@aquera/nile-elements 1.6.2 → 1.6.4
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 +16 -0
- package/demo/variables.css +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +527 -339
- package/dist/internal/accessibility/a11y.custom-value.enum.cjs.js +2 -0
- package/dist/internal/accessibility/a11y.custom-value.enum.cjs.js.map +1 -0
- package/dist/internal/accessibility/a11y.custom-value.enum.esm.js +1 -0
- package/dist/internal/accessibility/a11y.property.enum.cjs.js +2 -0
- package/dist/internal/accessibility/a11y.property.enum.cjs.js.map +1 -0
- package/dist/internal/accessibility/a11y.property.enum.esm.js +1 -0
- package/dist/internal/accessibility/a11y.role.enum.cjs.js +2 -0
- package/dist/internal/accessibility/a11y.role.enum.cjs.js.map +1 -0
- package/dist/internal/accessibility/a11y.role.enum.esm.js +1 -0
- package/dist/internal/accessibility/a11y.state.enum.cjs.js +2 -0
- package/dist/internal/accessibility/a11y.state.enum.cjs.js.map +1 -0
- package/dist/internal/accessibility/a11y.state.enum.esm.js +1 -0
- package/dist/internal/accessibility/accessibility.const.cjs.js +2 -0
- package/dist/internal/accessibility/accessibility.const.cjs.js.map +1 -0
- package/dist/internal/accessibility/accessibility.const.esm.js +1 -0
- package/dist/internal/accessibility/role.enum.cjs.js +2 -0
- package/dist/internal/accessibility/role.enum.cjs.js.map +1 -0
- package/dist/internal/accessibility/role.enum.esm.js +1 -0
- package/dist/internal/nile-element.cjs.js +1 -1
- package/dist/internal/nile-element.cjs.js.map +1 -1
- package/dist/internal/nile-element.esm.js +1 -1
- package/dist/nile-accordion/index.cjs.js +1 -1
- package/dist/nile-accordion/index.esm.js +1 -1
- 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 +2 -2
- package/dist/nile-auto-complete/index.cjs.js +1 -1
- package/dist/nile-auto-complete/index.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +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 +1 -1
- package/dist/nile-avatar/index.cjs.js +1 -1
- package/dist/nile-avatar/index.esm.js +1 -1
- 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 +3 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +2 -2
- package/dist/nile-breadcrumb/index.cjs.js +1 -1
- package/dist/nile-breadcrumb/index.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/index.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/index.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 +4 -4
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.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 +5 -0
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-button-filter/index.cjs.js +1 -1
- package/dist/nile-button-filter/index.esm.js +1 -1
- package/dist/nile-button-filter/nile-button-filter.cjs.js +1 -1
- package/dist/nile-button-filter/nile-button-filter.cjs.js.map +1 -1
- package/dist/nile-button-filter/nile-button-filter.esm.js +7 -7
- package/dist/nile-button-toggle/index.cjs.js +1 -1
- package/dist/nile-button-toggle/index.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 +2 -2
- package/dist/nile-button-toggle-group/index.cjs.js +1 -1
- package/dist/nile-button-toggle-group/index.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/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.esm.js +4 -4
- package/dist/nile-card/index.cjs.js +1 -1
- package/dist/nile-card/index.esm.js +1 -1
- 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 +2 -2
- package/dist/nile-carousel/index.cjs.js +1 -1
- package/dist/nile-carousel/index.esm.js +1 -1
- package/dist/nile-carousel/nile-carousel-item/index.cjs.js +1 -1
- package/dist/nile-carousel/nile-carousel-item/index.esm.js +1 -1
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js +1 -1
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.cjs.js.map +1 -1
- package/dist/nile-carousel/nile-carousel-item/nile-carousel-item.esm.js +2 -2
- package/dist/nile-carousel/nile-carousel.cjs.js +1 -1
- package/dist/nile-carousel/nile-carousel.cjs.js.map +1 -1
- package/dist/nile-carousel/nile-carousel.esm.js +1 -1
- package/dist/nile-checkbox/index.cjs.js +1 -1
- package/dist/nile-checkbox/index.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.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +4 -0
- package/dist/nile-checkbox/nile-checkbox.esm.js +3 -3
- package/dist/nile-checkbox-group/index.cjs.js +2 -0
- package/dist/nile-checkbox-group/index.cjs.js.map +1 -0
- package/dist/nile-checkbox-group/index.esm.js +1 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.cjs.js +2 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.cjs.js.map +1 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.css.cjs.js +2 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.css.cjs.js.map +1 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.css.esm.js +68 -0
- package/dist/nile-checkbox-group/nile-checkbox-group.esm.js +56 -0
- package/dist/nile-chip/index.cjs.js +1 -1
- package/dist/nile-chip/index.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 +2 -2
- package/dist/nile-circular-progressbar/index.cjs.js +1 -1
- package/dist/nile-circular-progressbar/index.esm.js +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js.map +1 -1
- package/dist/nile-circular-progressbar/nile-circular-progressbar.esm.js +2 -2
- package/dist/nile-code-editor/index.cjs.js +1 -1
- package/dist/nile-code-editor/index.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +2 -2
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -2
- package/dist/nile-content-editor/index.cjs.js +1 -1
- package/dist/nile-content-editor/index.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/index.cjs.js +1 -1
- package/dist/nile-date-picker/index.esm.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
- package/dist/nile-date-picker/nile-date-picker.esm.js +1 -1
- package/dist/nile-detail/index.cjs.js +1 -1
- package/dist/nile-detail/index.esm.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js +1 -1
- package/dist/nile-detail/nile-detail.cjs.js.map +1 -1
- package/dist/nile-detail/nile-detail.esm.js +2 -2
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +2 -2
- package/dist/nile-divider/index.cjs.js +1 -1
- package/dist/nile-divider/index.esm.js +1 -1
- package/dist/nile-divider/nile-divider.cjs.js +1 -1
- package/dist/nile-divider/nile-divider.cjs.js.map +1 -1
- package/dist/nile-divider/nile-divider.esm.js +2 -2
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +1 -1
- package/dist/nile-dropdown/index.cjs.js +1 -1
- package/dist/nile-dropdown/index.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-empty-state/index.cjs.js +1 -1
- package/dist/nile-empty-state/index.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 +2 -2
- package/dist/nile-file-preview/index.cjs.js +1 -1
- package/dist/nile-file-preview/index.esm.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js +1 -1
- package/dist/nile-file-preview/nile-file-preview.cjs.js.map +1 -1
- package/dist/nile-file-preview/nile-file-preview.esm.js +1 -1
- package/dist/nile-file-upload/index.cjs.js +1 -1
- package/dist/nile-file-upload/index.esm.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js +1 -1
- package/dist/nile-file-upload/nile-file-upload.cjs.js.map +1 -1
- package/dist/nile-file-upload/nile-file-upload.esm.js +2 -2
- package/dist/nile-filter-chip/index.cjs.js +1 -1
- package/dist/nile-filter-chip/index.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +2 -2
- package/dist/nile-floating-panel/index.cjs.js +1 -1
- package/dist/nile-floating-panel/index.esm.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
- package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
- package/dist/nile-form-group/index.cjs.js +1 -1
- package/dist/nile-form-group/index.esm.js +1 -1
- package/dist/nile-form-group/nile-form-group.cjs.js +1 -1
- package/dist/nile-form-group/nile-form-group.cjs.js.map +1 -1
- package/dist/nile-form-group/nile-form-group.esm.js +2 -2
- package/dist/nile-format-date/index.cjs.js +1 -1
- package/dist/nile-format-date/index.esm.js +1 -1
- package/dist/nile-format-date/nile-format-date.cjs.js +1 -1
- package/dist/nile-format-date/nile-format-date.cjs.js.map +1 -1
- package/dist/nile-format-date/nile-format-date.esm.js +1 -1
- package/dist/nile-grid/index.cjs.js +1 -1
- package/dist/nile-grid/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-body/index.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-body/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-body/nile-grid-body.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-body/nile-grid-body.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-body/nile-grid-body.esm.js +2 -2
- package/dist/nile-grid/nile-grid-cell-item/index.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-cell-item/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-cell-item/nile-grid-cell-item.esm.js +2 -2
- package/dist/nile-grid/nile-grid-head/index.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head/nile-grid-head.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head/nile-grid-head.esm.js +2 -2
- package/dist/nile-grid/nile-grid-head-item/index.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-head-item/nile-grid-head-item.esm.js +3 -3
- package/dist/nile-grid/nile-grid-row/index.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-row/index.esm.js +1 -1
- package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js +1 -1
- package/dist/nile-grid/nile-grid-row/nile-grid-row.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid-row/nile-grid-row.esm.js +2 -2
- package/dist/nile-grid/nile-grid.cjs.js +1 -1
- package/dist/nile-grid/nile-grid.cjs.js.map +1 -1
- package/dist/nile-grid/nile-grid.esm.js +2 -2
- package/dist/nile-hero/index.cjs.js +1 -1
- package/dist/nile-hero/index.esm.js +1 -1
- package/dist/nile-hero/nile-hero.cjs.js +1 -1
- package/dist/nile-hero/nile-hero.cjs.js.map +1 -1
- package/dist/nile-hero/nile-hero.esm.js +2 -2
- package/dist/nile-hero-header/index.cjs.js +1 -1
- package/dist/nile-hero-header/index.esm.js +1 -1
- package/dist/nile-hero-header/nile-hero-header.cjs.js +1 -1
- package/dist/nile-hero-header/nile-hero-header.cjs.js.map +1 -1
- package/dist/nile-hero-header/nile-hero-header.esm.js +2 -2
- package/dist/nile-icon/icons/svg/arrow-left-small.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/arrow-left-small.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/arrow-left-small.esm.js +1 -0
- package/dist/nile-icon/icons/svg/arrow-right-small.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/arrow-right-small.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/arrow-right-small.esm.js +1 -0
- package/dist/nile-icon/icons/svg/arrow_left_small.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/arrow_left_small.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/arrow_left_small.esm.js +1 -0
- package/dist/nile-icon/icons/svg/arrow_right_small.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/arrow_right_small.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/arrow_right_small.esm.js +1 -0
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-inline-edit/index.cjs.js +1 -1
- package/dist/nile-inline-edit/index.esm.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.esm.js +2 -2
- package/dist/nile-inline-sidebar/index.cjs.js +1 -1
- package/dist/nile-inline-sidebar/index.esm.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +3 -3
- package/dist/nile-inline-sidebar-group/index.cjs.js +1 -1
- package/dist/nile-inline-sidebar-group/index.esm.js +1 -1
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.cjs.js +1 -1
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-group/nile-inline-sidebar-group.esm.js +3 -3
- package/dist/nile-inline-sidebar-item/index.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/index.esm.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +3 -3
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-link/index.cjs.js +1 -1
- package/dist/nile-link/index.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 +3 -3
- package/dist/nile-list/index.cjs.js +1 -1
- package/dist/nile-list/index.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/index.cjs.js +1 -1
- package/dist/nile-list-item/index.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 +2 -2
- package/dist/nile-lite-tooltip/index.cjs.js +1 -1
- package/dist/nile-lite-tooltip/index.esm.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
- package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
- package/dist/nile-menu/index.cjs.js +1 -1
- package/dist/nile-menu/index.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 +2 -2
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.esm.js +11 -2
- package/dist/nile-menu-item/nile-menu-item.esm.js +3 -3
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +1 -1
- package/dist/nile-option-group/index.cjs.js +1 -1
- package/dist/nile-option-group/index.esm.js +1 -1
- package/dist/nile-option-group/nile-option-group.cjs.js +1 -1
- package/dist/nile-option-group/nile-option-group.cjs.js.map +1 -1
- package/dist/nile-option-group/nile-option-group.esm.js +2 -2
- package/dist/nile-otp-input/index.cjs.js +1 -1
- package/dist/nile-otp-input/index.esm.js +1 -1
- package/dist/nile-otp-input/nile-otp-input.cjs.js +1 -1
- package/dist/nile-otp-input/nile-otp-input.cjs.js.map +1 -1
- package/dist/nile-otp-input/nile-otp-input.esm.js +1 -1
- package/dist/nile-page-header/index.cjs.js +1 -1
- package/dist/nile-page-header/index.esm.js +1 -1
- package/dist/nile-page-header/nile-page-header.cjs.js +1 -1
- package/dist/nile-page-header/nile-page-header.cjs.js.map +1 -1
- package/dist/nile-page-header/nile-page-header.esm.js +2 -2
- package/dist/nile-pagination/index.cjs.js +1 -1
- package/dist/nile-pagination/index.esm.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.esm.js +13 -0
- package/dist/nile-pagination/nile-pagination.esm.js +1 -1
- package/dist/nile-popover/index.cjs.js +1 -1
- package/dist/nile-popover/index.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +2 -2
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +3 -3
- package/dist/nile-popup/index.cjs.js +1 -1
- package/dist/nile-popup/index.esm.js +1 -1
- 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 +2 -2
- package/dist/nile-progress-bar/index.cjs.js +1 -1
- package/dist/nile-progress-bar/index.esm.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.esm.js +2 -2
- package/dist/nile-qr-code/index.cjs.js +1 -1
- package/dist/nile-qr-code/index.esm.js +1 -1
- package/dist/nile-qr-code/nile-qr-code.cjs.js +1 -1
- package/dist/nile-qr-code/nile-qr-code.cjs.js.map +1 -1
- package/dist/nile-qr-code/nile-qr-code.esm.js +2 -2
- package/dist/nile-radio/index.cjs.js +1 -1
- package/dist/nile-radio/index.esm.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.css.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.css.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.css.esm.js +4 -0
- package/dist/nile-radio/nile-radio.esm.js +2 -2
- package/dist/nile-radio-group/index.cjs.js +1 -1
- package/dist/nile-radio-group/index.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 +2 -2
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +8 -6
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/utils/list-utils.cjs.js +1 -1
- package/dist/nile-rich-text-editor/utils/list-utils.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/utils/list-utils.esm.js +1 -1
- package/dist/nile-section-message/index.cjs.js +1 -1
- package/dist/nile-section-message/index.esm.js +1 -1
- package/dist/nile-section-message/nile-section-message.cjs.js +1 -1
- package/dist/nile-section-message/nile-section-message.cjs.js.map +1 -1
- package/dist/nile-section-message/nile-section-message.esm.js +2 -2
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +21 -2
- package/dist/nile-select/nile-select.esm.js +33 -25
- package/dist/nile-select/portal-utils.cjs.js +1 -1
- package/dist/nile-select/portal-utils.cjs.js.map +1 -1
- package/dist/nile-select/portal-utils.esm.js +1 -1
- package/dist/nile-side-bar/index.cjs.js +1 -1
- package/dist/nile-side-bar/index.esm.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js +1 -1
- package/dist/nile-side-bar/nile-side-bar.cjs.js.map +1 -1
- package/dist/nile-side-bar/nile-side-bar.esm.js +2 -2
- package/dist/nile-side-bar-action/index.cjs.js +1 -1
- package/dist/nile-side-bar-action/index.esm.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.cjs.js.map +1 -1
- package/dist/nile-side-bar-action/nile-side-bar-action.esm.js +3 -3
- package/dist/nile-side-bar-action-menu/index.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu/index.esm.js +1 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.cjs.js.map +1 -1
- package/dist/nile-side-bar-action-menu/nile-side-bar-action-menu.esm.js +2 -2
- package/dist/nile-side-bar-action-menu-item/index.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu-item/index.esm.js +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-action-menu-item/nile-side-bar-action-menu-item.esm.js +1 -1
- package/dist/nile-side-bar-expand/index.cjs.js +1 -1
- package/dist/nile-side-bar-expand/index.esm.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.cjs.js.map +1 -1
- package/dist/nile-side-bar-expand/nile-side-bar-expand.esm.js +2 -2
- package/dist/nile-side-bar-footer/index.cjs.js +1 -1
- package/dist/nile-side-bar-footer/index.esm.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer/nile-side-bar-footer.esm.js +2 -2
- package/dist/nile-side-bar-footer-item/index.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/index.esm.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-item/nile-side-bar-footer-item.esm.js +1 -1
- package/dist/nile-side-bar-footer-text/index.cjs.js +1 -1
- package/dist/nile-side-bar-footer-text/index.esm.js +1 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js +1 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.cjs.js.map +1 -1
- package/dist/nile-side-bar-footer-text/nile-side-bar-footer-text.esm.js +3 -3
- package/dist/nile-side-bar-group/index.cjs.js +1 -1
- package/dist/nile-side-bar-group/index.esm.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.cjs.js.map +1 -1
- package/dist/nile-side-bar-group/nile-side-bar-group.esm.js +2 -2
- package/dist/nile-side-bar-group-item/index.cjs.js +1 -1
- package/dist/nile-side-bar-group-item/index.esm.js +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item/nile-side-bar-group-item.esm.js +2 -2
- package/dist/nile-side-bar-group-item-icon/index.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-icon/index.esm.js +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item-icon/nile-side-bar-group-item-icon.esm.js +2 -2
- package/dist/nile-side-bar-group-item-text/index.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-text/index.esm.js +1 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js +1 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.cjs.js.map +1 -1
- package/dist/nile-side-bar-group-item-text/nile-side-bar-group-item-text.esm.js +1 -1
- package/dist/nile-side-bar-header/index.cjs.js +1 -1
- package/dist/nile-side-bar-header/index.esm.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.cjs.js.map +1 -1
- package/dist/nile-side-bar-header/nile-side-bar-header.esm.js +2 -2
- package/dist/nile-side-bar-logo/index.cjs.js +1 -1
- package/dist/nile-side-bar-logo/index.esm.js +1 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js +1 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.cjs.js.map +1 -1
- package/dist/nile-side-bar-logo/nile-side-bar-logo.esm.js +2 -2
- package/dist/nile-side-bar-panel/index.cjs.js +1 -1
- package/dist/nile-side-bar-panel/index.esm.js +1 -1
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js +1 -1
- package/dist/nile-side-bar-panel/nile-side-bar-panel.cjs.js.map +1 -1
- package/dist/nile-side-bar-panel/nile-side-bar-panel.esm.js +2 -2
- package/dist/nile-skeleton-loader/index.cjs.js +1 -1
- package/dist/nile-skeleton-loader/index.esm.js +1 -1
- package/dist/nile-skeleton-loader/nile-skeleton-loader.cjs.js +1 -1
- package/dist/nile-skeleton-loader/nile-skeleton-loader.cjs.js.map +1 -1
- package/dist/nile-skeleton-loader/nile-skeleton-loader.esm.js +2 -2
- package/dist/nile-slide-toggle/index.cjs.js +1 -1
- package/dist/nile-slide-toggle/index.esm.js +1 -1
- 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 +2 -2
- package/dist/nile-slider/index.cjs.js +1 -1
- package/dist/nile-slider/index.esm.js +1 -1
- package/dist/nile-slider/nile-slider.cjs.js +1 -1
- package/dist/nile-slider/nile-slider.cjs.js.map +1 -1
- package/dist/nile-slider/nile-slider.esm.js +3 -3
- package/dist/nile-split-panel/index.cjs.js +1 -1
- package/dist/nile-split-panel/index.esm.js +1 -1
- 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 +2 -2
- package/dist/nile-stepper/index.cjs.js +1 -1
- package/dist/nile-stepper/index.esm.js +1 -1
- 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 +3 -3
- package/dist/nile-stepper-item/index.cjs.js +1 -1
- package/dist/nile-stepper-item/index.esm.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
- package/dist/nile-stepper-item/nile-stepper-item.esm.js +1 -1
- package/dist/nile-switcher/index.cjs.js +1 -1
- package/dist/nile-switcher/index.esm.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +23 -23
- package/dist/nile-tab/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-tab-panel/index.cjs.js +1 -1
- package/dist/nile-tab-panel/index.esm.js +1 -1
- package/dist/nile-tab-panel/nile-tab-panel.cjs.js +1 -1
- package/dist/nile-tab-panel/nile-tab-panel.cjs.js.map +1 -1
- package/dist/nile-tab-panel/nile-tab-panel.esm.js +3 -3
- package/dist/nile-table/index.cjs.js +1 -1
- package/dist/nile-table/index.esm.js +1 -1
- package/dist/nile-table/nile-table.cjs.js +1 -1
- package/dist/nile-table/nile-table.cjs.js.map +1 -1
- package/dist/nile-table/nile-table.esm.js +1 -1
- package/dist/nile-table-body/index.cjs.js +1 -1
- package/dist/nile-table-body/index.esm.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +3 -3
- package/dist/nile-table-cell-item/index.cjs.js +1 -1
- package/dist/nile-table-cell-item/index.esm.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.cjs.js.map +1 -1
- package/dist/nile-table-cell-item/nile-table-cell-item.esm.js +5 -5
- package/dist/nile-table-header-item/index.cjs.js +1 -1
- package/dist/nile-table-header-item/index.esm.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
- package/dist/nile-table-row/index.cjs.js +1 -1
- package/dist/nile-table-row/index.esm.js +1 -1
- package/dist/nile-table-row/nile-table-row.cjs.js +1 -1
- package/dist/nile-table-row/nile-table-row.cjs.js.map +1 -1
- package/dist/nile-table-row/nile-table-row.esm.js +2 -2
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-textarea/index.cjs.js +1 -1
- package/dist/nile-textarea/index.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 +2 -2
- package/dist/nile-title/index.cjs.js +1 -1
- package/dist/nile-title/index.esm.js +1 -1
- package/dist/nile-title/nile-title.cjs.js +1 -1
- package/dist/nile-title/nile-title.cjs.js.map +1 -1
- package/dist/nile-title/nile-title.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +1 -1
- package/dist/nile-toolbar/index.cjs.js +1 -1
- package/dist/nile-toolbar/index.esm.js +1 -1
- package/dist/nile-toolbar/nile-toolbar.cjs.js +1 -1
- package/dist/nile-toolbar/nile-toolbar.cjs.js.map +1 -1
- package/dist/nile-toolbar/nile-toolbar.esm.js +2 -2
- package/dist/nile-tooltip/index.cjs.js +1 -1
- package/dist/nile-tooltip/index.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 +2 -2
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/nile-vertical-stepper-item/index.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/index.esm.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
- package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +7 -7
- package/dist/nile-virtual-select/index.cjs.js +1 -1
- package/dist/nile-virtual-select/index.esm.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +2 -2
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/accessibility/a11y.custom-value.enum.d.ts +69 -0
- package/dist/src/internal/accessibility/a11y.custom-value.enum.js +71 -0
- package/dist/src/internal/accessibility/a11y.custom-value.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.property.enum.d.ts +33 -0
- package/dist/src/internal/accessibility/a11y.property.enum.js +35 -0
- package/dist/src/internal/accessibility/a11y.property.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.role.enum.d.ts +50 -0
- package/dist/src/internal/accessibility/a11y.role.enum.js +52 -0
- package/dist/src/internal/accessibility/a11y.role.enum.js.map +1 -0
- package/dist/src/internal/accessibility/a11y.state.enum.d.ts +17 -0
- package/dist/src/internal/accessibility/a11y.state.enum.js +19 -0
- package/dist/src/internal/accessibility/a11y.state.enum.js.map +1 -0
- package/dist/src/internal/accessibility/accessibility.const.d.ts +8 -0
- package/dist/src/internal/accessibility/accessibility.const.js +9 -0
- package/dist/src/internal/accessibility/accessibility.const.js.map +1 -0
- package/dist/src/internal/accessibility/role.enum.d.ts +3 -0
- package/dist/src/internal/accessibility/role.enum.js +5 -0
- package/dist/src/internal/accessibility/role.enum.js.map +1 -0
- package/dist/src/internal/nile-element.d.ts +52 -0
- package/dist/src/internal/nile-element.js +45 -0
- package/dist/src/internal/nile-element.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.js +2 -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 +12 -1
- package/dist/src/nile-badge/nile-badge.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +5 -0
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +4 -0
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
- package/dist/src/nile-checkbox/nile-checkbox.js +5 -0
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-checkbox-group/index.d.ts +1 -0
- package/dist/src/nile-checkbox-group/index.js +2 -0
- package/dist/src/nile-checkbox-group/index.js.map +1 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.css.d.ts +1 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.css.js +70 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.css.js.map +1 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.d.ts +84 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.js +355 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.js.map +1 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.test.d.ts +2 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.test.js +671 -0
- package/dist/src/nile-checkbox-group/nile-checkbox-group.test.js.map +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +1 -7
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/arrow-left-small.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/arrow-left-small.js +5 -0
- package/dist/src/nile-icon/icons/svg/arrow-left-small.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/arrow-right-small.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/arrow-right-small.js +5 -0
- package/dist/src/nile-icon/icons/svg/arrow-right-small.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/arrow_left_small.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/arrow_left_small.js +5 -0
- package/dist/src/nile-icon/icons/svg/arrow_left_small.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/arrow_right_small.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/arrow_right_small.js +5 -0
- package/dist/src/nile-icon/icons/svg/arrow_right_small.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/index.d.ts +4 -0
- package/dist/src/nile-icon/icons/svg/index.js +4 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-link/nile-link.d.ts +2 -1
- package/dist/src/nile-link/nile-link.js +18 -1
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.css.js +11 -2
- package/dist/src/nile-menu-item/nile-menu-item.css.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 +7 -1
- package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/dist/src/nile-otp-input/nile-otp-input.test.js +7 -7
- package/dist/src/nile-otp-input/nile-otp-input.test.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.css.js +13 -0
- package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.css.js +4 -0
- package/dist/src/nile-radio/nile-radio.css.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +7 -0
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +8 -6
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +2 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +43 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-link.test.js +6 -5
- package/dist/src/nile-rich-text-editor/nile-rte-link.test.js.map +1 -1
- package/dist/src/nile-rich-text-editor/utils/list-utils.js +0 -1
- package/dist/src/nile-rich-text-editor/utils/list-utils.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +21 -2
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +4 -0
- package/dist/src/nile-select/nile-select.js +42 -24
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-select/portal-utils.d.ts +2 -0
- package/dist/src/nile-select/portal-utils.js +36 -3
- package/dist/src/nile-select/portal-utils.js.map +1 -1
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/index.ts +1 -0
- package/src/internal/accessibility/a11y.custom-value.enum.ts +69 -0
- package/src/internal/accessibility/a11y.property.enum.ts +33 -0
- package/src/internal/accessibility/a11y.role.enum.ts +50 -0
- package/src/internal/accessibility/a11y.state.enum.ts +17 -0
- package/src/internal/accessibility/accessibility.const.ts +9 -0
- package/src/internal/accessibility/role.enum.ts +3 -0
- package/src/internal/nile-element.ts +99 -0
- package/src/nile-avatar/nile-avatar.ts +2 -0
- package/src/nile-badge/nile-badge.ts +13 -1
- package/src/nile-button/nile-button.css.ts +5 -0
- package/src/nile-checkbox/nile-checkbox.css.ts +4 -0
- package/src/nile-checkbox/nile-checkbox.ts +3 -0
- package/src/nile-checkbox-group/index.ts +1 -0
- package/src/nile-checkbox-group/nile-checkbox-group.css.ts +70 -0
- package/src/nile-checkbox-group/nile-checkbox-group.test.ts +769 -0
- package/src/nile-checkbox-group/nile-checkbox-group.ts +351 -0
- package/src/nile-code-editor/nile-code-editor.ts +1 -7
- package/src/nile-icon/icons/svg/arrow-left-small.ts +5 -0
- package/src/nile-icon/icons/svg/arrow-right-small.ts +5 -0
- package/src/nile-icon/icons/svg/arrow_left_small.ts +5 -0
- package/src/nile-icon/icons/svg/arrow_right_small.ts +5 -0
- package/src/nile-icon/icons/svg/index.ts +4 -0
- package/src/nile-link/nile-link.ts +21 -2
- package/src/nile-menu-item/nile-menu-item.css.ts +11 -2
- package/src/nile-menu-item/nile-menu-item.ts +5 -1
- package/src/nile-otp-input/nile-otp-input.test.ts +7 -7
- package/src/nile-pagination/nile-pagination.css.ts +13 -0
- package/src/nile-radio/nile-radio.css.ts +4 -0
- package/src/nile-radio-group/nile-radio-group.ts +7 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +8 -6
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +43 -0
- package/src/nile-rich-text-editor/nile-rte-link.test.ts +6 -5
- package/src/nile-rich-text-editor/utils/list-utils.ts +1 -2
- package/src/nile-select/nile-select.css.ts +21 -2
- package/src/nile-select/nile-select.ts +44 -24
- package/src/nile-select/portal-utils.ts +46 -3
- package/vscode-html-custom-data.json +117 -20
|
@@ -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","lit","lit/decorators.js","./nile-button-filter.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,n,
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-button-filter.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var e,i,n,t,r,o,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){n=_litDecoratorsJs.property;t=_litDecoratorsJs.state;r=_litDecoratorsJs.customElement;},function(_nileButtonFilterCssCjsJs){o=_nileButtonFilterCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_s){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.values=[],_this.isOpen=!1;return _this;}_inherits(l,_s);return _createClass(l,[{key:"handleInnerText",value:function handleInnerText(e){if(!e.length)return"";var n=e[0].slice(0,3);return e[0].length>3&&(n+="."),i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"inner__text\">\n <span> ","</span>\n ","\n </div>\n "])),n,e.length>1?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-badge variant=\"primary\" rounded\n >+","</nile-badge\n >\n "])),e.length-1):"");}},{key:"render",value:function render(){var e=this.handleInnerText(this.values);return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-button variant=\"tertiary\">\n <div class=\"inner__text\">\n <slot></slot>\n ","\n </div>\n\n ","\n\n <nile-icon slot=\"suffix\" name=\"var(--nile-icon-close, var(--ng-icon-x-close))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"16\" color=\"black\"></nile-icon>\n </nile-button>\n "])),e,this.isOpen?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral([" <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-up, var(--ng-icon-chevron-up))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>"]))):i(_templateObject5||(_templateObject5=_taggedTemplateLiteral([" <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-down, var(--ng-icon-chevron-down))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>"]))));}}],[{key:"styles",get:function get(){return[o];}}]);}(s));e([n({type:Array})],l.prototype,"values",void 0),e([t()],l.prototype,"isOpen",void 0),_export("N",l=e([r("nile-button-filter")],l));}};});
|
|
2
2
|
//# sourceMappingURL=nile-button-filter.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-button-filter.cjs.js","sources":["../../../src/nile-button-filter/nile-button-filter.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 CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-button-filter.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-button-filter\n *\n */\n@customElement('nile-button-filter')\nexport class NileButtonFilter extends NileElement {\n /**\n * The styles for ButtonFilter\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /** Disables the duplicate entries. */\n @property({ type: Array }) values: any = [];\n\n @state() private isOpen = false;\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n private handleInnerText(values: any) {\n if (!values.length) {\n return '';\n }\n let inner__text__value = values[0].slice(0, 3);\n if (values[0].length > 3) {\n inner__text__value = inner__text__value + '.';\n }\n let final__value = html`\n <div class=\"inner__text\">\n <span> ${inner__text__value}</span>\n ${values.length > 1\n ? html`\n <nile-badge variant=\"primary\" rounded\n >+${values.length - 1}</nile-badge\n >\n `\n : ``}\n </div>\n `;\n return final__value;\n }\n\n public render(): TemplateResult {\n const inner__value = this.handleInnerText(this.values);\n return html`\n <nile-button variant=\"tertiary\">\n <div class=\"inner__text\">\n <slot></slot>\n ${inner__value}\n </div>\n\n ${!this.isOpen\n ? html` <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-down, var(--ng-icon-chevron-down))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>`\n : html` <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-up, var(--ng-icon-chevron-up))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>`}\n\n <nile-icon slot=\"suffix\" name=\"var(--nile-icon-close, var(--ng-icon-x-close))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"16\" color=\"black\"></nile-icon>\n </nile-button>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileButtonFilter;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-filter': NileButtonFilter;\n }\n}\n"],"names":["NileButtonFilter","l","constructor","this","values","isOpen","_this","_inherits","_s","_createClass","key","value","handleInnerText","length","inner__text__value","slice","html","_templateObject","_taggedTemplateLiteral","_templateObject2","render","inner__value","_templateObject3","_templateObject4","_templateObject5","__decorate","get","styles","NileElement","property","type","Array","prototype","state","_export","customElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"nile-button-filter.cjs.js","sources":["../../../src/nile-button-filter/nile-button-filter.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 CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, state, property } from 'lit/decorators.js';\nimport { styles } from './nile-button-filter.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-button-filter\n *\n */\n@customElement('nile-button-filter')\nexport class NileButtonFilter extends NileElement {\n /**\n * The styles for ButtonFilter\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n /** Disables the duplicate entries. */\n @property({ type: Array }) values: any = [];\n\n @state() private isOpen = false;\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n\n private handleInnerText(values: any) {\n if (!values.length) {\n return '';\n }\n let inner__text__value = values[0].slice(0, 3);\n if (values[0].length > 3) {\n inner__text__value = inner__text__value + '.';\n }\n let final__value = html`\n <div class=\"inner__text\">\n <span> ${inner__text__value}</span>\n ${values.length > 1\n ? html`\n <nile-badge variant=\"primary\" rounded\n >+${values.length - 1}</nile-badge\n >\n `\n : ``}\n </div>\n `;\n return final__value;\n }\n\n public render(): TemplateResult {\n const inner__value = this.handleInnerText(this.values);\n return html`\n <nile-button variant=\"tertiary\">\n <div class=\"inner__text\">\n <slot></slot>\n ${inner__value}\n </div>\n\n ${!this.isOpen\n ? html` <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-down, var(--ng-icon-chevron-down))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>`\n : html` <nile-icon\n slot=\"suffix\"\n name=\"var(--nile-icon-arrow-up, var(--ng-icon-chevron-up))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n size=\"16\"\n color=\"black\"\n ></nile-icon>`}\n\n <nile-icon slot=\"suffix\" name=\"var(--nile-icon-close, var(--ng-icon-x-close))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" size=\"16\" color=\"black\"></nile-icon>\n </nile-button>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileButtonFilter;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-filter': NileButtonFilter;\n }\n}\n"],"names":["NileButtonFilter","l","constructor","this","values","isOpen","_this","_inherits","_s","_createClass","key","value","handleInnerText","length","inner__text__value","slice","html","_templateObject","_taggedTemplateLiteral","_templateObject2","render","inner__value","_templateObject3","_templateObject4","_templateObject5","__decorate","get","styles","NileElement","property","type","Array","prototype","state","_export","customElement"],"mappings":"giHAwBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAUsBC,KAAAA,CAAMC,MAAAA,CAAQ,EAExBD,CAAAA,KAAAA,CAAME,MAAG,CAAA,CAAA,CAgE3B,QAAAC,KAAA,EAvEQC,SAAA,CAAAN,CAAA,CAAAO,EAAA,SAAAC,YAAA,CAAAR,CAAA,GAAAS,GAAA,mBAAAC,KAAA,CAiBC,SAAAC,eAAAA,CAAgBR,CACtB,CAAA,CAAA,GAAA,CAAKA,CAAOS,CAAAA,MAAAA,CACV,MAAO,EAAA,CAET,GAAIC,CAAAA,CAAAA,CAAqBV,CAAO,CAAA,CAAA,CAAA,CAAGW,KAAM,CAAA,CAAA,CAAG,CAgB5C,CAAA,CAAA,MAfIX,CAAAA,CAAO,CAAA,CAAA,CAAA,CAAGS,MAAS,CAAA,CAAA,GACrBC,CAA0C,EAAA,GAAA,CAAA,CAEzBE,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uGAEVJ,CAAAA,CACPV,CAAOS,CAAAA,MAAAA,CAAS,EACdG,CAAI,CAAAG,gBAAA,GAAAA,gBAAA,CAAAD,sBAAA,iIAEId,CAAAA,CAAOS,MAAS,CAAA,CAAA,EAGxB,EAAA,CAIT,EAEM,GAAAH,GAAA,UAAAC,KAAA,UAAAS,MAAAA,CAAAA,EACL,GAAMC,CAAAA,CAAAA,CAAelB,KAAKS,eAAgBT,CAAAA,IAAAA,CAAKC,MAC/C,CAAA,CAAA,MAAOY,CAAAA,CAAI,CAAAM,gBAAA,GAAAA,gBAAA,CAAAJ,sBAAA,qYAIHG,CAAAA,CAGDlB,IAAAA,CAAKE,OAQJW,CAAI,CAAAO,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,wSAPJF,CAAI,CAAAQ,gBAAA,GAAAA,gBAAA,CAAAN,sBAAA,6SAkBb,CA/D0BO,KAAAA,GAAAA,UAAAA,GAAAA,CALpB,SAAAC,IAAA,CAAWC,CAChB,MAAO,CAACA,CACT,CAAA,EAeO,MAtB4BC,CAAAA,GAUTH,CAAAA,CAAA,CAA1BI,CAAS,CAAA,CAAEC,KAAMC,KAA0B/B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgC,SAAA,CAAA,QAAA,CAAA,IAAA,EAE3BP,CAAAA,CAAAA,CAAAA,CAAA,CAAhBQ,CAA+BjC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgC,UAAA,QAAA,CAAA,IAAA,EAAA,CAAA,CAAAE,OAAA,KAZrBlC,EAAgByB,CAAA,CAAA,CAD5BU,CAAc,CAAA,oBAAA,CAAA,CAAA,CACFnC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{html as
|
|
1
|
+
import{__decorate as e}from"tslib";import{html as i}from"lit";import{property as n,state as t,customElement as r}from"lit/decorators.js";import{s as o}from"./nile-button-filter.css.esm.js";import{N as s}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let l=class extends s{constructor(){super(...arguments),this.values=[],this.isOpen=!1}static get styles(){return[o]}handleInnerText(e){if(!e.length)return"";let n=e[0].slice(0,3);return e[0].length>3&&(n+="."),i`
|
|
2
2
|
<div class="inner__text">
|
|
3
|
-
<span> ${
|
|
4
|
-
${e.length>1?
|
|
3
|
+
<span> ${n}</span>
|
|
4
|
+
${e.length>1?i`
|
|
5
5
|
<nile-badge variant="primary" rounded
|
|
6
6
|
>+${e.length-1}</nile-badge
|
|
7
7
|
>
|
|
8
8
|
`:""}
|
|
9
9
|
</div>
|
|
10
|
-
`}render(){const e=this.handleInnerText(this.values);return
|
|
10
|
+
`}render(){const e=this.handleInnerText(this.values);return i`
|
|
11
11
|
<nile-button variant="tertiary">
|
|
12
12
|
<div class="inner__text">
|
|
13
13
|
<slot></slot>
|
|
14
14
|
${e}
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
${this.isOpen?
|
|
17
|
+
${this.isOpen?i` <nile-icon
|
|
18
18
|
slot="suffix"
|
|
19
19
|
name="var(--nile-icon-arrow-up, var(--ng-icon-chevron-up))"
|
|
20
20
|
method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"
|
|
21
21
|
size="16"
|
|
22
22
|
color="black"
|
|
23
|
-
></nile-icon>`:
|
|
23
|
+
></nile-icon>`:i` <nile-icon
|
|
24
24
|
slot="suffix"
|
|
25
25
|
name="var(--nile-icon-arrow-down, var(--ng-icon-chevron-down))"
|
|
26
26
|
method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))"
|
|
@@ -30,4 +30,4 @@ import{__decorate as e}from"tslib";import{html as n}from"lit";import{property as
|
|
|
30
30
|
|
|
31
31
|
<nile-icon slot="suffix" name="var(--nile-icon-close, var(--ng-icon-x-close))" method="var(--nile-svg-method-fill, var(--ng-svg-method-stroke))" size="16" color="black"></nile-icon>
|
|
32
32
|
</nile-button>
|
|
33
|
-
`}};e([
|
|
33
|
+
`}};e([n({type:Array})],l.prototype,"values",void 0),e([t()],l.prototype,"isOpen",void 0),l=e([r("nile-button-filter")],l);export{l as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-button-toggle.cjs.js","tslib","lit","lit/decorators.js","./nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileButtonToggleCjsJs){_export("NileButtonToggle",_nileButtonToggleCjsJs.a);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileButtonToggleCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-button-toggle.cjs.js","tslib","lit","lit/decorators.js","./nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileButtonToggleCjsJs){_export("NileButtonToggle",_nileButtonToggleCjsJs.a);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileButtonToggleCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as NileButtonToggle}from"./nile-button-toggle.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-button-toggle.css.esm.js";import"../internal/nile-element.esm.js";
|
|
1
|
+
export{a as NileButtonToggle}from"./nile-button-toggle.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-button-toggle.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
|
|
@@ -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","lit","lit/decorators.js","./nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,i,l,o,
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,l,o,_templateObject,n,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileButtonToggleCssCjsJs){l=_nileButtonToggleCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("a",n=/*#__PURE__*/function(_o){function n(){var _this;_classCallCheck(this,n);_this=_callSuper(this,n,arguments),_this.active=!1,_this.initial=!1,_this.middle=!1,_this.end=!1,_this.disabled=!1,_this.value="";return _this;}_inherits(n,_o);return _createClass(n,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(n,"connectedCallback",this,3)([]),this.addEventListener("click",this.toggle);}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.removeEventListener("click",this.toggle),_superPropGet(n,"disconnectedCallback",this,3)([]);}},{key:"toggle",value:function toggle(){this.disabled||this.emit("nile-toggle-change",{active:this.active,value:this.value});}},{key:"render",value:function render(){var t=["nile-button-toggle"];this.active&&t.push("nile-button-toggle__active"),this.initial&&t.push("nile-button-toggle__initial"),this.middle&&t.push("nile-button-toggle__middle"),this.end&&t.push("nile-button-toggle__end"),this.disabled&&t.push("nile-button-toggle__disabled");var i=t.join(" ");return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\""," \" part=\"base\">\n <slot name=\"prefix\"></slot>\n <slot> </slot>\n </div>\n "])),i);}}],[{key:"styles",get:function get(){return[l];}}]);}(o));t([i({type:Boolean,reflect:!0})],n.prototype,"active",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"initial",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"middle",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"end",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),t([i({type:String})],n.prototype,"value",void 0),_export("a",n=t([s("nile-button-toggle")],n));_export("N",r=n);}};});
|
|
2
2
|
//# sourceMappingURL=nile-button-toggle.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-button-toggle.cjs.js","sources":["../../../src/nile-button-toggle/nile-button-toggle.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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport {styles} from './nile-button-toggle.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-button-toggle\n *\n */\n@customElement('nile-button-toggle')\nexport class NileButtonToggle extends NileElement {\n\n\t/**\n\t * The styles for ButtonToggle\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n @property({ type: Boolean, reflect: true })\n active = false;\n\n @property({ type: Boolean, reflect: true })\n initial = false;\n\n @property({ type: Boolean, reflect: true })\n middle = false;\n\n @property({ type: Boolean, reflect: true })\n end = false;\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: String })\n value = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.toggle);\n }\n\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n super.disconnectedCallback();\n }\n\n toggle() {\n if (this.disabled) return;\n this.emit('nile-toggle-change',{ active: this.active, value: this.value })\n }\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n public render(): TemplateResult {\n let classes = ['nile-button-toggle'];\n if (this.active) {\n classes.push('nile-button-toggle__active');\n }\n if (this.initial) {\n classes.push('nile-button-toggle__initial');\n }\n if (this.middle) {\n classes.push('nile-button-toggle__middle');\n }\n if (this.end) {\n classes.push('nile-button-toggle__end');\n }\n if (this.disabled) {\n classes.push('nile-button-toggle__disabled');\n }\n\n const classString = classes.join(' ');\n\n return html`\n <div class=\"${classString} \" part=\"base\">\n <slot name=\"prefix\"></slot>\n <slot> </slot>\n </div>\n `;\n }\n\n\t/* #endregion */\n}\n\nexport default NileButtonToggle;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-toggle': NileButtonToggle;\n }\n}\n"],"names":["NileButtonToggle","n","this","active","initial","middle","end","disabled","value","_this","_inherits","
|
|
1
|
+
{"version":3,"file":"nile-button-toggle.cjs.js","sources":["../../../src/nile-button-toggle/nile-button-toggle.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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport {styles} from './nile-button-toggle.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-button-toggle\n *\n */\n@customElement('nile-button-toggle')\nexport class NileButtonToggle extends NileElement {\n\n\t/**\n\t * The styles for ButtonToggle\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n @property({ type: Boolean, reflect: true })\n active = false;\n\n @property({ type: Boolean, reflect: true })\n initial = false;\n\n @property({ type: Boolean, reflect: true })\n middle = false;\n\n @property({ type: Boolean, reflect: true })\n end = false;\n\n @property({ type: Boolean, reflect: true })\n disabled = false;\n\n @property({ type: String })\n value = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.toggle);\n }\n\n disconnectedCallback() {\n this.removeEventListener('click', this.toggle);\n super.disconnectedCallback();\n }\n\n toggle() {\n if (this.disabled) return;\n this.emit('nile-toggle-change',{ active: this.active, value: this.value })\n }\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n public render(): TemplateResult {\n let classes = ['nile-button-toggle'];\n if (this.active) {\n classes.push('nile-button-toggle__active');\n }\n if (this.initial) {\n classes.push('nile-button-toggle__initial');\n }\n if (this.middle) {\n classes.push('nile-button-toggle__middle');\n }\n if (this.end) {\n classes.push('nile-button-toggle__end');\n }\n if (this.disabled) {\n classes.push('nile-button-toggle__disabled');\n }\n\n const classString = classes.join(' ');\n\n return html`\n <div class=\"${classString} \" part=\"base\">\n <slot name=\"prefix\"></slot>\n <slot> </slot>\n </div>\n `;\n }\n\n\t/* #endregion */\n}\n\nexport default NileButtonToggle;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-toggle': NileButtonToggle;\n }\n}\n"],"names":["NileButtonToggle","_o","n","this","active","initial","middle","end","disabled","value","_this","_inherits","_createClass","key","connectedCallback","super","addEventListener","toggle","disconnectedCallback","removeEventListener","emit","render","classes","push","classString","join","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","property","type","Boolean","reflect","prototype","String","_export","customElement","NileButtonToggle$1"],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,customElement as s}from"lit/decorators.js";import{s as l}from"./nile-button-toggle.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let n=class extends o{constructor(){super(...arguments),this.active=!1,this.initial=!1,this.middle=!1,this.end=!1,this.disabled=!1,this.value=""}static get styles(){return[l]}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.toggle)}disconnectedCallback(){this.removeEventListener("click",this.toggle),super.disconnectedCallback()}toggle(){this.disabled||this.emit("nile-toggle-change",{active:this.active,value:this.value})}render(){let t=["nile-button-toggle"];this.active&&t.push("nile-button-toggle__active"),this.initial&&t.push("nile-button-toggle__initial"),this.middle&&t.push("nile-button-toggle__middle"),this.end&&t.push("nile-button-toggle__end"),this.disabled&&t.push("nile-button-toggle__disabled");const i=t.join(" ");return e`
|
|
2
2
|
<div class="${i} " part="base">
|
|
3
3
|
<slot name="prefix"></slot>
|
|
4
4
|
<slot> </slot>
|
|
5
5
|
</div>
|
|
6
|
-
`}};t([i({type:Boolean,reflect:!0})],n.prototype,"active",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"initial",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"middle",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"end",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),t([i({type:String})],n.prototype,"value",void 0),n=t([
|
|
6
|
+
`}};t([i({type:Boolean,reflect:!0})],n.prototype,"active",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"initial",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"middle",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"end",void 0),t([i({type:Boolean,reflect:!0})],n.prototype,"disabled",void 0),t([i({type:String})],n.prototype,"value",void 0),n=t([s("nile-button-toggle")],n);var r=n;export{r as N,n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-button-toggle-group.cjs.js","tslib","lit","lit/decorators.js","./nile-button-toggle-group.css.cjs.js","../nile-button-toggle/nile-button-toggle.cjs.js","../nile-button-toggle/nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileButtonToggleGroupCjsJs){_export("NileButtonToggleGroup",_nileButtonToggleGroupCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileButtonToggleGroupCssCjsJs){},function(_nileButtonToggleNileButtonToggleCjsJs){},function(_nileButtonToggleNileButtonToggleCssCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-button-toggle-group.cjs.js","tslib","lit","lit/decorators.js","./nile-button-toggle-group.css.cjs.js","../nile-button-toggle/nile-button-toggle.cjs.js","../nile-button-toggle/nile-button-toggle.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileButtonToggleGroupCjsJs){_export("NileButtonToggleGroup",_nileButtonToggleGroupCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileButtonToggleGroupCssCjsJs){},function(_nileButtonToggleNileButtonToggleCjsJs){},function(_nileButtonToggleNileButtonToggleCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NileButtonToggleGroup}from"./nile-button-toggle-group.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-button-toggle-group.css.esm.js";import"../nile-button-toggle/nile-button-toggle.esm.js";import"../nile-button-toggle/nile-button-toggle.css.esm.js";import"../internal/nile-element.esm.js";
|
|
1
|
+
export{N as NileButtonToggleGroup}from"./nile-button-toggle-group.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-button-toggle-group.css.esm.js";import"../nile-button-toggle/nile-button-toggle.esm.js";import"../nile-button-toggle/nile-button-toggle.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
|
|
@@ -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","lit","lit/decorators.js","./nile-button-toggle-group.css.cjs.js","../nile-button-toggle/nile-button-toggle.cjs.js","../internal/nile-element.cjs.js","../nile-button-toggle/nile-button-toggle.css.cjs.js"],function(_export,_context){"use strict";var t,s,i,e,o,l,h,
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-button-toggle-group.css.cjs.js","../nile-button-toggle/nile-button-toggle.cjs.js","../internal/nile-element.cjs.js","../nile-button-toggle/nile-button-toggle.css.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,s,i,e,o,l,n,h,a,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_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(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){s=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.queryAll;e=_litDecoratorsJs.query;o=_litDecoratorsJs.property;l=_litDecoratorsJs.customElement;},function(_nileButtonToggleGroupCssCjsJs){n=_nileButtonToggleGroupCssCjsJs.s;},function(_nileButtonToggleNileButtonToggleCjsJs){h=_nileButtonToggleNileButtonToggleCjsJs.N;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_nileButtonToggleNileButtonToggleCssCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",r=/*#__PURE__*/function(_a){function r(){var _this;_classCallCheck(this,r);_this=_callSuper(this,r,arguments),_this.disabled=!1,_this.value="",_this.multiple=!1,_this.disableUserInput=!1,_this.emptyDefault=!1;return _this;}_inherits(r,_a);return _createClass(r,[{key:"firstUpdated",value:function firstUpdated(){var _this2=this;if(this.defaultSlot.addEventListener("slotchange",function(){return _this2.updateTogglePositions();}),this.addEventListener("nile-toggle-change",this.handleToggle),this.updateTogglePositions(),!this.value)if(this.multiple)this.value=[];else{var _t=Array.from(this.querySelectorAll("nile-button-toggle")),_s=_t.find(function(t){return t.active&&!t.disabled;});_s?this.value=_s.value:!_t.length||this.emptyDefault||this.disabled?this.value="":this.value=_t[0].value;}this.setBtnState();}},{key:"updated",value:function updated(t){_superPropGet(r,"updated",this,3)([t]),t.has("disabled")&&this.updateDisabledState(),t.has("multiple")&&(this.value||(this.value=this.multiple?[]:""),this.setBtnState()),t.has("value")&&this.setBtnState();}},{key:"updateDisabledState",value:function updateDisabledState(){var _this3=this;this.defaultSlot.assignedNodes({flatten:!0}).filter(function(t){return t instanceof h;}).forEach(function(t){t.disabled||(t.disabled=_this3.disabled);});}},{key:"updateTogglePositions",value:function updateTogglePositions(){var t=this.defaultSlot.assignedNodes({flatten:!0}).filter(function(t){return t instanceof h;});t.forEach(function(s,i){s.initial=0===i,s.middle=i>0&&i<t.length-1,s.end=i===t.length-1;});}},{key:"handleToggle",value:function handleToggle(t){t.stopPropagation(),this.disabled||(this.multiple||t.detail.value!=this.value)&&(this.disableUserInput||(this.setValue(t.detail.value),this.emit("nile-change",{value:this.value})));}},{key:"setValue",value:function setValue(t){this.multiple&&t?this.value.includes(t)?this.value=this.value.filter(function(s){return s!=t;}):this.value=[].concat(_toConsumableArray(this.value),[t]):this.value=t,this.setBtnState();}},{key:"setBtnState",value:function setBtnState(){var _this4=this;var t=Array.from(this.querySelectorAll("nile-button-toggle"));this.multiple?t.forEach(function(t){_this4.value.includes(t.value)?t.active=!0:t.active=!1;}):t.forEach(function(t){t.value==_this4.value?t.active=!0:t.active=!1;});}},{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<slot> </slot>"])));}}],[{key:"styles",get:function get(){return[n];}}]);}(a));t([i("nile-button-toggle")],r.prototype,"toggles",void 0),t([e("slot:not([name])")],r.prototype,"defaultSlot",void 0),t([o({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),t([o()],r.prototype,"value",void 0),t([o({type:Boolean})],r.prototype,"multiple",void 0),t([o({type:Boolean})],r.prototype,"disableUserInput",void 0),t([o({type:Boolean})],r.prototype,"emptyDefault",void 0),_export("N",r=t([l("nile-button-toggle-group")],r));}};});
|
|
2
2
|
//# sourceMappingURL=nile-button-toggle-group.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-button-toggle-group.cjs.js","sources":["../../../src/nile-button-toggle-group/nile-button-toggle-group.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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, query, queryAll, property } from 'lit/decorators.js';\nimport {styles} from './nile-button-toggle-group.css';\nimport NileButtonToggle from '../nile-button-toggle/nile-button-toggle';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-button-toggle-group\n *\n */\n@customElement('nile-button-toggle-group')\nexport class NileButtonToggleGroup extends NileElement {\n /**\n * The styles for ButtonToggleGroup\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAll('nile-button-toggle') private toggles!: NodeListOf<NileButtonToggle>;\n\n @query('slot:not([name])') private defaultSlot!: HTMLSlotElement;\n\n @property({ type: Boolean, reflect: true }) public disabled: boolean = false;\n\n @property() value:String[]|String='';\n\n @property({type:Boolean}) multiple:boolean=false;\n\n @property({type: Boolean}) disableUserInput: Boolean = false;\n\n @property({type:Boolean}) emptyDefault:boolean=false;\n\n firstUpdated() {\n this.defaultSlot.addEventListener('slotchange', () =>\n this.updateTogglePositions()\n );\n this.addEventListener('nile-toggle-change', this.handleToggle);\n this.updateTogglePositions();\n if (!this.value) {\n if (!this.multiple) {\n const toggles = Array.from(this.querySelectorAll<NileButtonToggle>('nile-button-toggle'));\n const activeToggle = toggles.find(e => e.active && !e.disabled);\n if (activeToggle) this.value = activeToggle.value;\n else if(toggles.length && !this.emptyDefault && !this.disabled) this.value = toggles[0].value;\n else this.value = '';\n }\n else this.value = [];\n }\n this.setBtnState()\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled')) {\n this.updateDisabledState();\n }\n if(changedProperties.has('multiple')){\n if(!this.value) this.value=this.multiple?[]:''\n this.setBtnState()\n }\n if(changedProperties.has('value')){\n this.setBtnState()\n }\n }\n\n private updateDisabledState() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach(toggle => {\n if (!toggle.disabled) {\n toggle.disabled = this.disabled;\n }\n });\n }\n\n updateTogglePositions() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach((toggle, index) => {\n toggle.initial = index === 0;\n toggle.middle = index > 0 && index < toggles.length - 1;\n toggle.end = index === toggles.length - 1;\n });\n }\n\n handleToggle(event: CustomEvent) {\n event.stopPropagation()\n if (this.disabled) return;\n if(!this.multiple && event.detail.value == this.value) return;\n if(this.disableUserInput) return;\n this.setValue(event.detail.value);\n this.emit('nile-change', { value: this.value });\n }\n\n setValue(btnValue:string){\n if(this.multiple && btnValue){\n // @ts-ignore\n if(this.value.includes(btnValue)) this.value=this.value.filter(e=>e!=btnValue)\n else this.value=[...this.value,btnValue]\n }\n else{\n this.value=btnValue;\n }\n this.setBtnState()\n }\n\n setBtnState(){\n const toggles = Array.from(this.querySelectorAll<NileButtonToggle>('nile-button-toggle'));\n if(this.multiple){\n toggles.forEach(btn=>{\n if(this.value.includes(btn.value)) btn.active=true;\n else btn.active=false;\n })\n }\n else toggles.forEach(btn=>{\n if(btn.value==this.value) btn.active=true;\n else btn.active=false;\n })\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`<slot> </slot>`;\n }\n\n /* #endregion */\n}\n\nexport default NileButtonToggleGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-toggle-group': NileButtonToggleGroup;\n }\n}\n"],"names":["NileButtonToggleGroup","_a","r","constructor","this","disabled","value","multiple","disableUserInput","emptyDefault","_this","_inherits","_createClass","key","firstUpdated","_this2","defaultSlot","addEventListener","updateTogglePositions","handleToggle","toggles","Array","from","querySelectorAll","activeToggle","find","e","active","length","setBtnState","updated","changedProperties","super","has","updateDisabledState","assignedNodes","flatten","filter","node","NileButtonToggle","forEach","toggle","index","initial","middle","end","event","stopPropagation","detail","setValue","emit","btnValue","includes","concat","_toConsumableArray","_this4","btn","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","queryAll","prototype","query","property","type","Boolean","reflect","customElement"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"nile-button-toggle-group.cjs.js","sources":["../../../src/nile-button-toggle-group/nile-button-toggle-group.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 {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, query, queryAll, property } from 'lit/decorators.js';\nimport {styles} from './nile-button-toggle-group.css';\nimport NileButtonToggle from '../nile-button-toggle/nile-button-toggle';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-button-toggle-group\n *\n */\n@customElement('nile-button-toggle-group')\nexport class NileButtonToggleGroup extends NileElement {\n /**\n * The styles for ButtonToggleGroup\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @queryAll('nile-button-toggle') private toggles!: NodeListOf<NileButtonToggle>;\n\n @query('slot:not([name])') private defaultSlot!: HTMLSlotElement;\n\n @property({ type: Boolean, reflect: true }) public disabled: boolean = false;\n\n @property() value:String[]|String='';\n\n @property({type:Boolean}) multiple:boolean=false;\n\n @property({type: Boolean}) disableUserInput: Boolean = false;\n\n @property({type:Boolean}) emptyDefault:boolean=false;\n\n firstUpdated() {\n this.defaultSlot.addEventListener('slotchange', () =>\n this.updateTogglePositions()\n );\n this.addEventListener('nile-toggle-change', this.handleToggle);\n this.updateTogglePositions();\n if (!this.value) {\n if (!this.multiple) {\n const toggles = Array.from(this.querySelectorAll<NileButtonToggle>('nile-button-toggle'));\n const activeToggle = toggles.find(e => e.active && !e.disabled);\n if (activeToggle) this.value = activeToggle.value;\n else if(toggles.length && !this.emptyDefault && !this.disabled) this.value = toggles[0].value;\n else this.value = '';\n }\n else this.value = [];\n }\n this.setBtnState()\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled')) {\n this.updateDisabledState();\n }\n if(changedProperties.has('multiple')){\n if(!this.value) this.value=this.multiple?[]:''\n this.setBtnState()\n }\n if(changedProperties.has('value')){\n this.setBtnState()\n }\n }\n\n private updateDisabledState() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach(toggle => {\n if (!toggle.disabled) {\n toggle.disabled = this.disabled;\n }\n });\n }\n\n updateTogglePositions() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach((toggle, index) => {\n toggle.initial = index === 0;\n toggle.middle = index > 0 && index < toggles.length - 1;\n toggle.end = index === toggles.length - 1;\n });\n }\n\n handleToggle(event: CustomEvent) {\n event.stopPropagation()\n if (this.disabled) return;\n if(!this.multiple && event.detail.value == this.value) return;\n if(this.disableUserInput) return;\n this.setValue(event.detail.value);\n this.emit('nile-change', { value: this.value });\n }\n\n setValue(btnValue:string){\n if(this.multiple && btnValue){\n // @ts-ignore\n if(this.value.includes(btnValue)) this.value=this.value.filter(e=>e!=btnValue)\n else this.value=[...this.value,btnValue]\n }\n else{\n this.value=btnValue;\n }\n this.setBtnState()\n }\n\n setBtnState(){\n const toggles = Array.from(this.querySelectorAll<NileButtonToggle>('nile-button-toggle'));\n if(this.multiple){\n toggles.forEach(btn=>{\n if(this.value.includes(btn.value)) btn.active=true;\n else btn.active=false;\n })\n }\n else toggles.forEach(btn=>{\n if(btn.value==this.value) btn.active=true;\n else btn.active=false;\n })\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`<slot> </slot>`;\n }\n\n /* #endregion */\n}\n\nexport default NileButtonToggleGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-toggle-group': NileButtonToggleGroup;\n }\n}\n"],"names":["NileButtonToggleGroup","_a","r","constructor","this","disabled","value","multiple","disableUserInput","emptyDefault","_this","_inherits","_createClass","key","firstUpdated","_this2","defaultSlot","addEventListener","updateTogglePositions","handleToggle","toggles","Array","from","querySelectorAll","activeToggle","find","e","active","length","setBtnState","updated","changedProperties","super","has","updateDisabledState","assignedNodes","flatten","filter","node","NileButtonToggle","forEach","toggle","index","initial","middle","end","event","stopPropagation","detail","setValue","emit","btnValue","includes","btn","render","html","_templateObject","_taggedTemplateLiteral","get","styles","NileElement","__decorate","queryAll","prototype","query","property","type","Boolean","reflect","customElement"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as s}from"lit";import{queryAll as i,query as e,property as o,customElement as l}from"lit/decorators.js";import{s as
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as s}from"lit";import{queryAll as i,query as e,property as o,customElement as l}from"lit/decorators.js";import{s as n}from"./nile-button-toggle-group.css.esm.js";import{N as h}from"../nile-button-toggle/nile-button-toggle.esm.js";import{N as a}from"../internal/nile-element.esm.js";import"../nile-button-toggle/nile-button-toggle.css.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";let r=class extends a{constructor(){super(...arguments),this.disabled=!1,this.value="",this.multiple=!1,this.disableUserInput=!1,this.emptyDefault=!1}static get styles(){return[n]}firstUpdated(){if(this.defaultSlot.addEventListener("slotchange",(()=>this.updateTogglePositions())),this.addEventListener("nile-toggle-change",this.handleToggle),this.updateTogglePositions(),!this.value)if(this.multiple)this.value=[];else{const t=Array.from(this.querySelectorAll("nile-button-toggle")),s=t.find((t=>t.active&&!t.disabled));s?this.value=s.value:!t.length||this.emptyDefault||this.disabled?this.value="":this.value=t[0].value}this.setBtnState()}updated(t){super.updated(t),t.has("disabled")&&this.updateDisabledState(),t.has("multiple")&&(this.value||(this.value=this.multiple?[]:""),this.setBtnState()),t.has("value")&&this.setBtnState()}updateDisabledState(){this.defaultSlot.assignedNodes({flatten:!0}).filter((t=>t instanceof h)).forEach((t=>{t.disabled||(t.disabled=this.disabled)}))}updateTogglePositions(){const t=this.defaultSlot.assignedNodes({flatten:!0}).filter((t=>t instanceof h));t.forEach(((s,i)=>{s.initial=0===i,s.middle=i>0&&i<t.length-1,s.end=i===t.length-1}))}handleToggle(t){t.stopPropagation(),this.disabled||(this.multiple||t.detail.value!=this.value)&&(this.disableUserInput||(this.setValue(t.detail.value),this.emit("nile-change",{value:this.value})))}setValue(t){this.multiple&&t?this.value.includes(t)?this.value=this.value.filter((s=>s!=t)):this.value=[...this.value,t]:this.value=t,this.setBtnState()}setBtnState(){const t=Array.from(this.querySelectorAll("nile-button-toggle"));this.multiple?t.forEach((t=>{this.value.includes(t.value)?t.active=!0:t.active=!1})):t.forEach((t=>{t.value==this.value?t.active=!0:t.active=!1}))}render(){return s`<slot> </slot>`}};t([i("nile-button-toggle")],r.prototype,"toggles",void 0),t([e("slot:not([name])")],r.prototype,"defaultSlot",void 0),t([o({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0),t([o()],r.prototype,"value",void 0),t([o({type:Boolean})],r.prototype,"multiple",void 0),t([o({type:Boolean})],r.prototype,"disableUserInput",void 0),t([o({type:Boolean})],r.prototype,"emptyDefault",void 0),r=t([l("nile-button-toggle-group")],r);export{r as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-calendar.cjs.js","tslib","lit","lit/decorators.js","./nile-calendar.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-calendar.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileCalendarCjsJs){_export("NileCalendar",_nileCalendarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileCalendarCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_nileCalendarEnumCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-calendar.cjs.js","tslib","lit","lit/decorators.js","./nile-calendar.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","./nile-calendar.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileCalendarCjsJs){_export("NileCalendar",_nileCalendarCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileCalendarCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_nileCalendarEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NileCalendar}from"./nile-calendar.esm.js";import"tslib";import"lit";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"./nile-calendar.enum.esm.js";
|
|
1
|
+
export{N as NileCalendar}from"./nile-calendar.esm.js";import"tslib";import"lit";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"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"./nile-calendar.enum.esm.js";
|
|
@@ -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","lit","lit/decorators.js","./nile-calendar.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-calendar.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,l,r,h,d,o,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23,_templateObject24,_templateObject25,c;function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_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(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;e=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;n=_litDecoratorsJs.state;a=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){l=_nileCalendarCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_nileCalendarEnumCjsJs){o=_nileCalendarEnumCjsJs.C;}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_d){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.valueAttribute=null,_this.allowedDates=JSON.stringify({}),_this.range=!1,_this.hideTypes=!1,_this.doubleClickUnselect=!1,_this.allowClear=!1,_this.type="absolute",_this.hideDurationFields=[],_this.showManualInputs=!1,_this.showMonthDropdown=!1,_this.showYearDropdown=!1,_this.dateFormat="MM/DD/YYYY",_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.hideInput=!1,_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.allowedDatesLocal=null,_this.disabled=!1;return _this;}_inherits(c,_d);return _createClass(c,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(c,"connectedCallback",this,3)([]),this.initializeValue(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(c,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}},{key:"updated",value:function updated(t){if(_superPropGet(c,"updated",this,3)([t]),t.has("valueAttribute")){this.valueAttribute||(this.value=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0);var _t=new Date(this.valueAttribute||"");if(!isNaN(_t.getTime())){var _i=_t.getTimezoneOffset();this.value=new Date(_t.getTime()-60*_i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}this.initializeValue();}}},{key:"monthNames",get:function get(){return Array.from({length:12},function(t,i){return new Date(0,i).toLocaleString("default",{month:"long"});});}},{key:"yearOptions",get:function get(){var _this$startYear,_this$endYear;var t=(_this$startYear=this.startYear)!==null&&_this$startYear!==void 0?_this$startYear:2e3,i=(_this$endYear=this.endYear)!==null&&_this$endYear!==void 0?_this$endYear:2050;return t>i?[]:Array.from({length:i-t+1},function(i,e){return t+e;});}},{key:"onMonthSelected",value:function onMonthSelected(t){this.currentMonth=t,this.emit("nile-month-change",{month:t});}},{key:"onYearSelected",value:function onYearSelected(t){this.currentYear=t,this.emit("nile-year-change",{year:t});}},{key:"checkValidAllowedDate",value:function checkValidAllowedDate(){var t;try{t=JSON.parse(this.allowedDates);}catch(i){t=null;}if(!t||0==Object.keys(t).length)return void(this.allowedDatesLocal=null);this.hideInput=!0;this.getUTCDate(t.startDate)>this.getUTCDate(t.endDate)?console.error("StartDate must be greater than endDate"):this.allowedDatesLocal=t;}},{key:"isPrevDisabled",value:function isPrevDisabled(){return 0===this.currentMonth&&void 0!==this.startYear&&this.currentYear<=this.startYear;}},{key:"isNextDisabled",value:function isNextDisabled(){return 11===this.currentMonth&&void 0!==this.endYear&&this.currentYear>=this.endYear;}},{key:"formatDate",value:function formatDate(t){if(!t)return"";var i=t.getFullYear(),e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");var n=this.dateFormat;return n=n.replace(/YYYY/g,String(i)),n=n.replace(/MM/g,e),n=n.replace(/DD/g,s),n=n.replace(/YY/g,String(i).slice(-2)),n;}},{key:"parseDate",value:function parseDate(t,i){if(!t||!this.dateFormat)return null;var e=this.dateFormat.replace(/YYYY/,"(?<year>\\d{4})").replace(/YY/,"(?<year>\\d{2})").replace(/MM/,"(?<month>\\d{1,2})").replace(/DD/,"(?<day>\\d{1,2})"),s=new RegExp("^".concat(e,"$")),n=t.match(s);if(!n||!n.groups)return null;var a=2===n.groups.year.length?Number("20".concat(n.groups.year)):Number(n.groups.year),l=Number(n.groups.month)-1,r=Number(n.groups.day),h=new Date(a,l,r);return i?h.setHours(i.getHours(),i.getMinutes(),i.getSeconds()):h.setHours(0,0,0),h;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){t.stopPropagation();var i=this.parseDate(t.detail.value,this.startDate);i&&(i.setHours(0,0,0),this.startDate=i,this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.requestUpdate());}},{key:"handleEndDateInput",value:function handleEndDateInput(t){t.stopPropagation();var i=this.parseDate(t.detail.value,this.endDate);i&&(i.setHours(23,59,59),this.endDate=i,this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.requestUpdate());}},{key:"render",value:function render(){var _this2=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n class=","\n part=\"calendar-container\"\n >\n <div class=",">\n <div class=\"calendar-switcher\" part=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\" value=\"","\">\n <nile-tab slot=\"nav\" panel=\"absolute\" tabindex=\"","\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\" tabindex=\"","\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n \n ","\n ","\n\n ","\n </div>\n "])),r({base:!0,base__range:this.range}),r({"calendar-config":!0,hidden:!this.range||this.range&&this.hideTypes}),this.onTypeChange,this.type,this.disabled?"-1":"0",this.disabled?"-1":"0","relative"==this.type?this.renderRelativeCalendar():"","absolute"==this.type?this.renderAbsoluteCalendar():"",this.range?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <div class=\"button-container\" part=\"button-container\">\n ","\n <nile-button \n class=\"apply-button\" \n ?disabled=\"","\" \n @click=\"","\"\n @keydown=\"","\"\n > Apply</nile-button>\n </div>\n "])),this.allowClear?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-button \n class=\"clear-button\"\n variant=\"secondary\"\n role=\"button\"\n ?disabled=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n\n > Reset</nile-button>"])),!this.startDate||!this.endDate,function(t){"Enter"!==t.key&&" "!==t.key||_this2.clearDate();},this.clearDate):e,!this.startDate||!this.endDate,this.confimRange,function(t){"Enter"!==t.key&&" "!==t.key||_this2.confimRange();}):"");}},{key:"renderAbsoluteCalendar",value:function renderAbsoluteCalendar(){return i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=\"calendar-wrapper\" part=\"calendar-wrapper\">\n <div class=\"calendar-container\" >\n ","\n </div>\n </div>\n ","\n "])),this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),this.range?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input ","\" >\n <div class=\"from\">\n <div class=\"from-date\">\n <nile-input\n ?disabled=\"","\"\n label=\"From\"\n class=\"manual-input date-input\"\n placeholder=\"","\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n\n <div class=\"from-time\">\n <nile-input\n ?disabled=\"","\"\n class=\"manual-input time-input\"\n placeholder=\"HH:MM:SS\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n</div>\n\n\n <div class=\"from\">\n <div class=\"from-date\">\n <nile-input\n ?disabled=\"","\"\n label=\"To\"\n class=\"manual-input date-input\"\n placeholder=\"","\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n <div class=\"from-time\">\n <nile-input\n ?disabled=\"","\"\n class=\"manual-input time-input\"\n placeholder=\"HH:MM:SS\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n </div>\n </div>\n "])),this.showManualInputs?"":"hidden",this.disabled,this.dateFormat,this.formatDate(this.startDate),this.handleStartDateInput,this.disabled,this.formatTime(this.startDate),this.handleStartTimeInput,this.disabled,this.dateFormat,this.formatDate(this.endDate),this.handleEndDateInput,this.disabled,this.formatTime(this.endDate),this.handleEndTimeInput):"");}},{key:"renderRelativeCalendar",value:function renderRelativeCalendar(){var _this$hideDurationFie,_this$hideDurationFie2,_this$hideDurationFie3,_this$hideDurationFie4,_this$hideDurationFie5,_this$hideDurationFie6,_this$hideDurationFie7,_this$hideDurationFie8,_this$hideDurationFie9,_this$hideDurationFie10;return i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n \n ","\n \n ","\n \n ","\n \n ","\n \n ","\n </div>\n </div>\n \n ","\n "])),(_this$hideDurationFie=this.hideDurationFields)!==null&&_this$hideDurationFie!==void 0&&_this$hideDurationFie.includes("minutes")?"":i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("minutes",[1,5,15,30,45])),(_this$hideDurationFie2=this.hideDurationFields)!==null&&_this$hideDurationFie2!==void 0&&_this$hideDurationFie2.includes("hours")?"":i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("hours",[1,2,3,6,8,12])),(_this$hideDurationFie3=this.hideDurationFields)!==null&&_this$hideDurationFie3!==void 0&&_this$hideDurationFie3.includes("days")?"":i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("days",[1,2,3,4,5,6])),(_this$hideDurationFie4=this.hideDurationFields)!==null&&_this$hideDurationFie4!==void 0&&_this$hideDurationFie4.includes("weeks")?"":i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("weeks",[1,2,4,6])),(_this$hideDurationFie5=this.hideDurationFields)!==null&&_this$hideDurationFie5!==void 0&&_this$hideDurationFie5.includes("months")?"":i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("months",[3,6,12,15])),this.range?i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n ?disabled=\"","\"\n label=\"Duration\"\n inputmode=\"numeric\"\n type=\"number\"\n value=\"","\" \n @nile-change=\"","\"\n placeholder=\"Enter Value\"\n ></nile-input>\n \n <nile-select \n class=\"manual-input time-input\" \n ?disabled=\"","\"\n label=\"Unit of time\" \n value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\" class=\"","\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"","\">Hours</nile-option>\n <nile-option value=\"days\" class=\"","\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"","\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"","\">Months</nile-option>\n </nile-select>\n </div>\n </div>\n "])),this.disabled,this.selectedValue,this.handleDurationChange,this.disabled,this.selectedUnit,this.handleUnitChange,(_this$hideDurationFie6=this.hideDurationFields)!==null&&_this$hideDurationFie6!==void 0&&_this$hideDurationFie6.includes("minutes")?"hidden":"",(_this$hideDurationFie7=this.hideDurationFields)!==null&&_this$hideDurationFie7!==void 0&&_this$hideDurationFie7.includes("hours")?"hidden":"",(_this$hideDurationFie8=this.hideDurationFields)!==null&&_this$hideDurationFie8!==void 0&&_this$hideDurationFie8.includes("days")?"hidden":"",(_this$hideDurationFie9=this.hideDurationFields)!==null&&_this$hideDurationFie9!==void 0&&_this$hideDurationFie9.includes("weeks")?"hidden":"",(_this$hideDurationFie10=this.hideDurationFields)!==null&&_this$hideDurationFie10!==void 0&&_this$hideDurationFie10.includes("months")?"hidden":""):"");}},{key:"renderTimeValues",value:function renderTimeValues(t,e){var _this3=this;return e.map(function(e){return i(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <div\n class=\"duration__value ","\"\n @click=","\n @keydown=\"","\"\n >","\n </div>"])),_this3.selectedUnit===t&&_this3.selectedValue===e?"duration__value--selected":"",function(i){return _this3.handleTimeValueClick(t,e,i);},function(i){"Enter"!==i.key&&" "!==i.key||_this3.handleTimeValueClick(t,e,i);},e);});}},{key:"renderMonth",value:function renderMonth(t,s,n){var _this4=this;var a=new Date(t,s,1).getDay(),l=new Date(t,s+1,0).getDay(),h=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),d=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),o=h.slice(h.length-a),_c=d.slice(0,6-l),u=[].concat(_toConsumableArray(o),_toConsumableArray(n),_toConsumableArray(_c)),v=function v(t,i,e,s){if(!s)return"";if(!_this4.range&&_this4.value){if(t===_this4.value.getDate()&&i===_this4.value.getMonth()&&e===_this4.value.getFullYear())return"selected-date";}var n=_this4.startDate&&t===_this4.startDate.getDate()&&i===_this4.startDate.getMonth()&&e===_this4.startDate.getFullYear(),a=_this4.endDate&&t===_this4.endDate.getDate()&&i===_this4.endDate.getMonth()&&e===_this4.endDate.getFullYear();return n?"range-start":a?"range-end":"";},p=function p(t,i,e,s){if(!s)return!1;if(_this4.startDate&&_this4.endDate){var _s=new Date(e,i,t);return _s>=_this4.startDate&&_s<=_this4.endDate;}return!1;};return i(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"var(--nile-icon-arrow-left, var(--ng-icon-chevron-left))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=","\n role=\"button\"\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n >\n </nile-icon>\n <div class=\"calendar-header__center\">\n\n","\n</div>\n\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=","\n role=\"button\"\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n \n >\n </nile-icon>\n </div>\n \n <div class=\"days_container\">\n ","\n ","\n </div>\n </div>\n "])),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.disabled||this.isPrevDisabled()?"-1":"0",function(t){"Enter"!==t.key&&" "!==t.key||_this4.prevMonth();},this.prevMonth,this.showMonthDropdown||this.showYearDropdown?i(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n ","\n ","\n"])),this.showMonthDropdown?i(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-dropdown ?disabled=\"","\" class=\"month-dropdown\">\n <span\n slot=\"trigger\"\n class=\"calendar-header__trigger month-trigger\"\n role=\"button\"\n part=\"trigger\"\n >\n ","\n <nile-icon name=\"arrowdropdown\" color="," class=\"calendar-header__caret\"></nile-icon>\n </span>\n <nile-menu>\n <div class=\"month-scroll-wrapper\">\n ","\n </div>\n </nile-menu>\n </nile-dropdown>\n "])),this.disabled,new Date(t,s).toLocaleString("default",{month:"long"}),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.monthNames.map(function(t,e){return i(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-menu-item\n class=\"month-menu-item\"\n ?selected=\"","\"\n @click=\"","\"\n >\n ","\n </nile-menu-item>\n "])),e===s,function(){return _this4.onMonthSelected(e);},t);})):i(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <span\n >","</span\n >\n "])),new Date(t,s).toLocaleString("default",{month:"long"})),this.showYearDropdown?i(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-dropdown ?disabled=\"","\" class=\"year-dropdown\">\n <span\n slot=\"trigger\"\n class=\"calendar-header__trigger\"\n role=\"button\"\n part=\"trigger\"\n >\n ","\n <nile-icon name=\"arrowdropdown\" color="," class=\"calendar-header__caret\"></nile-icon>\n </span>\n <nile-menu>\n <div class=\"year-scroll-wrapper\">\n ","\n </div>\n </nile-menu>\n </nile-dropdown>\n "])),this.disabled,t,this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.yearOptions.map(function(e){return i(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-menu-item\n class=\"year-menu-item\"\n ?selected=\"","\"\n @click=\"","\"\n >\n ","\n </nile-menu-item>\n "])),e===t,function(){return _this4.onYearSelected(e);},e);})):i(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <span>","</span>\n "])),t)):i(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <span\n >","\n ","</span\n >\n"])),new Date(t,s).toLocaleString("default",{month:"long"}),t),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.disabled||this.isNextDisabled()?"-1":"0",function(t){"Enter"!==t.key&&" "!==t.key||_this4.nextMonth();},this.nextMonth,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(function(t){return i(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["<div class=\"day_name\">","</div>"])),t);}),u.map(function(a,l){var h=l>=o.length&&l<o.length+n.length,d=v(a,s,t,h),_c2={day_date:!0,"not-allowed":!_this4.isAllowedDate(a,s,t),"in-range":p(a,s,t,h),filler:!h};return d&&(_c2[d]=!0),i(_templateObject24||(_templateObject24=_taggedTemplateLiteral([" \n <div\n part=\"calendar-day-","\"\n class=","\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n >\n <span style=\"position:relative;\">\n ","\n ","\n </span>\n </div>"])),a,r(_c2),h&&_this4.isAllowedDate(a,s,t)&&!_this4.disabled?"0":"-1",function(i){"Enter"!==i.key&&" "!==i.key||_this4.selectDate(a,s,t);},function(){h&&_this4.selectDate(a,s,t);},a,function(t,i,e){var s=new Date();return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear();}(a,s,t)&&h?i(_templateObject25||(_templateObject25=_taggedTemplateLiteral(["<div class=\"current__date__dot\" part=\"current-date-dot\"></div>"]))):e);}));}},{key:"isAllowedDate",value:function isAllowedDate(t,i,e){if(!this.allowedDatesLocal)return!0;var s=new Date(Date.UTC(e,i,t)),n=this.getUTCDate(this.allowedDatesLocal.startDate),a=this.getUTCDate(this.allowedDatesLocal.endDate);a.setUTCHours(23,59,59,999);return s>=n&&s<=a;}},{key:"clearDate",value:function clearDate(t){(t!==null&&t!==void 0?t:this.range?"relative"===this.type?o.Relative:o.Range:o.Single)===o.Single?this.value=null:(this.valueAttribute="",this.startDate=null,this.endDate=null,this.selectedUnit=void 0,this.selectedValue=void 0),this.requestUpdate(),this.emit("nile-clear");}},{key:"selectDate",value:function selectDate(t,i,e){if(this.disabled)return;var s=new Date(e,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{var _t2=s;_t2.setHours(23,59,59,999),this.endDate=_t2;}}else{if(String(this.value)==String(s)&&this.doubleClickUnselect)return void this.clearDate();this.value=s,this.emitChangedData({value:this.value});}}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.value=null;}catch(t){}else if(this.valueAttribute){var _t4=new Date(this.valueAttribute);_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}}},{key:"handleDurationChange",value:function handleDurationChange(t){t.stopPropagation(),t.detail.value=t.detail.value.replace(/e/gi,"");var i=Number(t.detail.value);i&&(this.selectedValue=i,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t));}},{key:"handleUnitChange",value:function handleUnitChange(t){t.stopPropagation(),this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var e=new Date(),s=new Date();switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i);}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(t.stopPropagation(),!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(t.stopPropagation(),!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map=t.split(":").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),e=_t$split$map2[0],s=_t$split$map2[1],n=_t$split$map2[2],a=new Date(i.getTime());return a.setHours(e,s,n),a;}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"nextMonth",value:function nextMonth(){if(!this.disabled)if(11===this.currentMonth){var _t5=this.currentYear+1;if(void 0!==this.endYear&&_t5>this.endYear)return;this.currentMonth=0,this.currentYear=_t5;}else this.currentMonth++;}},{key:"prevMonth",value:function prevMonth(){if(!this.disabled)if(0===this.currentMonth){var _t6=this.currentYear-1;if(void 0!==this.startYear&&_t6<this.startYear)return;this.currentMonth=11,this.currentYear=_t6;}else this.currentMonth--;}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&this.emitChangedData({startDate:this.startDate,endDate:this.endDate});}},{key:"onTypeChange",value:function onTypeChange(t){this.disabled||(this.type=t.detail.value,this.emit("nile-type-change",{value:this.type}));}},{key:"getUTCDate",value:function getUTCDate(t){return new Date(Date.UTC(t.slice(0,4),t.slice(5,7)-1,t.slice(8,10)));}},{key:"emitChangedData",value:function emitChangedData(t){this.emit("nile-changed",t),this.emit("nile-change",t);}},{key:"getDaysArray",value:function getDaysArray(t,i){var e=new Date(t,i+1,0).getDate();return Array.from({length:e},function(t,i){return i+1;});}}],[{key:"styles",get:function get(){return[l];}}]);}(d));t([s({type:String,attribute:"value"})],c.prototype,"valueAttribute",void 0),t([s({type:String,attribute:!0,reflect:!0})],c.prototype,"allowedDates",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"range",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"hideTypes",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"doubleClickUnselect",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"allowClear",void 0),t([s({type:String,reflect:!0})],c.prototype,"type",void 0),t([s({type:String})],c.prototype,"selectedUnit",void 0),t([s({type:Number})],c.prototype,"selectedValue",void 0),t([s({type:Array,attribute:"hide-duration-fields"})],c.prototype,"hideDurationFields",void 0),t([s({type:Boolean})],c.prototype,"showManualInputs",void 0),t([s({type:Number,attribute:!0,reflect:!0})],c.prototype,"startYear",void 0),t([s({type:Number,attribute:!0,reflect:!0})],c.prototype,"endYear",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"showMonthDropdown",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"showYearDropdown",void 0),t([s({type:String,reflect:!0,attribute:!0})],c.prototype,"dateFormat",void 0),t([n()],c.prototype,"startDate",void 0),t([n()],c.prototype,"endDate",void 0),t([n()],c.prototype,"isSelectingStart",void 0),t([n()],c.prototype,"hideInput",void 0),t([n()],c.prototype,"value",void 0),t([n()],c.prototype,"currentMonth",void 0),t([n()],c.prototype,"currentYear",void 0),t([n()],c.prototype,"allowedDatesLocal",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"disabled",void 0),t([h("allowedDates")],c.prototype,"checkValidAllowedDate",null),_export("N",c=t([a("nile-calendar")],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","lit","lit/decorators.js","./nile-calendar.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","./nile-calendar.enum.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,a,l,r,h,o,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,_templateObject8,_templateObject9,_templateObject10,_templateObject11,_templateObject12,_templateObject13,_templateObject14,_templateObject15,_templateObject16,_templateObject17,_templateObject18,_templateObject19,_templateObject20,_templateObject21,_templateObject22,_templateObject23,_templateObject24,_templateObject25,c;function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_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(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;e=_lit.nothing;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;n=_litDecoratorsJs.state;a=_litDecoratorsJs.customElement;},function(_nileCalendarCssCjsJs){l=_nileCalendarCssCjsJs.s;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_nileCalendarEnumCjsJs){d=_nileCalendarEnumCjsJs.C;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",c=/*#__PURE__*/function(_o){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.valueAttribute=null,_this.allowedDates=JSON.stringify({}),_this.range=!1,_this.hideTypes=!1,_this.doubleClickUnselect=!1,_this.allowClear=!1,_this.type="absolute",_this.hideDurationFields=[],_this.showManualInputs=!1,_this.showMonthDropdown=!1,_this.showYearDropdown=!1,_this.dateFormat="MM/DD/YYYY",_this.startDate=null,_this.endDate=null,_this.isSelectingStart=!0,_this.hideInput=!1,_this.currentMonth=new Date().getMonth(),_this.currentYear=new Date().getFullYear(),_this.allowedDatesLocal=null,_this.disabled=!1;return _this;}_inherits(c,_o);return _createClass(c,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(c,"connectedCallback",this,3)([]),this.initializeValue(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(c,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}},{key:"updated",value:function updated(t){if(_superPropGet(c,"updated",this,3)([t]),t.has("valueAttribute")){this.valueAttribute||(this.value=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0);var _t=new Date(this.valueAttribute||"");if(!isNaN(_t.getTime())){var _i=_t.getTimezoneOffset();this.value=new Date(_t.getTime()-60*_i*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear();}this.initializeValue();}}},{key:"monthNames",get:function get(){return Array.from({length:12},function(t,i){return new Date(0,i).toLocaleString("default",{month:"long"});});}},{key:"yearOptions",get:function get(){var _this$startYear,_this$endYear;var t=(_this$startYear=this.startYear)!==null&&_this$startYear!==void 0?_this$startYear:2e3,i=(_this$endYear=this.endYear)!==null&&_this$endYear!==void 0?_this$endYear:2050;return t>i?[]:Array.from({length:i-t+1},function(i,e){return t+e;});}},{key:"onMonthSelected",value:function onMonthSelected(t){this.currentMonth=t,this.emit("nile-month-change",{month:t});}},{key:"onYearSelected",value:function onYearSelected(t){this.currentYear=t,this.emit("nile-year-change",{year:t});}},{key:"checkValidAllowedDate",value:function checkValidAllowedDate(){var t;try{t=JSON.parse(this.allowedDates);}catch(i){t=null;}if(!t||0==Object.keys(t).length)return void(this.allowedDatesLocal=null);this.hideInput=!0;this.getUTCDate(t.startDate)>this.getUTCDate(t.endDate)?console.error("StartDate must be greater than endDate"):this.allowedDatesLocal=t;}},{key:"isPrevDisabled",value:function isPrevDisabled(){return 0===this.currentMonth&&void 0!==this.startYear&&this.currentYear<=this.startYear;}},{key:"isNextDisabled",value:function isNextDisabled(){return 11===this.currentMonth&&void 0!==this.endYear&&this.currentYear>=this.endYear;}},{key:"formatDate",value:function formatDate(t){if(!t)return"";var i=t.getFullYear(),e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");var n=this.dateFormat;return n=n.replace(/YYYY/g,String(i)),n=n.replace(/MM/g,e),n=n.replace(/DD/g,s),n=n.replace(/YY/g,String(i).slice(-2)),n;}},{key:"parseDate",value:function parseDate(t,i){if(!t||!this.dateFormat)return null;var e=this.dateFormat.replace(/YYYY/,"(?<year>\\d{4})").replace(/YY/,"(?<year>\\d{2})").replace(/MM/,"(?<month>\\d{1,2})").replace(/DD/,"(?<day>\\d{1,2})"),s=new RegExp("^".concat(e,"$")),n=t.match(s);if(!n||!n.groups)return null;var a=2===n.groups.year.length?Number("20".concat(n.groups.year)):Number(n.groups.year),l=Number(n.groups.month)-1,r=Number(n.groups.day),h=new Date(a,l,r);return i?h.setHours(i.getHours(),i.getMinutes(),i.getSeconds()):h.setHours(0,0,0),h;}},{key:"handleStartDateInput",value:function handleStartDateInput(t){t.stopPropagation();var i=this.parseDate(t.detail.value,this.startDate);i&&(i.setHours(0,0,0),this.startDate=i,this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.requestUpdate());}},{key:"handleEndDateInput",value:function handleEndDateInput(t){t.stopPropagation();var i=this.parseDate(t.detail.value,this.endDate);i&&(i.setHours(23,59,59),this.endDate=i,this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.requestUpdate());}},{key:"render",value:function render(){var _this2=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n class=","\n part=\"calendar-container\"\n >\n <div class=",">\n <div class=\"calendar-switcher\" part=\"calendar-switcher\">\n <nile-tab-group centered @nile-tab-show=\"","\" value=\"","\">\n <nile-tab slot=\"nav\" panel=\"absolute\" tabindex=\"","\">Absolute</nile-tab>\n <nile-tab slot=\"nav\" panel=\"relative\" tabindex=\"","\">Relative</nile-tab>\n </nile-tab-group>\n </div>\n </div>\n \n ","\n ","\n\n ","\n </div>\n "])),r({base:!0,base__range:this.range}),r({"calendar-config":!0,hidden:!this.range||this.range&&this.hideTypes}),this.onTypeChange,this.type,this.disabled?"-1":"0",this.disabled?"-1":"0","relative"==this.type?this.renderRelativeCalendar():"","absolute"==this.type?this.renderAbsoluteCalendar():"",this.range?i(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <div class=\"button-container\" part=\"button-container\">\n ","\n <nile-button \n class=\"apply-button\" \n ?disabled=\"","\" \n @click=\"","\"\n @keydown=\"","\"\n > Apply</nile-button>\n </div>\n "])),this.allowClear?i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-button \n class=\"clear-button\"\n variant=\"secondary\"\n role=\"button\"\n ?disabled=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n\n > Reset</nile-button>"])),!this.startDate||!this.endDate,function(t){"Enter"!==t.key&&" "!==t.key||_this2.clearDate();},this.clearDate):e,!this.startDate||!this.endDate,this.confimRange,function(t){"Enter"!==t.key&&" "!==t.key||_this2.confimRange();}):"");}},{key:"renderAbsoluteCalendar",value:function renderAbsoluteCalendar(){return i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <div class=\"calendar-wrapper\" part=\"calendar-wrapper\">\n <div class=\"calendar-container\" >\n ","\n </div>\n </div>\n ","\n "])),this.renderMonth(this.currentYear,this.currentMonth,this.getDaysArray(this.currentYear,this.currentMonth)),this.range?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <div class=\"calender-input ","\" >\n <div class=\"from\">\n <div class=\"from-date\">\n <nile-input\n ?disabled=\"","\"\n label=\"From\"\n class=\"manual-input date-input\"\n placeholder=\"","\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n\n <div class=\"from-time\">\n <nile-input\n ?disabled=\"","\"\n class=\"manual-input time-input\"\n placeholder=\"HH:MM:SS\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n</div>\n\n\n <div class=\"from\">\n <div class=\"from-date\">\n <nile-input\n ?disabled=\"","\"\n label=\"To\"\n class=\"manual-input date-input\"\n placeholder=\"","\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n <div class=\"from-time\">\n <nile-input\n ?disabled=\"","\"\n class=\"manual-input time-input\"\n placeholder=\"HH:MM:SS\"\n value=\"","\"\n @nile-change=\"","\"\n ></nile-input>\n </div>\n </div>\n </div>\n "])),this.showManualInputs?"":"hidden",this.disabled,this.dateFormat,this.formatDate(this.startDate),this.handleStartDateInput,this.disabled,this.formatTime(this.startDate),this.handleStartTimeInput,this.disabled,this.dateFormat,this.formatDate(this.endDate),this.handleEndDateInput,this.disabled,this.formatTime(this.endDate),this.handleEndTimeInput):"");}},{key:"renderRelativeCalendar",value:function renderRelativeCalendar(){var _this$hideDurationFie,_this$hideDurationFie2,_this$hideDurationFie3,_this$hideDurationFie4,_this$hideDurationFie5,_this$hideDurationFie6,_this$hideDurationFie7,_this$hideDurationFie8,_this$hideDurationFie9,_this$hideDurationFie10;return i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <div class=\"units-wrapper\">\n <div class=\"unit-container\">\n \n ","\n \n ","\n \n ","\n \n ","\n \n ","\n </div>\n </div>\n \n ","\n "])),(_this$hideDurationFie=this.hideDurationFields)!==null&&_this$hideDurationFie!==void 0&&_this$hideDurationFie.includes("minutes")?"":i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Minutes</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("minutes",[1,5,15,30,45])),(_this$hideDurationFie2=this.hideDurationFields)!==null&&_this$hideDurationFie2!==void 0&&_this$hideDurationFie2.includes("hours")?"":i(_templateObject8||(_templateObject8=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Hours</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("hours",[1,2,3,6,8,12])),(_this$hideDurationFie3=this.hideDurationFields)!==null&&_this$hideDurationFie3!==void 0&&_this$hideDurationFie3.includes("days")?"":i(_templateObject9||(_templateObject9=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Days</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("days",[1,2,3,4,5,6])),(_this$hideDurationFie4=this.hideDurationFields)!==null&&_this$hideDurationFie4!==void 0&&_this$hideDurationFie4.includes("weeks")?"":i(_templateObject10||(_templateObject10=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Weeks</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("weeks",[1,2,4,6])),(_this$hideDurationFie5=this.hideDurationFields)!==null&&_this$hideDurationFie5!==void 0&&_this$hideDurationFie5.includes("months")?"":i(_templateObject11||(_templateObject11=_taggedTemplateLiteral(["\n <div class=\"unit-group\">\n <div class=\"duration-name\">Months</div>\n <div class=\"duration-units\">\n ","\n </div>\n </div>\n "])),this.renderTimeValues("months",[3,6,12,15])),this.range?i(_templateObject12||(_templateObject12=_taggedTemplateLiteral(["\n <div>\n <div class=\"unit-input-container\">\n <nile-input \n class=\"manual-input duration-input\" \n ?disabled=\"","\"\n label=\"Duration\"\n inputmode=\"numeric\"\n type=\"number\"\n value=\"","\" \n @nile-change=\"","\"\n placeholder=\"Enter Value\"\n ></nile-input>\n \n <nile-select \n class=\"manual-input time-input\" \n ?disabled=\"","\"\n label=\"Unit of time\" \n value=\"","\"\n @nile-change=\"","\"\n >\n <nile-option value=\"minutes\" class=\"","\">Minutes</nile-option>\n <nile-option value=\"hours\" class=\"","\">Hours</nile-option>\n <nile-option value=\"days\" class=\"","\">Days</nile-option>\n <nile-option value=\"weeks\" class=\"","\">Weeks</nile-option>\n <nile-option value=\"months\" class=\"","\">Months</nile-option>\n </nile-select>\n </div>\n </div>\n "])),this.disabled,this.selectedValue,this.handleDurationChange,this.disabled,this.selectedUnit,this.handleUnitChange,(_this$hideDurationFie6=this.hideDurationFields)!==null&&_this$hideDurationFie6!==void 0&&_this$hideDurationFie6.includes("minutes")?"hidden":"",(_this$hideDurationFie7=this.hideDurationFields)!==null&&_this$hideDurationFie7!==void 0&&_this$hideDurationFie7.includes("hours")?"hidden":"",(_this$hideDurationFie8=this.hideDurationFields)!==null&&_this$hideDurationFie8!==void 0&&_this$hideDurationFie8.includes("days")?"hidden":"",(_this$hideDurationFie9=this.hideDurationFields)!==null&&_this$hideDurationFie9!==void 0&&_this$hideDurationFie9.includes("weeks")?"hidden":"",(_this$hideDurationFie10=this.hideDurationFields)!==null&&_this$hideDurationFie10!==void 0&&_this$hideDurationFie10.includes("months")?"hidden":""):"");}},{key:"renderTimeValues",value:function renderTimeValues(t,e){var _this3=this;return e.map(function(e){return i(_templateObject13||(_templateObject13=_taggedTemplateLiteral(["\n <div\n class=\"duration__value ","\"\n @click=","\n @keydown=\"","\"\n >","\n </div>"])),_this3.selectedUnit===t&&_this3.selectedValue===e?"duration__value--selected":"",function(i){return _this3.handleTimeValueClick(t,e,i);},function(i){"Enter"!==i.key&&" "!==i.key||_this3.handleTimeValueClick(t,e,i);},e);});}},{key:"renderMonth",value:function renderMonth(t,s,n){var _this4=this;var a=new Date(t,s,1).getDay(),l=new Date(t,s+1,0).getDay(),h=this.getDaysArray(0===s?t-1:t,0===s?11:s-1),o=this.getDaysArray(11===s?t+1:t,11===s?0:s+1),d=h.slice(h.length-a),_c=o.slice(0,6-l),u=[].concat(_toConsumableArray(d),_toConsumableArray(n),_toConsumableArray(_c)),v=function v(t,i,e,s){if(!s)return"";if(!_this4.range&&_this4.value){if(t===_this4.value.getDate()&&i===_this4.value.getMonth()&&e===_this4.value.getFullYear())return"selected-date";}var n=_this4.startDate&&t===_this4.startDate.getDate()&&i===_this4.startDate.getMonth()&&e===_this4.startDate.getFullYear(),a=_this4.endDate&&t===_this4.endDate.getDate()&&i===_this4.endDate.getMonth()&&e===_this4.endDate.getFullYear();return n?"range-start":a?"range-end":"";},p=function p(t,i,e,s){if(!s)return!1;if(_this4.startDate&&_this4.endDate){var _s=new Date(e,i,t);return _s>=_this4.startDate&&_s<=_this4.endDate;}return!1;};return i(_templateObject14||(_templateObject14=_taggedTemplateLiteral(["\n <div class=\"calendar\">\n <div class=\"calendar-header\">\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"var(--nile-icon-arrow-left, var(--ng-icon-chevron-left))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=","\n role=\"button\"\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n >\n </nile-icon>\n <div class=\"calendar-header__center\">\n\n","\n</div>\n\n <nile-icon\n class=\"calendar-header__month-navigation\"\n name=\"var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n color=","\n role=\"button\"\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n \n >\n </nile-icon>\n </div>\n \n <div class=\"days_container\">\n ","\n ","\n </div>\n </div>\n "])),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.disabled||this.isPrevDisabled()?"-1":"0",function(t){"Enter"!==t.key&&" "!==t.key||_this4.prevMonth();},this.prevMonth,this.showMonthDropdown||this.showYearDropdown?i(_templateObject15||(_templateObject15=_taggedTemplateLiteral(["\n ","\n ","\n"])),this.showMonthDropdown?i(_templateObject16||(_templateObject16=_taggedTemplateLiteral(["\n <nile-dropdown ?disabled=\"","\" class=\"month-dropdown\">\n <span\n slot=\"trigger\"\n class=\"calendar-header__trigger month-trigger\"\n role=\"button\"\n part=\"trigger\"\n >\n ","\n <nile-icon name=\"arrowdropdown\" color="," class=\"calendar-header__caret\"></nile-icon>\n </span>\n <nile-menu>\n <div class=\"month-scroll-wrapper\">\n ","\n </div>\n </nile-menu>\n </nile-dropdown>\n "])),this.disabled,new Date(t,s).toLocaleString("default",{month:"long"}),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.monthNames.map(function(t,e){return i(_templateObject17||(_templateObject17=_taggedTemplateLiteral(["\n <nile-menu-item\n class=\"month-menu-item\"\n ?selected=\"","\"\n @click=\"","\"\n >\n ","\n </nile-menu-item>\n "])),e===s,function(){return _this4.onMonthSelected(e);},t);})):i(_templateObject18||(_templateObject18=_taggedTemplateLiteral(["\n <span\n >","</span\n >\n "])),new Date(t,s).toLocaleString("default",{month:"long"})),this.showYearDropdown?i(_templateObject19||(_templateObject19=_taggedTemplateLiteral(["\n <nile-dropdown ?disabled=\"","\" class=\"year-dropdown\">\n <span\n slot=\"trigger\"\n class=\"calendar-header__trigger\"\n role=\"button\"\n part=\"trigger\"\n >\n ","\n <nile-icon name=\"arrowdropdown\" color="," class=\"calendar-header__caret\"></nile-icon>\n </span>\n <nile-menu>\n <div class=\"year-scroll-wrapper\">\n ","\n </div>\n </nile-menu>\n </nile-dropdown>\n "])),this.disabled,t,this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.yearOptions.map(function(e){return i(_templateObject20||(_templateObject20=_taggedTemplateLiteral(["\n <nile-menu-item\n class=\"year-menu-item\"\n ?selected=\"","\"\n @click=\"","\"\n >\n ","\n </nile-menu-item>\n "])),e===t,function(){return _this4.onYearSelected(e);},e);})):i(_templateObject21||(_templateObject21=_taggedTemplateLiteral(["\n <span>","</span>\n "])),t)):i(_templateObject22||(_templateObject22=_taggedTemplateLiteral(["\n <span\n >","\n ","</span\n >\n"])),new Date(t,s).toLocaleString("default",{month:"long"}),t),this.disabled?"var(--nile-colors-dark-500, var(--ng-colors-fg-disabled))":"black",this.disabled||this.isNextDisabled()?"-1":"0",function(t){"Enter"!==t.key&&" "!==t.key||_this4.nextMonth();},this.nextMonth,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(function(t){return i(_templateObject23||(_templateObject23=_taggedTemplateLiteral(["<div class=\"day_name\">","</div>"])),t);}),u.map(function(a,l){var h=l>=d.length&&l<d.length+n.length,o=v(a,s,t,h),_c2={day_date:!0,"not-allowed":!_this4.isAllowedDate(a,s,t),"in-range":p(a,s,t,h),filler:!h};return o&&(_c2[o]=!0),i(_templateObject24||(_templateObject24=_taggedTemplateLiteral([" \n <div\n part=\"calendar-day-","\"\n class=","\n tabindex=\"","\"\n @keydown=\"","\"\n @click=\"","\"\n >\n <span style=\"position:relative;\">\n ","\n ","\n </span>\n </div>"])),a,r(_c2),h&&_this4.isAllowedDate(a,s,t)&&!_this4.disabled?"0":"-1",function(i){"Enter"!==i.key&&" "!==i.key||_this4.selectDate(a,s,t);},function(){h&&_this4.selectDate(a,s,t);},a,function(t,i,e){var s=new Date();return t===s.getDate()&&i+1===s.getMonth()+1&&e===s.getFullYear();}(a,s,t)&&h?i(_templateObject25||(_templateObject25=_taggedTemplateLiteral(["<div class=\"current__date__dot\" part=\"current-date-dot\"></div>"]))):e);}));}},{key:"isAllowedDate",value:function isAllowedDate(t,i,e){if(!this.allowedDatesLocal)return!0;var s=new Date(Date.UTC(e,i,t)),n=this.getUTCDate(this.allowedDatesLocal.startDate),a=this.getUTCDate(this.allowedDatesLocal.endDate);a.setUTCHours(23,59,59,999);return s>=n&&s<=a;}},{key:"clearDate",value:function clearDate(t){(t!==null&&t!==void 0?t:this.range?"relative"===this.type?d.Relative:d.Range:d.Single)===d.Single?this.value=null:(this.valueAttribute="",this.startDate=null,this.endDate=null,this.selectedUnit=void 0,this.selectedValue=void 0),this.requestUpdate(),this.emit("nile-clear");}},{key:"selectDate",value:function selectDate(t,i,e){if(this.disabled)return;var s=new Date(e,i,t);if(this.range){if(this.startDate&&this.endDate&&(this.startDate=null,this.endDate=null),this.isSelectingStart)this.startDate=s,this.endDate&&s>this.endDate&&(this.endDate=null),this.isSelectingStart=!1;else if(this.isSelectingStart=!0,this.startDate&&s<this.startDate)this.startDate=s,this.endDate=null,this.isSelectingStart=!1;else{var _t2=s;_t2.setHours(23,59,59,999),this.endDate=_t2;}}else{if(String(this.value)==String(s)&&this.doubleClickUnselect)return void this.clearDate();this.value=s,this.emitChangedData({value:this.value});}}},{key:"initializeValue",value:function initializeValue(){if(this.range)try{var _t3=JSON.parse(this.valueAttribute||"");this.startDate=new Date(_t3.startDate),this.endDate=new Date(_t3.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.value=null;}catch(t){}else if(this.valueAttribute){var _t4=new Date(this.valueAttribute);_t4=new Date(_t4.getTime()-6e4*_t4.getTimezoneOffset()),isNaN(_t4.getTime())||(this.value=_t4,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear());}}},{key:"handleDurationChange",value:function handleDurationChange(t){t.stopPropagation(),t.detail.value=t.detail.value.replace(/e/gi,"");var i=Number(t.detail.value);i&&(this.selectedValue=i,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t));}},{key:"handleUnitChange",value:function handleUnitChange(t){t.stopPropagation(),this.selectedUnit=t.detail.value,this.selectedUnit&&this.selectedValue&&this.handleTimeValueClick(this.selectedUnit,this.selectedValue,t);}},{key:"handleTimeValueClick",value:function handleTimeValueClick(t,i,e){this.createRelativePeriod(t,i),this.selectedUnit=t,this.selectedValue=i;}},{key:"createRelativePeriod",value:function createRelativePeriod(t,i){var e=new Date(),s=new Date();switch(t){case"minutes":s.setMinutes(s.getMinutes()-i);break;case"hours":s.setHours(s.getHours()-i);break;case"days":s.setDate(s.getDate()-i);break;case"weeks":s.setDate(s.getDate()-7*i);break;case"months":s.setMonth(s.getMonth()-i);}return this.startDate=new Date(s.getTime()),this.endDate=new Date(e.getTime()),{startDate:this.startDate,endDate:this.endDate};}},{key:"handleStartTimeInput",value:function handleStartTimeInput(t){if(t.stopPropagation(),!this.startDate)return void(this.startDate=null);var i=this.parseTime(t.detail.value,this.startDate);i?this.startDate=i:this.startDate.setHours(0,0,0),this.requestUpdate();}},{key:"handleEndTimeInput",value:function handleEndTimeInput(t){if(t.stopPropagation(),!this.endDate)return void(this.endDate=null);var i=this.parseTime(t.detail.value,this.endDate);i?this.endDate=i:this.endDate.setHours(0,0,0),this.requestUpdate();}},{key:"parseTime",value:function parseTime(t,i){if(!this.isValidTimeInput(t))return null;var _t$split$map=t.split(":").map(Number),_t$split$map2=_slicedToArray(_t$split$map,3),e=_t$split$map2[0],s=_t$split$map2[1],n=_t$split$map2[2],a=new Date(i.getTime());return a.setHours(e,s,n),a;}},{key:"isValidTimeInput",value:function isValidTimeInput(t){return /^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/.test(t);}},{key:"formatTime",value:function formatTime(t){if(!t)return"";return"".concat(String(t.getHours()).padStart(2,"0"),":").concat(String(t.getMinutes()).padStart(2,"0"),":").concat(String(t.getSeconds()).padStart(2,"0"));}},{key:"nextMonth",value:function nextMonth(){if(!this.disabled)if(11===this.currentMonth){var _t5=this.currentYear+1;if(void 0!==this.endYear&&_t5>this.endYear)return;this.currentMonth=0,this.currentYear=_t5;}else this.currentMonth++;}},{key:"prevMonth",value:function prevMonth(){if(!this.disabled)if(0===this.currentMonth){var _t6=this.currentYear-1;if(void 0!==this.startYear&&_t6<this.startYear)return;this.currentMonth=11,this.currentYear=_t6;}else this.currentMonth--;}},{key:"confimRange",value:function confimRange(){this.startDate&&this.endDate&&this.emitChangedData({startDate:this.startDate,endDate:this.endDate});}},{key:"onTypeChange",value:function onTypeChange(t){this.disabled||(this.type=t.detail.value,this.emit("nile-type-change",{value:this.type}));}},{key:"getUTCDate",value:function getUTCDate(t){return new Date(Date.UTC(t.slice(0,4),t.slice(5,7)-1,t.slice(8,10)));}},{key:"emitChangedData",value:function emitChangedData(t){this.emit("nile-changed",t),this.emit("nile-change",t);}},{key:"getDaysArray",value:function getDaysArray(t,i){var e=new Date(t,i+1,0).getDate();return Array.from({length:e},function(t,i){return i+1;});}}],[{key:"styles",get:function get(){return[l];}}]);}(o));t([s({type:String,attribute:"value"})],c.prototype,"valueAttribute",void 0),t([s({type:String,attribute:!0,reflect:!0})],c.prototype,"allowedDates",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"range",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"hideTypes",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"doubleClickUnselect",void 0),t([s({type:Boolean,reflect:!0})],c.prototype,"allowClear",void 0),t([s({type:String,reflect:!0})],c.prototype,"type",void 0),t([s({type:String})],c.prototype,"selectedUnit",void 0),t([s({type:Number})],c.prototype,"selectedValue",void 0),t([s({type:Array,attribute:"hide-duration-fields"})],c.prototype,"hideDurationFields",void 0),t([s({type:Boolean})],c.prototype,"showManualInputs",void 0),t([s({type:Number,attribute:!0,reflect:!0})],c.prototype,"startYear",void 0),t([s({type:Number,attribute:!0,reflect:!0})],c.prototype,"endYear",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"showMonthDropdown",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"showYearDropdown",void 0),t([s({type:String,reflect:!0,attribute:!0})],c.prototype,"dateFormat",void 0),t([n()],c.prototype,"startDate",void 0),t([n()],c.prototype,"endDate",void 0),t([n()],c.prototype,"isSelectingStart",void 0),t([n()],c.prototype,"hideInput",void 0),t([n()],c.prototype,"value",void 0),t([n()],c.prototype,"currentMonth",void 0),t([n()],c.prototype,"currentYear",void 0),t([n()],c.prototype,"allowedDatesLocal",void 0),t([s({type:Boolean,attribute:!0,reflect:!0})],c.prototype,"disabled",void 0),t([h("allowedDates")],c.prototype,"checkValidAllowedDate",null),_export("N",c=t([a("nile-calendar")],c));}};});
|
|
2
2
|
//# sourceMappingURL=nile-calendar.cjs.js.map
|