@aquera/nile-elements 1.6.2 → 1.6.3
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 +8 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +503 -335
- 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.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 +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-content-editor/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-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.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +5 -5
- 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 +7 -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-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 +2 -2
- 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 +3 -3
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +3 -3
- 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-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-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-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 +7 -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-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-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 +1 -1
- 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-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-link/nile-link.ts +21 -2
- package/src/nile-otp-input/nile-otp-input.test.ts +7 -7
- package/src/nile-pagination/nile-pagination.css.ts +7 -0
- package/src/nile-radio/nile-radio.css.ts +4 -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-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 +111 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-popup.cjs.js","sources":["../../../../node_modules/composed-offset-position/dist/composed-offset-position.mjs","../../../src/nile-popup/nile-popup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nfunction offsetParent(element) {\n return offsetParentPolyfill(element);\n}\nfunction offsetTop(element) {\n return offsetTopLeftPolyfill(element, 'offsetTop');\n}\nfunction offsetLeft(element) {\n return offsetTopLeftPolyfill(element, 'offsetLeft');\n}\nfunction flatTreeParent(element) {\n if (element.assignedSlot) {\n return element.assignedSlot;\n }\n if (element.parentNode instanceof ShadowRoot) {\n return element.parentNode.host;\n }\n return element.parentNode;\n}\nfunction ancestorTreeScopes(element) {\n const scopes = new Set();\n let currentScope = element.getRootNode();\n while (currentScope) {\n scopes.add(currentScope);\n currentScope = currentScope.parentNode\n ? currentScope.parentNode.getRootNode()\n : null;\n }\n return scopes;\n}\nfunction offsetParentPolyfill(element) {\n // Do an initial walk to check for display:none ancestors.\n for (let ancestor = element; ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n if (getComputedStyle(ancestor).display === 'none') {\n return null;\n }\n }\n for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n const style = getComputedStyle(ancestor);\n // Display:contents nodes aren't in the layout tree so they should be skipped.\n if (style.display === 'contents') {\n continue;\n }\n if (style.position !== 'static' || style.filter !== 'none') {\n return ancestor;\n }\n if (ancestor.tagName === 'BODY') {\n return ancestor;\n }\n }\n return null;\n}\nfunction offsetTopLeftPolyfill(element, offsetTopOrLeft) {\n let value = element[offsetTopOrLeft];\n let nextOffsetParent = offsetParentPolyfill(element);\n const scopes = ancestorTreeScopes(element);\n while (nextOffsetParent && !scopes.has(nextOffsetParent.getRootNode())) {\n value -= nextOffsetParent[offsetTopOrLeft];\n nextOffsetParent = offsetParentPolyfill(nextOffsetParent);\n }\n return value;\n}\n\nexport { offsetLeft, offsetParent, offsetTop };\n","/**\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, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n /**\n * NOTE TO DEVELOPERS:\n * The anchor element is essential for nile-popup to function correctly.\n * This error was thrown when an anchor (slot=\"anchor\") or anchor reference was not found.\n *\n * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot\n * inside <nile-tooltip>, which removes the anchor from the DOM.\n * As a result, the tooltip remains but cannot be anchored — leading to this error.\n *\n * Suggested Fixes:\n * - Move *ngIf to a wrapper above <nile-tooltip>\n * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor\n *\n * For now, this error is commented out to avoid runtime crashes.\n * Proper usage patterns should be followed instead.\n */\n if (!this.anchorEl) {\n // throw new Error(\n // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n // );\n return;\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"],"names":["offsetParent","element","ancestor","flatTreeParent","Element","getComputedStyle","display","style","position","filter","tagName","offsetParentPolyfill","assignedSlot","parentNode","ShadowRoot","host","setters","_tslib","NilePopup","y","this","active","placement","strategy","distance","skidding","arrow","arrowPlacement","arrowPadding","flip","flipFallbackPlacements","flipFallbackStrategy","flipPadding","shift","shiftPadding","autoSizePadding","_this","_inherits","_f","_createClass","key","value","_connectedCallback","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","_superPropGet","updateComplete","start","stop","connectedCallback","disconnectedCallback","_updated","_callee2","changedProps","has","handleAnchorChange","reposition","_context3","updated","_callee3","_t2","_callee3$","_context4","anchor","root","getRootNode","anchorEl","getElementById","querySelector","HTMLSlotElement","assignedElements","flatten","cleanup","autoUpdate","popup","_stop","_callee4","_this3","_callee4$","_context5","abrupt","Promise","resolve","undefined","removeAttribute","removeProperty","requestAnimationFrame","_this4","middleware","offset","mainAxis","crossAxis","sync","push","size","apply","_ref","rects","syncWidth","syncHeight","width","reference","height","concat","boundary","flipBoundary","fallbackPlacements","fallbackStrategy","padding","shiftBoundary","autoSize","autoSizeBoundary","availableWidth","availableHeight","setProperty","arrowEl","getOffsetParent","platform","computePosition","then","_ref3","x","middlewareData","s","isRtl","direction","staticSide","top","right","bottom","left","split","setAttribute","Object","assign","arrowX","arrowY","_defineProperty","emit","render","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","Number","attribute","converter","fromAttribute","map","p","trim","toAttribute","join","_export","customElement"],"mappings":"8pYACA,QAASA,CAAAA,CAAAA,CAAaC,CAClB,CAAA,CAAA,MA4BJ,UAA8BA,CAE1B,CAAA,CAAA,IAAK,GAAIC,CAAAA,EAAAA,CAAWD,EAASC,EAAUA,CAAAA,EAAAA,CAAWC,EAAeD,EAC7D,CAAA,CAAA,GAAMA,aAAoBE,CAAAA,OAGiB,EAAA,MAAA,GAAvCC,gBAAiBH,CAAAA,EAAAA,CAAAA,CAAUI,QAC3B,MAAO,KAAA,CAGf,IAAK,GAAIJ,CAAAA,IAAWC,CAAeF,CAAAA,CAAAA,CAAAA,CAAUC,GAAUA,CAAAA,GAAAA,CAAWC,EAAeD,GAAW,CAAA,CAAA,CACxF,KAAMA,GAAoBE,WAAAA,CAAAA,OAAAA,CAAAA,CACtB,SAEJ,GAAMG,CAAAA,EAAAA,CAAQF,gBAAiBH,CAAAA,GAAAA,CAAAA,CAE/B,GAAsB,UAAlBK,GAAAA,EAAAA,CAAMD,OAAV,CAAA,CAGA,GAAuB,QAAnBC,GAAAA,EAAAA,CAAMC,QAA0C,EAAA,MAAA,GAAjBD,GAAME,MACrC,CAAA,MAAOP,CAAAA,IAEX,GAAyB,MAAA,GAArBA,IAASQ,OACT,CAAA,MAAOR,CAAAA,GALV,EAOJ,CACD,MAAO,KACX,EAvDWS,CAAqBV,EAChC,EAOA,QAASE,CAAAA,CAAeF,CAAAA,CAAAA,CAAAA,CACpB,MAAIA,CAAAA,CAAQW,CAAAA,YAAAA,CACDX,EAAQW,YAEfX,CAAAA,CAAAA,CAAQY,qBAAsBC,CAAAA,UACvBb,CAAAA,CAAAA,CAAQY,UAAWE,CAAAA,IAAAA,CAEvBd,EAAQY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IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA2B/I,CAAA0I,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAGnCF,CAAA,CAAA,CAArCG,CAAS,CAAA,CAAEK,SAAW,CAAA,WAAA,CAAA,CAAA,CAAA,CAA4DhJ,CAAA0I,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAGvEF,EAAA,CAAXG,CAAAA,CAAAA,CAAAA,CAAAA,CAA6C3I,CAAA0I,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAOlBF,CAAA,CAAA,CAA3BG,CAAS,CAAA,CAAEC,IAAMlB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAgD1H,CAAA0I,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,CAAA,CAGNF,CAAA,CAAA,CAA3DG,CAAS,CAAA,CAAEK,SAAW,CAAA,mBAAA,CAAqBJ,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA8B/I,CAAA0I,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAc,OAAA,KA/IrExJ,CAASwI,CAAAA,CAAAA,CAAA,CADrBiB,CAAAA,CAAc,eACFzJ","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"nile-popup.cjs.js","sources":["../../../../node_modules/composed-offset-position/dist/composed-offset-position.mjs","../../../src/nile-popup/nile-popup.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nfunction offsetParent(element) {\n return offsetParentPolyfill(element);\n}\nfunction offsetTop(element) {\n return offsetTopLeftPolyfill(element, 'offsetTop');\n}\nfunction offsetLeft(element) {\n return offsetTopLeftPolyfill(element, 'offsetLeft');\n}\nfunction flatTreeParent(element) {\n if (element.assignedSlot) {\n return element.assignedSlot;\n }\n if (element.parentNode instanceof ShadowRoot) {\n return element.parentNode.host;\n }\n return element.parentNode;\n}\nfunction ancestorTreeScopes(element) {\n const scopes = new Set();\n let currentScope = element.getRootNode();\n while (currentScope) {\n scopes.add(currentScope);\n currentScope = currentScope.parentNode\n ? currentScope.parentNode.getRootNode()\n : null;\n }\n return scopes;\n}\nfunction offsetParentPolyfill(element) {\n // Do an initial walk to check for display:none ancestors.\n for (let ancestor = element; ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n if (getComputedStyle(ancestor).display === 'none') {\n return null;\n }\n }\n for (let ancestor = flatTreeParent(element); ancestor; ancestor = flatTreeParent(ancestor)) {\n if (!(ancestor instanceof Element)) {\n continue;\n }\n const style = getComputedStyle(ancestor);\n // Display:contents nodes aren't in the layout tree so they should be skipped.\n if (style.display === 'contents') {\n continue;\n }\n if (style.position !== 'static' || style.filter !== 'none') {\n return ancestor;\n }\n if (ancestor.tagName === 'BODY') {\n return ancestor;\n }\n }\n return null;\n}\nfunction offsetTopLeftPolyfill(element, offsetTopOrLeft) {\n let value = element[offsetTopOrLeft];\n let nextOffsetParent = offsetParentPolyfill(element);\n const scopes = ancestorTreeScopes(element);\n while (nextOffsetParent && !scopes.has(nextOffsetParent.getRootNode())) {\n value -= nextOffsetParent[offsetTopOrLeft];\n nextOffsetParent = offsetParentPolyfill(nextOffsetParent);\n }\n return value;\n}\n\nexport { offsetLeft, offsetParent, offsetTop };\n","/**\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, CSSResultArray, TemplateResult} from 'lit';\nimport { arrow, autoUpdate, computePosition, flip, offset, platform, shift, size } from '@floating-ui/dom';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { html } from 'lit';\nimport { offsetParent } from 'composed-offset-position';\nimport NileElement from '../internal/nile-element';\nimport {styles} from './nile-popup.css';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile icon component.\n *\n * @tag nile-popup\n *\n */\n@customElement('nile-popup')\nexport class NilePopup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private anchorEl: Element | null;\n private cleanup: ReturnType<typeof autoUpdate> | undefined;\n\n /** A reference to the internal popup container. Useful for animating and styling the popup with JavaScript. */\n @query('.popup') popup: HTMLElement;\n @query('.popup__arrow') private arrowEl: HTMLElement;\n\n /**\n * The element the popup will be anchored to. If the anchor lives outside of the popup, you can provide its `id` or a\n * reference to it here. If the anchor lives inside the popup, use the `anchor` slot instead.\n */\n @property() anchor: Element | string;\n\n /**\n * Activates the positioning logic and shows the popup. When this attribute is removed, the positioning logic is torn\n * down and the popup will be hidden.\n */\n @property({ type: Boolean, reflect: true }) active = false;\n\n /**\n * The preferred placement of the popup. Note that the actual placement will vary as configured to keep the\n * panel inside of the viewport.\n */\n @property({ reflect: true }) placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /**\n * Determines how the popup is positioned. The `absolute` strategy works well in most cases, but if overflow is\n * clipped, using a `fixed` position strategy can often workaround it.\n */\n @property({ reflect: true }) strategy: 'absolute' | 'fixed' = 'absolute';\n\n /** The distance in pixels from which to offset the panel away from its anchor. */\n @property({ type: Number }) distance = 0;\n\n /** The distance in pixels from which to offset the panel along its anchor. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Attaches an arrow to the popup. The arrow's size and color can be customized using the `--arrow-size` and\n * `--arrow-color` custom properties. For additional customizations, you can also target the arrow using\n * `::part(arrow)` in your stylesheet.\n */\n @property({ type: Boolean }) arrow = false;\n\n /**\n * The placement of the arrow. The default is `anchor`, which will align the arrow as close to the center of the\n * anchor as possible, considering available space and `arrow-padding`. A value of `start`, `end`, or `center` will\n * align the arrow to the start, end, or center of the popover instead.\n */\n @property({ attribute: 'arrow-placement' }) arrowPlacement: 'start' | 'end' | 'center' | 'anchor' = 'anchor';\n\n /**\n * The amount of padding between the arrow and the edges of the popup. If the popup has a border-radius, for example,\n * this will prevent it from overflowing the corners.\n */\n @property({ attribute: 'arrow-padding', type: Number }) arrowPadding = 10;\n\n /**\n * When set, placement of the popup will flip to the opposite site to keep it in view. You can use\n * `flipFallbackPlacements` to further configure how the fallback placement is determined.\n */\n @property({ type: Boolean }) flip = false;\n\n /**\n * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits. Must be a\n * string of any number of placements separated by a space, e.g. \"top bottom left\". If no placement fits, the flip\n * fallback strategy will be used instead.\n * */\n @property({\n attribute: 'flip-fallback-placements',\n converter: {\n fromAttribute: (value: string) => {\n return value\n .split(' ')\n .map(p => p.trim())\n .filter(p => p !== '');\n },\n toAttribute: (value: []) => {\n return value.join(' ');\n }\n }\n })\n flipFallbackPlacements = '';\n\n /**\n * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether\n * the popup should be positioned using the best available fit based on available space or as it was initially\n * preferred.\n */\n @property({ attribute: 'flip-fallback-strategy' }) flipFallbackStrategy: 'best-fit' | 'initial' = 'best-fit';\n\n /**\n * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) flipBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the flip behavior will occur. */\n @property({ attribute: 'flip-padding', type: Number }) flipPadding = 0;\n\n /** Moves the popup along the axis to keep it in view when clipped. */\n @property({ type: Boolean }) shift = false;\n\n /**\n * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) shiftBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the shift behavior will occur. */\n @property({ attribute: 'shift-padding', type: Number }) shiftPadding = 0;\n\n /** When set, this will cause the popup to automatically resize itself to prevent it from overflowing. */\n @property({ attribute: 'auto-size' }) autoSize: 'horizontal' | 'vertical' | 'both';\n\n /** Syncs the popup's width or height to that of the anchor element. */\n @property() sync: 'width' | 'height' | 'both';\n\n /**\n * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing. By\n * default, the boundary includes overflow ancestors that will cause the element to be clipped. If needed, you can\n * change the boundary by passing a reference to one or more elements to this property.\n */\n @property({ type: Object }) autoSizeBoundary: Element | Element[];\n\n /** The amount of padding, in pixels, to exceed before the auto-size behavior will occur. */\n @property({ attribute: 'auto-size-padding', type: Number }) autoSizePadding = 0;\n\n async connectedCallback() {\n super.connectedCallback();\n\n // Start the positioner after the first update\n await this.updateComplete;\n this.start();\n }\n\n disconnectedCallback() {\n this.stop();\n }\n\n async updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n // Start or stop the positioner when active changes\n if (changedProps.has('active')) {\n if (this.active) {\n this.start();\n } else {\n this.stop();\n }\n }\n\n // Update the anchor when anchor changes\n if (changedProps.has('anchor')) {\n this.handleAnchorChange();\n }\n\n // All other properties will trigger a reposition when active\n if (this.active) {\n await this.updateComplete;\n this.reposition();\n }\n }\n\n private async handleAnchorChange() {\n await this.stop();\n\n if (this.anchor && typeof this.anchor === 'string') {\n // Locate the anchor by id\n const root = this.getRootNode() as Document | ShadowRoot;\n this.anchorEl = root.getElementById(this.anchor);\n } else if (this.anchor instanceof Element) {\n // Use the anchor's reference\n this.anchorEl = this.anchor;\n } else {\n // Look for a slotted anchor\n this.anchorEl = this.querySelector<HTMLElement>('[slot=\"anchor\"]');\n }\n\n // If the anchor is a <slot>, we'll use the first assigned element as the target since slots use `display: contents`\n // and positioning can't be calculated on them\n if (this.anchorEl instanceof HTMLSlotElement) {\n this.anchorEl = this.anchorEl.assignedElements({ flatten: true })[0] as HTMLElement;\n }\n\n /**\n * NOTE TO DEVELOPERS:\n * The anchor element is essential for nile-popup to function correctly.\n * This error was thrown when an anchor (slot=\"anchor\") or anchor reference was not found.\n *\n * In many places, developers are using *ngIf or similar conditional rendering directly on the anchor slot\n * inside <nile-tooltip>, which removes the anchor from the DOM.\n * As a result, the tooltip remains but cannot be anchored — leading to this error.\n *\n * Suggested Fixes:\n * - Move *ngIf to a wrapper above <nile-tooltip>\n * - OR use the 'disabled' property of nile-tooltip to prevent it from activating without anchor\n *\n * For now, this error is commented out to avoid runtime crashes.\n * Proper usage patterns should be followed instead.\n */\n if (!this.anchorEl) {\n // throw new Error(\n // 'Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.'\n // );\n return;\n }\n\n this.start();\n }\n\n private start() {\n // We can't start the positioner without an anchor\n if (!this.anchorEl) {\n return;\n }\n\n this.cleanup = autoUpdate(this.anchorEl, this.popup, () => {\n this.reposition();\n });\n }\n\n private async stop(): Promise<void> {\n return new Promise(resolve => {\n if (this.cleanup) {\n this.cleanup();\n this.cleanup = undefined;\n this.removeAttribute('data-current-placement');\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n requestAnimationFrame(() => resolve());\n } else {\n resolve();\n }\n });\n }\n\n /** Forces the popup to recalculate and reposition itself. */\n reposition() {\n // Nothing to do if the popup is inactive or the anchor doesn't exist\n if (!this.active || !this.anchorEl) {\n return;\n }\n\n //\n // NOTE: Floating UI middlewares are order dependent: https://floating-ui.com/docs/middleware\n //\n const middleware = [\n // The offset middleware goes first\n offset({ mainAxis: this.distance, crossAxis: this.skidding })\n ];\n\n // First we sync width/height\n if (this.sync) {\n middleware.push(\n size({\n apply: ({ rects }) => {\n const syncWidth = this.sync === 'width' || this.sync === 'both';\n const syncHeight = this.sync === 'height' || this.sync === 'both';\n this.popup.style.width = syncWidth ? `${rects.reference.width}px` : '';\n this.popup.style.height = syncHeight ? `${rects.reference.height}px` : '';\n }\n })\n );\n } else {\n // Cleanup styles if we're not matching width/height\n this.popup.style.width = '';\n this.popup.style.height = '';\n }\n\n // Then we flip\n if (this.flip) {\n middleware.push(\n flip({\n boundary: this.flipBoundary,\n // @ts-expect-error - We're converting a string attribute to an array here\n fallbackPlacements: this.flipFallbackPlacements,\n fallbackStrategy: this.flipFallbackStrategy === 'best-fit' ? 'bestFit' : 'initialPlacement',\n padding: this.flipPadding\n })\n );\n }\n\n // Then we shift\n if (this.shift) {\n middleware.push(\n shift({\n boundary: this.shiftBoundary,\n padding: this.shiftPadding\n })\n );\n }\n\n // Now we adjust the size as needed\n if (this.autoSize) {\n middleware.push(\n size({\n boundary: this.autoSizeBoundary,\n padding: this.autoSizePadding,\n apply: ({ availableWidth, availableHeight }) => {\n if (this.autoSize === 'vertical' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-height', `${availableHeight}px`);\n } else {\n this.style.removeProperty('--auto-size-available-height');\n }\n\n if (this.autoSize === 'horizontal' || this.autoSize === 'both') {\n this.style.setProperty('--auto-size-available-width', `${availableWidth}px`);\n } else {\n this.style.removeProperty('--auto-size-available-width');\n }\n }\n })\n );\n } else {\n // Cleanup styles if we're no longer using auto-size\n this.style.removeProperty('--auto-size-available-width');\n this.style.removeProperty('--auto-size-available-height');\n }\n\n // Finally, we add an arrow\n if (this.arrow) {\n middleware.push(\n arrow({\n element: this.arrowEl,\n padding: this.arrowPadding\n })\n );\n }\n\n //\n // Use custom positioning logic if the strategy is absolute. Otherwise, fall back to the default logic.\n //\n //\n const getOffsetParent =\n this.strategy === 'absolute'\n ? (element: Element) => platform.getOffsetParent(element, offsetParent)\n : platform.getOffsetParent;\n\n computePosition(this.anchorEl, this.popup, {\n placement: this.placement,\n middleware,\n strategy: this.strategy,\n platform: {\n ...platform,\n getOffsetParent\n }\n }).then(({ x, y, middlewareData, placement }) => {\n //\n // Even though we have our own localization utility, it uses different heuristics to determine RTL. Because of\n // that, we'll use the same approach that Floating UI uses.\n //\n // Source: https://github.com/floating-ui/floating-ui/blob/cb3b6ab07f95275730d3e6e46c702f8d4908b55c/packages/dom/src/utils/getDocumentRect.ts#L31\n //\n const isRtl = getComputedStyle(this).direction === 'rtl';\n const staticSide = { top: 'bottom', right: 'left', bottom: 'top', left: 'right' }[placement.split('-')[0]]!;\n\n this.setAttribute('data-current-placement', placement);\n\n Object.assign(this.popup.style, {\n left: `${x}px`,\n top: `${y}px`\n });\n\n if (this.arrow) {\n const arrowX = middlewareData.arrow!.x;\n const arrowY = middlewareData.arrow!.y;\n let top = '';\n let right = '';\n let bottom = '';\n let left = '';\n\n if (this.arrowPlacement === 'start') {\n // Start\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n top = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? value : '';\n left = isRtl ? '' : value;\n } else if (this.arrowPlacement === 'end') {\n // End\n const value = typeof arrowX === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n right = isRtl ? '' : value;\n left = isRtl ? value : '';\n bottom = typeof arrowY === 'number' ? `calc(${this.arrowPadding}px - var(--arrow-padding-offset))` : '';\n } else if (this.arrowPlacement === 'center') {\n // Center\n left = typeof arrowX === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n top = typeof arrowY === 'number' ? `calc(50% - var(--arrow-size-diagonal))` : '';\n } else {\n // Anchor (default)\n left = typeof arrowX === 'number' ? `${arrowX}px` : '';\n top = typeof arrowY === 'number' ? `${arrowY}px` : '';\n }\n\n Object.assign(this.arrowEl.style, {\n top,\n right,\n bottom,\n left,\n [staticSide]: 'calc(var(--arrow-size-diagonal) * -1)'\n });\n }\n });\n\n this.emit('reposition');\n }\n\n render() {\n return html`\n <slot name=\"anchor\" @slotchange=${this.handleAnchorChange}></slot>\n\n <div\n part=\"popup\"\n class=${classMap({\n popup: true,\n 'popup--active': this.active,\n 'popup--fixed': this.strategy === 'fixed',\n 'popup--has-arrow': this.arrow\n })}\n >\n <slot></slot>\n ${this.arrow ? html`<div part=\"arrow\" class=\"popup__arrow\" role=\"presentation\"></div>` : ''}\n </div>\n `;\n }\n}\n\nexport default NilePopup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-popup': NilePopup;\n }\n}\n"],"names":["offsetParent","element","ancestor","flatTreeParent","Element","getComputedStyle","display","style","position","filter","tagName","offsetParentPolyfill","assignedSlot","parentNode","ShadowRoot","host","setters","_tslib","NilePopup","_f","y","this","active","placement","strategy","distance","skidding","arrow","arrowPlacement","arrowPadding","flip","flipFallbackPlacements","flipFallbackStrategy","flipPadding","shift","shiftPadding","autoSizePadding","_this","_inherits","_createClass","key","value","_connectedCallback","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","_superPropGet","updateComplete","start","stop","connectedCallback","disconnectedCallback","_updated","_callee2","changedProps","super","has","handleAnchorChange","reposition","updated","_callee3","_t2","_callee3$","_context4","anchor","root","getRootNode","anchorEl","getElementById","querySelector","HTMLSlotElement","assignedElements","flatten","cleanup","autoUpdate","popup","_stop","_callee4","_this3","_callee4$","_context5","abrupt","Promise","resolve","undefined","removeAttribute","removeProperty","requestAnimationFrame","middleware","offset","mainAxis","crossAxis","sync","push","size","apply","t","_ref","rects","syncWidth","syncHeight","width","reference","height","boundary","flipBoundary","fallbackPlacements","fallbackStrategy","padding","shiftBoundary","autoSize","autoSizeBoundary","availableWidth","availableHeight","setProperty","arrowEl","getOffsetParent","platform","computePosition","then","_ref3","x","middlewareData","s","isRtl","direction","staticSide","top","right","bottom","left","split","setAttribute","Object","assign","concat","arrowX","arrowY","_defineProperty","emit","render","html","_templateObject","_taggedTemplateLiteral","classMap","_templateObject2","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","Number","attribute","converter","fromAttribute","map","p","trim","toAttribute","join","_export","customElement"],"mappings":"ozYACA,QAASA,CAAAA,EAAaC,CAClB,CAAA,CAAA,MA4BJ,UAA8BA,CAAAA,CAAAA,CAE1B,IAAK,GAAIC,CAAAA,EAAAA,CAAWD,EAASC,EAAUA,CAAAA,EAAAA,CAAWC,EAAe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AA,CAOlBF,CAAA,CAAA,CAA3BG,CAAS,CAAA,CAAEC,IAAMnB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAgDzH,CAAA0I,CAAAA,SAAAA,CAAA,kBAAA,CAAA,IAAA,EAAA,CAAA,CAGNF,CAAA,CAAA,CAA3DG,CAAS,CAAA,CAAEK,SAAW,CAAA,mBAAA,CAAqBJ,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAA8B/I,CAAA0I,CAAAA,SAAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAAc,OAAA,KA/IrExJ,CAASwI,CAAAA,CAAAA,CAAA,CADrBiB,CAAAA,CAAc,eACFzJ","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p as
|
|
1
|
+
import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p as n,c as h}from"../floating-ui.dom-cc9126da.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{query as p,property as c,customElement as d}from"lit/decorators.js";import{html as u}from"lit";import{N as f}from"../internal/nile-element.esm.js";import{s as m}from"./nile-popup.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";function b(t){return function(t){for(let i=t;i;i=v(i))if(i instanceof Element&&"none"===getComputedStyle(i).display)return null;for(let i=v(t);i;i=v(i)){if(!(i instanceof Element))continue;const t=getComputedStyle(i);if("contents"!==t.display){if("static"!==t.position||"none"!==t.filter)return i;if("BODY"===i.tagName)return i}}return null}(t)}function v(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}let y=class extends f{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=i(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[e({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(o({apply:({rects:t})=>{const i="width"===this.sync||"both"===this.sync,e="height"===this.sync||"both"===this.sync;this.popup.style.width=i?`${t.reference.width}px`:"",this.popup.style.height=e?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(s({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(a({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(o({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:i})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${i}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(r({element:this.arrowEl,padding:this.arrowPadding}));const i="absolute"===this.strategy?t=>n.getOffsetParent(t,b):n.getOffsetParent;h(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:{...n,getOffsetParent:i}}).then((({x:t,y:i,middlewareData:e,placement:s})=>{const a="rtl"===getComputedStyle(this).direction,o={top:"bottom",right:"left",bottom:"top",left:"right"}[s.split("-")[0]];if(this.setAttribute("data-current-placement",s),Object.assign(this.popup.style,{left:`${t}px`,top:`${i}px`}),this.arrow){const t=e.arrow.x,i=e.arrow.y;let s="",r="",n="",h="";if("start"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";s="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",r=a?e:"",h=a?"":e}else if("end"===this.arrowPlacement){const e="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";r=a?"":e,h=a?e:"",n="number"==typeof i?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(h="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",s="number"==typeof i?"calc(50% - var(--arrow-size-diagonal))":""):(h="number"==typeof t?`${t}px`:"",s="number"==typeof i?`${i}px`:"");Object.assign(this.arrowEl.style,{top:s,right:r,bottom:n,left:h,[o]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("reposition")}render(){return u`
|
|
2
2
|
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
3
3
|
|
|
4
4
|
<div
|
|
@@ -8,4 +8,4 @@ import{__decorate as t}from"tslib";import{b as i,o as e,f as s,a,s as o,d as r,p
|
|
|
8
8
|
<slot></slot>
|
|
9
9
|
${this.arrow?u`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
|
10
10
|
</div>
|
|
11
|
-
`}};y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([
|
|
11
|
+
`}};y.styles=m,t([p(".popup")],y.prototype,"popup",void 0),t([p(".popup__arrow")],y.prototype,"arrowEl",void 0),t([c()],y.prototype,"anchor",void 0),t([c({type:Boolean,reflect:!0})],y.prototype,"active",void 0),t([c({reflect:!0})],y.prototype,"placement",void 0),t([c({reflect:!0})],y.prototype,"strategy",void 0),t([c({type:Number})],y.prototype,"distance",void 0),t([c({type:Number})],y.prototype,"skidding",void 0),t([c({type:Boolean})],y.prototype,"arrow",void 0),t([c({attribute:"arrow-placement"})],y.prototype,"arrowPlacement",void 0),t([c({attribute:"arrow-padding",type:Number})],y.prototype,"arrowPadding",void 0),t([c({type:Boolean})],y.prototype,"flip",void 0),t([c({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],y.prototype,"flipFallbackPlacements",void 0),t([c({attribute:"flip-fallback-strategy"})],y.prototype,"flipFallbackStrategy",void 0),t([c({type:Object})],y.prototype,"flipBoundary",void 0),t([c({attribute:"flip-padding",type:Number})],y.prototype,"flipPadding",void 0),t([c({type:Boolean})],y.prototype,"shift",void 0),t([c({type:Object})],y.prototype,"shiftBoundary",void 0),t([c({attribute:"shift-padding",type:Number})],y.prototype,"shiftPadding",void 0),t([c({attribute:"auto-size"})],y.prototype,"autoSize",void 0),t([c()],y.prototype,"sync",void 0),t([c({type:Object})],y.prototype,"autoSizeBoundary",void 0),t([c({attribute:"auto-size-padding",type:Number})],y.prototype,"autoSizePadding",void 0),y=t([d("nile-popup")],y);export{y as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-progress-bar.cjs.js","tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileProgressBarCjsJs){_export("NileProgressBar",_nileProgressBarCjsJs.N);},function(_tslib){},function(_lit){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-progress-bar.cjs.js","tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.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(_nileProgressBarCjsJs){_export("NileProgressBar",_nileProgressBarCjsJs.N);},function(_tslib){},function(_lit){},function(_nileProgressBarCssCjsJs){},function(_litDecoratorsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NileProgressBar}from"./nile-progress-bar.esm.js";import"tslib";import"lit";import"./nile-progress-bar.css.esm.js";import"lit/decorators.js";import"../internal/nile-element.esm.js";
|
|
1
|
+
export{N as NileProgressBar}from"./nile-progress-bar.esm.js";import"tslib";import"lit";import"./nile-progress-bar.css.esm.js";import"lit/decorators.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","./nile-progress-bar.css.cjs.js","lit/decorators.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var e,r,
|
|
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","./nile-progress-bar.css.cjs.js","lit/decorators.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,s,r,t,i,a,_templateObject,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){s=_lit.html;},function(_nileProgressBarCssCjsJs){r=_nileProgressBarCssCjsJs.s;},function(_litDecoratorsJs){t=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_a){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value=0;return _this;}_inherits(l,_a);return _createClass(l,[{key:"updated",value:function updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error("[NileProgressBar]: Invalid value (".concat(this.value,") detected. Value must be between 0 and 100.")),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}));}},{key:"render",value:function render(){return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ","%\"></span></li>\n </ul>\n </div>\n "])),this.value);}}]);}(a));l.styles=r,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),_export("N",l=e([i("nile-progress-bar")],l));}};});
|
|
2
2
|
//# sourceMappingURL=nile-progress-bar.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends NileElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number, reflect: true, attribute: true }) value = 0;\n\n override updated(changedProperties: Map<string, any>) {\n if (changedProperties.has('value')) {\n if (this.value < 0 || this.value > 100) {\n console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`);\n this.value = 0; \n }\n\n if (this.value === 100) {\n this.emit('nile-complete', { message: 'Nile Progress reached 100%' });\n }\n }\n }\n\n override render() {\n return html`\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","l","this","value","_this","_inherits","_a","_createClass","key","updated","changedProperties","has","console","error","emit","message","render","html","_templateObject","_taggedTemplateLiteral","NileElement","styles","__decorate","property","type","Number","reflect","attribute","prototype","_export","customElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends NileElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number, reflect: true, attribute: true }) value = 0;\n\n override updated(changedProperties: Map<string, any>) {\n if (changedProperties.has('value')) {\n if (this.value < 0 || this.value > 100) {\n console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`);\n this.value = 0; \n }\n\n if (this.value === 100) {\n this.emit('nile-complete', { message: 'Nile Progress reached 100%' });\n }\n }\n }\n\n override render() {\n return html`\n <div part=\"container\" class=\"nile-progress-bar__container\">\n <ul part=\"progress-bar\" class=\"nile-progress-bar__progress-bar\">\n <li part=\"remaining\"><span part=\"progress\" style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","l","constructor","this","value","_this","_inherits","_a","_createClass","key","updated","changedProperties","has","console","error","concat","emit","message","render","html","_templateObject","_taggedTemplateLiteral","NileElement","styles","__decorate","property","type","Number","reflect","attribute","prototype","_export","customElement"],"mappings":"87GAKaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAGuDC,KAAAA,CAAKC,KAAAA,CAAG,CAwBrE,QAAAC,KAAA,EAtBUC,SAAA,CAAAL,CAAA,CAAAM,EAAA,SAAAC,YAAA,CAAAP,CAAA,GAAAQ,GAAA,WAAAL,KAAA,UAAAM,OAAAA,CAAQC,CACXA,CAAAA,CAAAA,CAAAA,CAAkBC,IAAI,OACpBT,CAAAA,GAAAA,CAAAA,IAAAA,CAAKC,KAAQ,CAAA,CAAA,EAAKD,IAAKC,CAAAA,KAAAA,CAAQ,GACjCS,IAAAA,OAAAA,CAAQC,KAAM,sCAAAC,MAAA,CAAqCZ,IAAKC,CAAAA,KAAAA,gDAAAA,CAAAA,CACxDD,IAAKC,CAAAA,KAAAA,CAAQ,CAGI,CAAA,CAAA,GAAA,GAAfD,IAAKC,CAAAA,KAAAA,EACPD,IAAKa,CAAAA,IAAAA,CAAK,eAAiB,CAAA,CAAEC,OAAS,CAAA,4BAAA,CAAA,CAAA,CAG3C,EAEQ,GAAAR,GAAA,UAAAL,KAAA,UAAAc,MAAAA,CAAAA,CACP,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6RAGsDlB,IAAKC,CAAAA,KAAAA,EAIvE,CAzBeJ,MADmBsB,CAAAA,GACnBtB,CAAAA,CAAMuB,OAAmBA,CAEmBC,CAAAA,CAAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,IAAMC,CAAAA,MAAAA,CAAQC,OAAS,CAAA,CAAA,CAAA,CAAMC,WAAW,CAAkB7B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8B,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAAAC,OAAA,KAH3D/B,EAAewB,CAAA,CAAA,CAD3BQ,CAAc,CAAA,mBAAA,CAAA,CAAA,CACFhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{__decorate as e}from"tslib";import{html as
|
|
1
|
+
import{__decorate as e}from"tslib";import{html as s}from"lit";import{s as r}from"./nile-progress-bar.css.esm.js";import{property as t,customElement as i}from"lit/decorators.js";import{N as a}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 a{constructor(){super(...arguments),this.value=0}updated(e){e.has("value")&&((this.value<0||this.value>100)&&(console.error(`[NileProgressBar]: Invalid value (${this.value}) detected. Value must be between 0 and 100.`),this.value=0),100===this.value&&this.emit("nile-complete",{message:"Nile Progress reached 100%"}))}render(){return s`
|
|
2
2
|
<div part="container" class="nile-progress-bar__container">
|
|
3
3
|
<ul part="progress-bar" class="nile-progress-bar__progress-bar">
|
|
4
4
|
<li part="remaining"><span part="progress" style="width: ${this.value}%"></span></li>
|
|
5
5
|
</ul>
|
|
6
6
|
</div>
|
|
7
|
-
`}};l.styles=
|
|
7
|
+
`}};l.styles=r,e([t({type:Number,reflect:!0,attribute:!0})],l.prototype,"value",void 0),l=e([i("nile-progress-bar")],l);export{l as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-qr-code.cjs.js","tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileQrCodeCjsJs){_export("NileQrCode",_nileQrCodeCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileQrCodeCssCjsJs){},function(_nileQrCodeUtilsCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-qr-code.cjs.js","tslib","lit","lit/decorators.js","./nile-qr-code.css.cjs.js","./nile-qr-code-utils.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(_nileQrCodeCjsJs){_export("NileQrCode",_nileQrCodeCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileQrCodeCssCjsJs){},function(_nileQrCodeUtilsCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NileQrCode}from"./nile-qr-code.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-qr-code.css.esm.js";import"./nile-qr-code-utils.esm.js";import"../internal/nile-element.esm.js";
|
|
1
|
+
export{N as NileQrCode}from"./nile-qr-code.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-qr-code.css.esm.js";import"./nile-qr-code-utils.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-qr-code.css.cjs.js","./nile-qr-code-utils.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,i,e,r,s,a,n,o,_templateObject,
|
|
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-qr-code.css.cjs.js","./nile-qr-code-utils.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,i,e,r,s,a,n,o,_templateObject,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 _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;},function(_litDecoratorsJs){e=_litDecoratorsJs.property;r=_litDecoratorsJs.query;s=_litDecoratorsJs.customElement;},function(_nileQrCodeCssCjsJs){a=_nileQrCodeCssCjsJs.s;},function(_nileQrCodeUtilsCjsJs){n=_nileQrCodeUtilsCjsJs.g;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_o){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value="",_this.size=128,_this.fill="black",_this.background="white",_this.radius=0,_this.errorCorrection="H",_this.label="",_this.image="",_this.imageSize=.25,_this.imagePadding=4,_this.imageRadius=4,_this.fillGradient="",_this._loadedImage=null,_this._imageLoadPromise=null;return _this;}_inherits(l,_o);return _createClass(l,[{key:"updated",value:function updated(t){if(_superPropGet(l,"updated",this,3)([t]),t.has("image")&&(this._loadedImage=null,this._imageLoadPromise=null,this.image))return void this.loadImage(this.image);["value","size","fill","background","radius","errorCorrection","imageSize","imagePadding","imageRadius","fillGradient"].some(function(i){return t.has(i);})&&this.drawQrCode();}},{key:"render",value:function render(){var t=this.label||this.value||"QR Code";return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <canvas\n part=\"base\"\n role=\"img\"\n aria-label=","\n width=","\n height=","\n ></canvas>\n "])),t,this.size,this.size);}},{key:"download",value:function download(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"qr-code.png";if(!this.canvas)return;var i=document.createElement("a");i.download=t,i.href=this.canvas.toDataURL("image/png"),i.click();}},{key:"toDataURL",value:function toDataURL(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"image/png";return this.canvas?this.canvas.toDataURL(t):"";}},{key:"loadImage",value:function loadImage(t){var _this2=this;var i=new Image();i.crossOrigin="anonymous",this._imageLoadPromise=new Promise(function(e){i.onload=function(){_this2._loadedImage=i,_this2._imageLoadPromise=null,_this2.drawQrCode(),e();},i.onerror=function(){_this2._loadedImage=null,_this2._imageLoadPromise=null,_this2.emit("nile-qr-image-error",{src:t}),_this2.drawQrCode(),e();};}),i.src=t;}},{key:"drawQrCode",value:function drawQrCode(){if(!this.canvas)return;var t=this.canvas.getContext("2d");if(!t)return;var i=this.size,e=this.fill,r=this.background,s=this.radius,a=this.errorCorrection,o=this.value,_l=Math.max(0,Math.min(.5,s)),h=n(o,a),c=h.length,d=i/c;t.clearRect(0,0,i,i),r&&"transparent"!==r&&(t.fillStyle=r,t.fillRect(0,0,i,i));var u=Math.max(.1,Math.min(.4,this.imageSize)),m=this._loadedImage?i*u:0,f=m+(this._loadedImage?2*this.imagePadding:0),g=(i-f)/2,p=g+f,b=this.resolveModuleFill(t,i);t.fillStyle=b;for(var _i=0;_i<c;_i++)for(var _e=0;_e<c;_e++){if(1!==h[_i][_e])continue;var _r=_e*d,_s=_i*d;if(this._loadedImage){if(_r>=g&&_r+d<=p&&_s>=g&&_s+d<=p)continue;}_l>0?this.drawRoundedModule(t,_r,_s,d,d,_l*d):t.fillRect(_r,_s,d,d);}this._loadedImage&&this.drawCenterImage(t,i,m);}},{key:"resolveModuleFill",value:function resolveModuleFill(t,i){if(!this.fillGradient)return this.fill;var e=this.fillGradient.split(",").map(function(t){return t.trim();});if(e.length<3)return this.fill;var r=parseFloat(e[0]);if(Number.isNaN(r))return this.fill;var s=r*Math.PI/180,a=i/2,n=i/2,o=i/2,_l2=a-Math.cos(s)*o,h=n-Math.sin(s)*o,c=a+Math.cos(s)*o,d=n+Math.sin(s)*o,u=t.createLinearGradient(_l2,h,c,d),m=e.slice(1);for(var _t=0;_t<m.length;_t++)u.addColorStop(_t/(m.length-1),m[_t]);return u;}},{key:"drawCenterImage",value:function drawCenterImage(t,i,e){if(!this._loadedImage)return;var r=(i-e)/2,s=(i-e)/2,a=Math.min(this.imageRadius,e/2),n=this.imagePadding;if(n>0&&this.background&&"transparent"!==this.background){t.fillStyle=this.background;var _i2=r-n,_o2=s-n,_l3=e+2*n,h=e+2*n,c=a+.5*n;this.drawRoundedRect(t,_i2,_o2,_l3,h,c),t.fill();}t.save(),this.clipRoundedRect(t,r,s,e,e,a),t.drawImage(this._loadedImage,r,s,e,e),t.restore();}},{key:"drawRoundedModule",value:function drawRoundedModule(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.fill();}},{key:"drawRoundedRect",value:function drawRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath();}},{key:"clipRoundedRect",value:function clipRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.clip();}}],[{key:"styles",get:function get(){return[a];}}]);}(o));t([e({type:String,reflect:!0})],l.prototype,"value",void 0),t([e({type:Number,reflect:!0})],l.prototype,"size",void 0),t([e({type:String,reflect:!0})],l.prototype,"fill",void 0),t([e({type:String,reflect:!0})],l.prototype,"background",void 0),t([e({type:Number,reflect:!0})],l.prototype,"radius",void 0),t([e({attribute:"error-correction",reflect:!0})],l.prototype,"errorCorrection",void 0),t([e({type:String,reflect:!0})],l.prototype,"label",void 0),t([e({type:String,reflect:!0})],l.prototype,"image",void 0),t([e({attribute:"image-size",type:Number,reflect:!0})],l.prototype,"imageSize",void 0),t([e({attribute:"image-padding",type:Number,reflect:!0})],l.prototype,"imagePadding",void 0),t([e({attribute:"image-radius",type:Number,reflect:!0})],l.prototype,"imageRadius",void 0),t([e({attribute:"fill-gradient",type:String,reflect:!0})],l.prototype,"fillGradient",void 0),t([r("canvas")],l.prototype,"canvas",void 0),_export("N",l=t([s("nile-qr-code")],l));}};});
|
|
2
2
|
//# sourceMappingURL=nile-qr-code.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-qr-code.cjs.js","sources":["../../../src/nile-qr-code/nile-qr-code.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 { html, CSSResultArray, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { styles } from './nile-qr-code.css.js';\nimport { generateQR, ErrorCorrectionLevel } from './nile-qr-code-utils.js';\nimport NileElement from '../internal/nile-element.js';\n\n/**\n * Nile QR Code component.\n *\n \n * @tag nile-qr-code\n *\n * @csspart base - The canvas element used to draw the QR code.\n *\n * @fires nile-qr-image-error - Emitted when the center image fails to load.\n *\n * @example\n \n *\n \n */\n@customElement('nile-qr-code')\nexport class NileQrCode extends NileElement {\n\n /**\n * The styles for QR Code.\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 // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n\n /**\n * The QR code's value — the text or URL to encode.\n */\n @property({ type: String, reflect: true })\n value = '';\n\n /**\n * The size of the QR code, in pixels.\n */\n @property({ type: Number, reflect: true })\n size = 128;\n\n /**\n * The fill color. This can be any valid CSS color, but not a CSS custom property.\n */\n @property({ type: String, reflect: true })\n fill = 'black';\n\n /**\n * The background color. This can be any valid CSS color or `'transparent'`.\n * It cannot be a CSS custom property.\n */\n @property({ type: String, reflect: true })\n background = 'white';\n\n /**\n * The edge radius of each module. Must be between 0 and 0.5.\n * Use this to create a rounded effect.\n */\n @property({ type: Number, reflect: true })\n radius = 0;\n\n /**\n * The level of error correction to use.\n * - `'L'` — Low (~7%)\n * - `'M'` — Medium (~15%)\n * - `'Q'` — Quartile (~25%)\n * - `'H'` — High (~30%)\n *\n * When using an image overlay, `'H'` is recommended so the QR remains scannable.\n */\n @property({ attribute: 'error-correction', reflect: true })\n errorCorrection: ErrorCorrectionLevel = 'H';\n\n /**\n * The label for assistive devices to announce.\n * If unspecified, the `value` will be used instead.\n */\n @property({ type: String, reflect: true })\n label = '';\n\n /**\n * URL of an image to overlay in the center of the QR code (e.g. a logo).\n * The image is drawn on top of the QR modules, so use `error-correction=\"H\"`\n * to ensure the code remains scannable.\n */\n @property({ type: String, reflect: true })\n image = '';\n\n /**\n * Size of the center image as a fraction of the overall QR code size\n * (0.1 – 0.4). Defaults to 0.25 (25% of the QR code).\n */\n @property({ attribute: 'image-size', type: Number, reflect: true })\n imageSize = 0.25;\n\n /**\n * Padding around the center image in pixels. Creates a clear area\n * between the image and the surrounding QR modules.\n */\n @property({ attribute: 'image-padding', type: Number, reflect: true })\n imagePadding = 4;\n\n /**\n * Optional border radius for the center image in pixels.\n * Set to a high value for a circular mask.\n */\n @property({ attribute: 'image-radius', type: Number, reflect: true })\n imageRadius = 4;\n\n /**\n * Apply a linear gradient to the QR modules instead of a flat color.\n * Format: `\"direction, color1, color2[, ...]\"` where direction is an\n * angle in degrees (e.g. `\"135, #6366f1, #ec4899\"`).\n * When set, this overrides the `fill` property for module rendering.\n */\n @property({ attribute: 'fill-gradient', type: String, reflect: true })\n fillGradient = '';\n\n // -------------------------------------------------------------------------\n // Internal state\n // -------------------------------------------------------------------------\n\n private _loadedImage: HTMLImageElement | null = null;\n\n private _imageLoadPromise: Promise<void> | null = null;\n\n // -------------------------------------------------------------------------\n // Refs\n // -------------------------------------------------------------------------\n\n @query('canvas')\n private canvas!: HTMLCanvasElement;\n\n // -------------------------------------------------------------------------\n // Lifecycle\n // -------------------------------------------------------------------------\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('image')) {\n this._loadedImage = null;\n this._imageLoadPromise = null;\n if (this.image) {\n this.loadImage(this.image);\n return;\n }\n }\n\n const relevantProps: (keyof NileQrCode)[] = [\n 'value', 'size', 'fill', 'background', 'radius', 'errorCorrection',\n 'imageSize', 'imagePadding', 'imageRadius', 'fillGradient',\n ];\n\n const needsRedraw = relevantProps.some(p => changedProperties.has(p));\n if (needsRedraw) {\n this.drawQrCode();\n }\n }\n\n // -------------------------------------------------------------------------\n // Rendering\n // -------------------------------------------------------------------------\n\n public render(): TemplateResult {\n const ariaLabel = this.label || this.value || 'QR Code';\n\n return html`\n <canvas\n part=\"base\"\n role=\"img\"\n aria-label=${ariaLabel}\n width=${this.size}\n height=${this.size}\n ></canvas>\n `;\n }\n\n // -------------------------------------------------------------------------\n // Public methods\n // -------------------------------------------------------------------------\n\n /**\n * Downloads the QR code as a PNG image.\n * @param filename - The name of the downloaded file (defaults to `'qr-code.png'`).\n */\n public download(filename = 'qr-code.png'): void {\n if (!this.canvas) return;\n const link = document.createElement('a');\n link.download = filename;\n link.href = this.canvas.toDataURL('image/png');\n link.click();\n }\n\n /**\n * Returns the QR code canvas content as a data URL.\n * @param type - MIME type (defaults to `'image/png'`).\n */\n public toDataURL(type = 'image/png'): string {\n if (!this.canvas) return '';\n return this.canvas.toDataURL(type);\n }\n\n // -------------------------------------------------------------------------\n // Private methods\n // -------------------------------------------------------------------------\n\n private loadImage(src: string): void {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n\n this._imageLoadPromise = new Promise<void>((resolve) => {\n img.onload = () => {\n this._loadedImage = img;\n this._imageLoadPromise = null;\n this.drawQrCode();\n resolve();\n };\n img.onerror = () => {\n this._loadedImage = null;\n this._imageLoadPromise = null;\n this.emit('nile-qr-image-error', { src });\n this.drawQrCode();\n resolve();\n };\n });\n\n img.src = src;\n }\n\n private drawQrCode(): void {\n if (!this.canvas) return;\n\n const ctx = this.canvas.getContext('2d');\n if (!ctx) return;\n\n const { size, fill, background, radius: rawRadius, errorCorrection, value } = this;\n\n const clampedRadius = Math.max(0, Math.min(0.5, rawRadius));\n\n const matrix = generateQR(value, errorCorrection);\n const moduleCount = matrix.length;\n const moduleSize = size / moduleCount;\n\n ctx.clearRect(0, 0, size, size);\n\n if (background && background !== 'transparent') {\n ctx.fillStyle = background;\n ctx.fillRect(0, 0, size, size);\n }\n\n const imgFraction = Math.max(0.1, Math.min(0.4, this.imageSize));\n const imgPixelSize = this._loadedImage ? size * imgFraction : 0;\n const padTotal = this._loadedImage ? this.imagePadding * 2 : 0;\n const exclusionSize = imgPixelSize + padTotal;\n const exclusionStart = (size - exclusionSize) / 2;\n const exclusionEnd = exclusionStart + exclusionSize;\n\n const useFill = this.resolveModuleFill(ctx, size);\n ctx.fillStyle = useFill;\n\n for (let row = 0; row < moduleCount; row++) {\n for (let col = 0; col < moduleCount; col++) {\n if (matrix[row][col] !== 1) continue;\n\n const x = col * moduleSize;\n const y = row * moduleSize;\n\n if (this._loadedImage) {\n const modRight = x + moduleSize;\n const modBottom = y + moduleSize;\n if (x >= exclusionStart && modRight <= exclusionEnd &&\n y >= exclusionStart && modBottom <= exclusionEnd) {\n continue;\n }\n }\n\n if (clampedRadius > 0) {\n this.drawRoundedModule(ctx, x, y, moduleSize, moduleSize, clampedRadius * moduleSize);\n } else {\n ctx.fillRect(x, y, moduleSize, moduleSize);\n }\n }\n }\n\n if (this._loadedImage) {\n this.drawCenterImage(ctx, size, imgPixelSize);\n }\n }\n\n /**\n * Returns the fill style for QR modules — either a gradient or the flat fill color.\n */\n private resolveModuleFill(ctx: CanvasRenderingContext2D, size: number): string | CanvasGradient {\n if (!this.fillGradient) return this.fill;\n\n const parts = this.fillGradient.split(',').map(s => s.trim());\n if (parts.length < 3) return this.fill;\n\n const angleDeg = parseFloat(parts[0]);\n if (Number.isNaN(angleDeg)) return this.fill;\n\n const angleRad = (angleDeg * Math.PI) / 180;\n const cx = size / 2;\n const cy = size / 2;\n const len = size / 2;\n const x0 = cx - Math.cos(angleRad) * len;\n const y0 = cy - Math.sin(angleRad) * len;\n const x1 = cx + Math.cos(angleRad) * len;\n const y1 = cy + Math.sin(angleRad) * len;\n\n const gradient = ctx.createLinearGradient(x0, y0, x1, y1);\n const colors = parts.slice(1);\n for (let i = 0; i < colors.length; i++) {\n gradient.addColorStop(i / (colors.length - 1), colors[i]);\n }\n return gradient;\n }\n\n private drawCenterImage(ctx: CanvasRenderingContext2D, size: number, imgPixelSize: number): void {\n if (!this._loadedImage) return;\n\n const x = (size - imgPixelSize) / 2;\n const y = (size - imgPixelSize) / 2;\n const r = Math.min(this.imageRadius, imgPixelSize / 2);\n\n const pad = this.imagePadding;\n if (pad > 0 && this.background && this.background !== 'transparent') {\n ctx.fillStyle = this.background;\n const bx = x - pad;\n const by = y - pad;\n const bw = imgPixelSize + pad * 2;\n const bh = imgPixelSize + pad * 2;\n const br = r + pad * 0.5;\n this.drawRoundedRect(ctx, bx, by, bw, bh, br);\n ctx.fill();\n }\n\n ctx.save();\n this.clipRoundedRect(ctx, x, y, imgPixelSize, imgPixelSize, r);\n ctx.drawImage(this._loadedImage, x, y, imgPixelSize, imgPixelSize);\n ctx.restore();\n }\n\n private drawRoundedModule(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n ctx.fill();\n }\n\n private drawRoundedRect(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n }\n\n private clipRoundedRect(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n ctx.clip();\n }\n}\n\nexport default NileQrCode;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-qr-code': NileQrCode;\n }\n}\n"],"names":["NileQrCode","h","constructor","this","value","size","fill","background","radius","errorCorrection","label","image","imageSize","imagePadding","imageRadius","fillGradient","_loadedImage","_imageLoadPromise","_this","_inherits","_o","_createClass","key","updated","changedProperties","super","has","loadImage","some","p","drawQrCode","render","ariaLabel","html","_templateObject","_taggedTemplateLiteral","download","filename","arguments","length","undefined","canvas","link","document","createElement","href","toDataURL","click","type","src","_this2","img","Image","crossOrigin","Promise","resolve","onload","onerror","emit","ctx","getContext","clampedRadius","rawRadius","Math","max","min","matrix","generateQR","moduleCount","moduleSize","clearRect","fillStyle","fillRect","imgFraction","imgPixelSize","exclusionSize","exclusionStart","exclusionEnd","useFill","resolveModuleFill","row","col","x","y","drawRoundedModule","drawCenterImage","parts","split","map","s","trim","angleDeg","parseFloat","Number","isNaN","angleRad","PI","cx","cy","len","x0","cos","y0","sin","x1","y1","gradient","createLinearGradient","colors","slice","i","addColorStop","r","pad","bx","by","bw","bh","br","drawRoundedRect","save","clipRoundedRect","drawImage","restore","w","beginPath","moveTo","lineTo","arcTo","closePath","clip","__decorate","get","styles","NileElement","property","String","reflect","prototype","attribute","query","_export","customElement"],"mappings":"gwHA6BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAkBLC,KAAAA,CAAKC,KAAAA,CAAG,EAMRD,CAAAA,KAAAA,CAAIE,IAAG,CAAA,GAAA,CAMPF,KAAAA,CAAIG,IAAAA,CAAG,OAOPH,CAAAA,KAAAA,CAAUI,UAAG,CAAA,OAAA,CAObJ,KAAAA,CAAMK,MAAAA,CAAG,CAYTL,CAAAA,KAAAA,CAAeM,eAAyB,CAAA,GAAA,CAOxCN,KAAAA,CAAKO,KAAAA,CAAG,EAQRP,CAAAA,KAAAA,CAAKQ,KAAG,CAAA,EAAA,CAORR,KAAAA,CAASS,SAAAA,CAAG,GAOZT,CAAAA,KAAAA,CAAYU,YAAG,CAAA,CAAA,CAOfV,KAAAA,CAAWW,WAAAA,CAAG,CASdX,CAAAA,KAAAA,CAAYY,YAAG,CAAA,EAAA,CAMPZ,KAAAA,CAAYa,YAAAA,CAA4B,IAExCb,CAAAA,KAAAA,CAAiBc,kBAA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AM6C,CAAAA,MAAAA,CAAQ4C,SAAS,CAC9CzI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0I,SAAA,CAAA,cAAA,CAAA,IAAA,EAOjBP,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEI,SAAW,CAAA,cAAA,CAAgB3F,IAAM6C,CAAAA,MAAAA,CAAQ4C,SAAS,CAC9CzI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0I,SAAA,CAAA,aAAA,CAAA,IAAA,EAShBP,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEI,SAAW,CAAA,eAAA,CAAiB3F,IAAMwF,CAAAA,MAAAA,CAAQC,SAAS,CAC7CzI,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0I,SAAA,CAAA,cAAA,CAAA,IAAA,EAeVP,CAAAA,CAAAA,CAAAA,CAAA,CADPS,CAAM,CAAA,QAAA,CAAA,CAAA,CAC4B5I,CAAA0I,CAAAA,SAAAA,CAAA,QAAA,CAAA,IAAA,EAAA,CAAA,CAAAG,OAAA,KApHxB7I,EAAUmI,CAAA,CAAA,CADtBW,CAAc,CAAA,cAAA,CAAA,CAAA,CACF9I"}
|
|
1
|
+
{"version":3,"file":"nile-qr-code.cjs.js","sources":["../../../src/nile-qr-code/nile-qr-code.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 { html, CSSResultArray, TemplateResult, PropertyValues } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { styles } from './nile-qr-code.css.js';\nimport { generateQR, ErrorCorrectionLevel } from './nile-qr-code-utils.js';\nimport NileElement from '../internal/nile-element.js';\n\n/**\n * Nile QR Code component.\n *\n \n * @tag nile-qr-code\n *\n * @csspart base - The canvas element used to draw the QR code.\n *\n * @fires nile-qr-image-error - Emitted when the center image fails to load.\n *\n * @example\n \n *\n \n */\n@customElement('nile-qr-code')\nexport class NileQrCode extends NileElement {\n\n /**\n * The styles for QR Code.\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 // -------------------------------------------------------------------------\n // Properties\n // -------------------------------------------------------------------------\n\n /**\n * The QR code's value — the text or URL to encode.\n */\n @property({ type: String, reflect: true })\n value = '';\n\n /**\n * The size of the QR code, in pixels.\n */\n @property({ type: Number, reflect: true })\n size = 128;\n\n /**\n * The fill color. This can be any valid CSS color, but not a CSS custom property.\n */\n @property({ type: String, reflect: true })\n fill = 'black';\n\n /**\n * The background color. This can be any valid CSS color or `'transparent'`.\n * It cannot be a CSS custom property.\n */\n @property({ type: String, reflect: true })\n background = 'white';\n\n /**\n * The edge radius of each module. Must be between 0 and 0.5.\n * Use this to create a rounded effect.\n */\n @property({ type: Number, reflect: true })\n radius = 0;\n\n /**\n * The level of error correction to use.\n * - `'L'` — Low (~7%)\n * - `'M'` — Medium (~15%)\n * - `'Q'` — Quartile (~25%)\n * - `'H'` — High (~30%)\n *\n * When using an image overlay, `'H'` is recommended so the QR remains scannable.\n */\n @property({ attribute: 'error-correction', reflect: true })\n errorCorrection: ErrorCorrectionLevel = 'H';\n\n /**\n * The label for assistive devices to announce.\n * If unspecified, the `value` will be used instead.\n */\n @property({ type: String, reflect: true })\n label = '';\n\n /**\n * URL of an image to overlay in the center of the QR code (e.g. a logo).\n * The image is drawn on top of the QR modules, so use `error-correction=\"H\"`\n * to ensure the code remains scannable.\n */\n @property({ type: String, reflect: true })\n image = '';\n\n /**\n * Size of the center image as a fraction of the overall QR code size\n * (0.1 – 0.4). Defaults to 0.25 (25% of the QR code).\n */\n @property({ attribute: 'image-size', type: Number, reflect: true })\n imageSize = 0.25;\n\n /**\n * Padding around the center image in pixels. Creates a clear area\n * between the image and the surrounding QR modules.\n */\n @property({ attribute: 'image-padding', type: Number, reflect: true })\n imagePadding = 4;\n\n /**\n * Optional border radius for the center image in pixels.\n * Set to a high value for a circular mask.\n */\n @property({ attribute: 'image-radius', type: Number, reflect: true })\n imageRadius = 4;\n\n /**\n * Apply a linear gradient to the QR modules instead of a flat color.\n * Format: `\"direction, color1, color2[, ...]\"` where direction is an\n * angle in degrees (e.g. `\"135, #6366f1, #ec4899\"`).\n * When set, this overrides the `fill` property for module rendering.\n */\n @property({ attribute: 'fill-gradient', type: String, reflect: true })\n fillGradient = '';\n\n // -------------------------------------------------------------------------\n // Internal state\n // -------------------------------------------------------------------------\n\n private _loadedImage: HTMLImageElement | null = null;\n\n private _imageLoadPromise: Promise<void> | null = null;\n\n // -------------------------------------------------------------------------\n // Refs\n // -------------------------------------------------------------------------\n\n @query('canvas')\n private canvas!: HTMLCanvasElement;\n\n // -------------------------------------------------------------------------\n // Lifecycle\n // -------------------------------------------------------------------------\n\n protected override updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n\n if (changedProperties.has('image')) {\n this._loadedImage = null;\n this._imageLoadPromise = null;\n if (this.image) {\n this.loadImage(this.image);\n return;\n }\n }\n\n const relevantProps: (keyof NileQrCode)[] = [\n 'value', 'size', 'fill', 'background', 'radius', 'errorCorrection',\n 'imageSize', 'imagePadding', 'imageRadius', 'fillGradient',\n ];\n\n const needsRedraw = relevantProps.some(p => changedProperties.has(p));\n if (needsRedraw) {\n this.drawQrCode();\n }\n }\n\n // -------------------------------------------------------------------------\n // Rendering\n // -------------------------------------------------------------------------\n\n public render(): TemplateResult {\n const ariaLabel = this.label || this.value || 'QR Code';\n\n return html`\n <canvas\n part=\"base\"\n role=\"img\"\n aria-label=${ariaLabel}\n width=${this.size}\n height=${this.size}\n ></canvas>\n `;\n }\n\n // -------------------------------------------------------------------------\n // Public methods\n // -------------------------------------------------------------------------\n\n /**\n * Downloads the QR code as a PNG image.\n * @param filename - The name of the downloaded file (defaults to `'qr-code.png'`).\n */\n public download(filename = 'qr-code.png'): void {\n if (!this.canvas) return;\n const link = document.createElement('a');\n link.download = filename;\n link.href = this.canvas.toDataURL('image/png');\n link.click();\n }\n\n /**\n * Returns the QR code canvas content as a data URL.\n * @param type - MIME type (defaults to `'image/png'`).\n */\n public toDataURL(type = 'image/png'): string {\n if (!this.canvas) return '';\n return this.canvas.toDataURL(type);\n }\n\n // -------------------------------------------------------------------------\n // Private methods\n // -------------------------------------------------------------------------\n\n private loadImage(src: string): void {\n const img = new Image();\n img.crossOrigin = 'anonymous';\n\n this._imageLoadPromise = new Promise<void>((resolve) => {\n img.onload = () => {\n this._loadedImage = img;\n this._imageLoadPromise = null;\n this.drawQrCode();\n resolve();\n };\n img.onerror = () => {\n this._loadedImage = null;\n this._imageLoadPromise = null;\n this.emit('nile-qr-image-error', { src });\n this.drawQrCode();\n resolve();\n };\n });\n\n img.src = src;\n }\n\n private drawQrCode(): void {\n if (!this.canvas) return;\n\n const ctx = this.canvas.getContext('2d');\n if (!ctx) return;\n\n const { size, fill, background, radius: rawRadius, errorCorrection, value } = this;\n\n const clampedRadius = Math.max(0, Math.min(0.5, rawRadius));\n\n const matrix = generateQR(value, errorCorrection);\n const moduleCount = matrix.length;\n const moduleSize = size / moduleCount;\n\n ctx.clearRect(0, 0, size, size);\n\n if (background && background !== 'transparent') {\n ctx.fillStyle = background;\n ctx.fillRect(0, 0, size, size);\n }\n\n const imgFraction = Math.max(0.1, Math.min(0.4, this.imageSize));\n const imgPixelSize = this._loadedImage ? size * imgFraction : 0;\n const padTotal = this._loadedImage ? this.imagePadding * 2 : 0;\n const exclusionSize = imgPixelSize + padTotal;\n const exclusionStart = (size - exclusionSize) / 2;\n const exclusionEnd = exclusionStart + exclusionSize;\n\n const useFill = this.resolveModuleFill(ctx, size);\n ctx.fillStyle = useFill;\n\n for (let row = 0; row < moduleCount; row++) {\n for (let col = 0; col < moduleCount; col++) {\n if (matrix[row][col] !== 1) continue;\n\n const x = col * moduleSize;\n const y = row * moduleSize;\n\n if (this._loadedImage) {\n const modRight = x + moduleSize;\n const modBottom = y + moduleSize;\n if (x >= exclusionStart && modRight <= exclusionEnd &&\n y >= exclusionStart && modBottom <= exclusionEnd) {\n continue;\n }\n }\n\n if (clampedRadius > 0) {\n this.drawRoundedModule(ctx, x, y, moduleSize, moduleSize, clampedRadius * moduleSize);\n } else {\n ctx.fillRect(x, y, moduleSize, moduleSize);\n }\n }\n }\n\n if (this._loadedImage) {\n this.drawCenterImage(ctx, size, imgPixelSize);\n }\n }\n\n /**\n * Returns the fill style for QR modules — either a gradient or the flat fill color.\n */\n private resolveModuleFill(ctx: CanvasRenderingContext2D, size: number): string | CanvasGradient {\n if (!this.fillGradient) return this.fill;\n\n const parts = this.fillGradient.split(',').map(s => s.trim());\n if (parts.length < 3) return this.fill;\n\n const angleDeg = parseFloat(parts[0]);\n if (Number.isNaN(angleDeg)) return this.fill;\n\n const angleRad = (angleDeg * Math.PI) / 180;\n const cx = size / 2;\n const cy = size / 2;\n const len = size / 2;\n const x0 = cx - Math.cos(angleRad) * len;\n const y0 = cy - Math.sin(angleRad) * len;\n const x1 = cx + Math.cos(angleRad) * len;\n const y1 = cy + Math.sin(angleRad) * len;\n\n const gradient = ctx.createLinearGradient(x0, y0, x1, y1);\n const colors = parts.slice(1);\n for (let i = 0; i < colors.length; i++) {\n gradient.addColorStop(i / (colors.length - 1), colors[i]);\n }\n return gradient;\n }\n\n private drawCenterImage(ctx: CanvasRenderingContext2D, size: number, imgPixelSize: number): void {\n if (!this._loadedImage) return;\n\n const x = (size - imgPixelSize) / 2;\n const y = (size - imgPixelSize) / 2;\n const r = Math.min(this.imageRadius, imgPixelSize / 2);\n\n const pad = this.imagePadding;\n if (pad > 0 && this.background && this.background !== 'transparent') {\n ctx.fillStyle = this.background;\n const bx = x - pad;\n const by = y - pad;\n const bw = imgPixelSize + pad * 2;\n const bh = imgPixelSize + pad * 2;\n const br = r + pad * 0.5;\n this.drawRoundedRect(ctx, bx, by, bw, bh, br);\n ctx.fill();\n }\n\n ctx.save();\n this.clipRoundedRect(ctx, x, y, imgPixelSize, imgPixelSize, r);\n ctx.drawImage(this._loadedImage, x, y, imgPixelSize, imgPixelSize);\n ctx.restore();\n }\n\n private drawRoundedModule(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n ctx.fill();\n }\n\n private drawRoundedRect(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n }\n\n private clipRoundedRect(\n ctx: CanvasRenderingContext2D,\n x: number,\n y: number,\n w: number,\n h: number,\n r: number\n ): void {\n ctx.beginPath();\n ctx.moveTo(x + r, y);\n ctx.lineTo(x + w - r, y);\n ctx.arcTo(x + w, y, x + w, y + r, r);\n ctx.lineTo(x + w, y + h - r);\n ctx.arcTo(x + w, y + h, x + w - r, y + h, r);\n ctx.lineTo(x + r, y + h);\n ctx.arcTo(x, y + h, x, y + h - r, r);\n ctx.lineTo(x, y + r);\n ctx.arcTo(x, y, x + r, y, r);\n ctx.closePath();\n ctx.clip();\n }\n}\n\nexport default NileQrCode;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-qr-code': NileQrCode;\n }\n}\n"],"names":["NileQrCode","l","constructor","this","value","size","fill","background","radius","errorCorrection","label","image","imageSize","imagePadding","imageRadius","fillGradient","_loadedImage","_imageLoadPromise","_this","_inherits","_o","_createClass","key","updated","changedProperties","super","has","loadImage","some","p","drawQrCode","render","ariaLabel","html","_templateObject","_taggedTemplateLiteral","download","filename","arguments","length","undefined","canvas","link","document","createElement","href","toDataURL","click","type","src","_this2","img","Image","crossOrigin","Promise","resolve","onload","onerror","emit","ctx","getContext","clampedRadius","rawRadius","Math","max","min","matrix","generateQR","moduleCount","moduleSize","clearRect","fillStyle","fillRect","imgFraction","imgPixelSize","exclusionSize","exclusionStart","exclusionEnd","useFill","resolveModuleFill","row","col","x","y","drawRoundedModule","drawCenterImage","parts","split","map","s","trim","angleDeg","parseFloat","Number","isNaN","angleRad","PI","cx","cy","len","x0","cos","y0","sin","x1","y1","gradient","createLinearGradient","colors","slice","i","addColorStop","r","pad","bx","by","bw","bh","br","drawRoundedRect","save","clipRoundedRect","drawImage","restore","w","h","beginPath","moveTo","lineTo","arcTo","closePath","clip","__decorate","get","styles","NileElement","property","String","reflect","prototype","attribute","query","_export","customElement"],"mappings":"mjIA6BaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAkBLC,KAAAA,CAAKC,KAAAA,CAAG,EAMRD,CAAAA,KAAAA,CAAIE,IAAG,CAAA,GAAA,CAMPF,KAAAA,CAAIG,IAAAA,CAAG,OAOPH,CAAAA,KAAAA,CAAUI,UAAG,CAAA,OAAA,CAObJ,KAAAA,CAAMK,MAAAA,CAAG,CAYTL,CAAAA,KAAAA,CAAeM,eAAyB,CAAA,GAAA,CAOxCN,KAAAA,CAAKO,KAAAA,CAAG,EAQRP,CAAAA,KAAAA,CAAKQ,KAAG,CAAA,EAAA,CAORR,KAAAA,CAASS,SAAAA,CAAG,GAOZT,CAAAA,KAAAA,CAAYU,YAAG,CAAA,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CAAAA,CAAAA,CAAA2I,SAAA,CAAA,WAAA,CAAA,IAAA,EAOjBP,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEI,SAAW,CAAA,eAAA,CAAiB5F,IAAM6C,CAAAA,MAAAA,CAAQ6C,SAAS,CAC9C1I,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2I,SAAA,CAAA,cAAA,CAAA,IAAA,EAOjBP,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEI,SAAW,CAAA,cAAA,CAAgB5F,IAAM6C,CAAAA,MAAAA,CAAQ6C,SAAS,CAC9C1I,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2I,SAAA,CAAA,aAAA,CAAA,IAAA,EAShBP,CAAAA,CAAAA,CAAAA,CAAA,CADCI,CAAS,CAAA,CAAEI,SAAW,CAAA,eAAA,CAAiB5F,IAAMyF,CAAAA,MAAAA,CAAQC,SAAS,CAC7C1I,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2I,SAAA,CAAA,cAAA,CAAA,IAAA,EAeVP,CAAAA,CAAAA,CAAAA,CAAA,CADPS,CAAM,CAAA,QAAA,CAAA,CAAA,CAC4B7I,CAAA2I,CAAAA,SAAAA,CAAA,QAAA,CAAA,IAAA,EAAA,CAAA,CAAAG,OAAA,KApHxB9I,EAAUoI,CAAA,CAAA,CADtBW,CAAc,CAAA,cAAA,CAAA,CAAA,CACF/I"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as i}from"lit";import{property as e,query as r,customElement as s}from"lit/decorators.js";import{s as a}from"./nile-qr-code.css.esm.js";import{g as n}from"./nile-qr-code-utils.esm.js";import{N as o}from"../internal/nile-element.esm.js";let
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as i}from"lit";import{property as e,query as r,customElement as s}from"lit/decorators.js";import{s as a}from"./nile-qr-code.css.esm.js";import{g as n}from"./nile-qr-code-utils.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 l=class extends o{constructor(){super(...arguments),this.value="",this.size=128,this.fill="black",this.background="white",this.radius=0,this.errorCorrection="H",this.label="",this.image="",this.imageSize=.25,this.imagePadding=4,this.imageRadius=4,this.fillGradient="",this._loadedImage=null,this._imageLoadPromise=null}static get styles(){return[a]}updated(t){if(super.updated(t),t.has("image")&&(this._loadedImage=null,this._imageLoadPromise=null,this.image))return void this.loadImage(this.image);["value","size","fill","background","radius","errorCorrection","imageSize","imagePadding","imageRadius","fillGradient"].some((i=>t.has(i)))&&this.drawQrCode()}render(){const t=this.label||this.value||"QR Code";return i`
|
|
2
2
|
<canvas
|
|
3
3
|
part="base"
|
|
4
4
|
role="img"
|
|
@@ -6,4 +6,4 @@ import{__decorate as t}from"tslib";import{html as i}from"lit";import{property as
|
|
|
6
6
|
width=${this.size}
|
|
7
7
|
height=${this.size}
|
|
8
8
|
></canvas>
|
|
9
|
-
`}download(t="qr-code.png"){if(!this.canvas)return;const i=document.createElement("a");i.download=t,i.href=this.canvas.toDataURL("image/png"),i.click()}toDataURL(t="image/png"){return this.canvas?this.canvas.toDataURL(t):""}loadImage(t){const i=new Image;i.crossOrigin="anonymous",this._imageLoadPromise=new Promise((e=>{i.onload=()=>{this._loadedImage=i,this._imageLoadPromise=null,this.drawQrCode(),e()},i.onerror=()=>{this._loadedImage=null,this._imageLoadPromise=null,this.emit("nile-qr-image-error",{src:t}),this.drawQrCode(),e()}})),i.src=t}drawQrCode(){if(!this.canvas)return;const t=this.canvas.getContext("2d");if(!t)return;const{size:i,fill:e,background:r,radius:s,errorCorrection:a,value:o}=this,
|
|
9
|
+
`}download(t="qr-code.png"){if(!this.canvas)return;const i=document.createElement("a");i.download=t,i.href=this.canvas.toDataURL("image/png"),i.click()}toDataURL(t="image/png"){return this.canvas?this.canvas.toDataURL(t):""}loadImage(t){const i=new Image;i.crossOrigin="anonymous",this._imageLoadPromise=new Promise((e=>{i.onload=()=>{this._loadedImage=i,this._imageLoadPromise=null,this.drawQrCode(),e()},i.onerror=()=>{this._loadedImage=null,this._imageLoadPromise=null,this.emit("nile-qr-image-error",{src:t}),this.drawQrCode(),e()}})),i.src=t}drawQrCode(){if(!this.canvas)return;const t=this.canvas.getContext("2d");if(!t)return;const{size:i,fill:e,background:r,radius:s,errorCorrection:a,value:o}=this,l=Math.max(0,Math.min(.5,s)),h=n(o,a),d=h.length,c=i/d;t.clearRect(0,0,i,i),r&&"transparent"!==r&&(t.fillStyle=r,t.fillRect(0,0,i,i));const u=Math.max(.1,Math.min(.4,this.imageSize)),m=this._loadedImage?i*u:0,f=m+(this._loadedImage?2*this.imagePadding:0),g=(i-f)/2,p=g+f,b=this.resolveModuleFill(t,i);t.fillStyle=b;for(let i=0;i<d;i++)for(let e=0;e<d;e++){if(1!==h[i][e])continue;const r=e*c,s=i*c;if(this._loadedImage){if(r>=g&&r+c<=p&&s>=g&&s+c<=p)continue}l>0?this.drawRoundedModule(t,r,s,c,c,l*c):t.fillRect(r,s,c,c)}this._loadedImage&&this.drawCenterImage(t,i,m)}resolveModuleFill(t,i){if(!this.fillGradient)return this.fill;const e=this.fillGradient.split(",").map((t=>t.trim()));if(e.length<3)return this.fill;const r=parseFloat(e[0]);if(Number.isNaN(r))return this.fill;const s=r*Math.PI/180,a=i/2,n=i/2,o=i/2,l=a-Math.cos(s)*o,h=n-Math.sin(s)*o,d=a+Math.cos(s)*o,c=n+Math.sin(s)*o,u=t.createLinearGradient(l,h,d,c),m=e.slice(1);for(let t=0;t<m.length;t++)u.addColorStop(t/(m.length-1),m[t]);return u}drawCenterImage(t,i,e){if(!this._loadedImage)return;const r=(i-e)/2,s=(i-e)/2,a=Math.min(this.imageRadius,e/2),n=this.imagePadding;if(n>0&&this.background&&"transparent"!==this.background){t.fillStyle=this.background;const i=r-n,o=s-n,l=e+2*n,h=e+2*n,d=a+.5*n;this.drawRoundedRect(t,i,o,l,h,d),t.fill()}t.save(),this.clipRoundedRect(t,r,s,e,e,a),t.drawImage(this._loadedImage,r,s,e,e),t.restore()}drawRoundedModule(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.fill()}drawRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath()}clipRoundedRect(t,i,e,r,s,a){t.beginPath(),t.moveTo(i+a,e),t.lineTo(i+r-a,e),t.arcTo(i+r,e,i+r,e+a,a),t.lineTo(i+r,e+s-a),t.arcTo(i+r,e+s,i+r-a,e+s,a),t.lineTo(i+a,e+s),t.arcTo(i,e+s,i,e+s-a,a),t.lineTo(i,e+a),t.arcTo(i,e,i+a,e,a),t.closePath(),t.clip()}};t([e({type:String,reflect:!0})],l.prototype,"value",void 0),t([e({type:Number,reflect:!0})],l.prototype,"size",void 0),t([e({type:String,reflect:!0})],l.prototype,"fill",void 0),t([e({type:String,reflect:!0})],l.prototype,"background",void 0),t([e({type:Number,reflect:!0})],l.prototype,"radius",void 0),t([e({attribute:"error-correction",reflect:!0})],l.prototype,"errorCorrection",void 0),t([e({type:String,reflect:!0})],l.prototype,"label",void 0),t([e({type:String,reflect:!0})],l.prototype,"image",void 0),t([e({attribute:"image-size",type:Number,reflect:!0})],l.prototype,"imageSize",void 0),t([e({attribute:"image-padding",type:Number,reflect:!0})],l.prototype,"imagePadding",void 0),t([e({attribute:"image-radius",type:Number,reflect:!0})],l.prototype,"imageRadius",void 0),t([e({attribute:"fill-gradient",type:String,reflect:!0})],l.prototype,"fillGradient",void 0),t([r("canvas")],l.prototype,"canvas",void 0),l=t([s("nile-qr-code")],l);export{l as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./nile-radio.cjs.js","tslib","lit","lit/decorators.js","./nile-radio.css.cjs.js","lit/directives/class-map.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileRadioCjsJs){_export("NileRadio",_nileRadioCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileRadioCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){}],execute:function execute(){}};});
|
|
1
|
+
System.register(["./nile-radio.cjs.js","tslib","lit","lit/decorators.js","./nile-radio.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"],function(_export,_context){"use strict";return{setters:[function(_nileRadioCjsJs){_export("NileRadio",_nileRadioCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileRadioCssCjsJs){},function(_litDirectivesClassMapJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{N as NileRadio}from"./nile-radio.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-radio.css.esm.js";import"lit/directives/class-map.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";
|
|
1
|
+
export{N as NileRadio}from"./nile-radio.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-radio.css.esm.js";import"lit/directives/class-map.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
|