@aquera/nile-elements 0.0.81 → 0.0.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -0
- package/demo/filenames.txt +1 -1
- package/demo/variables.css +54 -0
- package/demo/variables_v2.css +51 -0
- package/dist/{fixture-b1476eef.cjs.js → fixture-1a9fb5f1.cjs.js} +5 -5
- package/dist/fixture-1a9fb5f1.cjs.js.map +1 -0
- package/dist/{fixture-6f853cbd.esm.js → fixture-81e5a936.esm.js} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +854 -547
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/animate.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.css.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.css.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.css.esm.js +7 -8
- package/dist/nile-avatar/nile-avatar.test.cjs.js +2 -0
- package/dist/nile-avatar/nile-avatar.test.cjs.js.map +1 -0
- package/dist/nile-avatar/nile-avatar.test.esm.js +1 -0
- 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.css.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.css.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.css.esm.js +47 -47
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +2 -0
- package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -0
- package/dist/nile-badge/nile-badge.test.esm.js +1 -0
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.cjs.js.map +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.css.esm.js +3 -4
- 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 +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +2 -0
- package/dist/nile-button/nile-button.test.cjs.js.map +1 -0
- package/dist/nile-button/nile-button.test.esm.js +4 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js +2 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.cjs.js.map +1 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.test.esm.js +49 -0
- package/dist/nile-calendar/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +122 -191
- package/dist/nile-calendar/nile-calendar.esm.js +135 -135
- package/dist/nile-card/nile-card.test.cjs.js +2 -0
- package/dist/nile-card/nile-card.test.cjs.js.map +1 -0
- package/dist/nile-card/nile-card.test.esm.js +51 -0
- 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-date-picker/nile-date-picker.cjs.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
- package/dist/nile-date-picker/nile-date-picker.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.css.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.css.esm.js +4 -1
- package/dist/nile-dialog/nile-dialog.esm.js +5 -4
- 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 +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +2 -0
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -0
- package/dist/nile-drawer/nile-drawer.test.esm.js +18 -0
- 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 +2 -0
- package/dist/nile-error-message/nile-error-message.test.cjs.js.map +1 -0
- package/dist/nile-error-message/nile-error-message.test.esm.js +1 -0
- package/dist/nile-form-group/nile-form-group.test.cjs.js +2 -0
- package/dist/nile-form-group/nile-form-group.test.cjs.js.map +1 -0
- package/dist/nile-form-group/nile-form-group.test.esm.js +1 -0
- package/dist/nile-hero/nile-hero.test.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.test.esm.js +1 -1
- package/dist/nile-icon/icons/svg/alert.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/alert.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/alert.esm.js +1 -0
- package/dist/nile-icon/icons/svg/file-check-02.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/file-check-02.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/file-check-02.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/monitor-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/monitor-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/monitor-01.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 +2 -0
- package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -0
- package/dist/nile-icon/nile-icon.test.esm.js +1 -0
- 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 +2 -0
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -0
- package/dist/nile-input/nile-input.test.esm.js +17 -0
- package/dist/nile-link/nile-link.test.cjs.js +2 -0
- package/dist/nile-link/nile-link.test.cjs.js.map +1 -0
- package/dist/nile-link/nile-link.test.esm.js +1 -0
- package/dist/nile-list/index.cjs.js +2 -0
- package/dist/nile-list/index.cjs.js.map +1 -0
- package/dist/nile-list/index.esm.js +1 -0
- package/dist/nile-list/nile-list.cjs.js +2 -0
- package/dist/nile-list/nile-list.cjs.js.map +1 -0
- package/dist/nile-list/nile-list.css.cjs.js +2 -0
- package/dist/nile-list/nile-list.css.cjs.js.map +1 -0
- package/dist/nile-list/nile-list.css.esm.js +8 -0
- package/dist/nile-list/nile-list.esm.js +3 -0
- package/dist/nile-list-item/index.cjs.js +2 -0
- package/dist/nile-list-item/index.cjs.js.map +1 -0
- package/dist/nile-list-item/index.esm.js +1 -0
- package/dist/nile-list-item/nile-list-item.cjs.js +2 -0
- package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -0
- package/dist/nile-list-item/nile-list-item.css.cjs.js +2 -0
- package/dist/nile-list-item/nile-list-item.css.cjs.js.map +1 -0
- package/dist/nile-list-item/nile-list-item.css.esm.js +54 -0
- package/dist/nile-list-item/nile-list-item.esm.js +21 -0
- package/dist/nile-loader/nile-loader.test.cjs.js +2 -0
- package/dist/nile-loader/nile-loader.test.cjs.js.map +1 -0
- package/dist/nile-loader/nile-loader.test.esm.js +1 -0
- package/dist/nile-menu/nile-menu.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.css.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.css.esm.js +21 -7
- package/dist/nile-menu/nile-menu.esm.js +17 -15
- 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.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.css.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.css.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.css.esm.js +6 -4
- package/dist/nile-popover/nile-popover.esm.js +4 -7
- package/dist/nile-popover/nile-popover.test.cjs.js +2 -0
- package/dist/nile-popover/nile-popover.test.cjs.js.map +1 -0
- package/dist/nile-popover/nile-popover.test.esm.js +21 -0
- package/dist/nile-popup/nile-popup.css.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.css.cjs.js.map +1 -1
- package/dist/nile-popup/nile-popup.css.esm.js +8 -4
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js +2 -0
- package/dist/nile-progress-bar/nile-progress-bar.test.cjs.js.map +1 -0
- package/dist/nile-progress-bar/nile-progress-bar.test.esm.js +1 -0
- package/dist/nile-radio/nile-radio.test.cjs.js +2 -0
- package/dist/nile-radio/nile-radio.test.cjs.js.map +1 -0
- package/dist/nile-radio/nile-radio.test.esm.js +1 -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 +3 -3
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js +2 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.test.cjs.js.map +1 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.test.esm.js +1 -0
- 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.css.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.css.esm.js +2 -2
- package/dist/nile-tab-group/nile-tab-group.esm.js +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 +0 -4
- 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 +2 -0
- package/dist/nile-textarea/nile-textarea.test.cjs.js.map +1 -0
- package/dist/nile-textarea/nile-textarea.test.esm.js +1 -0
- 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 +2 -0
- package/dist/nile-tree/index.cjs.js.map +1 -0
- package/dist/nile-tree/index.esm.js +1 -0
- package/dist/nile-tree/nile-tree.cjs.js +2 -0
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -0
- package/dist/nile-tree/nile-tree.css.cjs.js +2 -0
- package/dist/nile-tree/nile-tree.css.cjs.js.map +1 -0
- package/dist/nile-tree/nile-tree.css.esm.js +36 -0
- package/dist/nile-tree/nile-tree.esm.js +13 -0
- package/dist/nile-tree-item/index.cjs.js +2 -0
- package/dist/nile-tree-item/index.cjs.js.map +1 -0
- package/dist/nile-tree-item/index.esm.js +1 -0
- package/dist/nile-tree-item/nile-tree-item.cjs.js +2 -0
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -0
- package/dist/nile-tree-item/nile-tree-item.css.cjs.js +2 -0
- package/dist/nile-tree-item/nile-tree-item.css.cjs.js.map +1 -0
- package/dist/nile-tree-item/nile-tree-item.css.esm.js +164 -0
- package/dist/nile-tree-item/nile-tree-item.esm.js +63 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +4 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.css.js +5 -6
- package/dist/src/nile-avatar/nile-avatar.css.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.test.d.ts +1 -0
- package/dist/src/nile-avatar/nile-avatar.test.js +58 -0
- package/dist/src/nile-avatar/nile-avatar.test.js.map +1 -0
- package/dist/src/nile-badge/nile-badge.css.js +45 -45
- package/dist/src/nile-badge/nile-badge.css.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.test.d.ts +1 -0
- package/dist/src/nile-badge/nile-badge.test.js +42 -0
- package/dist/src/nile-badge/nile-badge.test.js.map +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js +3 -4
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.test.d.ts +1 -0
- package/dist/src/nile-button/nile-button.test.js +86 -0
- package/dist/src/nile-button/nile-button.test.js.map +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.d.ts +2 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js +108 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.test.js.map +1 -0
- package/dist/src/nile-calendar/nile-calendar.css.js +122 -191
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +8 -0
- package/dist/src/nile-calendar/nile-calendar.js +164 -167
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-card/nile-card.test.d.ts +1 -0
- package/dist/src/nile-card/nile-card.test.js +69 -0
- package/dist/src/nile-card/nile-card.test.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.css.js +4 -1
- package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.js +4 -3
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/dist/src/nile-drawer/nile-drawer.test.d.ts +1 -0
- package/dist/src/nile-drawer/nile-drawer.test.js +88 -0
- package/dist/src/nile-drawer/nile-drawer.test.js.map +1 -0
- package/dist/src/nile-error-message/nile-error-message.test.d.ts +1 -0
- package/dist/src/nile-error-message/nile-error-message.test.js +61 -0
- package/dist/src/nile-error-message/nile-error-message.test.js.map +1 -0
- package/dist/src/nile-form-group/nile-form-group.test.d.ts +1 -0
- package/dist/src/nile-form-group/nile-form-group.test.js +55 -0
- package/dist/src/nile-form-group/nile-form-group.test.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/alert.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/alert.js +5 -0
- package/dist/src/nile-icon/icons/svg/alert.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/file-check-02.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/file-check-02.js +5 -0
- package/dist/src/nile-icon/icons/svg/file-check-02.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +3 -0
- package/dist/src/nile-icon/icons/svg/index.js +3 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/monitor-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/monitor-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/monitor-01.js.map +1 -0
- package/dist/src/nile-icon/nile-icon.test.d.ts +1 -0
- package/dist/src/nile-icon/nile-icon.test.js +45 -0
- package/dist/src/nile-icon/nile-icon.test.js.map +1 -0
- package/dist/src/nile-input/nile-input.test.d.ts +1 -0
- package/dist/src/nile-input/nile-input.test.js +139 -0
- package/dist/src/nile-input/nile-input.test.js.map +1 -0
- package/dist/src/nile-link/nile-link.test.d.ts +1 -0
- package/dist/src/nile-link/nile-link.test.js +72 -0
- package/dist/src/nile-link/nile-link.test.js.map +1 -0
- package/dist/src/nile-list/index.d.ts +1 -0
- package/dist/src/nile-list/index.js +2 -0
- package/dist/src/nile-list/index.js.map +1 -0
- package/dist/src/nile-list/nile-list.css.d.ts +12 -0
- package/dist/src/nile-list/nile-list.css.js +20 -0
- package/dist/src/nile-list/nile-list.css.js.map +1 -0
- package/dist/src/nile-list/nile-list.d.ts +33 -0
- package/dist/src/nile-list/nile-list.js +47 -0
- package/dist/src/nile-list/nile-list.js.map +1 -0
- package/dist/src/nile-list-item/index.d.ts +1 -0
- package/dist/src/nile-list-item/index.js +2 -0
- package/dist/src/nile-list-item/index.js.map +1 -0
- package/dist/src/nile-list-item/nile-list-item.css.d.ts +12 -0
- package/dist/src/nile-list-item/nile-list-item.css.js +66 -0
- package/dist/src/nile-list-item/nile-list-item.css.js.map +1 -0
- package/dist/src/nile-list-item/nile-list-item.d.ts +38 -0
- package/dist/src/nile-list-item/nile-list-item.js +96 -0
- package/dist/src/nile-list-item/nile-list-item.js.map +1 -0
- package/dist/src/nile-loader/nile-loader.test.d.ts +1 -0
- package/dist/src/nile-loader/nile-loader.test.js +39 -0
- package/dist/src/nile-loader/nile-loader.test.js.map +1 -0
- package/dist/src/nile-menu/nile-menu.css.js +19 -5
- package/dist/src/nile-menu/nile-menu.css.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.d.ts +1 -0
- package/dist/src/nile-menu/nile-menu.js +25 -14
- package/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.css.js +6 -4
- package/dist/src/nile-popover/nile-popover.css.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.d.ts +1 -0
- package/dist/src/nile-popover/nile-popover.js +7 -6
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.test.d.ts +1 -0
- package/dist/src/nile-popover/nile-popover.test.js +73 -0
- package/dist/src/nile-popover/nile-popover.test.js.map +1 -0
- package/dist/src/nile-popup/nile-popup.css.d.ts +5 -5
- package/dist/src/nile-popup/nile-popup.css.js +13 -9
- package/dist/src/nile-popup/nile-popup.css.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.test.d.ts +1 -0
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js +48 -0
- package/dist/src/nile-progress-bar/nile-progress-bar.test.js.map +1 -0
- package/dist/src/nile-radio/nile-radio.test.d.ts +1 -0
- package/dist/src/nile-radio/nile-radio.test.js +71 -0
- package/dist/src/nile-radio/nile-radio.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.d.ts +1 -0
- package/dist/src/nile-select/nile-select.js +5 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.d.ts +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js +54 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.test.js.map +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.css.js +2 -2
- package/dist/src/nile-tab-group/nile-tab-group.css.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.js +16 -15
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js +0 -4
- package/dist/src/nile-table-header-item/nile-table-header-item.css.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.test.d.ts +1 -0
- package/dist/src/nile-textarea/nile-textarea.test.js +87 -0
- package/dist/src/nile-textarea/nile-textarea.test.js.map +1 -0
- package/dist/src/nile-tree/index.d.ts +1 -0
- package/dist/src/nile-tree/index.js +2 -0
- package/dist/src/nile-tree/index.js.map +1 -0
- package/dist/src/nile-tree/nile-tree.css.d.ts +12 -0
- package/dist/src/nile-tree/nile-tree.css.js +48 -0
- package/dist/src/nile-tree/nile-tree.css.js.map +1 -0
- package/dist/src/nile-tree/nile-tree.d.ts +69 -0
- package/dist/src/nile-tree/nile-tree.js +376 -0
- package/dist/src/nile-tree/nile-tree.js.map +1 -0
- package/dist/src/nile-tree-item/index.d.ts +1 -0
- package/dist/src/nile-tree-item/index.js +2 -0
- package/dist/src/nile-tree-item/index.js.map +1 -0
- package/dist/src/nile-tree-item/nile-tree-item.css.d.ts +12 -0
- package/dist/src/nile-tree-item/nile-tree-item.css.js +176 -0
- package/dist/src/nile-tree-item/nile-tree-item.css.js.map +1 -0
- package/dist/src/nile-tree-item/nile-tree-item.d.ts +96 -0
- package/dist/src/nile-tree-item/nile-tree-item.js +324 -0
- package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +71 -2
- package/plopfile.js +11 -0
- package/src/index.ts +5 -1
- package/src/nile-avatar/nile-avatar.css.ts +5 -6
- package/src/nile-avatar/nile-avatar.test.ts +65 -0
- package/src/nile-badge/nile-badge.css.ts +45 -45
- package/src/nile-badge/nile-badge.test.ts +48 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.css.ts +3 -4
- package/src/nile-button/nile-button.test.ts +117 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.test.ts +130 -0
- package/src/nile-calendar/nile-calendar.css.ts +122 -191
- package/src/nile-calendar/nile-calendar.ts +170 -213
- package/src/nile-card/nile-card.test.ts +74 -0
- package/src/nile-date-picker/nile-date-picker.ts +5 -6
- package/src/nile-dialog/nile-dialog.css.ts +4 -1
- package/src/nile-dialog/nile-dialog.ts +4 -4
- package/src/nile-drawer/nile-drawer.test.ts +106 -0
- package/src/nile-error-message/nile-error-message.test.ts +69 -0
- package/src/nile-form-group/nile-form-group.test.ts +63 -0
- package/src/nile-icon/icons/svg/alert.ts +5 -0
- package/src/nile-icon/icons/svg/file-check-02.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +3 -0
- package/src/nile-icon/icons/svg/monitor-01.ts +5 -0
- package/src/nile-icon/nile-icon.test.ts +53 -0
- package/src/nile-input/nile-input.test.ts +160 -0
- package/src/nile-link/nile-link.test.ts +83 -0
- package/src/nile-list/index.ts +1 -0
- package/src/nile-list/nile-list.css.ts +22 -0
- package/src/nile-list/nile-list.ts +64 -0
- package/src/nile-list-item/index.ts +1 -0
- package/src/nile-list-item/nile-list-item.css.ts +68 -0
- package/src/nile-list-item/nile-list-item.ts +104 -0
- package/src/nile-loader/nile-loader.test.ts +45 -0
- package/src/nile-menu/nile-menu.css.ts +19 -5
- package/src/nile-menu/nile-menu.ts +27 -17
- package/src/nile-popover/nile-popover.css.ts +6 -4
- package/src/nile-popover/nile-popover.test.ts +86 -0
- package/src/nile-popover/nile-popover.ts +7 -10
- package/src/nile-popup/nile-popup.css.ts +14 -10
- package/src/nile-progress-bar/nile-progress-bar.test.ts +55 -0
- package/src/nile-radio/nile-radio.test.ts +81 -0
- package/src/nile-select/nile-select.ts +3 -1
- package/src/nile-slide-toggle/nile-slide-toggle.test.ts +61 -0
- package/src/nile-tab-group/nile-tab-group.css.ts +2 -2
- package/src/nile-tab-group/nile-tab-group.ts +2 -1
- package/src/nile-table-header-item/nile-table-header-item.css.ts +0 -4
- package/src/nile-textarea/nile-textarea.test.ts +102 -0
- package/src/nile-tree/index.ts +1 -0
- package/src/nile-tree/nile-tree.css.ts +50 -0
- package/src/nile-tree/nile-tree.ts +433 -0
- package/src/nile-tree-item/index.ts +1 -0
- package/src/nile-tree-item/nile-tree-item.css.ts +178 -0
- package/src/nile-tree-item/nile-tree-item.ts +330 -0
- package/dist/fixture-b1476eef.cjs.js.map +0 -1
@@ -1,2 +1,2 @@
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-b1476eef.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-empty-state.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","lit/directives/class-map.js","./nile-empty-state.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var t,e,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){t=_fixture004CjsJs.f;e=_fixture004CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileEmptyStateCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileEmptyStateCssCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileEmptyState",function(){it("renders correctly with default properties",/*#__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 t(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-empty-state></nile-empty-state>"]))));case 2:i=_context2.sent;e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be["false"],e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data");case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:i="action";_context3.next=3;return t(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-empty-state size=\"sm\" variant=\"flat\" icon="," grayscale text=\"Test state text\" sub-text=\"Test sub text\"></nile-empty-state>\n "])),i));case 3:a=_context3.sent;e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be["true"],e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text");case 5:case"end":return _context3.stop();}},_callee2);}))),it("should render different sizes correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,_i2,_i,a,_i3;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:i=["sm","md","lg"];_i2=0,_i=i;case 2:if(!(_i2<_i.length)){_context4.next=11;break;}a=_i[_i2];_context4.next=6;return t(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-empty-state size=\"","\"></nile-empty-state>"])),a));case 6:_i3=_context4.sent.shadowRoot.querySelector(".empty-state");e(_i3.classList.contains("empty-state--".concat(a))).to.be["true"];case 8:_i2++;_context4.next=2;break;case 11:case"end":return _context4.stop();}},_callee3);}))),it("should render different variants correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i,_i5,_i4,a,_i6;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:i=["flat","content","tonal"];_i5=0,_i4=i;case 2:if(!(_i5<_i4.length)){_context5.next=11;break;}a=_i4[_i5];_context5.next=6;return t(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-empty-state variant=\"","\"></nile-empty-state>"])),a));case 6:_i6=_context5.sent.shadowRoot.querySelector(".empty-state__body--".concat(a));e(_i6).to.exist;case 8:_i5++;_context5.next=2;break;case 11:case"end":return _context5.stop();}},_callee4);}))),it("should render text properties correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,a,o,r,n;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i="Custom Text";a="Custom SubText";_context6.next=4;return t(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-empty-state text="," sub-text=","></nile-empty-state>\n "])),i,a));case 4:o=_context6.sent;r=o.shadowRoot.querySelector(".empty-state__text");n=o.shadowRoot.querySelector(".empty-state__subtext");e(r.textContent).to.equal(i),e(n.textContent).to.equal(a);case 8:case"end":return _context6.stop();}},_callee5);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-empty-state>\n <div class=\"slot-content\">Slot Content</div>\n </nile-empty-state>\n "]))));case 2:i=_context7.sent.querySelector(".slot-content");e(i).to.exist,e(i.textContent).to.equal("Slot Content");case 4:case"end":return _context7.stop();}},_callee6);})));});}};});
|
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-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-empty-state.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","lit/directives/class-map.js","./nile-empty-state.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var t,e,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){t=_fixture004CjsJs.f;e=_fixture004CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileEmptyStateCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileEmptyStateCssCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileEmptyState",function(){it("renders correctly with default properties",/*#__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 t(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-empty-state></nile-empty-state>"]))));case 2:i=_context2.sent;e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be["false"],e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data");case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:i="action";_context3.next=3;return t(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-empty-state size=\"sm\" variant=\"flat\" icon="," grayscale text=\"Test state text\" sub-text=\"Test sub text\"></nile-empty-state>\n "])),i));case 3:a=_context3.sent;e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be["true"],e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text");case 5:case"end":return _context3.stop();}},_callee2);}))),it("should render different sizes correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,_i2,_i,a,_i3;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:i=["sm","md","lg"];_i2=0,_i=i;case 2:if(!(_i2<_i.length)){_context4.next=11;break;}a=_i[_i2];_context4.next=6;return t(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-empty-state size=\"","\"></nile-empty-state>"])),a));case 6:_i3=_context4.sent.shadowRoot.querySelector(".empty-state");e(_i3.classList.contains("empty-state--".concat(a))).to.be["true"];case 8:_i2++;_context4.next=2;break;case 11:case"end":return _context4.stop();}},_callee3);}))),it("should render different variants correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i,_i5,_i4,a,_i6;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:i=["flat","content","tonal"];_i5=0,_i4=i;case 2:if(!(_i5<_i4.length)){_context5.next=11;break;}a=_i4[_i5];_context5.next=6;return t(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-empty-state variant=\"","\"></nile-empty-state>"])),a));case 6:_i6=_context5.sent.shadowRoot.querySelector(".empty-state__body--".concat(a));e(_i6).to.exist;case 8:_i5++;_context5.next=2;break;case 11:case"end":return _context5.stop();}},_callee4);}))),it("should render text properties correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,a,o,r,n;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i="Custom Text";a="Custom SubText";_context6.next=4;return t(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-empty-state text="," sub-text=","></nile-empty-state>\n "])),i,a));case 4:o=_context6.sent;r=o.shadowRoot.querySelector(".empty-state__text");n=o.shadowRoot.querySelector(".empty-state__subtext");e(r.textContent).to.equal(i),e(n.textContent).to.equal(a);case 8:case"end":return _context6.stop();}},_callee5);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-empty-state>\n <div class=\"slot-content\">Slot Content</div>\n </nile-empty-state>\n "]))));case 2:i=_context7.sent.querySelector(".slot-content");e(i).to.exist,e(i.textContent).to.equal("Slot Content");case 4:case"end":return _context7.stop();}},_callee6);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-empty-state.test.cjs.js.map
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{f as t,a as e}from"../fixture-
|
1
|
+
import{f as t,a as e}from"../fixture-81e5a936.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-empty-state.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-empty-state.css.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileEmptyState",(()=>{it("renders correctly with default properties",(async()=>{const i=await t(s`<nile-empty-state></nile-empty-state>`);e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be.false,e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data")})),it("should reflect properties to attributes",(async()=>{const i="action",a=await t(s`
|
2
2
|
<nile-empty-state size="sm" variant="flat" icon=${i} grayscale text="Test state text" sub-text="Test sub text"></nile-empty-state>
|
3
3
|
`);e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be.true,e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text")})),it("should render different sizes correctly",(async()=>{const i=["sm","md","lg"];for(const a of i){const i=(await t(s`<nile-empty-state size="${a}"></nile-empty-state>`)).shadowRoot.querySelector(".empty-state");e(i.classList.contains(`empty-state--${a}`)).to.be.true}})),it("should render different variants correctly",(async()=>{const i=["flat","content","tonal"];for(const a of i){const i=(await t(s`<nile-empty-state variant="${a}"></nile-empty-state>`)).shadowRoot.querySelector(`.empty-state__body--${a}`);e(i).to.exist}})),it("should render text properties correctly",(async()=>{const i="Custom Text",a="Custom SubText",o=await t(s`
|
4
4
|
<nile-empty-state text=${i} sub-text=${a}></nile-empty-state>
|
@@ -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(["../fixture-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-error-message.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-error-message.css.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,r,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;r=_fixture004CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileErrorMessageCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileErrorMessageCssCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileErrorMessage",function(){it("should render the error message",/*#__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 e(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context2.sent.shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred");case 4:case"end":return _context2.stop();}},_callee);}))),it("should truncate the error response if it is too long",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var o,t;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:o="a".repeat(150);_context3.next=3;return e(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context3.sent.getTruncatedResponse();r(t).to.equal("".concat(o.substring(0,100),"..."));case 5:case"end":return _context3.stop();}},_callee2);}))),it("should not truncate the error response if it is within the maximum length",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var o,t;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:o="Short error message";_context4.next=3;return e(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"","\"></nile-error-message>"])),o));case 3:t=_context4.sent.getTruncatedResponse();r(t).to.equal(o);case 5:case"end":return _context4.stop();}},_callee3);}))),it("should toggle the expanded state when the button is clicked",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var _o$shadowRoot$querySe;var o,t;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return e(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context5.sent;t=(_o$shadowRoot$querySe=o.shadowRoot.querySelector(".nile-error-message__more-button"))!==null&&_o$shadowRoot$querySe!==void 0?_o$shadowRoot$querySe:{};t.click(),r(o.isExpanded).to.be["true"],t.click(),r(o.isExpanded).to.be["false"];case 5:case"end":return _context5.stop();}},_callee4);}))),it('should display the "View More" button if there is extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return e(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context6.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist;case 4:case"end":return _context6.stop();}},_callee5);}))),it('should not display the "View More" button if there is no extended error information',/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var o;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return e(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\"></nile-error-message>"]))));case 2:o=_context7.sent.shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist;case 4:case"end":return _context7.stop();}},_callee6);}))),it("should show the extended error information when expanded",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var o,t;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return e(s(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context8.sent;o.isExpanded=!0;_context8.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t===null||t===void 0?void 0:t.textContent).to.include("Detailed error information");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should hide the extended error information when collapsed",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var o,t;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return e(s(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>"]))));case 2:o=_context9.sent;o.isExpanded=!1;_context9.next=6;return o.updateComplete;case 6:t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have["class"]("collapsed");case 8:case"end":return _context9.stop();}},_callee8);}))),it("should render icon and error message parts",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){var o,t,i;return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return e(s(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>"]))));case 2:o=_context10.sent;t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;i=o.shadowRoot.querySelector(".nile-error-message__error");r(i).to.exist;case 7:case"end":return _context10.stop();}},_callee9);})));});}};});
|
2
|
+
//# sourceMappingURL=nile-error-message.test.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-error-message.test.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.test.ts"],"sourcesContent":["import { html, fixture, expect, oneEvent } from '@open-wc/testing';\nimport './nile-error-message';\nimport { NileErrorMessage } from './nile-error-message';\ndescribe('NileErrorMessage', () => {\n it('should render the error message', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>`);\n const errorMessage = el.shadowRoot!.querySelector('.nile-error-message__error');\n expect(errorMessage!.textContent).to.equal('An error occurred');\n });\n\n it('should truncate the error response if it is too long', async () => {\n const longErrorResponse = 'a'.repeat(150);\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"${longErrorResponse}\"></nile-error-message>`);\n const truncatedResponse = el.getTruncatedResponse();\n expect(truncatedResponse).to.equal(`${longErrorResponse.substring(0, 100)}...`);\n });\n\n it('should not truncate the error response if it is within the maximum length', async () => {\n const shortErrorResponse = 'Short error message';\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"${shortErrorResponse}\"></nile-error-message>`);\n const truncatedResponse = el.getTruncatedResponse();\n expect(truncatedResponse).to.equal(shortErrorResponse);\n });\n\n it('should toggle the expanded state when the button is clicked', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n const button :HTMLButtonElement = el.shadowRoot!.querySelector('.nile-error-message__more-button') ??{} as HTMLButtonElement;\n button.click();\n expect(el.isExpanded).to.be.true;\n button.click();\n expect(el.isExpanded).to.be.false;\n });\n\n it('should display the \"View More\" button if there is extended error information', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n const button = el.shadowRoot!.querySelector('.nile-error-message__more-button');\n expect(button).to.exist;\n });\n\n it('should not display the \"View More\" button if there is no extended error information', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\"></nile-error-message>`);\n const button = el.shadowRoot!.querySelector('.nile-error-message__more-button');\n expect(button).to.not.exist;\n });\n\n it('should show the extended error information when expanded', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n el.isExpanded = true;\n await el.updateComplete;\n const expandedResponse = el.shadowRoot!.querySelector('.nile-error-message__response-expanded');\n expect(expandedResponse?.textContent).to.include('Detailed error information');\n });\n\n it('should hide the extended error information when collapsed', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorResponse=\"Short error message\" errorResponseLong=\"Detailed error information\"></nile-error-message>`);\n el.isExpanded = false;\n await el.updateComplete;\n const expandedResponse = el.shadowRoot!.querySelector('.nile-error-message__response-expanded');\n expect(expandedResponse).to.have.class('collapsed');\n });\n\n it('should render icon and error message parts', async () => {\n const el = await fixture<NileErrorMessage>(html`<nile-error-message errorMessage=\"An error occurred\"></nile-error-message>`);\n const icon = el.shadowRoot!.querySelector('nile-icon');\n expect(icon).to.exist;\n const errorMessage = el.shadowRoot!.querySelector('.nile-error-message__error');\n expect(errorMessage).to.exist;\n });\n});"],"names":["describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","shadowRoot","errorMessage","querySelector","expect","textContent","to","equal","_context2","stop","_callee","longErrorResponse","repeat","_context3","next","_templateObject2","truncatedResponse","getTruncatedResponse","concat","substring","_callee2","shortErrorResponse","_templateObject3","_context4","_callee3","_templateObject4","el","button","click","isExpanded","be","false","_context5","_callee4","_templateObject5","exist","_context6","_callee5","_templateObject6","not","_context7","_callee6","_templateObject7","updateComplete","expandedResponse","include","_context8","_callee7","_templateObject8","have","class","_context9","_callee8","_templateObject9","icon","_context10","_callee9"],"mappings":"mhTAGAA,QAAAA,CAAS,kBAAoB,CAAA,UAAA,CAC3BC,EAAG,CAAA,iCAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAAmCC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,SAAAA,SAAAA,iBAAAA,SAAAA,CAAAA,IAAAA,CAAAA,SAAAA,CAAAA,IAAAA,SAAAA,SAAAA,CAAAA,IAAAA,SACnBC,CAAAA,CAA0BC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,oFACvBC,CAAAA,QAAlBC,CAAAA,CAAAA,SAAAA,CA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,mBAAAA,GAAAA,IAAAA,CAAAA,SAAAA,SAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,IAAAA,UAAAA,UAAAA,UAAAA,iBAAAA,UAAAA,CAAAA,IAAAA,CAAAA,UAAAA,CAAAA,IAAAA,SAAAA,UAAAA,CAAAA,IAAAA,SAC9BC,CAAAA,CAA0BC,CAAAA,CAAI,CAAAuD,gBAAA,GAAAA,gBAAA,CAAArD,sBAAA,6FAAzC0B,CAAAA,CAAAA,UAAAA,CAAAA,IAAAA,CACA4B,CAAO5B,CAAAA,CAAAA,CAAGzB,UAAYE,CAAAA,aAAAA,CAAc,WAC1CC,CAAAA,CAAAA,CAAAA,CAAOkD,GAAMhD,EAAG6B,CAAAA,KAAAA,CACVjC,CAAAA,CAAewB,CAAGzB,CAAAA,UAAAA,CAAYE,aAAc,CAAA,4BAAA,CAAA,CAClDC,CAAOF,CAAAA,CAAAA,CAAAA,CAAcI,EAAG6B,CAAAA,KAAK,yBAAAoB,UAAA,CAAA9C,IAAA,MAAA+C,QAAA,GAC7B,EAAA,CAAA,EAAA,CAAA,CAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{f as e,a as r}from"../fixture-81e5a936.esm.js";import{html as s}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-error-message.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-error-message.css.esm.js";import"../property-09139d3c.esm.js";describe("NileErrorMessage",(()=>{it("should render the error message",(async()=>{const o=(await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__error");r(o.textContent).to.equal("An error occurred")})),it("should truncate the error response if it is too long",(async()=>{const o="a".repeat(150),t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(`${o.substring(0,100)}...`)})),it("should not truncate the error response if it is within the maximum length",(async()=>{const o="Short error message",t=(await e(s`<nile-error-message errorResponse="${o}"></nile-error-message>`)).getTruncatedResponse();r(t).to.equal(o)})),it("should toggle the expanded state when the button is clicked",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`),t=o.shadowRoot.querySelector(".nile-error-message__more-button")??{};t.click(),r(o.isExpanded).to.be.true,t.click(),r(o.isExpanded).to.be.false})),it('should display the "View More" button if there is extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.exist})),it('should not display the "View More" button if there is no extended error information',(async()=>{const o=(await e(s`<nile-error-message errorResponse="Short error message"></nile-error-message>`)).shadowRoot.querySelector(".nile-error-message__more-button");r(o).to.not.exist})),it("should show the extended error information when expanded",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!0,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t?.textContent).to.include("Detailed error information")})),it("should hide the extended error information when collapsed",(async()=>{const o=await e(s`<nile-error-message errorResponse="Short error message" errorResponseLong="Detailed error information"></nile-error-message>`);o.isExpanded=!1,await o.updateComplete;const t=o.shadowRoot.querySelector(".nile-error-message__response-expanded");r(t).to.have.class("collapsed")})),it("should render icon and error message parts",(async()=>{const o=await e(s`<nile-error-message errorMessage="An error occurred"></nile-error-message>`),t=o.shadowRoot.querySelector("nile-icon");r(t).to.exist;const i=o.shadowRoot.querySelector(".nile-error-message__error");r(i).to.exist}))}));
|
@@ -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(["../fixture-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-form-group.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-form-group.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var t,e,i,_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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){t=_fixture004CjsJs.f;e=_fixture004CjsJs.a;},function(_litStaticHtmlJs){i=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileFormGroupCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileFormGroupCssCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileFormGroup",function(){it("should have default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var l;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context2.sent;e(l.title).to.equal(""),e(l.subtitle).to.equal("");case 4:case"end":return _context2.stop();}},_callee);}))),it("should render title when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _l$textContent;var l;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return t(i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\"></nile-form-group>"]))));case 2:l=_context3.sent.shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent=l.textContent)===null||_l$textContent===void 0?void 0:_l$textContent.trim()).to.equal("Test Title");case 4:case"end":return _context3.stop();}},_callee2);}))),it("should render subtitle when set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _l$textContent2;var l;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return t(i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context4.sent.shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l===null||l===void 0||(_l$textContent2=l.textContent)===null||_l$textContent2===void 0?void 0:_l$textContent2.trim()).to.equal("Test Subtitle");case 4:case"end":return _context4.stop();}},_callee3);}))),it("should not render title and subtitle if not set",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var l,o,s;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_context5.next=2;return t(i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-form-group></nile-form-group>"]))));case 2:l=_context5.sent;o=l.shadowRoot.querySelector('slot[name="title"]');s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist;case 6:case"end":return _context5.stop();}},_callee4);}))),it("should render content inside the form body slot",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var _l$assignedNodes;var l,o;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:_context6.next=2;return t(i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<nile-form-group><p>Form Content</p></nile-form-group>"]))));case 2:l=_context6.sent.shadowRoot.querySelector(".form__body slot");o=(_l$assignedNodes=l===null||l===void 0?void 0:l.assignedNodes())!==null&&_l$assignedNodes!==void 0?_l$assignedNodes:[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content");case 5:case"end":return _context6.stop();}},_callee5);}))),it("should reflect title and subtitle attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var l;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>"]))));case 2:l=_context7.sent;e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle");case 4:case"end":return _context7.stop();}},_callee6);}))),it("should update the title dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){var _l$shadowRoot$querySe;var l,o;return _regeneratorRuntime().wrap(function _callee7$(_context8){while(1)switch(_context8.prev=_context8.next){case 0:_context8.next=2;return t(i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-group title=\"Initial Title\"></nile-form-group>"]))));case 2:l=_context8.sent;l.title="Updated Title";_context8.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe=l.shadowRoot.querySelector('slot[name="title"]'))!==null&&_l$shadowRoot$querySe!==void 0?_l$shadowRoot$querySe:{};e(o.textContent.trim()).to.equal("Updated Title");case 8:case"end":return _context8.stop();}},_callee7);}))),it("should update the subtitle dynamically",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){var _l$shadowRoot$querySe2;var l,o;return _regeneratorRuntime().wrap(function _callee8$(_context9){while(1)switch(_context9.prev=_context9.next){case 0:_context9.next=2;return t(i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>"]))));case 2:l=_context9.sent;l.subtitle="Updated Subtitle";_context9.next=6;return l.updateComplete;case 6:o=(_l$shadowRoot$querySe2=l.shadowRoot.querySelector('slot[name="subtitle"]'))!==null&&_l$shadowRoot$querySe2!==void 0?_l$shadowRoot$querySe2:{};e(o.textContent.trim()).to.equal("Updated Subtitle");case 8:case"end":return _context9.stop();}},_callee8);})));});}};});
|
2
|
+
//# sourceMappingURL=nile-form-group.test.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"nile-form-group.test.cjs.js","sources":["../../../src/nile-form-group/nile-form-group.test.ts"],"sourcesContent":["import { fixture, html, expect } from '@open-wc/testing';\nimport './nile-form-group'; // Make sure to import the component to be tested\nimport NileFormGroup from './nile-form-group';\n\ndescribe('NileFormGroup', () => {\n it('should have default properties', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group></nile-form-group>`);\n expect(el.title).to.equal('');\n expect(el.subtitle).to.equal('');\n });\n\n it('should render title when set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\"></nile-form-group>`);\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]');\n expect(titleSlot).to.exist;\n expect(titleSlot?.textContent?.trim()).to.equal('Test Title');\n });\n\n it('should render subtitle when set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>`);\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]');\n expect(subtitleSlot).to.exist;\n expect(subtitleSlot?.textContent?.trim()).to.equal('Test Subtitle');\n });\n\n it('should not render title and subtitle if not set', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group></nile-form-group>`);\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]');\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]');\n expect(titleSlot).to.not.exist;\n expect(subtitleSlot).to.not.exist;\n });\n\n it('should render content inside the form body slot', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group><p>Form Content</p></nile-form-group>`);\n const bodySlot = el.shadowRoot!.querySelector<HTMLSlotElement>('.form__body slot');\n const assignedNodes = bodySlot?.assignedNodes() ?? [] as any;\n expect(assignedNodes.length).to.equal(1);\n expect(assignedNodes[0].textContent.trim()).to.equal('Form Content');\n });\n\n it('should reflect title and subtitle attributes', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Test Subtitle\"></nile-form-group>`);\n expect(el.getAttribute('title')).to.equal('Test Title');\n expect(el.getAttribute('subtitle')).to.equal('Test Subtitle');\n });\n\n it('should update the title dynamically', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Initial Title\"></nile-form-group>`);\n el.title = 'Updated Title';\n await el.updateComplete;\n const titleSlot = el.shadowRoot!.querySelector('slot[name=\"title\"]')?? {} as any;\n expect(titleSlot.textContent.trim()).to.equal('Updated Title');\n });\n\n it('should update the subtitle dynamically', async () => {\n const el = await fixture<NileFormGroup>(html`<nile-form-group title=\"Test Title\" subtitle=\"Initial Subtitle\"></nile-form-group>`);\n el.subtitle = 'Updated Subtitle';\n await el.updateComplete;\n const subtitleSlot = el.shadowRoot!.querySelector('slot[name=\"subtitle\"]') ?? {} as any;\n expect(subtitleSlot.textContent.trim()).to.equal('Updated Subtitle');\n });\n});\n"],"names":["describe","it","async","fixture","html","_templateObject","_taggedTemplateLiteral","el","expect","title","to","equal","subtitle","_context2","stop","_callee","_templateObject2","titleSlot","shadowRoot","querySelector","exist","textContent","trim","_context3","_callee2","_templateObject3","subtitleSlot","_context4","_callee3","_templateObject4","not","_context5","_callee4","_templateObject5","bodySlot","assignedNodes","_l$assignedNodes","length","_context6","_callee5","_templateObject6","getAttribute","_context7","_callee6","_asyncToGenerator","_regeneratorRuntime","mark","_templateObject7","updateComplete","_l$shadowRoot$querySe","_context8","_callee7","_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../fixture-81e5a936.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"./nile-form-group.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-form-group.css.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileFormGroup",(()=>{it("should have default properties",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`);e(l.title).to.equal(""),e(l.subtitle).to.equal("")})),it("should render title when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title"></nile-form-group>`)).shadowRoot.querySelector('slot[name="title"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Title")})),it("should render subtitle when set",(async()=>{const l=(await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`)).shadowRoot.querySelector('slot[name="subtitle"]');e(l).to.exist,e(l?.textContent?.trim()).to.equal("Test Subtitle")})),it("should not render title and subtitle if not set",(async()=>{const l=await t(i`<nile-form-group></nile-form-group>`),o=l.shadowRoot.querySelector('slot[name="title"]'),s=l.shadowRoot.querySelector('slot[name="subtitle"]');e(o).to.not.exist,e(s).to.not.exist})),it("should render content inside the form body slot",(async()=>{const l=(await t(i`<nile-form-group><p>Form Content</p></nile-form-group>`)).shadowRoot.querySelector(".form__body slot"),o=l?.assignedNodes()??[];e(o.length).to.equal(1),e(o[0].textContent.trim()).to.equal("Form Content")})),it("should reflect title and subtitle attributes",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Test Subtitle"></nile-form-group>`);e(l.getAttribute("title")).to.equal("Test Title"),e(l.getAttribute("subtitle")).to.equal("Test Subtitle")})),it("should update the title dynamically",(async()=>{const l=await t(i`<nile-form-group title="Initial Title"></nile-form-group>`);l.title="Updated Title",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="title"]')??{};e(o.textContent.trim()).to.equal("Updated Title")})),it("should update the subtitle dynamically",(async()=>{const l=await t(i`<nile-form-group title="Test Title" subtitle="Initial Subtitle"></nile-form-group>`);l.subtitle="Updated Subtitle",await l.updateComplete;const o=l.shadowRoot.querySelector('slot[name="subtitle"]')??{};e(o.textContent.trim()).to.equal("Updated Subtitle")}))}));
|
@@ -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-b1476eef.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;i=_fixture004CjsJs.a;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:s=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(s===null||s===void 0?void 0:s.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:s=r.querySelector("nile-page-header");i(s).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
|
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-1a9fb5f1.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;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(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;i=_fixture004CjsJs.a;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:s=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(s===null||s===void 0?void 0:s.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:s=r.querySelector("nile-page-header");i(s).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
|
2
2
|
//# sourceMappingURL=nile-hero.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-81e5a936.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-hero.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-hero.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directives/class-map.js";import"../property-09139d3c.esm.js";describe("NileHero",(()=>{it("renders correctly with default properties",(async()=>{const r=await e(t`
|
2
2
|
<nile-hero icon="error" hero-text="Test Hero">
|
3
3
|
<nile-page-header
|
4
4
|
heading="I am heading"
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register([],function(_export,_context){"use strict";var I;return{setters:[],execute:function execute(){_export("a",I="PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTIgOFYxMk0xMiAxNkgxMi4wMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+");}};});
|
2
|
+
//# sourceMappingURL=alert.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"alert.cjs.js","sources":["../../../../../src/nile-icon/icons/svg/alert.ts"],"sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTIgOFYxMk0xMiAxNkgxMi4wMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+\";"],"names":["alert"],"mappings":"0HAIAA,EAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
var I="PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTIgOFYxMk0xMiAxNkgxMi4wMSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+";export{I as a};
|
@@ -0,0 +1,2 @@
|
|
1
|
+
System.register([],function(_export,_context){"use strict";var M;return{setters:[],execute:function execute(){_export("f",M="PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMjAgMTIuNVY2LjhDMjAgNS4xMTk4NCAyMCA0LjI3OTc2IDE5LjY3MyAzLjYzODAzQzE5LjM4NTQgMy4wNzM1NCAxOC45MjY1IDIuNjE0NiAxOC4zNjIgMi4zMjY5OEMxNy43MjAyIDIgMTYuODgwMiAyIDE1LjIgMkg4LjhDNy4xMTk4NCAyIDYuMjc5NzYgMiA1LjYzODAzIDIuMzI2OThDNS4wNzM1NCAyLjYxNDYgNC42MTQ2IDMuMDczNTQgNC4zMjY5OCAzLjYzODAzQzQgNC4yNzk3NiA0IDUuMTE5ODQgNCA2LjhWMTcuMkM0IDE4Ljg4MDIgNCAxOS43MjAyIDQuMzI2OTggMjAuMzYyQzQuNjE0NiAyMC45MjY1IDUuMDczNTQgMjEuMzg1NCA1LjYzODAzIDIxLjY3M0M2LjI3OTc2IDIyIDcuMTE5ODQgMjIgOC44IDIySDEyTTE0IDExSDhNMTAgMTVIOE0xNiA3SDhNMTQuNSAxOUwxNi41IDIxTDIxIDE2LjUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==");}};});
|
2
|
+
//# sourceMappingURL=file-check-02.cjs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file-check-02.cjs.js","sources":["../../../../../src/nile-icon/icons/svg/file-check-02.ts"],"sourcesContent":["/**\n * Do not edit directly\n */\n\nexport default \"PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMjAgMTIuNVY2LjhDMjAgNS4xMTk4NCAyMCA0LjI3OTc2IDE5LjY3MyAzLjYzODAzQzE5LjM4NTQgMy4wNzM1NCAxOC45MjY1IDIuNjE0NiAxOC4zNjIgMi4zMjY5OEMxNy43MjAyIDIgMTYuODgwMiAyIDE1LjIgMkg4LjhDNy4xMTk4NCAyIDYuMjc5NzYgMiA1LjYzODAzIDIuMzI2OThDNS4wNzM1NCAyLjYxNDYgNC42MTQ2IDMuMDczNTQgNC4zMjY5OCAzLjYzODAzQzQgNC4yNzk3NiA0IDUuMTE5ODQgNCA2LjhWMTcuMkM0IDE4Ljg4MDIgNCAxOS43MjAyIDQuMzI2OTggMjAuMzYyQzQuNjE0NiAyMC45MjY1IDUuMDczNTQgMjEuMzg1NCA1LjYzODAzIDIxLjY3M0M2LjI3OTc2IDIyIDcuMTE5ODQgMjIgOC44IDIySDEyTTE0IDExSDhNMTAgMTVIOE0xNiA3SDhNMTQuNSAxOUwxNi41IDIxTDIxIDE2LjUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==\";"],"names":["fileCheck02"],"mappings":"0HAIAA,EAAe"}
|
@@ -0,0 +1 @@
|
|
1
|
+
var M="PHN2ZyB3aWR0aD0iM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