@aquera/nile-elements 0.0.119 → 0.0.121
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 +11 -0
- package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
- package/dist/nile-accordion/nile-accordion.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +15 -6
- package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +24 -28
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.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 +4 -1
- package/dist/nile-calendar/nile-calendar.esm.js +10 -3
- package/dist/nile-calendar/nile-calendar.test.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.test.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.test.esm.js +5 -5
- package/dist/nile-card/nile-card.cjs.js +1 -1
- package/dist/nile-card/nile-card.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +6 -2
- package/dist/nile-chip/nile-chip.test.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
- 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 +17 -6
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +1 -1
- package/dist/nile-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-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.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/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.cjs.js +1 -1
- package/dist/nile-link/nile-link.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.esm.js +1 -1
- package/dist/nile-list/nile-list.cjs.js +1 -1
- package/dist/nile-list/nile-list.cjs.js.map +1 -1
- package/dist/nile-list/nile-list.esm.js +1 -1
- package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
- package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
- package/dist/nile-list-item/nile-list-item.esm.js +1 -1
- 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.esm.js +5 -2
- 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/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.esm.js +2 -2
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
- package/dist/nile-popup/nile-popup.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js +2 -0
- package/dist/nile-radio-group/nile-radio-group.test.cjs.js.map +1 -0
- package/dist/nile-radio-group/nile-radio-group.test.esm.js +57 -0
- 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 +6 -4
- package/dist/nile-select/nile-select.test.cjs.js +2 -0
- package/dist/nile-select/nile-select.test.cjs.js.map +1 -0
- package/dist/nile-select/nile-select.test.esm.js +55 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +3 -3
- package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
- package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
- package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
- package/dist/nile-split-panel/nile-split-panel.test.cjs.js +2 -0
- package/dist/nile-split-panel/nile-split-panel.test.cjs.js.map +1 -0
- package/dist/nile-split-panel/nile-split-panel.test.esm.js +1 -0
- package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.esm.js +1 -1
- package/dist/nile-stepper/nile-stepper.test.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.test.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.test.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/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +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.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.test.cjs.js.map +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-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree/nile-tree.test.cjs.js +2 -0
- package/dist/nile-tree/nile-tree.test.cjs.js.map +1 -0
- package/dist/nile-tree/nile-tree.test.esm.js +1 -0
- package/dist/src/nile-accordion/nile-accordion.d.ts +1 -0
- package/dist/src/nile-accordion/nile-accordion.js +1 -0
- package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +1 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.js +12 -2
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.d.ts +1 -0
- package/dist/src/nile-avatar/nile-avatar.js +1 -0
- package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.d.ts +1 -0
- package/dist/src/nile-badge/nile-badge.js +1 -0
- package/dist/src/nile-badge/nile-badge.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +1 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js +5 -0
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +1 -0
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +24 -28
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.d.ts +1 -0
- package/dist/src/nile-button/nile-button.js +1 -0
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.js +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +4 -1
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +5 -3
- package/dist/src/nile-calendar/nile-calendar.js +43 -23
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.test.d.ts +6 -0
- package/dist/src/nile-calendar/nile-calendar.test.js +6 -0
- package/dist/src/nile-calendar/nile-calendar.test.js.map +1 -1
- package/dist/src/nile-card/nile-card.d.ts +1 -0
- package/dist/src/nile-card/nile-card.js +1 -0
- package/dist/src/nile-card/nile-card.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +1 -0
- package/dist/src/nile-checkbox/nile-checkbox.js +1 -0
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.d.ts +1 -0
- package/dist/src/nile-chip/nile-chip.js +5 -0
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.test.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
- package/dist/src/nile-content-editor/nile-content-editor.js +1 -0
- package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +3 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +24 -5
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.d.ts +1 -0
- package/dist/src/nile-dialog/nile-dialog.js +1 -0
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/dist/src/nile-drawer/nile-drawer.d.ts +1 -0
- package/dist/src/nile-drawer/nile-drawer.js +1 -0
- package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.js +1 -0
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.js +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-input/nile-input.d.ts +1 -0
- package/dist/src/nile-input/nile-input.js +1 -0
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-input/nile-input.test.js +5 -1
- package/dist/src/nile-input/nile-input.test.js.map +1 -1
- package/dist/src/nile-link/nile-link.d.ts +1 -0
- package/dist/src/nile-link/nile-link.js +1 -0
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-list/nile-list.d.ts +1 -0
- package/dist/src/nile-list/nile-list.js +5 -0
- package/dist/src/nile-list/nile-list.js.map +1 -1
- package/dist/src/nile-list-item/nile-list-item.d.ts +1 -0
- package/dist/src/nile-list-item/nile-list-item.js +1 -0
- package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.d.ts +1 -0
- package/dist/src/nile-menu/nile-menu.js +4 -0
- package/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.d.ts +2 -0
- package/dist/src/nile-menu-item/nile-menu-item.js +2 -0
- package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/dist/src/nile-option/nile-option.d.ts +2 -0
- package/dist/src/nile-option/nile-option.js +2 -0
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.d.ts +2 -0
- package/dist/src/nile-popover/nile-popover.js +6 -1
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.d.ts +2 -0
- package/dist/src/nile-popup/nile-popup.js +2 -0
- package/dist/src/nile-popup/nile-popup.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.d.ts +1 -0
- package/dist/src/nile-radio-group/nile-radio-group.js +1 -0
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.test.d.ts +2 -0
- package/dist/src/nile-radio-group/nile-radio-group.test.js +174 -0
- package/dist/src/nile-radio-group/nile-radio-group.test.js.map +1 -0
- package/dist/src/nile-select/nile-select.d.ts +1 -0
- package/dist/src/nile-select/nile-select.js +6 -37
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.test.d.ts +6 -0
- package/dist/src/nile-select/nile-select.test.js +247 -0
- package/dist/src/nile-select/nile-select.test.js.map +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +3 -2
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-split-panel/nile-split-panel.d.ts +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.js +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
- package/dist/src/nile-split-panel/nile-split-panel.test.d.ts +1 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js +4 -0
- package/dist/src/nile-split-panel/nile-split-panel.test.js.map +1 -0
- package/dist/src/nile-stepper/nile-stepper.d.ts +1 -0
- package/dist/src/nile-stepper/nile-stepper.js +1 -0
- package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
- package/dist/src/nile-stepper/nile-stepper.test.d.ts +4 -0
- package/dist/src/nile-stepper/nile-stepper.test.js +6 -164
- package/dist/src/nile-stepper/nile-stepper.test.js.map +1 -1
- package/dist/src/nile-tab/nile-tab.d.ts +1 -0
- package/dist/src/nile-tab/nile-tab.js +1 -0
- package/dist/src/nile-tab/nile-tab.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.d.ts +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.js +1 -0
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.d.ts +1 -0
- package/dist/src/nile-table-body/nile-table-body.js +1 -0
- package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +1 -0
- package/dist/src/nile-tag/nile-tag.js +1 -0
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.d.ts +1 -0
- package/dist/src/nile-textarea/nile-textarea.js +1 -0
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.test.js.map +1 -1
- package/dist/src/nile-toast/nile-toast.d.ts +1 -0
- package/dist/src/nile-toast/nile-toast.js +1 -0
- package/dist/src/nile-toast/nile-toast.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.js +1 -0
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/src/nile-tree/nile-tree.d.ts +1 -0
- package/dist/src/nile-tree/nile-tree.js +1 -0
- package/dist/src/nile-tree/nile-tree.js.map +1 -1
- package/dist/src/nile-tree/nile-tree.test.d.ts +2 -0
- package/dist/src/nile-tree/nile-tree.test.js +5 -0
- package/dist/src/nile-tree/nile-tree.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/rollup.config.js +1 -0
- package/src/nile-accordion/nile-accordion.ts +1 -0
- package/src/nile-auto-complete/nile-auto-complete.ts +13 -2
- package/src/nile-avatar/nile-avatar.ts +2 -0
- package/src/nile-badge/nile-badge.ts +2 -0
- package/src/nile-breadcrumb/nile-breadcrumb.ts +2 -0
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +2 -0
- package/src/nile-button/nile-button.css.ts +24 -28
- package/src/nile-button/nile-button.ts +2 -0
- package/src/nile-button-toggle/nile-button-toggle.ts +2 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.ts +2 -0
- package/src/nile-calendar/nile-calendar.css.ts +4 -1
- package/src/nile-calendar/nile-calendar.test.ts +7 -0
- package/src/nile-calendar/nile-calendar.ts +43 -26
- package/src/nile-card/nile-card.ts +2 -0
- package/src/nile-checkbox/nile-checkbox.ts +2 -0
- package/src/nile-chip/nile-chip.test.ts +0 -1
- package/src/nile-chip/nile-chip.ts +6 -0
- package/src/nile-code-editor/nile-code-editor.ts +2 -0
- package/src/nile-content-editor/nile-content-editor.ts +2 -0
- package/src/nile-date-picker/nile-date-picker.ts +21 -5
- package/src/nile-dialog/nile-dialog.ts +2 -0
- package/src/nile-drawer/nile-drawer.ts +2 -0
- package/src/nile-empty-state/nile-empty-state.ts +2 -0
- package/src/nile-icon-button/nile-icon-button.ts +2 -0
- package/src/nile-input/nile-input.test.ts +7 -1
- package/src/nile-input/nile-input.ts +2 -0
- package/src/nile-link/nile-link.ts +2 -0
- package/src/nile-list/nile-list.ts +2 -0
- package/src/nile-list-item/nile-list-item.ts +2 -0
- package/src/nile-menu/nile-menu.ts +6 -0
- package/src/nile-menu-item/nile-menu-item.ts +3 -0
- package/src/nile-option/nile-option.ts +3 -0
- package/src/nile-popover/nile-popover.ts +5 -1
- package/src/nile-popup/nile-popup.ts +3 -0
- package/src/nile-radio-group/nile-radio-group.test.ts +215 -0
- package/src/nile-radio-group/nile-radio-group.ts +2 -0
- package/src/nile-select/nile-select.test.ts +309 -0
- package/src/nile-select/nile-select.ts +7 -38
- package/src/nile-slide-toggle/nile-slide-toggle.ts +4 -2
- package/src/nile-split-panel/nile-split-panel.test.ts +7 -0
- package/src/nile-split-panel/nile-split-panel.ts +2 -0
- package/src/nile-stepper/nile-stepper.test.ts +12 -174
- package/src/nile-stepper/nile-stepper.ts +2 -0
- package/src/nile-tab/nile-tab.ts +2 -0
- package/src/nile-tab-group/nile-tab-group.ts +2 -0
- package/src/nile-table-body/nile-table-body.ts +2 -0
- package/src/nile-tag/nile-tag.ts +2 -0
- package/src/nile-textarea/nile-textarea.test.ts +1 -1
- package/src/nile-textarea/nile-textarea.ts +2 -0
- package/src/nile-toast/nile-toast.ts +2 -0
- package/src/nile-tooltip/nile-tooltip.ts +2 -0
- package/src/nile-tree/nile-tree.test.ts +9 -0
- package/src/nile-tree/nile-tree.ts +2 -0
- package/web-test-runner.config.mjs +6 -1
@@ -1,7 +1,7 @@
|
|
1
|
-
import{f as a,a as e,o as t,e as n}from"../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{N as l}from"./nile-calendar.esm.js";import{s}from"../sinon-esm-cb0b9789.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-calendar.css.esm.js";import"lit/directives/class-map.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileCalendar",(()=>{it("should render correctly",(async()=>{const t=await a(i`<nile-calendar></nile-calendar>`);e(t).to.be.instanceOf(l),e(t.shadowRoot).not.to.be.null})),it("should initialize value on connectedCallback",(async()=>{const t=await a(i`<nile-calendar value="2023-10-01"></nile-calendar>`);t.connectedCallback(),e(t.value?.toISOString().split("T")[0]).to.equal("2023-10-01")})),it("should emit `nile-init` event on connectedCallback",(async()=>{const t=await a(i`<nile-calendar></nile-calendar>`),n=s.spy(t,"emit");t.connectedCallback(),e(n).to.have.been.calledWith("nile-init")})),it("should initialize value on connectedCallback",(async()=>{const t=await a(i`<nile-calendar value="2023-10-01"></nile-calendar>`);t.connectedCallback(),e(t.value?.toISOString().split("T")[0]).to.equal("2023-10-01")})),it("should update value when valueAttribute changes",(async()=>{const t=await a(i`<nile-calendar value="2023-10-01"></nile-calendar>`);t.valueAttribute="2023-11-05",await t.updateComplete,e(t.value?.toISOString().split("T")[0]).to.equal("2023-11-05")})),it("should select a single date when clicked",(async()=>{const l=await a(i`<nile-calendar></nile-calendar>`),s=l.shadowRoot?.querySelector("div.days_container div.current__date__dot")?.parentElement?.parentElement;setTimeout((()=>s?.click()));const{detail:{value:o}}=await t(l,"nile-change");await n(l);const c=new Date(o);e(o).to.exist,e(c.getDate()).to.equal((new Date).getDate()),e(s?.className).to.include("selected-date")})),it("should change the month correctly on next and previous button click",(async()=>{const t=await a(i`<nile-calendar></nile-calendar>`);await n(t);const l=new Date,s=a=>a.toLocaleString("default",{month:"long"}),o=s(l),c=s(new Date(l.setMonth(l.getMonth()+1))),r=s(new Date(l.setMonth(l.getMonth()-2)));let d=t.shadowRoot?.querySelector("div.calendar-header > span")?.textContent;e(d).to.include(o);const[u,w]=t.shadowRoot?.querySelectorAll("nile-icon")||[];w?.click(),await n(t),d=t.shadowRoot?.querySelector("div.calendar-header > span")?.textContent,e(d).to.include(c),u?.click(),await n(t),u?.click(),await n(t),d=t.shadowRoot?.querySelector("div.calendar-header > span")?.textContent,e(d).to.include(r)})),it("should allow range selection and emit validated data on apply",(async()=>{const l=await a(i`<nile-calendar range></nile-calendar>`);await n(l);const s=l.shadowRoot?.querySelectorAll(".days_container .day_date:not(.filler)")||[],o=s[4],c=s[9];o.click(),await n(l),c.click(),await n(l),e(o.classList.contains("range-start")).to.be.true,e(c.classList.contains("range-end")).to.be.true;const r=l.shadowRoot?.querySelector(".apply-button");setTimeout((()=>r?.click()));const{detail:d}=await t(l,"nile-changed"),{startDate:u,endDate:w}=d,m=new Date;m.setDate(5);const p=new Date;p.setDate(10),e(u.getDate()).to.equal(m.getDate()),e(w.getDate()).to.equal(p.getDate())})),it("should correctly apply allowed dates range on calendar",(async()=>{const t=(new Date).getMonth(),l=(new Date).getFullYear(),s={startDate:`${l}-${String(t+1).padStart(2,"0")}-05`,endDate:`${l}-${String(t+1).padStart(2,"0")}-20`},o=await a(i`
|
2
|
-
<nile-calendar allowedDates='${JSON.stringify(
|
3
|
-
`);await
|
1
|
+
import{f as i,a as s,o as n,e as o}from"../fixture-81e5a936.esm.js";import{html as e}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import{N as c}from"./nile-calendar.esm.js";import{s as m}from"../sinon-esm-cb0b9789.esm.js";import"../nile-input/nile-input.esm.js";import"../nile-select/nile-select.esm.js";import"../nile-tab-group/nile-tab-group.esm.js";import"../nile-tab/nile-tab.esm.js";import"../nile-button/nile-button.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-calendar.css.esm.js";import"lit/directives/class-map.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";import"../nile-input/nile-input.css.esm.js";import"../nile-icon/index.esm.js";import"lit/directives/unsafe-svg.js";import"../nile-icon/icons/svg/index.esm.js";import"../nile-icon/icons/svg/access-request.esm.js";import"../nile-icon/icons/svg/accessreview.esm.js";import"../nile-icon/icons/svg/action.esm.js";import"../nile-icon/icons/svg/actionworkflow.esm.js";import"../nile-icon/icons/svg/activity-logs.esm.js";import"../nile-icon/icons/svg/address.esm.js";import"../nile-icon/icons/svg/admin-users.esm.js";import"../nile-icon/icons/svg/agent.esm.js";import"../nile-icon/icons/svg/agents.esm.js";import"../nile-icon/icons/svg/aggregation.esm.js";import"../nile-icon/icons/svg/alert-circle.esm.js";import"../nile-icon/icons/svg/alert.esm.js";import"../nile-icon/icons/svg/allapplication.esm.js";import"../nile-icon/icons/svg/allsearch.esm.js";import"../nile-icon/icons/svg/analytics.esm.js";import"../nile-icon/icons/svg/anomaly.esm.js";import"../nile-icon/icons/svg/api.esm.js";import"../nile-icon/icons/svg/application.esm.js";import"../nile-icon/icons/svg/applications-2.esm.js";import"../nile-icon/icons/svg/applications.esm.js";import"../nile-icon/icons/svg/apply-filter.esm.js";import"../nile-icon/icons/svg/approve.esm.js";import"../nile-icon/icons/svg/apps.esm.js";import"../nile-icon/icons/svg/aquera.esm.js";import"../nile-icon/icons/svg/aquerasupport.esm.js";import"../nile-icon/icons/svg/array-loop.esm.js";import"../nile-icon/icons/svg/array-of-boolean.esm.js";import"../nile-icon/icons/svg/array-of-integer.esm.js";import"../nile-icon/icons/svg/array-of-string.esm.js";import"../nile-icon/icons/svg/array.esm.js";import"../nile-icon/icons/svg/arrayofobject.esm.js";import"../nile-icon/icons/svg/arrow-narrow-left.esm.js";import"../nile-icon/icons/svg/arrow.esm.js";import"../nile-icon/icons/svg/arrowdown.esm.js";import"../nile-icon/icons/svg/arrowdropdown.esm.js";import"../nile-icon/icons/svg/arrowdropup.esm.js";import"../nile-icon/icons/svg/arrowleft.esm.js";import"../nile-icon/icons/svg/arrowright.esm.js";import"../nile-icon/icons/svg/arrowup.esm.js";import"../nile-icon/icons/svg/attribute-map-analysis-icon.esm.js";import"../nile-icon/icons/svg/attributemap.esm.js";import"../nile-icon/icons/svg/automation-details.esm.js";import"../nile-icon/icons/svg/back.esm.js";import"../nile-icon/icons/svg/bar-and-line-chart.esm.js";import"../nile-icon/icons/svg/bar-chart-square-02.esm.js";import"../nile-icon/icons/svg/bar-chart-square-03.esm.js";import"../nile-icon/icons/svg/bar-chart.esm.js";import"../nile-icon/icons/svg/bargraph.esm.js";import"../nile-icon/icons/svg/basic.esm.js";import"../nile-icon/icons/svg/bell-icon.esm.js";import"../nile-icon/icons/svg/bell.esm.js";import"../nile-icon/icons/svg/block-02.esm.js";import"../nile-icon/icons/svg/block.esm.js";import"../nile-icon/icons/svg/bluedot.esm.js";import"../nile-icon/icons/svg/book-closed.esm.js";import"../nile-icon/icons/svg/boolean.esm.js";import"../nile-icon/icons/svg/border_all.esm.js";import"../nile-icon/icons/svg/box.esm.js";import"../nile-icon/icons/svg/bubble-chart.esm.js";import"../nile-icon/icons/svg/bulk-sync.esm.js";import"../nile-icon/icons/svg/button-loading-black.esm.js";import"../nile-icon/icons/svg/button-loading-blue-animated.esm.js";import"../nile-icon/icons/svg/button-loading-blue.esm.js";import"../nile-icon/icons/svg/button-loading-white.esm.js";import"../nile-icon/icons/svg/calendar-01.esm.js";import"../nile-icon/icons/svg/calendar.esm.js";import"../nile-icon/icons/svg/cancel.esm.js";import"../nile-icon/icons/svg/cases.esm.js";import"../nile-icon/icons/svg/caution.esm.js";import"../nile-icon/icons/svg/cell-loader.esm.js";import"../nile-icon/icons/svg/certification.esm.js";import"../nile-icon/icons/svg/check-circle.esm.js";import"../nile-icon/icons/svg/check-done-01.esm.js";import"../nile-icon/icons/svg/check-done-02.esm.js";import"../nile-icon/icons/svg/check.esm.js";import"../nile-icon/icons/svg/chevron-down.esm.js";import"../nile-icon/icons/svg/chevron-left-double.esm.js";import"../nile-icon/icons/svg/chevron-selector-vertical.esm.js";import"../nile-icon/icons/svg/chevron-up.esm.js";import"../nile-icon/icons/svg/clock-check.esm.js";import"../nile-icon/icons/svg/clock-rewind.esm.js";import"../nile-icon/icons/svg/clock.esm.js";import"../nile-icon/icons/svg/close.esm.js";import"../nile-icon/icons/svg/cloud-01.esm.js";import"../nile-icon/icons/svg/code-generator.esm.js";import"../nile-icon/icons/svg/collapse-1.esm.js";import"../nile-icon/icons/svg/collapse.esm.js";import"../nile-icon/icons/svg/color.esm.js";import"../nile-icon/icons/svg/column-02.esm.js";import"../nile-icon/icons/svg/columns-03.esm.js";import"../nile-icon/icons/svg/combo1.esm.js";import"../nile-icon/icons/svg/compact.esm.js";import"../nile-icon/icons/svg/compare-tiles.esm.js";import"../nile-icon/icons/svg/compare.esm.js";import"../nile-icon/icons/svg/component-menu.esm.js";import"../nile-icon/icons/svg/component.esm.js";import"../nile-icon/icons/svg/componentblock.esm.js";import"../nile-icon/icons/svg/components-icon.esm.js";import"../nile-icon/icons/svg/componenttext.esm.js";import"../nile-icon/icons/svg/condition.esm.js";import"../nile-icon/icons/svg/conditions.esm.js";import"../nile-icon/icons/svg/connect.esm.js";import"../nile-icon/icons/svg/connectivitymap.esm.js";import"../nile-icon/icons/svg/connectorrightarrow.esm.js";import"../nile-icon/icons/svg/continuous.esm.js";import"../nile-icon/icons/svg/copy-06.esm.js";import"../nile-icon/icons/svg/copy.esm.js";import"../nile-icon/icons/svg/cor-analysis.esm.js";import"../nile-icon/icons/svg/correlation.esm.js";import"../nile-icon/icons/svg/cost-analytics.esm.js";import"../nile-icon/icons/svg/create.esm.js";import"../nile-icon/icons/svg/createuser.esm.js";import"../nile-icon/icons/svg/custom.esm.js";import"../nile-icon/icons/svg/dashboard.esm.js";import"../nile-icon/icons/svg/data-insight.esm.js";import"../nile-icon/icons/svg/data-type-array.esm.js";import"../nile-icon/icons/svg/data-type-boolean.esm.js";import"../nile-icon/icons/svg/data-type-expression.esm.js";import"../nile-icon/icons/svg/data-type-json.esm.js";import"../nile-icon/icons/svg/data-type-null.esm.js";import"../nile-icon/icons/svg/data-type-number.esm.js";import"../nile-icon/icons/svg/data-type-persistent-variable.esm.js";import"../nile-icon/icons/svg/data-type-string.esm.js";import"../nile-icon/icons/svg/data-type-unknown.esm.js";import"../nile-icon/icons/svg/data-type-variable.esm.js";import"../nile-icon/icons/svg/database-1.esm.js";import"../nile-icon/icons/svg/database.esm.js";import"../nile-icon/icons/svg/databaseview.esm.js";import"../nile-icon/icons/svg/dataflow-03.esm.js";import"../nile-icon/icons/svg/dataflow-04.esm.js";import"../nile-icon/icons/svg/default-1.esm.js";import"../nile-icon/icons/svg/default-cursor.esm.js";import"../nile-icon/icons/svg/default.esm.js";import"../nile-icon/icons/svg/delegate.esm.js";import"../nile-icon/icons/svg/delete.esm.js";import"../nile-icon/icons/svg/deleteuser.esm.js";import"../nile-icon/icons/svg/deligateduser.esm.js";import"../nile-icon/icons/svg/directory.esm.js";import"../nile-icon/icons/svg/disabled.esm.js";import"../nile-icon/icons/svg/dock-to-right.esm.js";import"../nile-icon/icons/svg/document.esm.js";import"../nile-icon/icons/svg/done-02.esm.js";import"../nile-icon/icons/svg/done.esm.js";import"../nile-icon/icons/svg/dontmap.esm.js";import"../nile-icon/icons/svg/donut.esm.js";import"../nile-icon/icons/svg/dotpoints-02.esm.js";import"../nile-icon/icons/svg/dots-grid.esm.js";import"../nile-icon/icons/svg/dots-vertical.esm.js";import"../nile-icon/icons/svg/doublearrowleft.esm.js";import"../nile-icon/icons/svg/doublearrowright.esm.js";import"../nile-icon/icons/svg/dowhileloop.esm.js";import"../nile-icon/icons/svg/downarrow.esm.js";import"../nile-icon/icons/svg/downgrade.esm.js";import"../nile-icon/icons/svg/download-01.esm.js";import"../nile-icon/icons/svg/download-02.esm.js";import"../nile-icon/icons/svg/download.esm.js";import"../nile-icon/icons/svg/drag.esm.js";import"../nile-icon/icons/svg/draglist.esm.js";import"../nile-icon/icons/svg/droparrow.esm.js";import"../nile-icon/icons/svg/dropdown.esm.js";import"../nile-icon/icons/svg/edit-01.esm.js";import"../nile-icon/icons/svg/edit-1.esm.js";import"../nile-icon/icons/svg/edit-pencil.esm.js";import"../nile-icon/icons/svg/edit-write.esm.js";import"../nile-icon/icons/svg/else.esm.js";import"../nile-icon/icons/svg/email.esm.js";import"../nile-icon/icons/svg/enable.esm.js";import"../nile-icon/icons/svg/enabled.esm.js";import"../nile-icon/icons/svg/entities.esm.js";import"../nile-icon/icons/svg/entitlement.esm.js";import"../nile-icon/icons/svg/error.esm.js";import"../nile-icon/icons/svg/escalate.esm.js";import"../nile-icon/icons/svg/event.esm.js";import"../nile-icon/icons/svg/every.esm.js";import"../nile-icon/icons/svg/exactmatch.esm.js";import"../nile-icon/icons/svg/execute.esm.js";import"../nile-icon/icons/svg/expand-03.esm.js";import"../nile-icon/icons/svg/expand-06.esm.js";import"../nile-icon/icons/svg/expand-1.esm.js";import"../nile-icon/icons/svg/expand-2.esm.js";import"../nile-icon/icons/svg/expand.esm.js";import"../nile-icon/icons/svg/eye-off.esm.js";import"../nile-icon/icons/svg/eye.esm.js";import"../nile-icon/icons/svg/eyeclosed.esm.js";import"../nile-icon/icons/svg/featured-icon.esm.js";import"../nile-icon/icons/svg/file-06.esm.js";import"../nile-icon/icons/svg/file-check-02.esm.js";import"../nile-icon/icons/svg/file-shield-01.esm.js";import"../nile-icon/icons/svg/file-shield-02.esm.js";import"../nile-icon/icons/svg/file-type-icon.esm.js";import"../nile-icon/icons/svg/file.esm.js";import"../nile-icon/icons/svg/filter-1.esm.js";import"../nile-icon/icons/svg/filter.esm.js";import"../nile-icon/icons/svg/fingerprint-03.esm.js";import"../nile-icon/icons/svg/firewall.esm.js";import"../nile-icon/icons/svg/firewallagent.esm.js";import"../nile-icon/icons/svg/flow-01.esm.js";import"../nile-icon/icons/svg/flow-h.esm.js";import"../nile-icon/icons/svg/flow.esm.js";import"../nile-icon/icons/svg/flowmap-agent.esm.js";import"../nile-icon/icons/svg/flowmap-application.esm.js";import"../nile-icon/icons/svg/flowmap-aquera.esm.js";import"../nile-icon/icons/svg/flowmap-block.esm.js";import"../nile-icon/icons/svg/flowmap-cancel.esm.js";import"../nile-icon/icons/svg/flowmap-colorpalatte.esm.js";import"../nile-icon/icons/svg/flowmap-drag.esm.js";import"../nile-icon/icons/svg/flowmap-ellipsis.esm.js";import"../nile-icon/icons/svg/flowmap-firewall-agent.esm.js";import"../nile-icon/icons/svg/flowmap-firewall.esm.js";import"../nile-icon/icons/svg/flowmap-gateway.esm.js";import"../nile-icon/icons/svg/flowmap-hand.esm.js";import"../nile-icon/icons/svg/flowmap-orchestration.esm.js";import"../nile-icon/icons/svg/flowmap-redo.esm.js";import"../nile-icon/icons/svg/flowmap-section.esm.js";import"../nile-icon/icons/svg/flowmap-text.esm.js";import"../nile-icon/icons/svg/flowmap-undo.esm.js";import"../nile-icon/icons/svg/flowmap-workflow.esm.js";import"../nile-icon/icons/svg/flowmap.esm.js";import"../nile-icon/icons/svg/folder-01.esm.js";import"../nile-icon/icons/svg/folder.esm.js";import"../nile-icon/icons/svg/foreach.esm.js";import"../nile-icon/icons/svg/form.esm.js";import"../nile-icon/icons/svg/frequency.esm.js";import"../nile-icon/icons/svg/full-union.esm.js";import"../nile-icon/icons/svg/fullscreen.esm.js";import"../nile-icon/icons/svg/fullscreenexit.esm.js";import"../nile-icon/icons/svg/fullscreenshrink.esm.js";import"../nile-icon/icons/svg/funnel-02.esm.js";import"../nile-icon/icons/svg/funnel.esm.js";import"../nile-icon/icons/svg/gateway.esm.js";import"../nile-icon/icons/svg/gauge.esm.js";import"../nile-icon/icons/svg/general.esm.js";import"../nile-icon/icons/svg/generationphase.esm.js";import"../nile-icon/icons/svg/global-search.esm.js";import"../nile-icon/icons/svg/globe-03.esm.js";import"../nile-icon/icons/svg/globe.esm.js";import"../nile-icon/icons/svg/goto.esm.js";import"../nile-icon/icons/svg/graph.esm.js";import"../nile-icon/icons/svg/graphedit.esm.js";import"../nile-icon/icons/svg/greendot.esm.js";import"../nile-icon/icons/svg/greydot.esm.js";import"../nile-icon/icons/svg/greylightdot.esm.js";import"../nile-icon/icons/svg/grid-01.esm.js";import"../nile-icon/icons/svg/group-analysis-icon.esm.js";import"../nile-icon/icons/svg/group.esm.js";import"../nile-icon/icons/svg/groupby.esm.js";import"../nile-icon/icons/svg/groups.esm.js";import"../nile-icon/icons/svg/guide-01.esm.js";import"../nile-icon/icons/svg/guide.esm.js";import"../nile-icon/icons/svg/handtool.esm.js";import"../nile-icon/icons/svg/header-actions.esm.js";import"../nile-icon/icons/svg/header-child-workflow.esm.js";import"../nile-icon/icons/svg/header-flows.esm.js";import"../nile-icon/icons/svg/header-functions.esm.js";import"../nile-icon/icons/svg/header-tasks.esm.js";import"../nile-icon/icons/svg/header-variable.esm.js";import"../nile-icon/icons/svg/headphones-01.esm.js";import"../nile-icon/icons/svg/help-1.esm.js";import"../nile-icon/icons/svg/help-circle.esm.js";import"../nile-icon/icons/svg/help.esm.js";import"../nile-icon/icons/svg/helpandsupport.esm.js";import"../nile-icon/icons/svg/helpers.esm.js";import"../nile-icon/icons/svg/helpsupport.esm.js";import"../nile-icon/icons/svg/history.esm.js";import"../nile-icon/icons/svg/identitygraph.esm.js";import"../nile-icon/icons/svg/identityledger.esm.js";import"../nile-icon/icons/svg/if.esm.js";import"../nile-icon/icons/svg/ifelse.esm.js";import"../nile-icon/icons/svg/image.esm.js";import"../nile-icon/icons/svg/immutable.esm.js";import"../nile-icon/icons/svg/info-circle.esm.js";import"../nile-icon/icons/svg/info-icon.esm.js";import"../nile-icon/icons/svg/info-icon1.esm.js";import"../nile-icon/icons/svg/info.esm.js";import"../nile-icon/icons/svg/info2.esm.js";import"../nile-icon/icons/svg/inner-union.esm.js";import"../nile-icon/icons/svg/inprogress.esm.js";import"../nile-icon/icons/svg/insert-at-cursor.esm.js";import"../nile-icon/icons/svg/integer.esm.js";import"../nile-icon/icons/svg/intersection.esm.js";import"../nile-icon/icons/svg/itemplaceholder.esm.js";import"../nile-icon/icons/svg/js.esm.js";import"../nile-icon/icons/svg/key-performance-indicator.esm.js";import"../nile-icon/icons/svg/keyboard-01.esm.js";import"../nile-icon/icons/svg/kill.esm.js";import"../nile-icon/icons/svg/laptop-01.esm.js";import"../nile-icon/icons/svg/layers-three-01.esm.js";import"../nile-icon/icons/svg/layers-three-02.esm.js";import"../nile-icon/icons/svg/layout-alt-02.esm.js";import"../nile-icon/icons/svg/layout-alt-03.esm.js";import"../nile-icon/icons/svg/left-join.esm.js";import"../nile-icon/icons/svg/left-union.esm.js";import"../nile-icon/icons/svg/leftarrow.esm.js";import"../nile-icon/icons/svg/leftpointarrow.esm.js";import"../nile-icon/icons/svg/life-buoy-01.esm.js";import"../nile-icon/icons/svg/line.esm.js";import"../nile-icon/icons/svg/link.esm.js";import"../nile-icon/icons/svg/list-attribute.esm.js";import"../nile-icon/icons/svg/list.esm.js";import"../nile-icon/icons/svg/loader.esm.js";import"../nile-icon/icons/svg/loading.esm.js";import"../nile-icon/icons/svg/loading2.esm.js";import"../nile-icon/icons/svg/lock.esm.js";import"../nile-icon/icons/svg/log-info.esm.js";import"../nile-icon/icons/svg/log.esm.js";import"../nile-icon/icons/svg/logo-white.esm.js";import"../nile-icon/icons/svg/logout.esm.js";import"../nile-icon/icons/svg/logs.esm.js";import"../nile-icon/icons/svg/loop.esm.js";import"../nile-icon/icons/svg/manage.esm.js";import"../nile-icon/icons/svg/manageduser.esm.js";import"../nile-icon/icons/svg/map.esm.js";import"../nile-icon/icons/svg/mapcreate.esm.js";import"../nile-icon/icons/svg/mapdont.esm.js";import"../nile-icon/icons/svg/maponcreate.esm.js";import"../nile-icon/icons/svg/maponupdate.esm.js";import"../nile-icon/icons/svg/mapper.esm.js";import"../nile-icon/icons/svg/mapupdate.esm.js";import"../nile-icon/icons/svg/marker-pin-01.esm.js";import"../nile-icon/icons/svg/maximize.esm.js";import"../nile-icon/icons/svg/menu.esm.js";import"../nile-icon/icons/svg/message-notification-square.esm.js";import"../nile-icon/icons/svg/minus.esm.js";import"../nile-icon/icons/svg/monitor-01.esm.js";import"../nile-icon/icons/svg/mouse.esm.js";import"../nile-icon/icons/svg/move-application.esm.js";import"../nile-icon/icons/svg/moveleft.esm.js";import"../nile-icon/icons/svg/moveright.esm.js";import"../nile-icon/icons/svg/multiple-user.esm.js";import"../nile-icon/icons/svg/mute.esm.js";import"../nile-icon/icons/svg/my-integration.esm.js";import"../nile-icon/icons/svg/next-down.esm.js";import"../nile-icon/icons/svg/next.esm.js";import"../nile-icon/icons/svg/nightingale-chart.esm.js";import"../nile-icon/icons/svg/nlp.esm.js";import"../nile-icon/icons/svg/no-anomaly.esm.js";import"../nile-icon/icons/svg/nomatch.esm.js";import"../nile-icon/icons/svg/not.esm.js";import"../nile-icon/icons/svg/note.esm.js";import"../nile-icon/icons/svg/notification.esm.js";import"../nile-icon/icons/svg/notificationadd.esm.js";import"../nile-icon/icons/svg/notificationadded.esm.js";import"../nile-icon/icons/svg/notscheduled.esm.js";import"../nile-icon/icons/svg/null.esm.js";import"../nile-icon/icons/svg/number.esm.js";import"../nile-icon/icons/svg/numberinput.esm.js";import"../nile-icon/icons/svg/numbers.esm.js";import"../nile-icon/icons/svg/object.esm.js";import"../nile-icon/icons/svg/operators.esm.js";import"../nile-icon/icons/svg/options.esm.js";import"../nile-icon/icons/svg/orchestration-solid.esm.js";import"../nile-icon/icons/svg/orchestration.esm.js";import"../nile-icon/icons/svg/organization.esm.js";import"../nile-icon/icons/svg/other.esm.js";import"../nile-icon/icons/svg/otherdetails.esm.js";import"../nile-icon/icons/svg/ou-analysis-icon.esm.js";import"../nile-icon/icons/svg/override.esm.js";import"../nile-icon/icons/svg/palette.esm.js";import"../nile-icon/icons/svg/palletemenu.esm.js";import"../nile-icon/icons/svg/paperclip.esm.js";import"../nile-icon/icons/svg/partner.esm.js";import"../nile-icon/icons/svg/partners.esm.js";import"../nile-icon/icons/svg/pause.esm.js";import"../nile-icon/icons/svg/pen.esm.js";import"../nile-icon/icons/svg/pencil.esm.js";import"../nile-icon/icons/svg/peopletask.esm.js";import"../nile-icon/icons/svg/persistent-variable.esm.js";import"../nile-icon/icons/svg/persistentdata.esm.js";import"../nile-icon/icons/svg/personaldetails.esm.js";import"../nile-icon/icons/svg/phone.esm.js";import"../nile-icon/icons/svg/pie.esm.js";import"../nile-icon/icons/svg/pin.esm.js";import"../nile-icon/icons/svg/placeholder-wf.esm.js";import"../nile-icon/icons/svg/play-circle.esm.js";import"../nile-icon/icons/svg/play.esm.js";import"../nile-icon/icons/svg/plus-icon.esm.js";import"../nile-icon/icons/svg/plus.esm.js";import"../nile-icon/icons/svg/pluscircle.esm.js";import"../nile-icon/icons/svg/plussquare.esm.js";import"../nile-icon/icons/svg/policy.esm.js";import"../nile-icon/icons/svg/potentialmatch.esm.js";import"../nile-icon/icons/svg/poweron.esm.js";import"../nile-icon/icons/svg/predefined.esm.js";import"../nile-icon/icons/svg/prev-up.esm.js";import"../nile-icon/icons/svg/prev.esm.js";import"../nile-icon/icons/svg/preview.esm.js";import"../nile-icon/icons/svg/printer.esm.js";import"../nile-icon/icons/svg/priority-high.esm.js";import"../nile-icon/icons/svg/priority-highest.esm.js";import"../nile-icon/icons/svg/priority-low.esm.js";import"../nile-icon/icons/svg/priority-medium.esm.js";import"../nile-icon/icons/svg/privilage.esm.js";import"../nile-icon/icons/svg/privilege.esm.js";import"../nile-icon/icons/svg/privilegeobject.esm.js";import"../nile-icon/icons/svg/process.esm.js";import"../nile-icon/icons/svg/professionaldetails.esm.js";import"../nile-icon/icons/svg/question.esm.js";import"../nile-icon/icons/svg/radar.esm.js";import"../nile-icon/icons/svg/radio.esm.js";import"../nile-icon/icons/svg/radioactive.esm.js";import"../nile-icon/icons/svg/radiodone.esm.js";import"../nile-icon/icons/svg/read.esm.js";import"../nile-icon/icons/svg/readexpression.esm.js";import"../nile-icon/icons/svg/readonly.esm.js";import"../nile-icon/icons/svg/readonlyuser.esm.js";import"../nile-icon/icons/svg/readuser.esm.js";import"../nile-icon/icons/svg/reddot.esm.js";import"../nile-icon/icons/svg/redo-02.esm.js";import"../nile-icon/icons/svg/redo.esm.js";import"../nile-icon/icons/svg/refresh-cw-03.esm.js";import"../nile-icon/icons/svg/refresh.esm.js";import"../nile-icon/icons/svg/reminder.esm.js";import"../nile-icon/icons/svg/resize.esm.js";import"../nile-icon/icons/svg/resource.esm.js";import"../nile-icon/icons/svg/returnvalue.esm.js";import"../nile-icon/icons/svg/revocationcycle.esm.js";import"../nile-icon/icons/svg/revokation-cycle.esm.js";import"../nile-icon/icons/svg/right-join.esm.js";import"../nile-icon/icons/svg/right-union.esm.js";import"../nile-icon/icons/svg/rightarrow.esm.js";import"../nile-icon/icons/svg/rocket-02.esm.js";import"../nile-icon/icons/svg/role.esm.js";import"../nile-icon/icons/svg/rolemanager.esm.js";import"../nile-icon/icons/svg/run.esm.js";import"../nile-icon/icons/svg/sankey.esm.js";import"../nile-icon/icons/svg/save.esm.js";import"../nile-icon/icons/svg/scatter-plot.esm.js";import"../nile-icon/icons/svg/schedule.esm.js";import"../nile-icon/icons/svg/schema.esm.js";import"../nile-icon/icons/svg/script.esm.js";import"../nile-icon/icons/svg/search-lg.esm.js";import"../nile-icon/icons/svg/search-steps-icon.esm.js";import"../nile-icon/icons/svg/search.esm.js";import"../nile-icon/icons/svg/section-02.esm.js";import"../nile-icon/icons/svg/section.esm.js";import"../nile-icon/icons/svg/select-02.esm.js";import"../nile-icon/icons/svg/select.esm.js";import"../nile-icon/icons/svg/selectapplication.esm.js";import"../nile-icon/icons/svg/selectattributes.esm.js";import"../nile-icon/icons/svg/selectuser.esm.js";import"../nile-icon/icons/svg/semi-circle-donut-chart.esm.js";import"../nile-icon/icons/svg/send.esm.js";import"../nile-icon/icons/svg/sendemail.esm.js";import"../nile-icon/icons/svg/sendescalation.esm.js";import"../nile-icon/icons/svg/sendprompt.esm.js";import"../nile-icon/icons/svg/sendreminder.esm.js";import"../nile-icon/icons/svg/server-03.esm.js";import"../nile-icon/icons/svg/setting.esm.js";import"../nile-icon/icons/svg/settings-02.esm.js";import"../nile-icon/icons/svg/settings-1.esm.js";import"../nile-icon/icons/svg/settings.esm.js";import"../nile-icon/icons/svg/shape.esm.js";import"../nile-icon/icons/svg/share.esm.js";import"../nile-icon/icons/svg/shield-01.esm.js";import"../nile-icon/icons/svg/smalltick.esm.js";import"../nile-icon/icons/svg/smartcode.esm.js";import"../nile-icon/icons/svg/sort.esm.js";import"../nile-icon/icons/svg/sortascending.esm.js";import"../nile-icon/icons/svg/sortdescending.esm.js";import"../nile-icon/icons/svg/sortdown.esm.js";import"../nile-icon/icons/svg/sortup.esm.js";import"../nile-icon/icons/svg/stacked-bar-chart.esm.js";import"../nile-icon/icons/svg/stop-circle.esm.js";import"../nile-icon/icons/svg/stop.esm.js";import"../nile-icon/icons/svg/storybook.esm.js";import"../nile-icon/icons/svg/string.esm.js";import"../nile-icon/icons/svg/stringinput.esm.js";import"../nile-icon/icons/svg/stringletters.esm.js";import"../nile-icon/icons/svg/support.esm.js";import"../nile-icon/icons/svg/swap.esm.js";import"../nile-icon/icons/svg/switch.esm.js";import"../nile-icon/icons/svg/sync.esm.js";import"../nile-icon/icons/svg/table-1.esm.js";import"../nile-icon/icons/svg/table.esm.js";import"../nile-icon/icons/svg/tag.esm.js";import"../nile-icon/icons/svg/test.esm.js";import"../nile-icon/icons/svg/text-02.esm.js";import"../nile-icon/icons/svg/text.esm.js";import"../nile-icon/icons/svg/textarea-expander.esm.js";import"../nile-icon/icons/svg/themes.esm.js";import"../nile-icon/icons/svg/thumbsdown.esm.js";import"../nile-icon/icons/svg/thumbsup.esm.js";import"../nile-icon/icons/svg/thumsup.esm.js";import"../nile-icon/icons/svg/tick.esm.js";import"../nile-icon/icons/svg/timeupdate.esm.js";import"../nile-icon/icons/svg/timezone.esm.js";import"../nile-icon/icons/svg/trash-01.esm.js";import"../nile-icon/icons/svg/trash-03.esm.js";import"../nile-icon/icons/svg/trash-no-fill.esm.js";import"../nile-icon/icons/svg/trash.esm.js";import"../nile-icon/icons/svg/trend-up-02.esm.js";import"../nile-icon/icons/svg/trigger.esm.js";import"../nile-icon/icons/svg/undo-02.esm.js";import"../nile-icon/icons/svg/undo-1.esm.js";import"../nile-icon/icons/svg/undo.esm.js";import"../nile-icon/icons/svg/union.esm.js";import"../nile-icon/icons/svg/unmute.esm.js";import"../nile-icon/icons/svg/uparrow.esm.js";import"../nile-icon/icons/svg/update.esm.js";import"../nile-icon/icons/svg/updateuser.esm.js";import"../nile-icon/icons/svg/updown.esm.js";import"../nile-icon/icons/svg/upgrade.esm.js";import"../nile-icon/icons/svg/upload.esm.js";import"../nile-icon/icons/svg/user-01.esm.js";import"../nile-icon/icons/svg/user-03.esm.js";import"../nile-icon/icons/svg/user-analysis-icon.esm.js";import"../nile-icon/icons/svg/user-circle.esm.js";import"../nile-icon/icons/svg/user-group.esm.js";import"../nile-icon/icons/svg/user-inactive.esm.js";import"../nile-icon/icons/svg/user-selection.esm.js";import"../nile-icon/icons/svg/user-square.esm.js";import"../nile-icon/icons/svg/user.esm.js";import"../nile-icon/icons/svg/useractive.esm.js";import"../nile-icon/icons/svg/useradd.esm.js";import"../nile-icon/icons/svg/useraddgroup.esm.js";import"../nile-icon/icons/svg/userfind.esm.js";import"../nile-icon/icons/svg/userimport.esm.js";import"../nile-icon/icons/svg/userimportgroup.esm.js";import"../nile-icon/icons/svg/usermixed.esm.js";import"../nile-icon/icons/svg/userremove-1.esm.js";import"../nile-icon/icons/svg/userremove-2.esm.js";import"../nile-icon/icons/svg/userremove.esm.js";import"../nile-icon/icons/svg/userremovegroup.esm.js";import"../nile-icon/icons/svg/users-01.esm.js";import"../nile-icon/icons/svg/users-02.esm.js";import"../nile-icon/icons/svg/users-plus.esm.js";import"../nile-icon/icons/svg/users-up.esm.js";import"../nile-icon/icons/svg/users.esm.js";import"../nile-icon/icons/svg/userupdate.esm.js";import"../nile-icon/icons/svg/validationexpression.esm.js";import"../nile-icon/icons/svg/variable-global.esm.js";import"../nile-icon/icons/svg/variable-local-1.esm.js";import"../nile-icon/icons/svg/variable-local.esm.js";import"../nile-icon/icons/svg/variable-new-1.esm.js";import"../nile-icon/icons/svg/variable-new.esm.js";import"../nile-icon/icons/svg/variable.esm.js";import"../nile-icon/icons/svg/video.esm.js";import"../nile-icon/icons/svg/view.esm.js";import"../nile-icon/icons/svg/virtualserver.esm.js";import"../nile-icon/icons/svg/virtualservergroup.esm.js";import"../nile-icon/icons/svg/visibility.esm.js";import"../nile-icon/icons/svg/visibilityoff.esm.js";import"../nile-icon/icons/svg/wait.esm.js";import"../nile-icon/icons/svg/warning-01.esm.js";import"../nile-icon/icons/svg/warning.esm.js";import"../nile-icon/icons/svg/while.esm.js";import"../nile-icon/icons/svg/whileloop.esm.js";import"../nile-icon/icons/svg/workflow-01.esm.js";import"../nile-icon/icons/svg/workflow-application.esm.js";import"../nile-icon/icons/svg/workflow-orchestration.esm.js";import"../nile-icon/icons/svg/workflow-section.esm.js";import"../nile-icon/icons/svg/workflow-solid.esm.js";import"../nile-icon/icons/svg/workflow-text.esm.js";import"../nile-icon/icons/svg/workflow.esm.js";import"../nile-icon/icons/svg/writeexpression.esm.js";import"../nile-icon/icons/svg/x-circle.esm.js";import"../internal/default-value.esm.js";import"../internal/form.esm.js";import"../internal/slot.esm.js";import"lit/directives/if-defined.js";import"lit/directives/live.js";import"../nile-select/nile-select.css.esm.js";import"../nile-popup/nile-popup.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"../nile-tag/nile-tag.esm.js";import"../nile-tag/nile-tag.css.esm.js";import"../nile-icon-button/nile-icon-button.esm.js";import"../nile-icon-button/nile-icon-button.css.esm.js";import"../internal/animate.esm.js";import"../utilities/animation-registry.esm.js";import"../internal/scroll.esm.js";import"../internal/offset.esm.js";import"../internal/event.esm.js";import"../nile-tab-group/nile-tab-group.css.esm.js";import"../nile-tab/nile-tab.css.esm.js";import"../nile-button/nile-button.css.esm.js";describe("NileCalendar",(()=>{it("should render correctly",(async()=>{const n=await i(e`<nile-calendar></nile-calendar>`);s(n).to.be.instanceOf(c),s(n.shadowRoot).not.to.be.null})),it("should initialize value on connectedCallback",(async()=>{const n=await i(e`<nile-calendar value="2023-10-01"></nile-calendar>`);n.connectedCallback(),s(n.value?.toISOString().split("T")[0]).to.equal("2023-10-01")})),it("should emit `nile-init` event on connectedCallback",(async()=>{const n=await i(e`<nile-calendar></nile-calendar>`),o=m.spy(n,"emit");n.connectedCallback(),s(o).to.have.been.calledWith("nile-init")})),it("should initialize value on connectedCallback",(async()=>{const n=await i(e`<nile-calendar value="2023-10-01"></nile-calendar>`);n.connectedCallback(),s(n.value?.toISOString().split("T")[0]).to.equal("2023-10-01")})),it("should update value when valueAttribute changes",(async()=>{const n=await i(e`<nile-calendar value="2023-10-01"></nile-calendar>`);n.valueAttribute="2023-11-05",await n.updateComplete,s(n.value?.toISOString().split("T")[0]).to.equal("2023-11-05")})),it("should select a single date when clicked",(async()=>{const c=await i(e`<nile-calendar></nile-calendar>`),m=c.shadowRoot?.querySelector("div.days_container div.current__date__dot")?.parentElement?.parentElement;setTimeout((()=>m?.click()));const{detail:{value:t}}=await n(c,"nile-change");await o(c);const r=new Date(t);s(t).to.exist,s(r.getDate()).to.equal((new Date).getDate()),s(m?.className).to.include("selected-date")})),it("should change the month correctly on next and previous button click",(async()=>{const n=await i(e`<nile-calendar></nile-calendar>`);await o(n);const c=new Date,m=i=>i.toLocaleString("default",{month:"long"}),t=m(c),r=m(new Date(c.setMonth(c.getMonth()+1))),l=m(new Date(c.setMonth(c.getMonth()-2)));let p=n.shadowRoot?.querySelector("div.calendar-header > span")?.textContent;s(p).to.include(t);const[a,g]=n.shadowRoot?.querySelectorAll("nile-icon")||[];g?.click(),await o(n),p=n.shadowRoot?.querySelector("div.calendar-header > span")?.textContent,s(p).to.include(r),a?.click(),await o(n),a?.click(),await o(n),p=n.shadowRoot?.querySelector("div.calendar-header > span")?.textContent,s(p).to.include(l)})),it("should allow range selection and emit validated data on apply",(async()=>{const c=await i(e`<nile-calendar range></nile-calendar>`);await o(c);const m=c.shadowRoot?.querySelectorAll(".days_container .day_date:not(.filler)")||[],t=m[4],r=m[9];t.click(),await o(c),r.click(),await o(c),s(t.classList.contains("range-start")).to.be.true,s(r.classList.contains("range-end")).to.be.true;const l=c.shadowRoot?.querySelector(".apply-button");setTimeout((()=>l?.click()));const{detail:p}=await n(c,"nile-changed"),{startDate:a,endDate:g}=p,v=new Date;v.setDate(5);const j=new Date;j.setDate(10),s(a.getDate()).to.equal(v.getDate()),s(g.getDate()).to.equal(j.getDate())})),it("should correctly apply allowed dates range on calendar",(async()=>{const n=(new Date).getMonth(),c=(new Date).getFullYear(),m={startDate:`${c}-${String(n+1).padStart(2,"0")}-05`,endDate:`${c}-${String(n+1).padStart(2,"0")}-20`},t=await i(e`
|
2
|
+
<nile-calendar allowedDates='${JSON.stringify(m)}'></nile-calendar>
|
3
|
+
`);await o(t);(t.shadowRoot?.querySelectorAll(".days_container .day_date")||[]).forEach(((i,n)=>{const o=Number(i.textContent?.trim());o<5||o>20?s(i.classList.contains("not-allowed")).to.be.true:s(i.classList.contains("not-allowed")).to.be.false}))})),it("should select various ranges in relative calendar and emit correct data",(async()=>{const c=await i(e`<nile-calendar range type="relative"></nile-calendar>`);await o(c);const m=[{unit:"minutes",value:15},{unit:"hours",value:2},{unit:"days",value:3},{unit:"weeks",value:1},{unit:"months",value:6}];let t=1;for(const i of m){const{unit:e,value:m}=i,r=Array.from(c.shadowRoot?.querySelectorAll(`div.unit-container .duration-units:nth-child(${2*t})>div`)??[]).find((i=>Number(i.textContent?.trim())==m));r?.click(),await o(c);const l=c.shadowRoot?.querySelector(".apply-button");setTimeout((()=>{l?.click()}));const{detail:p}=await n(c,"nile-change"),{startDate:a,endDate:g}=p,v=new Date;let j=new Date(v);switch(e){case"minutes":j.setMinutes(v.getMinutes()-m);break;case"hours":j.setHours(v.getHours()-m);break;case"days":j.setDate(v.getDate()-m);break;case"weeks":j.setDate(v.getDate()-7*m);break;case"months":j.setMonth(v.getMonth()-m)}s(a.getTime()).to.be.closeTo(j.getTime(),1e3),s(g.getTime()).to.be.closeTo(v.getTime(),1e3),t++}})),it("should allow manual time input for from and to fields and emit correct data",(async()=>{const c=await i(e`
|
4
4
|
<nile-calendar range showManualInputs></nile-calendar>
|
5
|
-
`);await
|
5
|
+
`);await o(c);const m=c.shadowRoot?.querySelectorAll(".days_container .day_date:not(.filler)")||[],t=m[4],r=m[9];t.click(),await o(c),r.click(),await o(c);const l=c.shadowRoot?.querySelector('nile-input[label="From"]'),p=c.shadowRoot?.querySelector('nile-input[label="To"]');l&&p&&(l.dispatchEvent(new CustomEvent("nile-change",{detail:{value:"08:30:00"}})),p.dispatchEvent(new CustomEvent("nile-change",{detail:{value:"17:00:00"}}))),await o(c);const a=c.shadowRoot?.querySelector(".apply-button");setTimeout((()=>a?.click()));const{detail:g}=await n(c,"nile-change"),{startDate:v,endDate:j}=g,d=new Date;d.setHours(8,30,0);const u=new Date;u.setHours(17,0,0),s(v.getHours()).to.equal(d.getHours()),s(v.getMinutes()).to.equal(d.getMinutes()),s(v.getSeconds()).to.equal(d.getSeconds()),s(j.getHours()).to.equal(u.getHours()),s(j.getMinutes()).to.equal(u.getMinutes()),s(j.getSeconds()).to.equal(u.getSeconds())})),it("should allow setting duration and unit of time in relative mode and emit correct data",(async()=>{const c=await i(e`
|
6
6
|
<nile-calendar type="relative" range></nile-calendar>
|
7
|
-
`);await
|
7
|
+
`);await o(c);const m=c.shadowRoot?.querySelector("nile-input.duration-input");m&&m.dispatchEvent(new CustomEvent("nile-input",{detail:{value:"5"}})),await o(c);const t=c.shadowRoot?.querySelector("nile-select");t&&t.dispatchEvent(new CustomEvent("nile-change",{detail:{value:"hours"}})),await o(c);const r=c.shadowRoot?.querySelector(".apply-button");setTimeout((()=>r?.click()));const{detail:l}=await n(c,"nile-change"),{startDate:p,endDate:a}=l,g=new Date,v=new Date(g);v.setHours(g.getHours()-5),s(p.getTime()).to.be.closeTo(v.getTime(),1e3),s(a.getTime()).to.be.closeTo(g.getTime(),1e3)}))}));
|
@@ -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(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-card.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/nile-element.cjs.js","lit"],function(_export,_context){"use strict";var r,s,o,t,e,a,i,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_index001CjsJs){s=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileCardCssCjsJs){t=_nileCardCssCjsJs.s;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){a=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_lit){}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_i){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.hasSlotController=new a(_assertThisInitialized(_this),"footer");return _this;}_inherits(d,_i);return _createClass(d,[{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=","\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"","\"\n class=\"card__footer\"\n ></slot>\n </div>\n "])),e({card:!0,"card--has-footer":this.hasSlotController.test("footer")}),e({body__wrapper:!0,body__wrapper_nf:!this.hasSlotController.test("footer")}),!this.hasSlotController.test("footer"));}}]);}(i));d.styles=t,_export("N",d=r([o("nile-card")],d));}};});
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-card.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/nile-element.cjs.js","lit"],function(_export,_context){"use strict";var r,s,o,t,e,a,i,_templateObject,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_index001CjsJs){s=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileCardCssCjsJs){t=_nileCardCssCjsJs.s;},function(_litDirectivesClassMapJs){e=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){a=_internalSlotCjsJs.H;},function(_internalNileElementCjsJs){i=_internalNileElementCjsJs.N;},function(_lit){}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_i){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.BUBBLES=!1,_this.hasSlotController=new a(_assertThisInitialized(_this),"footer");return _this;}_inherits(d,_i);return _createClass(d,[{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=","\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"","\"\n class=\"card__footer\"\n ></slot>\n </div>\n "])),e({card:!0,"card--has-footer":this.hasSlotController.test("footer")}),e({body__wrapper:!0,body__wrapper_nf:!this.hasSlotController.test("footer")}),!this.hasSlotController.test("footer"));}}]);}(i));d.styles=t,_export("N",d=r([o("nile-card")],d));}};});
|
2
2
|
//# sourceMappingURL=nile-card.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-card.cjs.js","sources":["../../../src/nile-card/nile-card.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-card.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElements from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-card\n *\n */\n@customElement('nile-card')\nexport class NileCard extends NileElements {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n card: true,\n 'card--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=${classMap({\n 'body__wrapper':true,\n 'body__wrapper_nf': !this.hasSlotController.test('footer')\n })}\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"${!this.hasSlotController.test('footer')}\"\n class=\"card__footer\"\n ></slot>\n </div>\n `;\n }\n}\n\nexport default NileCard;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-card': NileCard;\n }\n}\n"],"names":["NileCard","
|
1
|
+
{"version":3,"file":"nile-card.cjs.js","sources":["../../../src/nile-card/nile-card.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-card.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport NileElements from '../internal/nile-element';\nimport { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-card\n *\n */\n@customElement('nile-card')\nexport class NileCard extends NileElements {\n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n card: true,\n 'card--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div class=\"body__wrapper\" part=\"body__wrapper\"\n class=${classMap({\n 'body__wrapper':true,\n 'body__wrapper_nf': !this.hasSlotController.test('footer')\n })}\n >\n <slot name=\"header\" part=\"header\" class=\"card__header\"></slot>\n <slot part=\"body\" class=\"card__body\"></slot>\n </div>\n\n <slot\n name=\"footer\"\n part=\"footer\"\n ?hidden=\"${!this.hasSlotController.test('footer')}\"\n class=\"card__footer\"\n ></slot>\n </div>\n `;\n }\n}\n\nexport default NileCard;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-card': NileCard;\n }\n}\n"],"names":["NileCard","_i","d","this","BUBBLES","hasSlotController","HasSlotController","_this","_inherits","_createClass","key","value","render","html","_templateObject","_taggedTemplateLiteral","classMap","card","test","body__wrapper","body__wrapper_nf","NileElements","styles","__decorate","customElement"],"mappings":"myHA4BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAGcC,KAAAA,CAAOC,OAAAA,CAAAA,CAAU,EAEnBD,KAAAA,CAAiBE,iBAAAA,CAAG,GAAIC,CAAAA,CAAAA,CAAAA,sBAAAA,CAAAA,KAAAA,EAAwB,QA8BlE,CAAA,QAAAC,KAAA,EA5BCC,SAAA,CAAAN,CAAA,CAAAD,EAAA,SAAAQ,YAAA,CAAAP,CAAA,GAAAQ,GAAA,UAAAC,KAAA,UAAAC,OAAA,CAAAA,CACE,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,weAGCC,CAAAA,CAAS,CACfC,IAAM,CAAA,CAAA,CAAA,CACN,kBAAoBd,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAI1CF,CAAAA,CAAS,CACfG,aAAgB,CAAA,CAAA,CAAA,CAChBC,gBAAqBjB,CAAAA,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,CAAA,CAAA,CAUrCf,CAAAA,IAAAA,CAAKE,kBAAkBa,IAAK,CAAA,QAAA,CAAA,EAK/C,CAjCMlB,MADqBqB,CAAvB,GACErB,CAAAA,CAAMsB,OAAmBA,CADrBtB,CAAAA,OAAAA,KAAAA,CAAAA,CAAQuB,EAAA,CADpBC,CAAAA,CAAc,cACFxB"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as r}from"tslib";import{x as s}from"../index-0a3007c5.esm.js";import{customElement as o}from"lit/decorators.js";import{s as t}from"./nile-card.css.esm.js";import{classMap as e}from"lit/directives/class-map.js";import{H as a}from"../internal/slot.esm.js";import{N as i}from"../internal/nile-element.esm.js";import"lit";let d=class extends i{constructor(){super(...arguments),this.hasSlotController=new a(this,"footer")}render(){return s`
|
1
|
+
import{__decorate as r}from"tslib";import{x as s}from"../index-0a3007c5.esm.js";import{customElement as o}from"lit/decorators.js";import{s as t}from"./nile-card.css.esm.js";import{classMap as e}from"lit/directives/class-map.js";import{H as a}from"../internal/slot.esm.js";import{N as i}from"../internal/nile-element.esm.js";import"lit";let d=class extends i{constructor(){super(...arguments),this.BUBBLES=!1,this.hasSlotController=new a(this,"footer")}render(){return s`
|
2
2
|
<div
|
3
3
|
part="base"
|
4
4
|
class=${e({card:!0,"card--has-footer":this.hasSlotController.test("footer")})}
|
@@ -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(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,h,l,r,n,a,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){n=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_d){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_d);return _createClass(m,[{key:"toggleHelpText",value:function toggleHelpText(){this.showHelpText=!this.showHelpText;}},{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked});}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,i=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n \n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n ","\n ","\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ","\n <slot></slot>\n </div>\n </label>\n \n ","\n \n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size}),this.title,this.name,r(this.value),n(this.indeterminate),n(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"","boolean"==typeof this.label?"":this.label,e?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):"",i?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);}(d));m.styles=c,e([i('input[type="checkbox"]')],m.prototype,"input",void 0),e([s()],m.prototype,"hasFocus",void 0),e([p()],m.prototype,"title",void 0),e([p()],m.prototype,"name",void 0),e([p()],m.prototype,"value",void 0),e([p({reflect:!0})],m.prototype,"size",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([p({type:String,reflect:!0})],m.prototype,"label",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([l("checked")],m.prototype,"defaultChecked",void 0),e([p({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([p({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([p({type:Boolean})],m.prototype,"showHelpText",void 0),e([p({reflect:!0})],m.prototype,"form",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([a(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([o("nile-checkbox")],m));}};});
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,h,l,r,n,a,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){n=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_d){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.BUBBLES=!1,_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_d);return _createClass(m,[{key:"toggleHelpText",value:function toggleHelpText(){this.showHelpText=!this.showHelpText;}},{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked});}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,i=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n \n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n ","\n ","\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ","\n <slot></slot>\n </div>\n </label>\n \n ","\n \n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size}),this.title,this.name,r(this.value),n(this.indeterminate),n(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"","boolean"==typeof this.label?"":this.label,e?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):"",i?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);}(d));m.styles=c,e([i('input[type="checkbox"]')],m.prototype,"input",void 0),e([s()],m.prototype,"hasFocus",void 0),e([p()],m.prototype,"title",void 0),e([p()],m.prototype,"name",void 0),e([p()],m.prototype,"value",void 0),e([p({reflect:!0})],m.prototype,"size",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([p({type:String,reflect:!0})],m.prototype,"label",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([l("checked")],m.prototype,"defaultChecked",void 0),e([p({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([p({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([p({type:Boolean})],m.prototype,"showHelpText",void 0),e([p({reflect:!0})],m.prototype,"form",void 0),e([p({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([a(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([o("nile-checkbox")],m));}};});
|
2
2
|
//# sourceMappingURL=nile-checkbox.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n \n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n \n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"],"names":["NileCheckbox","m","super","this","hasFocus","title","name","size","disabled","checked","label","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_d","_createClass","key","value","toggleHelpText","handleClick","emit","handleBlur","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","defaultValue","attribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"s1JAuDaA,4BACX,SAAAC,EAAA,CACEC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EAAAA,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,QAAG,CAAA,CAAA,CAAA,CAEhBD,KAAAA,CAAAE,KAAAA,CAAQ,EAGRF,CAAAA,KAAAA,CAAIG,KAAG,EAMUH,CAAAA,KAAAA,CAAII,IAAiC,CAAA,QAAA,CAGtBJ,KAAAA,CAAQK,QAAAA,CAAAA,CAAG,EAGXL,KAAAA,CAAOM,OAAAA,CAAAA,CAAG,CAGXN,CAAAA,KAAAA,CAAKO,KAAG,CAAA,EAAA,CAMPP,KAAAA,CAAaQ,aAAG,CAAA,CAAA,CAAA,CAGnCR,KAAAA,CAAcS,cAAG,CAAA,CAAA,CAAA,CAEWT,KAAAA,CAAQU,QAAG,CAAA,EAAA,CAEPV,KAAAA,CAAYW,YAAAA,CAAG,EAE3CX,CAAAA,KAAAA,CAAYY,cAAG,CAQfZ,CAAAA,KAAAA,CAAIa,IAAG,CAAA,EAAA,CAGQb,KAAAA,CAAQc,QAAAA,CAAAA,CAAG,CApDtD,QAAAC,KAAA,EAsDOC,SAAA,CAAAlB,CAAA,CAAAmB,EAAA,SAAAC,YAAA,CAAApB,CAAA,GAAAqB,GAAA,kBAAAC,KAAA,UAAAC,eAAA,CACNrB,CAAAA,IAAAA,CAAKY,YAAgBZ,CAAAA,CAAAA,IAAAA,CAAKY,YAC3B,EAEO,GAAAO,GAAA,eAAA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sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.emit('nile-change',{checked: this.checked})\n this.emit('valueChange',{checked: this.checked})\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n \n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n \n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"],"names":["NileCheckbox","m","constructor","super","this","BUBBLES","hasFocus","title","name","size","disabled","checked","label","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_d","_createClass","key","value","toggleHelpText","handleClick","emit","handleBlur","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","defaultValue","attribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"s1JAuDaA,4BACX,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EACEC,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAKiBC,KAAAA,CAAOC,SAAU,CAInBD,CAAAA,KAAAA,CAAQE,QAAG,CAAA,CAAA,CAAA,CAEhBF,KAAAA,CAAAG,KAAAA,CAAQ,GAGRH,KAAAA,CAAII,IAAAA,CAAG,EAMUJ,CAAAA,KAAAA,CAAIK,IAAiC,CAAA,QAAA,CAGtBL,KAAAA,CAAQM,QAAG,CAAA,CAAA,CAAA,CAGXN,KAAAA,CAAOO,OAAAA,CAAAA,CAAG,CAGXP,C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AEC,SAAS,CAAkBpE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiE,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAGKF,EAAA,CAA3CI,CAAAA,CAAS,CAAEE,IAAMC,CAAAA,OAAAA,CAASF,SAAS,CAAyBpE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAiE,SAAA,CAAA,UAAA,CAAA,IAAA,IA4B7DF,CAAA,CAAA,CADCW,EAAM,CAAC,SAAA,CAAW,iBAAkB,CAAEC,oBAAAA,CAAAA,CAAsB,KAI5D3E,CAAAiE,CAAAA,SAAAA,CAAA,oBAAA,IAxFUjE,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAY+D,EAAA,CADxBa,CAAAA,CAAc,kBACF5E"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{query as i,state as s,customElement as o}from"lit/decorators.js";import{s as c}from"./nile-checkbox.css.esm.js";import{classMap as h}from"lit/directives/class-map.js";import{d as l}from"../internal/default-value.esm.js";import{ifDefined as r}from"lit/directives/if-defined.js";import{live as n}from"lit/directives/live.js";import{w as a}from"../internal/watch.esm.js";import{N as d}from"../internal/nile-element.esm.js";import{n as m}from"../property-09139d3c.esm.js";import"lit";let p=class extends d{constructor(){super(),this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.indeterminate=!1,this.defaultChecked=!1,this.helpText="",this.errorMessage="",this.showHelpText=!1,this.form="",this.required=!1}toggleHelpText(){this.showHelpText=!this.showHelpText}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked})}handleBlur(){this.hasFocus=!1,this.emit("blur")}handleInput(){this.emit("input")}handleFocus(){this.hasFocus=!0,this.emit("focus")}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}connectedCallback(){super.connectedCallback(),this.updateHostClass(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(e){super.updated(e),e.has("helpText")&&this.updateHostClass()}updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width")}render(){const e=!!this.helpText,i=!!this.errorMessage;return t`
|
1
|
+
import{__decorate as e}from"tslib";import{x as t}from"../index-0a3007c5.esm.js";import{query as i,state as s,customElement as o}from"lit/decorators.js";import{s as c}from"./nile-checkbox.css.esm.js";import{classMap as h}from"lit/directives/class-map.js";import{d as l}from"../internal/default-value.esm.js";import{ifDefined as r}from"lit/directives/if-defined.js";import{live as n}from"lit/directives/live.js";import{w as a}from"../internal/watch.esm.js";import{N as d}from"../internal/nile-element.esm.js";import{n as m}from"../property-09139d3c.esm.js";import"lit";let p=class extends d{constructor(){super(),this.BUBBLES=!1,this.hasFocus=!1,this.title="",this.name="",this.size="medium",this.disabled=!1,this.checked=!1,this.label="",this.indeterminate=!1,this.defaultChecked=!1,this.helpText="",this.errorMessage="",this.showHelpText=!1,this.form="",this.required=!1}toggleHelpText(){this.showHelpText=!this.showHelpText}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("nile-change",{checked:this.checked}),this.emit("valueChange",{checked:this.checked})}handleBlur(){this.hasFocus=!1,this.emit("blur")}handleInput(){this.emit("input")}handleFocus(){this.hasFocus=!0,this.emit("focus")}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate}click(){this.input.click()}focus(e){this.input.focus(e)}blur(){this.input.blur()}connectedCallback(){super.connectedCallback(),this.updateHostClass(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}updated(e){super.updated(e),e.has("helpText")&&this.updateHostClass()}updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width")}render(){const e=!!this.helpText,i=!!this.errorMessage;return t`
|
2
2
|
<label
|
3
3
|
part="base"
|
4
4
|
class=${h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size})}
|
@@ -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(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-chip.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,e,i,s,o,l,h,r,n,a,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;o=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){l=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){r=_internalSlotCjsJs.H;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_a){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.hasSlotController=new r(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.acceptUserInput=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!1,_this.autoCompleteOptions=[],_this.filteredAutoCompleteOptions=[],_this.value=[],_this.noWrap=!1,_this.errorIndexes=[],_this.helpText="",_this.errorMessage="";return _this;}_inherits(c,_a);return _createClass(c,[{key:"onAutoCompleteOptionsChanged",value:function onAutoCompleteOptionsChanged(){var _this2=this;this.filteredAutoCompleteOptions=_toConsumableArray(this.autoCompleteOptions),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this2.value.includes(t);}));}},{key:"onValueChanged",value:function onValueChanged(){this.tags=_toConsumableArray(this.value),this.onTagsChanged();}},{key:"onTagsChanged",value:function onTagsChanged(){var _this3=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this3.tags.includes(t);}));}},{key:"connectedCallback",value:function connectedCallback(){var _this4=this;_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this4.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(c.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"handleSelect",value:function handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[].concat(_toConsumableArray(this.tags),[t.detail.value]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(e){return e!==t;}),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[].concat(_toConsumableArray(this.filteredAutoCompleteOptions),[t])),this.emit("nile-chip-change",{value:this.tags});}},{key:"handleInputChange",value:function handleInputChange(t){this.inputValue=t.detail.value;}},{key:"handleInputKeydown",value:function handleInputKeydown(t){this.acceptUserInput&&("Tab"===t.key&&t.preventDefault(),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(t.preventDefault(),this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.resetInput(),this.emit("nile-chip-change",{value:this.tags})),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||!this.noDuplicates&&!this.tags.includes(this.inputValue)||this.emit("nile-duplicates-blocked"));}},{key:"handleFocus",value:function handleFocus(){this.isDropdownOpen=!0;}},{key:"resetInput",value:function resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus();}},{key:"render",value:function render(){var _this5=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <div\n class=","\n >\n ","\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=","\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-complete=","\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=","\n >\n ","\n </slot>\n </div>\n ","\n\n ","\n </div>\n "])),h({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":s,"nile-chip--disabled":this.disabled}),i?"false":"true",this.label,h({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap}),this.tags.map(function(t,i){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n .variant=","\n @nile-remove=","\n removable\n pill\n >\n ","\n </nile-tag>\n "])),h({"nile-chip__tags":!0}),_this5.errorIndexes.includes(i)?"error":"normal",function(){return _this5.handleRemove(t);},t);}),this.filteredAutoCompleteOptions,this.inputValue,this.isDropdownOpen,!0,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleSelect,s?"false":"true",this.helpText,s?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",o?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}],[{key:"styles",get:function get(){return[l];}}]);}(a));t([i()],c.prototype,"tags",void 0),t([i()],c.prototype,"inputValue",void 0),t([i()],c.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],c.prototype,"autoComplete",void 0),t([p({type:Boolean})],c.prototype,"warning",void 0),t([p({type:Boolean})],c.prototype,"error",void 0),t([p({type:Boolean})],c.prototype,"success",void 0),t([p({type:Boolean})],c.prototype,"noDuplicates",void 0),t([p()],c.prototype,"label",void 0),t([p({type:Boolean})],c.prototype,"acceptUserInput",void 0),t([p({type:Boolean})],c.prototype,"clearable",void 0),t([p()],c.prototype,"placeholder",void 0),t([p({type:Boolean,reflect:!0})],c.prototype,"readonly",void 0),t([p({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([p({type:Array})],c.prototype,"autoCompleteOptions",void 0),t([p({type:Array})],c.prototype,"filteredAutoCompleteOptions",void 0),t([p({type:Array})],c.prototype,"value",void 0),t([p({type:Boolean})],c.prototype,"noWrap",void 0),t([p({type:Array})],c.prototype,"errorIndexes",void 0),t([p({attribute:"help-text",reflect:!0})],c.prototype,"helpText",void 0),t([p({attribute:"error-message",reflect:!0})],c.prototype,"errorMessage",void 0),t([n("autoCompleteOptions")],c.prototype,"onAutoCompleteOptionsChanged",null),t([n("value")],c.prototype,"onValueChanged",null),t([n("tags")],c.prototype,"onTagsChanged",null),_export("N",c=t([o("nile-chip")],c));}};});
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-chip.css.cjs.js","lit/directives/class-map.js","../internal/slot.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,e,i,s,o,l,h,n,r,a,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.state;s=_litDecoratorsJs.query;o=_litDecoratorsJs.customElement;},function(_nileChipCssCjsJs){l=_nileChipCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalSlotCjsJs){n=_internalSlotCjsJs.H;},function(_internalWatchCjsJs){r=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_a){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.BUBBLES=!1,_this.hasSlotController=new n(_assertThisInitialized(_this),"help-text","label"),_this.tags=[],_this.inputValue="",_this.isDropdownOpen=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.noDuplicates=!1,_this.label="",_this.acceptUserInput=!1,_this.clearable=!1,_this.placeholder="type here...",_this.readonly=!1,_this.disabled=!1,_this.autoCompleteOptions=[],_this.filteredAutoCompleteOptions=[],_this.value=[],_this.noWrap=!1,_this.errorIndexes=[],_this.helpText="",_this.errorMessage="";return _this;}_inherits(c,_a);return _createClass(c,[{key:"onAutoCompleteOptionsChanged",value:function onAutoCompleteOptionsChanged(){var _this2=this;this.filteredAutoCompleteOptions=_toConsumableArray(this.autoCompleteOptions),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this2.value.includes(t);}));}},{key:"onValueChanged",value:function onValueChanged(){this.tags=_toConsumableArray(this.value),this.onTagsChanged();}},{key:"onTagsChanged",value:function onTagsChanged(){var _this3=this;this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this3.tags.includes(t);}));}},{key:"connectedCallback",value:function connectedCallback(){var _this4=this;_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.noDuplicates&&(this.filteredAutoCompleteOptions=this.filteredAutoCompleteOptions.filter(function(t){return!_this4.value.includes(t);})),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(c.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"handleSelect",value:function handleSelect(t){this.noDuplicates&&this.tags.includes(t.detail.value)||(this.tags=[].concat(_toConsumableArray(this.tags),[t.detail.value]),this.emit("nile-chip-change",{value:this.tags}),this.resetInput());}},{key:"handleRemove",value:function handleRemove(t){this.tags=this.tags.filter(function(e){return e!==t;}),this.noDuplicates&&this.autoCompleteOptions.includes(t)&&(this.filteredAutoCompleteOptions=[].concat(_toConsumableArray(this.filteredAutoCompleteOptions),[t])),this.emit("nile-chip-change",{value:this.tags});}},{key:"handleInputChange",value:function handleInputChange(t){this.inputValue=t.detail.value;}},{key:"handleInputKeydown",value:function handleInputKeydown(t){this.acceptUserInput&&("Tab"===t.key&&t.preventDefault(),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||this.noDuplicates&&this.tags.includes(this.inputValue)||(t.preventDefault(),this.tags=[].concat(_toConsumableArray(this.tags),[this.inputValue]),this.resetInput(),this.emit("nile-chip-change",{value:this.tags})),"Enter"!==t.key&&"Tab"!==t.key||!this.inputValue||!this.noDuplicates&&!this.tags.includes(this.inputValue)||this.emit("nile-duplicates-blocked"));}},{key:"handleFocus",value:function handleFocus(){this.isDropdownOpen=!0;}},{key:"resetInput",value:function resetInput(){this.inputValue="",this.isDropdownOpen=!1,this.autoComplete.value="",this.autoComplete.handleFocus();}},{key:"render",value:function render(){var _this5=this;var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,o=!!this.errorMessage;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <div\n class=","\n >\n ","\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n @nile-show=\"","\"\n @nile-after-show=\"","\"\n @nile-hide=\"","\"\n @nile-after-hide=\"","\"\n .allMenuItems=","\n .value=","\n ?isDropdownOpen=","\n .noBorder=","\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=","\n @nile-input=","\n @keydown=","\n @nile-focus=","\n @nile-complete=","\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=","\n >\n ","\n </slot>\n </div>\n ","\n\n ","\n </div>\n "])),h({"form-control":!0,"form-control--medium":!0,"form-control--has-label":i,"form-control--has-help-text":s,"nile-chip--disabled":this.disabled}),i?"false":"true",this.label,h({"nile-chip":!0,"nile-chip--warning":this.warning,"nile-chip--error":this.error,"nile-chip--success":this.success,"nile-chip--no-wrap":this.noWrap}),this.tags.map(function(t,i){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-tag\n class=","\n .variant=","\n @nile-remove=","\n removable\n pill\n >\n ","\n </nile-tag>\n "])),h({"nile-chip__tags":!0}),_this5.errorIndexes.includes(i)?"error":"normal",function(){return _this5.handleRemove(t);},t);}),function(t){return _this5.emit("nile-show");},function(t){return _this5.emit("nile-after-show");},function(t){return _this5.emit("nile-hide");},function(t){return _this5.emit("nile-after-hide");},this.filteredAutoCompleteOptions,this.inputValue,this.isDropdownOpen,!0,this.placeholder,this.handleInputChange,this.handleInputKeydown,this.handleFocus,this.handleSelect,s?"false":"true",this.helpText,s?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",o?e(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}],[{key:"styles",get:function get(){return[l];}}]);}(a));t([i()],c.prototype,"tags",void 0),t([i()],c.prototype,"inputValue",void 0),t([i()],c.prototype,"isDropdownOpen",void 0),t([s("nile-auto-complete")],c.prototype,"autoComplete",void 0),t([p({type:Boolean})],c.prototype,"warning",void 0),t([p({type:Boolean})],c.prototype,"error",void 0),t([p({type:Boolean})],c.prototype,"success",void 0),t([p({type:Boolean})],c.prototype,"noDuplicates",void 0),t([p()],c.prototype,"label",void 0),t([p({type:Boolean})],c.prototype,"acceptUserInput",void 0),t([p({type:Boolean})],c.prototype,"clearable",void 0),t([p()],c.prototype,"placeholder",void 0),t([p({type:Boolean,reflect:!0})],c.prototype,"readonly",void 0),t([p({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),t([p({type:Array})],c.prototype,"autoCompleteOptions",void 0),t([p({type:Array})],c.prototype,"filteredAutoCompleteOptions",void 0),t([p({type:Array})],c.prototype,"value",void 0),t([p({type:Boolean})],c.prototype,"noWrap",void 0),t([p({type:Array})],c.prototype,"errorIndexes",void 0),t([p({attribute:"help-text",reflect:!0})],c.prototype,"helpText",void 0),t([p({attribute:"error-message",reflect:!0})],c.prototype,"errorMessage",void 0),t([r("autoCompleteOptions")],c.prototype,"onAutoCompleteOptionsChanged",null),t([r("value")],c.prototype,"onValueChanged",null),t([r("tags")],c.prototype,"onTagsChanged",null),_export("N",c=t([o("nile-chip")],c));}};});
|
2
2
|
//# sourceMappingURL=nile-chip.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-chip.cjs.js","sources":["../../../src/nile-chip/nile-chip.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if(event.key === 'Tab'){\n event.preventDefault()\n }\n \n if (\n (event.key === 'Enter' || event.key === 'Tab' ) \n && this.inputValue \n && (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n event.preventDefault()\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if(\n (event.key === 'Enter'|| event.key === 'Tab' ) \n && this.inputValue \n && (this.noDuplicates || this.tags.includes(this.inputValue))\n ){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","c","this","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","warning","error","success","noDuplicates","label","acceptUserInput","clearable","placeholder","readonly","disabled","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","errorIndexes","helpText","errorMessage","_this","_inherits","_a","_createClass","key","onAutoCompleteOptionsChanged","filter","option","includes","onValueChanged","onTagsChanged","connectedCallback","super","emit","disconnectedCallback","handleSelect","event","detail","concat","_toConsumableArray","resetInput","handleRemove","tag","handleInputChange","handleInputKeydown","preventDefault","handleFocus","autoComplete","render","_this5","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","index","_templateObject2","_templateObject3","_templateObject4","__decorate","get","styles","NileElement","state","prototype","query","property","type","Boolean","reflect","Array","attribute","watch","customElement"],"mappings":"upLA0BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEAKYC,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAAAA,CACvCF,CAAAA,sBAAAA,CAAAA,KAAAA,EACA,YACA,OAGOA,CAAAA,CAAAA,KAAA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,IA3FU1E,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAQqE,CAAA,CAAA,CADpBc,CAAc,CAAA,WAAA,CAAA,CAAA,CACFnF"}
|
1
|
+
{"version":3,"file":"nile-chip.cjs.js","sources":["../../../src/nile-chip/nile-chip.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-chip.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { HasSlotController } from '../internal/slot';\nimport { watch } from '../internal/watch';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\n\ninterface CustomEventDetail {\n value: string;\n}\n\n@customElement('nile-chip')\nexport class NileChip extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n \n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @state() tags: string[] = [];\n\n @state() inputValue: string = '';\n\n @state() isDropdownOpen: boolean = false;\n\n @query('nile-auto-complete') autoComplete!: any;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Disables the duplicate entries. */\n @property({ type: Boolean }) noDuplicates = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) acceptUserInput = false;\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = 'type here...';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n // Auto-complete options\n @property({ type: Array }) autoCompleteOptions: any[] = [];\n\n @property({ type: Array }) filteredAutoCompleteOptions: any[] = [];\n\n @property({ type: Array }) value: any[] = [];\n\n @property({ type: Boolean }) noWrap: boolean = false;\n\n @property({ type: Array }) errorIndexes: number[] = [];\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n\n @watch('autoCompleteOptions')\n onAutoCompleteOptionsChanged() {\n this.filteredAutoCompleteOptions = [...this.autoCompleteOptions];\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n }\n\n @watch('value')\n onValueChanged() {\n this.tags = [...this.value];\n this.onTagsChanged();\n }\n\n @watch('tags')\n onTagsChanged() {\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.tags.includes(option)\n );\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n if (this.noDuplicates) {\n this.filteredAutoCompleteOptions =\n this.filteredAutoCompleteOptions.filter(\n option => !this.value.includes(option)\n );\n }\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n private handleSelect(event: CustomEvent<CustomEventDetail>) {\n // Add the selected value to the tags array only if it doesn't already exist\n if (!this.noDuplicates || !this.tags.includes(event.detail.value)) {\n this.tags = [...this.tags, event.detail.value];\n this.emit('nile-chip-change', { value: this.tags });\n this.resetInput();\n }\n }\n\n private handleRemove(value: string) {\n // Remove the tag from the tags array\n this.tags = this.tags.filter(tag => tag !== value);\n\n if (this.noDuplicates && this.autoCompleteOptions.includes(value)) {\n this.filteredAutoCompleteOptions = [\n ...this.filteredAutoCompleteOptions,\n value,\n ];\n }\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n private handleInputChange(event: CustomEvent<CustomEventDetail>) {\n // Update the input value\n this.inputValue = event.detail.value;\n }\n\n private handleInputKeydown(event: KeyboardEvent) {\n if (!this.acceptUserInput) {\n return;\n }\n\n if(event.key === 'Tab'){\n event.preventDefault()\n }\n \n if (\n (event.key === 'Enter' || event.key === 'Tab' ) \n && this.inputValue \n && (!this.noDuplicates || !this.tags.includes(this.inputValue))\n ) {\n event.preventDefault()\n this.tags = [...this.tags, this.inputValue];\n this.resetInput();\n this.emit('nile-chip-change', { value: this.tags });\n }\n\n if(\n (event.key === 'Enter'|| event.key === 'Tab' ) \n && this.inputValue \n && (this.noDuplicates || this.tags.includes(this.inputValue))\n ){\n this.emit('nile-duplicates-blocked');\n }\n }\n\n private handleFocus() {\n this.isDropdownOpen = true;\n }\n\n private resetInput() {\n // Reset the input-related properties\n this.inputValue = '';\n this.isDropdownOpen = false;\n this.autoComplete.value = '';\n this.autoComplete.handleFocus();\n }\n\n render() {\n // Check if slots are present\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n\n // Check if label and help text are present\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'nile-chip--disabled': this.disabled,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div\n class=${classMap({\n 'nile-chip': true,\n 'nile-chip--warning': this.warning,\n 'nile-chip--error': this.error,\n 'nile-chip--success': this.success,\n 'nile-chip--no-wrap': this.noWrap,\n })}\n >\n ${this.tags.map(\n (tag, index) => html`\n <nile-tag\n class=${classMap({\n 'nile-chip__tags': true,\n })}\n .variant=${this.errorIndexes.includes(index) ? 'error' : 'normal'}\n @nile-remove=${() => this.handleRemove(tag)}\n removable\n pill\n >\n ${tag}\n </nile-tag>\n `\n )}\n <div class=\"nile-chip__auto-complete\">\n <nile-auto-complete\n @nile-show=\"${(e:CustomEvent)=>this.emit('nile-show')}\"\n @nile-after-show=\"${(e:CustomEvent)=>this.emit('nile-after-show')}\"\n @nile-hide=\"${(e:CustomEvent)=>this.emit('nile-hide')}\"\n @nile-after-hide=\"${(e:CustomEvent)=>this.emit('nile-after-hide')}\"\n .allMenuItems=${this.filteredAutoCompleteOptions}\n .value=${this.inputValue}\n ?isDropdownOpen=${this.isDropdownOpen}\n .noBorder=${true}\n openOnFocus\n exportparts=\"options__wrapper\"\n .placeholder=${this.placeholder}\n @nile-input=${this.handleInputChange}\n @keydown=${this.handleInputKeydown}\n @nile-focus=${this.handleFocus}\n @nile-complete=${this.handleSelect}\n ></nile-auto-complete>\n </div>\n <slot\n name=\"help-text\"\n part=\"form-control-help-text\"\n id=\"help-text\"\n class=\"form-control__help-text\"\n aria-hidden=${hasHelpText ? 'false' : 'true'}\n >\n ${this.helpText}\n </slot>\n </div>\n ${\n hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n `;\n }\n}\n\nexport default NileChip;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-chip': NileChip;\n }\n}\n"],"names":["NileChip","c","this","BUBBLES","hasSlotController","HasSlotController","tags","inputValue","isDropdownOpen","warning","error","success","noDuplicates","label","acceptUserInput","clearable","placeholder","readonly","disabled","autoCompleteOptions","filteredAutoCompleteOptions","value","noWrap","errorIndexes","helpText","errorMessage","_this","_inherits","_a","_createClass","key","onAutoCompleteOptionsChanged","filter","option","includes","onValueChanged","onTagsChanged","connectedCallback","super","emit","disconnectedCallback","handleSelect","event","detail","resetInput","handleRemove","tag","concat","_toConsumableArray","handleInputChange","handleInputKeydown","preventDefault","handleFocus","autoComplete","render","_this5","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","map","index","_templateObject2","e","_templateObject3","_templateObject4","__decorate","get","styles","NileElement","state","prototype","query","property","type","Boolean","reflect","Array","attribute","watch","customElement"],"mappings":"upLA0BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,uEAKcC,KAAAA,CAAOC,OAAU,CAAA,CAAA,CAAA,CAEnBD,KAAAA,CAAiBE,iBAAAA,CAAG,GAAIC,CAAAA,CACvCH,CAAAA,sBAAAA,CAAAA,KAAAA,EACA,YACA,OAGOA,CAAAA,CAAAA,KAAAA,CAAII,KAAa,EAEjBJ,CAAAA,KAAAA,CAAUK,UAAW,CAAA,EAAA,CAErBL,KAAAA,CAAcM,cAAY,CAAA,CAAA,CAAA,CAKNN,KAAAA,CAAOO,OAAG,CAAA,CAAA,CAAA,CAGVP,KAAAA,CAAKQ,KAAG,CAAA,CAAA,CAAA,CAGRR,KAAAA,CAAOS,OAAAA,CAAAA,CAAG,EAGVT,KAAAA,CAAYU,YAAAA,CAAAA,CAAG,EAGhCV,KAAAA,CAAKW,KAAAA,CAAG,GAGSX,KAAAA,CAAeY,eAAAA,CAAAA,CAAG,CAGlBZ,CAAAA,KAAAA,CAASa,WAAG,CAG7Bb,CAAAA,KAAAA,CAAWc,YAAG,cAGkBd,CAAAA,KAAAA,CAAQe,UAAG,CAGXf,CAAAA,KAAAA,CAAQgB,UAAG,CAG5BhB,CAAAA,KAAAA,CAAmBiB,oBAAU,EAE7BjB,CAAAA,KAAAA,CAA2BkB,4BAAU,EAErClB,CAAAA,KAAAA,CAAKmB,MAAU,EAEbnB,CAAAA,KAAAA,CAAMoB,MAAY,CAAA,CAAA,CAAA,CAEpBpB,KAAAA,CAAYqB,YAAa,CAAA,EAAA,CAECrB,KAAAA,CAAQ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