@aquera/nile-elements 0.0.4-1 → 0.0.4-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/watch.d.ts +3 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-badge/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-drawer/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-footer/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-heading/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-loader/nile-loader.js +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-loader/nile-loader.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-option/nile-option.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popup/nile-popup.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio/nile-radio.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-sidebar/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-spinner/nile-spinner.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toolbar/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/watch.d.ts +3 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/custom-element-fc8dd455.cjs.js.map +1 -1
- package/dist/index-cd2f9c12.esm.js +35 -0
- package/dist/index-cd83c5c8.cjs.js +22 -0
- package/dist/index-cd83c5c8.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +199 -204
- package/dist/internal/animate.cjs.js +1 -1
- package/dist/internal/animate.cjs.js.map +1 -1
- package/dist/internal/default-value.cjs.js.map +1 -1
- package/dist/internal/event.cjs.js.map +1 -1
- package/dist/internal/form.cjs.js +1 -1
- package/dist/internal/form.cjs.js.map +1 -1
- package/dist/internal/nile-element.cjs.js.map +1 -1
- package/dist/internal/offset.cjs.js.map +1 -1
- package/dist/internal/scroll.cjs.js.map +1 -1
- package/dist/internal/slot.cjs.js +1 -1
- package/dist/internal/slot.cjs.js.map +1 -1
- package/dist/internal/tabbable.cjs.js.map +1 -1
- package/dist/internal/watch.cjs.js +1 -1
- package/dist/internal/watch.cjs.js.map +1 -1
- 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.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +2 -2
- package/dist/nile-badge/index.cjs.js.map +1 -1
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +1 -1
- package/dist/nile-button/nile-button.esm.js +2 -2
- package/dist/nile-calendar/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.esm.js +3 -3
- 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 +1 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +1 -1
- package/dist/nile-chip/nile-chip.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.css.cjs.js.map +1 -1
- package/dist/nile-date-picker/nile-date-picker.css.esm.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.esm.js +2 -2
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.cjs.js.map +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.css.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.css.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.css.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.css.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.css.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.css.esm.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +2 -2
- package/dist/nile-error-message/index.cjs.js +1 -1
- package/dist/nile-error-message/index.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.esm.js +1 -1
- package/dist/nile-error-message/nile-error-message.esm.js +2 -2
- package/dist/nile-footer/index.cjs.js +1 -1
- package/dist/nile-footer/index.cjs.js.map +1 -1
- package/dist/nile-footer/index.esm.js +1 -1
- package/dist/nile-footer/nile-footer.css.cjs.js +1 -1
- package/dist/nile-footer/nile-footer.css.cjs.js.map +1 -1
- package/dist/nile-footer/nile-footer.css.esm.js +1 -1
- package/dist/nile-form-error-message/index.cjs.js +1 -1
- package/dist/nile-form-error-message/index.esm.js +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.cjs.js +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.cjs.js.map +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js.map +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.css.esm.js +1 -1
- package/dist/nile-form-error-message/nile-form-error-message.esm.js +2 -2
- package/dist/nile-form-help-text/index.cjs.js +1 -1
- package/dist/nile-form-help-text/index.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.cjs.js.map +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js.map +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.css.esm.js +1 -1
- package/dist/nile-form-help-text/nile-form-help-text.esm.js +2 -2
- package/dist/nile-heading/index.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +1 -1
- package/dist/nile-icon/utils.cjs.js.map +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.css.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.css.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.css.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +1 -1
- package/dist/nile-input/nile-input.esm.js +2 -2
- package/dist/nile-loader/index.cjs.js +1 -1
- package/dist/nile-loader/index.esm.js +1 -1
- package/dist/nile-loader/nile-loader.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.cjs.js.map +1 -1
- package/dist/nile-loader/nile-loader.css.cjs.js.map +1 -1
- package/dist/nile-loader/nile-loader.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.css.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.css.esm.js +1 -1
- package/dist/nile-menu/nile-menu.esm.js +2 -2
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.css.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-option/nile-option.css.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.css.esm.js +1 -1
- package/dist/nile-option/nile-option.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.css.cjs.js.map +1 -1
- package/dist/nile-popup/nile-popup.css.esm.js +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.css.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.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 +1 -1
- 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.css.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
- 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 +1 -1
- package/dist/nile-select/nile-select.esm.js +2 -2
- package/dist/nile-sidebar/index.cjs.js.map +1 -1
- 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.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +2 -2
- package/dist/nile-spinner/index.cjs.js +1 -1
- package/dist/nile-spinner/index.esm.js +1 -1
- package/dist/nile-spinner/nile-spinner.cjs.js +1 -1
- package/dist/nile-spinner/nile-spinner.cjs.js.map +1 -1
- package/dist/nile-spinner/nile-spinner.css.cjs.js +1 -1
- package/dist/nile-spinner/nile-spinner.css.cjs.js.map +1 -1
- package/dist/nile-spinner/nile-spinner.css.esm.js +1 -1
- package/dist/nile-spinner/nile-spinner.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.css.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.esm.js +1 -1
- package/dist/nile-tag/nile-tag.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.esm.js +2 -2
- package/dist/nile-toolbar/index.cjs.js +1 -1
- package/dist/nile-toolbar/index.cjs.js.map +1 -1
- package/dist/nile-toolbar/index.esm.js +1 -1
- package/dist/nile-toolbar/nile-toolbar.css.cjs.js +1 -1
- package/dist/nile-toolbar/nile-toolbar.css.cjs.js.map +1 -1
- package/dist/nile-toolbar/nile-toolbar.css.esm.js +1 -1
- 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.css.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.css.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +2 -2
- package/dist/{property-bf6307e2.esm.js → property-09139d3c.esm.js} +1 -1
- package/dist/property-0f6a51ec.cjs.js +6 -0
- package/dist/property-0f6a51ec.cjs.js.map +1 -0
- package/dist/src/internal/watch.d.ts +3 -3
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-badge/index.js.map +1 -1
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-drawer/index.js.map +1 -1
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/dist/src/nile-footer/index.js.map +1 -1
- package/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -1
- package/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -1
- package/dist/src/nile-heading/index.js.map +1 -1
- package/dist/src/nile-icon/index.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-loader/nile-loader.js +2 -2
- package/dist/src/nile-loader/nile-loader.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-sidebar/index.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-spinner/nile-spinner.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/src/nile-toolbar/index.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/src/watch.d.ts +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/animation-registry.cjs.js.map +1 -1
- package/dist/watch.cjs.js +1 -1
- package/dist/watch.cjs.js.map +1 -1
- package/package.json +1 -1
- package/src/nile-loader/nile-loader.ts +2 -2
- package/dist/index-adad7634.cjs.js +0 -22
- package/dist/index-adad7634.cjs.js.map +0 -1
- package/dist/index-f1b94546.esm.js +0 -35
- package/dist/property-ec52a751.cjs.js +0 -6
- package/dist/property-ec52a751.cjs.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-date-picker.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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 private currentMonth: number = new Date().getMonth();\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value : any;\n\n @property({ type: Object }) rangeValue : any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n @property({ type: Object }) endDate: Date | null = null;\n @property({ type: Boolean }) isSelectingStart = true; // flag to indicate what we're selecting\n\n @property({ type: Boolean }) range = false;\n\n @watch('value')\n valueChanged() {\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n handleChanged(event:any) {\n this.emit('nile-changed', { value: event.detail.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n\n return html`\n <nile-dropdown .hoist=\"${true}\">\n <slot\n slot=\"trigger\"\n part=\"trigger\"\n name=\"trigger\"\n ></slot>\n\n<nile-calendar .value=\"${this.range}\" .range=\"${this.range}\" @nile-changed=\"${this.handleChanged}\"> </nile-calendar>\n </nile-dropdown>\n `;\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"],"names":["NileDatePicker","constructor","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","styles","valueChanged","value","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","observedAttributes","attributeChangedCallback","name","oldValue","newValue","initializeValue","JSON","parse","e","console","error","requestUpdate","handleChanged","event","emit","detail","dropdown","hide","connectedCallback","render","html","__decorate","NileElement","query","prototype","property","type","Boolean","reflect","Object","attribute","watch","customElement"],"mappings":"2nJA0CaA,CAAAA,sEAAbC,kFASUC,MAAAC,YAAuB,CAAA,GAAIC,QAAOC,QAClCH,EAAAA,CAAAA,MAAAI,WAAsB,CAAA,GA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CH,CAAA,CAAA,CAA/CI,CAAS,CAAA,CAAEC,IAAMlC,CAAAA,MAAAA,CAAQsC,UAAW,OAC9BhE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0D,SAAA,CAAA,eAAA,CAAA,IAAA,EAEqBH,CAAAA,CAAAA,CAAAA,CAAA,CAA3BI,CAAAA,CAAS,CAAEC,IAAAA,CAAMG,MAAwC/D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0D,SAAA,CAAA,WAAA,CAAA,IAAA,IAC9BH,CAAA,CAAA,CAA3BI,CAAS,CAAA,CAAEC,IAAMG,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAsC/D,CAAA0D,CAAAA,SAAAA,CAAA,SAAA,CAAA,IAAA,EAAA,CAAA,CAC3BH,CAAA,CAAA,CAA5BI,CAAS,CAAA,CAAEC,KAAMC,OAAmC7D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0D,SAAA,CAAA,kBAAA,CAAA,IAAA,EAExBH,CAAAA,CAAAA,CAAAA,CAAA,CAA5BI,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAAyB7D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA0D,SAAA,CAAA,OAAA,CAAA,IAAA,IAG3CH,CAAA,CAAA,CADCU,CAAM,CAAA,OAAA,CAAA,CAAA,CAuBNjE,CAAA0D,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,CAAA,CAxDU1D,CAAcuD,CAAAA,CAAAA,CAAA,CAD1BW,CAAAA,CAAc,kBACFlE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
|
1
|
+
{"version":3,"file":"nile-date-picker.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport {\n getAnimation,\n setDefaultAnimation,\n} from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup, PropertyValues } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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 private currentMonth: number = new Date().getMonth();\n private currentYear: number = new Date().getFullYear();\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n @property({ type: Boolean, reflect: true }) dropDownOpened = false;\n\n @property({ type: Object }) value : any;\n\n @property({ type: Object }) rangeValue : any;\n\n @property({ type: String, attribute: 'value' }) valueAttribute:\n | string\n | null = null;\n\n @property({ type: String, attribute: 'value' }) formattedDate: string | null =\n null;\n\n @property({ type: Object }) startDate: Date | null = null;\n @property({ type: Object }) endDate: Date | null = null;\n @property({ type: Boolean }) isSelectingStart = true; // flag to indicate what we're selecting\n\n @property({ type: Boolean }) range = false;\n\n @watch('value')\n valueChanged() {\n\n if (this.range && this.value) {\n this.rangeValue = this.value;\n this.value = null;\n return;\n }\n\n if (this.value && !isNaN(this.value.getTime())) {\n const offset = this.value.getTimezoneOffset();\n const localDate = new Date(this.value.getTime() - offset * 60 * 1000);\n if (!isNaN(localDate.getTime())) {\n this.valueAttribute = localDate.toISOString().split('T')[0];\n this.formattedDate = `${String(localDate.getDate()).padStart(\n 2,\n '0'\n )}/${String(localDate.getMonth() + 1).padStart(\n 2,\n '0'\n )}/${localDate.getFullYear()}`;\n }\n }\n }\n\n\n updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n\n if (changedProperties.has('valueAttribute')) {\n const date = new Date(this.valueAttribute || '');\n if (!isNaN(date.getTime())) {\n const offset = date.getTimezoneOffset();\n this.value = new Date(date.getTime() - offset * 60 * 1000);\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n static get observedAttributes() {\n return ['value', 'range'];\n }\n\n attributeChangedCallback(name: string, oldValue: string, newValue: string) {\n if (name === 'value') {\n this.valueAttribute = newValue;\n this.initializeValue();\n } else if (name === 'range') {\n this.range = newValue !== null;\n }\n }\n\n initializeValue() {\n if (this.range) {\n try {\n const rangeValue = JSON.parse(this.valueAttribute || '');\n this.startDate = new Date(rangeValue.startDate);\n this.endDate = new Date(rangeValue.endDate);\n\n // Convert to local time\n this.startDate = new Date(this.startDate.getTime());\n this.endDate = new Date(this.endDate.getTime());\n\n this.rangeValue = {\n startDate: this.startDate,\n endDate: this.endDate,\n };\n this.value = null;\n } catch (e) {\n console.error('Invalid range value');\n }\n } else {\n if (this.valueAttribute) {\n let date: Date;\n\n date = new Date(this.valueAttribute);\n\n date = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n this.rangeValue = null;\n }\n }\n }\n this.requestUpdate();\n }\n\n handleChanged(event:any) {\n this.emit('nile-changed', { value: event.detail.value });\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.initializeValue();\n\n if (this.valueAttribute) {\n const date = new Date(this.valueAttribute);\n if (!isNaN(date.getTime())) {\n this.value = date;\n this.currentMonth = this.value.getMonth();\n this.currentYear = this.value.getFullYear();\n }\n }\n }\n\n\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n\n return html`\n <nile-dropdown .hoist=\"${true}\">\n <slot\n slot=\"trigger\"\n part=\"trigger\"\n name=\"trigger\"\n ></slot>\n\n<nile-calendar .value=\"${this.range}\" .range=\"${this.range}\" @nile-changed=\"${this.handleChanged}\"> </nile-calendar>\n </nile-dropdown>\n `;\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"],"names":["NileDatePicker","h","this","currentMonth","Date","getMonth","currentYear","getFullYear","dropDownOpened","valueAttribute","formattedDate","startDate","endDate","isSelectingStart","range","_this","_createClass","key","value","valueChanged","rangeValue","isNaN","getTime","offset","getTimezoneOffset","localDate","toISOString","split","String","getDate","padStart","updated","changedProperties","super","has","date","attributeChangedCallback","name","oldValue","newValue","initializeValue","JSON","parse","e","console","error","requestUpdate","handleChanged","event","emit","detail","dropdown","hide","connectedCallback","render","html","_templateObject","_taggedTemplateLiteral","__decorate","get","styles","observedAttributes","NileElement","query","prototype","property","type","Boolean","reflect","Object","attribute","watch","customElement"],"mappings":"uoJA0CaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,uEASGC,KAAAA,CAAAC,YAAAA,CAAuB,GAAIC,CAAAA,IAAOC,CAAAA,CAAAA,CAAAA,QAAAA,CAAAA,CAAAA,CAClCH,KAAAA,CAAAI,WAAsB,CAAA,GAAIF,CAAAA,OAAOG,WAIGL,CAAAA,CAAAA,CAAAA,KAAAA,CAAcM,gBAAG,CAMbN,CAAAA,KAAAA,CAAcO,eAEnD,IAEqCP,CAAAA,KAAAA,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nE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgE,SAAA,CAAA,kBAAA,CAAA,IAAA,EAExBN,CAAAA,CAAAA,CAAAA,CAAA,CAA5BO,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAAyBnE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgE,SAAA,CAAA,OAAA,CAAA,IAAA,EAG3CN,CAAAA,CAAAA,CAAAA,CAAA,CADCa,CAAAA,CAAM,OAuBNvE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAgE,SAAA,CAAA,cAAA,CAAA,IAxDUhE,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAc0D,CAAA,CAAA,CAD1Bc,CAAc,CAAA,kBAAA,CAAA,CAAA,CACFxE"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,a;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function(){_export("s",a=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n}\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n\n\n.calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 730px;\n}\n\n.selected-date,\n.range-start,\n.range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n}\n\n\n.range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n}\n\n.range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n}\n\n.range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n}\n\n.day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n}\n\n.day.in-range {\n background: #a5d3f3;\n color: white;\n}\n\n.selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n}\n\n.base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px\n}\n\n.calender-input{\n padding: 20px;\n padding-bottom: 0px;\n}\n\n.from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n}\n\n.manual-input{\n width:100%;\n}\n\n.manual-input-label{\n font-size: 12px;\nfont-style: normal;\nfont-weight: 500;\n margin-bottom: 10px;\n}\n\n.apply-button {\n text-align: right;\n display: block;\n padding-top: 20px;\n}\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-date-picker.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-date-picker.css.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.css.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 { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n}\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n\n\n.calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 730px;\n}\n\n.selected-date,\n.range-start,\n.range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n}\n\n\n.range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n}\n\n.range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n}\n\n.range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n}\n\n.day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n}\n\n.day.in-range {\n background: #a5d3f3;\n color: white;\n}\n\n.selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n}\n\n.base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px\n}\n\n.calender-input{\n padding: 20px;\n padding-bottom: 0px;\n}\n\n.from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n}\n\n.manual-input{\n width:100%;\n}\n\n.manual-input-label{\n font-size: 12px;\nfont-style: normal;\nfont-weight: 500;\n margin-bottom: 10px;\n}\n\n.apply-button {\n text-align: right;\n display: block;\n padding-top: 20px;\n}\n`;\n\nexport default [styles];\n"],"names":["styles","css"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG"}
|
1
|
+
{"version":3,"file":"nile-date-picker.css.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.css.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 { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: Colfax-regular;\n width: 365px;\n height: auto;\n text-align: center;\n background: white;\n }\n\n .calendar-container.with-margin {\n margin-right: 20px;\n}\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n margin-top: 10px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n height: auto;\n align-items: center;\n }\n\n .days {\n height: auto;\n }\n\n .day {\n flex-basis: calc(100% / 7);\n box-sizing: border-box;\n width: 48px;\n align-items: center;\n padding: 10px;\n height: 32px;\n margin-top: 6px;\n margin-bottom: 6px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .filler {\n color: grey;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n\n\n.calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 730px;\n}\n\n.selected-date,\n.range-start,\n.range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n}\n\n\n.range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n}\n\n.range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n}\n\n.range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n}\n\n.day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n}\n\n.day.in-range {\n background: #a5d3f3;\n color: white;\n}\n\n.selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n}\n\n.base {\n background-color: white;\n border-radius: 4px;\n padding-bottom: 20px\n}\n\n.calender-input{\n padding: 20px;\n padding-bottom: 0px;\n}\n\n.from {\n display: flex;\n justify-content: space-between;\n gap: 20px;\n}\n\n.manual-input{\n width:100%;\n}\n\n.manual-input-label{\n font-size: 12px;\nfont-style: normal;\nfont-weight: 500;\n margin-bottom: 10px;\n}\n\n.apply-button {\n text-align: right;\n display: block;\n padding-top: 20px;\n}\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{
|
1
|
+
import{__decorate as t}from"tslib";import{x as e}from"../index-cd2f9c12.esm.js";import{query as i,customElement as s}from"lit/decorators.js";import{s as n}from"./nile-date-picker.css.esm.js";import{w as a}from"../internal/watch.esm.js";import{N as r}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as l}from"../property-09139d3c.esm.js";import"lit";import"lit/directives/class-map.js";import"../nile-popup/nile-popup.css.esm.js";let h=class extends r{constructor(){super(...arguments),this.currentMonth=(new Date).getMonth(),this.currentYear=(new Date).getFullYear(),this.dropDownOpened=!1,this.valueAttribute=null,this.formattedDate=null,this.startDate=null,this.endDate=null,this.isSelectingStart=!0,this.range=!1}static get styles(){return[n]}valueChanged(){if(this.range&&this.value)return this.rangeValue=this.value,void(this.value=null);if(this.value&&!isNaN(this.value.getTime())){const t=this.value.getTimezoneOffset(),e=new Date(this.value.getTime()-60*t*1e3);isNaN(e.getTime())||(this.valueAttribute=e.toISOString().split("T")[0],this.formattedDate=`${String(e.getDate()).padStart(2,"0")}/${String(e.getMonth()+1).padStart(2,"0")}/${e.getFullYear()}`)}}updated(t){if(super.updated(t),t.has("valueAttribute")){const t=new Date(this.valueAttribute||"");if(!isNaN(t.getTime())){const e=t.getTimezoneOffset();this.value=new Date(t.getTime()-60*e*1e3),this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear()}}}static get observedAttributes(){return["value","range"]}attributeChangedCallback(t,e,i){"value"===t?(this.valueAttribute=i,this.initializeValue()):"range"===t&&(this.range=null!==i)}initializeValue(){if(this.range)try{const t=JSON.parse(this.valueAttribute||"");this.startDate=new Date(t.startDate),this.endDate=new Date(t.endDate),this.startDate=new Date(this.startDate.getTime()),this.endDate=new Date(this.endDate.getTime()),this.rangeValue={startDate:this.startDate,endDate:this.endDate},this.value=null}catch(t){console.error("Invalid range value")}else if(this.valueAttribute){let t;t=new Date(this.valueAttribute),t=new Date(t.getTime()-6e4*t.getTimezoneOffset()),isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear(),this.rangeValue=null)}this.requestUpdate()}handleChanged(t){this.emit("nile-changed",{value:t.detail.value}),this.dropdown&&this.dropdown.hide()}connectedCallback(){if(super.connectedCallback(),this.initializeValue(),this.valueAttribute){const t=new Date(this.valueAttribute);isNaN(t.getTime())||(this.value=t,this.currentMonth=this.value.getMonth(),this.currentYear=this.value.getFullYear())}}render(){return e`
|
2
2
|
<nile-dropdown .hoist="${!0}">
|
3
3
|
<slot
|
4
4
|
slot="trigger"
|
@@ -8,4 +8,4 @@ import{__decorate as t}from"tslib";import{y as e}from"../index-f1b94546.esm.js";
|
|
8
8
|
|
9
9
|
<nile-calendar .value="${this.range}" .range="${this.range}" @nile-changed="${this.handleChanged}"> </nile-calendar>
|
10
10
|
</nile-dropdown>
|
11
|
-
`}};t([i("nile-dropdown")],h.prototype,"dropdown",void 0),t([l({type:Boolean,reflect:!0})],h.prototype,"dropDownOpened",void 0),t([l({type:Object})],h.prototype,"value",void 0),t([l({type:Object})],h.prototype,"rangeValue",void 0),t([l({type:String,attribute:"value"})],h.prototype,"valueAttribute",void 0),t([l({type:String,attribute:"value"})],h.prototype,"formattedDate",void 0),t([l({type:Object})],h.prototype,"startDate",void 0),t([l({type:Object})],h.prototype,"endDate",void 0),t([l({type:Boolean})],h.prototype,"isSelectingStart",void 0),t([l({type:Boolean})],h.prototype,"range",void 0),t([a("value")],h.prototype,"valueChanged",null),h=t([s("nile-date-picker")],h);
|
11
|
+
`}};t([i("nile-dropdown")],h.prototype,"dropdown",void 0),t([l({type:Boolean,reflect:!0})],h.prototype,"dropDownOpened",void 0),t([l({type:Object})],h.prototype,"value",void 0),t([l({type:Object})],h.prototype,"rangeValue",void 0),t([l({type:String,attribute:"value"})],h.prototype,"valueAttribute",void 0),t([l({type:String,attribute:"value"})],h.prototype,"formattedDate",void 0),t([l({type:Object})],h.prototype,"startDate",void 0),t([l({type:Object})],h.prototype,"endDate",void 0),t([l({type:Boolean})],h.prototype,"isSelectingStart",void 0),t([l({type:Boolean})],h.prototype,"range",void 0),t([a("value")],h.prototype,"valueChanged",null),h=t([s("nile-date-picker")],h);export{h as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","lit","../index-
|
1
|
+
System.register(["tslib","lit","../index-cd83c5c8.cjs.js","lit/decorators.js","lit/directives/class-map.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";var e,r,a,i,o,t,n,s,_templateObject,_templateObject2,d;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_lit){r=_lit.css;},function(_index001CjsJs){a=_index001CjsJs.s;i=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.state;t=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_property002CjsJs){s=_property002CjsJs.n;}],execute:function(){d=/*#__PURE__*/function(_a){_inherits(d,_a);var _super=_createSuper(d);function d(){var _this;_classCallCheck(this,d);_this=_super.apply(this,arguments),_this.open=!1,_this.domExistence=!1;return _this;}_createClass(d,[{key:"toggleDialogHandler",value:function toggleDialogHandler(){this.open&&(this.domExistence=!0);}},{key:"connectedCallback",value:function connectedCallback(){var _window,_this2=this;_get(_getPrototypeOf(d.prototype),"connectedCallback",this).call(this),(_window=window)===null||_window===void 0?void 0:_window.addEventListener("nile-drawer-open",function(e){e.target!==_this2&&_this2.closeDrawer();});}},{key:"closeDrawer",value:function closeDrawer(){this.open=!1;}},{key:"updated",value:function updated(e){e.has("open")&&this.toggleDialogHandler();}},{key:"buttonClassMap",get:function get(){return{"nds-drawer--open":this.open,"nds-drawer--closed":!this.open};}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"btn ","\">\n <slot name=\"header\">\n <div class=\"header-section\">\n <nile-heading name=\"Edit Config\"></nile-heading>\n </div>\n </slot>\n <slot name=\"content\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n "])),n(this.buttonClassMap));}}]);return d;}(a);d.styles=r(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n @keyframes slide-from-right {\n 0% {\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n :not(:defined) {\n visibility: hidden;\n }\n :host {\n box-sizing: border-box;\n position: fixed;\n display: none;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(0); //translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n background-color: #fff;\n border-left: 1px solid #e5e5e5;\n }\n\n :host([open]) .drawer {\n transform: translateX(0);\n animation: slide-from-right var(--bl-drawer-animation-duration, 0.25s);\n position: fixed;\n box-shadow: 0px 14px 28px rgb(119 125 130 / 15%);\n }\n\n .nds-drawer {\n box-sizing: border-box;\n position: fixed;\n display: flex;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n }\n\n iframe {\n height: 100%;\n width: 100%;\n border: none;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n gap: var(--bl-size-xl);\n flex: 1;\n }\n\n header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: var(--bl-size-2xs);\n background-color: white;\n }\n\n header .header-buttons {\n display: flex;\n gap: 24px;\n margin-left: auto;\n }\n\n header h2 {\n font: var(--bl-font-title-1-medium);\n color: var(--bl-color-secondary);\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n\n .content {\n flex: 1;\n overflow-y: scroll;\n }\n\n .iframe-content {\n flex: 1;\n }\n\n @media only screen and (max-width: 424px) {\n :host([open]) .drawer {\n width: calc(100vw - 24px);\n }\n }\n\n .header-section {\n width: 100%;\n background-color: #e5e5e5;\n }\n .nds-drawer--closed {\n display: none;\n }\n "]))),e([s({type:Boolean,reflect:!0})],d.prototype,"open",void 0),e([o()],d.prototype,"domExistence",void 0),d=e([t("nile-drawer")],d);}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/nile-drawer/index.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 { css, PropertyValues } from 'lit';\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-drawer.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-drawer\n *\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends LitElement {\n static override styles = css`\n @keyframes slide-from-right {\n 0% {\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n :not(:defined) {\n visibility: hidden;\n }\n :host {\n box-sizing: border-box;\n position: fixed;\n display: none;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(0); //translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n background-color: #fff;\n border-left: 1px solid #e5e5e5;\n }\n\n :host([open]) .drawer {\n transform: translateX(0);\n animation: slide-from-right var(--bl-drawer-animation-duration, 0.25s);\n position: fixed;\n box-shadow: 0px 14px 28px rgb(119 125 130 / 15%);\n }\n\n .nds-drawer {\n box-sizing: border-box;\n position: fixed;\n display: flex;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n }\n\n iframe {\n height: 100%;\n width: 100%;\n border: none;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n gap: var(--bl-size-xl);\n flex: 1;\n }\n\n header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: var(--bl-size-2xs);\n background-color: white;\n }\n\n header .header-buttons {\n display: flex;\n gap: 24px;\n margin-left: auto;\n }\n\n header h2 {\n font: var(--bl-font-title-1-medium);\n color: var(--bl-color-secondary);\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n\n .content {\n flex: 1;\n overflow-y: scroll;\n }\n\n .iframe-content {\n flex: 1;\n }\n\n @media only screen and (max-width: 424px) {\n :host([open]) .drawer {\n width: calc(100vw - 24px);\n }\n }\n\n .header-section {\n width: 100%;\n background-color: #e5e5e5;\n }\n .nds-drawer--closed {\n display: none;\n }\n `;\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n // private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n this.domExistence = true;\n // FIXME: Allow events without payload\n // this.onOpen('');\n } else {\n // Give some time for exit animation\n // this.domExistenceSchedule = window.setTimeout(() => {\n // this.domExistence = false;\n // }, 1000);\n }\n }\n\n @state() private domExistence = false;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('nile-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n private closeDrawer() {\n this.open = false;\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n get buttonClassMap() {\n return {\n 'nds-drawer--open': this.open,\n 'nds-drawer--closed': !this.open,\n };\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <div class=\"btn ${classMap(this.buttonClassMap)}\">\n <slot name=\"header\">\n <div class=\"header-section\">\n <nile-heading name=\"Edit Config\"></nile-heading>\n </div>\n </slot>\n <slot name=\"content\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"],"names":["NileDrawer","constructor","this","open","domExistence","toggleDialogHandler","connectedCallback","super","window","addEventListener","event","target","closeDrawer","updated","changedProperties","has","buttonClassMap","render","html","classMap","LitElement","styles","css","__decorate","property","type","Boolean","reflect","prototype","state","customElement"],"mappings":"gyIA0BaA,
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/nile-drawer/index.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 { css, PropertyValues } from 'lit';\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-drawer.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-drawer\n *\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends LitElement {\n static override styles = css`\n @keyframes slide-from-right {\n 0% {\n transform: translateX(100%);\n }\n\n 100% {\n transform: translateX(0);\n }\n }\n :not(:defined) {\n visibility: hidden;\n }\n :host {\n box-sizing: border-box;\n position: fixed;\n display: none;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(0); //translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n background-color: #fff;\n border-left: 1px solid #e5e5e5;\n }\n\n :host([open]) .drawer {\n transform: translateX(0);\n animation: slide-from-right var(--bl-drawer-animation-duration, 0.25s);\n position: fixed;\n box-shadow: 0px 14px 28px rgb(119 125 130 / 15%);\n }\n\n .nds-drawer {\n box-sizing: border-box;\n position: fixed;\n display: flex;\n top: 0;\n right: 0;\n bottom: 0;\n width: 424px;\n padding: var(--bl-size-xl);\n padding-top: max(env(safe-area-inset-top), var(--bl-size-xl));\n padding-right: max(env(safe-area-inset-right), var(--bl-size-xl));\n padding-bottom: max(env(safe-area-inset-bottom), var(--bl-size-xl));\n background: var(--bl-color-primary-background);\n box-shadow: var(--bl-size-xs) 0 var(--bl-size-2xl) rgba(0 0 0 / 50%);\n transform: translateX(100%);\n transition: transform var(--bl-drawer-animation-duration, 0.25s);\n z-index: 999;\n }\n\n iframe {\n height: 100%;\n width: 100%;\n border: none;\n }\n\n .container {\n display: flex;\n flex-direction: column;\n gap: var(--bl-size-xl);\n flex: 1;\n }\n\n header {\n display: flex;\n justify-content: space-between;\n align-items: baseline;\n gap: var(--bl-size-2xs);\n background-color: white;\n }\n\n header .header-buttons {\n display: flex;\n gap: 24px;\n margin-left: auto;\n }\n\n header h2 {\n font: var(--bl-font-title-1-medium);\n color: var(--bl-color-secondary);\n overflow: hidden;\n margin: 0;\n padding: 0;\n }\n\n .content {\n flex: 1;\n overflow-y: scroll;\n }\n\n .iframe-content {\n flex: 1;\n }\n\n @media only screen and (max-width: 424px) {\n :host([open]) .drawer {\n width: calc(100vw - 24px);\n }\n }\n\n .header-section {\n width: 100%;\n background-color: #e5e5e5;\n }\n .nds-drawer--closed {\n display: none;\n }\n `;\n\n /**\n * Sets drawer open-close status\n */\n @property({ type: Boolean, reflect: true })\n open = false;\n\n // private domExistenceSchedule: number;\n\n private toggleDialogHandler() {\n if (this.open) {\n this.domExistence = true;\n // FIXME: Allow events without payload\n // this.onOpen('');\n } else {\n // Give some time for exit animation\n // this.domExistenceSchedule = window.setTimeout(() => {\n // this.domExistence = false;\n // }, 1000);\n }\n }\n\n @state() private domExistence = false;\n\n connectedCallback() {\n super.connectedCallback();\n window?.addEventListener('nile-drawer-open', event => {\n if (event.target !== this) this.closeDrawer();\n });\n }\n\n private closeDrawer() {\n this.open = false;\n }\n\n updated(changedProperties: PropertyValues<this>) {\n if (changedProperties.has('open')) {\n this.toggleDialogHandler();\n }\n }\n\n get buttonClassMap() {\n return {\n 'nds-drawer--open': this.open,\n 'nds-drawer--closed': !this.open,\n };\n }\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n <div class=\"btn ${classMap(this.buttonClassMap)}\">\n <slot name=\"header\">\n <div class=\"header-section\">\n <nile-heading name=\"Edit Config\"></nile-heading>\n </div>\n </slot>\n <slot name=\"content\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"],"names":["NileDrawer","_a","_inherits","d","_super","_createSuper","constructor","this","open","domExistence","_this","_createClass","key","value","toggleDialogHandler","connectedCallback","super","window","addEventListener","event","target","closeDrawer","updated","changedProperties","has","get","buttonClassMap","render","html","_templateObject","_taggedTemplateLiteral","classMap","LitElement","styles","css","_templateObject2","__decorate","property","type","Boolean","reflect","prototype","state","customElement"],"mappings":"gyIA0BaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,CAAAG,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCA4HLC,KAAAA,CAAIC,IAAG,CAAA,CAAA,CAAA,CAiBUD,KAAAA,CAAYE,YAAAA,CAAAA,CAAG,CA+CjC,QAAAC,KAAA,EA5DSC,YAAA,CAAAR,CAAA,GAAAS,GAAA,uBAAAC,KAAA,UAAAC,oBAAA,CACFP,CAAAA,IAAAA,CAAKC,OACPD,IAAKE,CAAAA,YAAAA,CAAAA,CAAe,EASvB,EAID,GAAAG,GAAA,qBAAAC,KAAA,UAAAE,kBAAA,0BACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,QAAAA,OAAAA,CACAC,MAAQC,UAAAA,OAAAA,iBAARD,OAAAA,CAAQC,gBAAAA,CAAiB,mBAAoBC,SAAAA,CACvCA,CAAAA,CAAAA,CAAAA,CAAMC,MAAWb,GAAAA,MAAAA,EAAMA,OAAKc,WAAa,CAAA,CAAA,EAAA,CAEhD,EAEO,GAAAT,GAAA,eAAAC,KAAA,UAAAQ,YAAA,EACNd,IAAKC,CAAAA,IAAAA,CAAAA,CAAO,CACb,EAED,GAAAI,GAAA,WAAAC,KAAA,UAAAS,QAAQC,CACFA,CAAAA,CAAAA,CAAAA,CAAkBC,GAAI,CAAA,MAAA,CAAA,EACxBjB,KAAKO,mBAER,CAAA,CAAA,EAED,GAAAF,GAAA,kBAAAa,GAAA,UAAAA,IAAA,CAAIC,CACF,MAAO,CACL,kBAAA,CAAoBnB,IAAKC,CAAAA,IAAAA,CACzB,sBAAuBD,IAAKC,CAAAA,IAAAA,CAE/B,EAUM,GAAAI,GAAA,UAAAC,KAAA,UAAAc,OAAA,CAAAA,CACL,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uTACSC,CAAAA,CAASxB,IAAKmB,CAAAA,cAAAA,CAAAA,EAUnC,CA1Le1B,WAAAA,CAAAA,GADcgC,GACdhC,CAAAA,CAAMiC,OAAGC,CAAG,CAAAC,gBAAA,GAAAA,gBAAA,CAAAL,sBAAA,06FA2H5BM,CAAA,CAAA,CADCC,EAAS,CAAEC,IAAAA,CAAMC,QAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACvBxC,CAAAyC,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAiBJL,EAAA,CAARM,CAAAA,CAAAA,CAAAA,CAAAA,CAAqC1C,EAAAyC,SAAA,CAAA,cAAA,CAAA,IAAA,IA7I3BzC,CAAUoC,CAAAA,CAAAA,CAAA,CADtBO,CAAAA,CAAc,aACF3C,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as e}from"tslib";import{css as r}from"lit";import{s as a,
|
1
|
+
import{__decorate as e}from"tslib";import{css as r}from"lit";import{s as a,x as i}from"../index-cd2f9c12.esm.js";import{state as o,customElement as t}from"lit/decorators.js";import{classMap as n}from"lit/directives/class-map.js";import{n as s}from"../property-09139d3c.esm.js";let d=class extends a{constructor(){super(...arguments),this.open=!1,this.domExistence=!1}toggleDialogHandler(){this.open&&(this.domExistence=!0)}connectedCallback(){super.connectedCallback(),window?.addEventListener("nile-drawer-open",(e=>{e.target!==this&&this.closeDrawer()}))}closeDrawer(){this.open=!1}updated(e){e.has("open")&&this.toggleDialogHandler()}get buttonClassMap(){return{"nds-drawer--open":this.open,"nds-drawer--closed":!this.open}}render(){return i`
|
2
2
|
<div class="btn ${n(this.buttonClassMap)}">
|
3
3
|
<slot name="header">
|
4
4
|
<div class="header-section">
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n\tbackground-color: var(--nile-alert-color-background-base);\n padding: var(----nile-spacing-1-x);\n position: fixed;\n top: 0px;\n right: 0px;\n width: 424px;\n height: 100vh;\n background: #ffff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1);\n transform: translateX(100%);\n z-index: 999;\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\twidth: 35%;\n }\n"])));}};});
|
2
2
|
//# sourceMappingURL=nile-drawer.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-drawer.css.cjs.js","sources":["../../../src/nile-drawer/nile-drawer.css.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 { css } from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n\tbackground-color: var(--nile-alert-color-background-base);\n padding: var(----nile-spacing-1-x);\n position: fixed;\n top: 0px;\n right: 0px;\n width: 424px;\n height: 100vh;\n background: #ffff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1);\n transform: translateX(100%);\n z-index: 999;\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\twidth: 35%;\n }\n`;\n"],"names":["css"],"mappings":"kWAYsBA,CAAG"}
|
1
|
+
{"version":3,"file":"nile-drawer.css.cjs.js","sources":["../../../src/nile-drawer/nile-drawer.css.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 { css } from 'lit-element';\n\n/**\n * Drawer CSS\n */\nexport const styles = css`\n :host {\n\tbackground-color: var(--nile-alert-color-background-base);\n padding: var(----nile-spacing-1-x);\n position: fixed;\n top: 0px;\n right: 0px;\n width: 424px;\n height: 100vh;\n background: #ffff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 4px 11px rgba(0, 0, 0, 0.1);\n transform: translateX(100%);\n z-index: 999;\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\twidth: 35%;\n }\n`;\n"],"names":["css","_templateObject","_taggedTemplateLiteral"],"mappings":"kWAYsBA,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-dropdown.cjs.js","tslib","../index-
|
1
|
+
System.register(["./nile-dropdown.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-dropdown.css.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","lit","../nile-popup/nile-popup.cjs.js","../nile-popup/nile-popup.css.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileDropdownCjsJs){_export("NileDropdown",_nileDropdownCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileDropdownCssCjsJs){},function(_internalAnimateCjsJs){},function(_litDirectivesClassMapJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalTabbableCjsJs){},function(_internalEventCjsJs){},function(_internalWatchCjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_nilePopupNilePopupCjsJs){},function(_nilePopupNilePopupCssCjsJs){},function(_property002CjsJs){}],execute:function(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export{N as NileDropdown}from"./nile-dropdown.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-dropdown.css.esm.js";import"../internal/animate.esm.js";import"lit/directives/class-map.js";import"../utilities/animation-registry.esm.js";import"../internal/tabbable.esm.js";import"../internal/event.esm.js";import"../internal/watch.esm.js";import"../internal/nile-element.esm.js";import"lit";import"../nile-popup/nile-popup.esm.js";import"../nile-popup/nile-popup.css.esm.js";import"../property-09139d3c.esm.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-adad7634.cjs.js","lit/decorators.js","./nile-dropdown.css.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-ec52a751.cjs.js","lit","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,o,n,h,r,a,d,l,p,c,m,u,_templateObject,w;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return exports;};var exports={},Op=Object.prototype,hasOwn=Op.hasOwnProperty,defineProperty=Object.defineProperty||function(obj,key,desc){obj[key]=desc.value;},$Symbol="function"==typeof Symbol?Symbol:{},iteratorSymbol=$Symbol.iterator||"@@iterator",asyncIteratorSymbol=$Symbol.asyncIterator||"@@asyncIterator",toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag";function define(obj,key,value){return Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}),obj[key];}try{define({},"");}catch(err){define=function(obj,key,value){return obj[key]=value;};}function wrap(innerFn,outerFn,self,tryLocsList){var protoGenerator=outerFn&&outerFn.prototype instanceof Generator?outerFn:Generator,generator=Object.create(protoGenerator.prototype),context=new Context(tryLocsList||[]);return defineProperty(generator,"_invoke",{value:makeInvokeMethod(innerFn,self,context)}),generator;}function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)};}catch(err){return{type:"throw",arg:err};}}exports.wrap=wrap;var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var IteratorPrototype={};define(IteratorPrototype,iteratorSymbol,function(){return this;});var getProto=Object.getPrototypeOf,NativeIteratorPrototype=getProto&&getProto(getProto(values([])));NativeIteratorPrototype&&NativeIteratorPrototype!==Op&&hasOwn.call(NativeIteratorPrototype,iteratorSymbol)&&(IteratorPrototype=NativeIteratorPrototype);var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(IteratorPrototype);function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){define(prototype,method,function(arg){return this._invoke(method,arg);});});}function AsyncIterator(generator,PromiseImpl){function invoke(method,arg,resolve,reject){var record=tryCatch(generator[method],generator,arg);if("throw"!==record.type){var result=record.arg,value=result.value;return value&&"object"==typeof value&&hasOwn.call(value,"__await")?PromiseImpl.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject);},function(err){invoke("throw",err,resolve,reject);}):PromiseImpl.resolve(value).then(function(unwrapped){result.value=unwrapped,resolve(result);},function(error){return invoke("throw",error,resolve,reject);});}reject(record.arg);}var previousPromise;defineProperty(this,"_invoke",{value:function(method,arg){function callInvokeWithMethodAndArg(){return new PromiseImpl(function(resolve,reject){invoke(method,arg,resolve,reject);});}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(innerFn,self,context){var state="suspendedStart";return function(method,arg){if("executing"===state)throw new Error("Generator is already running");if("completed"===state){if("throw"===method)throw arg;return doneResult();}for(context.method=method,context.arg=arg;;){var delegate=context.delegate;if(delegate){var delegateResult=maybeInvokeDelegate(delegate,context);if(delegateResult){if(delegateResult===ContinueSentinel)continue;return delegateResult;}}if("next"===context.method)context.sent=context._sent=context.arg;else if("throw"===context.method){if("suspendedStart"===state)throw state="completed",context.arg;context.dispatchException(context.arg);}else"return"===context.method&&context.abrupt("return",context.arg);state="executing";var record=tryCatch(innerFn,self,context);if("normal"===record.type){if(state=context.done?"completed":"suspendedYield",record.arg===ContinueSentinel)continue;return{value:record.arg,done:context.done};}"throw"===record.type&&(state="completed",context.method="throw",context.arg=record.arg);}};}function maybeInvokeDelegate(delegate,context){var methodName=context.method,method=delegate.iterator[methodName];if(undefined===method)return context.delegate=null,"throw"===methodName&&delegate.iterator.return&&(context.method="return",context.arg=undefined,maybeInvokeDelegate(delegate,context),"throw"===context.method)||"return"!==methodName&&(context.method="throw",context.arg=new TypeError("The iterator does not provide a '"+methodName+"' method")),ContinueSentinel;var record=tryCatch(method,delegate.iterator,context.arg);if("throw"===record.type)return context.method="throw",context.arg=record.arg,context.delegate=null,ContinueSentinel;var info=record.arg;return info?info.done?(context[delegate.resultName]=info.value,context.next=delegate.nextLoc,"return"!==context.method&&(context.method="next",context.arg=undefined),context.delegate=null,ContinueSentinel):info:(context.method="throw",context.arg=new TypeError("iterator result is not an object"),context.delegate=null,ContinueSentinel);}function pushTryEntry(locs){var entry={tryLoc:locs[0]};1 in locs&&(entry.catchLoc=locs[1]),2 in locs&&(entry.finallyLoc=locs[2],entry.afterLoc=locs[3]),this.tryEntries.push(entry);}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal",delete record.arg,entry.completion=record;}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}],tryLocsList.forEach(pushTryEntry,this),this.reset(!0);}function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod)return iteratorMethod.call(iterable);if("function"==typeof iterable.next)return iterable;if(!isNaN(iterable.length)){var i=-1,next=function next(){for(;++i<iterable.length;)if(hasOwn.call(iterable,i))return next.value=iterable[i],next.done=!1,next;return next.value=undefined,next.done=!0,next;};return next.next=next;}}return{next:doneResult};}function doneResult(){return{value:undefined,done:!0};}return GeneratorFunction.prototype=GeneratorFunctionPrototype,defineProperty(Gp,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),defineProperty(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,toStringTagSymbol,"GeneratorFunction"),exports.isGeneratorFunction=function(genFun){var ctor="function"==typeof genFun&&genFun.constructor;return!!ctor&&(ctor===GeneratorFunction||"GeneratorFunction"===(ctor.displayName||ctor.name));},exports.mark=function(genFun){return Object.setPrototypeOf?Object.setPrototypeOf(genFun,GeneratorFunctionPrototype):(genFun.__proto__=GeneratorFunctionPrototype,define(genFun,toStringTagSymbol,"GeneratorFunction")),genFun.prototype=Object.create(Gp),genFun;},exports.awrap=function(arg){return{__await:arg};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,asyncIteratorSymbol,function(){return this;}),exports.AsyncIterator=AsyncIterator,exports.async=function(innerFn,outerFn,self,tryLocsList,PromiseImpl){void 0===PromiseImpl&&(PromiseImpl=Promise);var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList),PromiseImpl);return exports.isGeneratorFunction(outerFn)?iter:iter.next().then(function(result){return result.done?result.value:iter.next();});},defineIteratorMethods(Gp),define(Gp,toStringTagSymbol,"Generator"),define(Gp,iteratorSymbol,function(){return this;}),define(Gp,"toString",function(){return"[object Generator]";}),exports.keys=function(val){var object=Object(val),keys=[];for(var key in object)keys.push(key);return keys.reverse(),function next(){for(;keys.length;){var key=keys.pop();if(key in object)return next.value=key,next.done=!1,next;}return next.done=!0,next;};},exports.values=values,Context.prototype={constructor:Context,reset:function(skipTempReset){if(this.prev=0,this.next=0,this.sent=this._sent=undefined,this.done=!1,this.delegate=null,this.method="next",this.arg=undefined,this.tryEntries.forEach(resetTryEntry),!skipTempReset)for(var name in this)"t"===name.charAt(0)&&hasOwn.call(this,name)&&!isNaN(+name.slice(1))&&(this[name]=undefined);},stop:function(){this.done=!0;var rootRecord=this.tryEntries[0].completion;if("throw"===rootRecord.type)throw rootRecord.arg;return this.rval;},dispatchException:function(exception){if(this.done)throw exception;var context=this;function handle(loc,caught){return record.type="throw",record.arg=exception,context.next=loc,caught&&(context.method="next",context.arg=undefined),!!caught;}for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i],record=entry.completion;if("root"===entry.tryLoc)return handle("end");if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc"),hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc);}else if(hasCatch){if(this.prev<entry.catchLoc)return handle(entry.catchLoc,!0);}else{if(!hasFinally)throw new Error("try statement without catch or finally");if(this.prev<entry.finallyLoc)return handle(entry.finallyLoc);}}}},abrupt:function(type,arg){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev<entry.finallyLoc){var finallyEntry=entry;break;}}finallyEntry&&("break"===type||"continue"===type)&&finallyEntry.tryLoc<=arg&&arg<=finallyEntry.finallyLoc&&(finallyEntry=null);var record=finallyEntry?finallyEntry.completion:{};return record.type=type,record.arg=arg,finallyEntry?(this.method="next",this.next=finallyEntry.finallyLoc,ContinueSentinel):this.complete(record);},complete:function(record,afterLoc){if("throw"===record.type)throw record.arg;return"break"===record.type||"continue"===record.type?this.next=record.arg:"return"===record.type?(this.rval=this.arg=record.arg,this.method="return",this.next="end"):"normal"===record.type&&afterLoc&&(this.next=afterLoc),ContinueSentinel;},finish:function(finallyLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc)return this.complete(entry.completion,entry.afterLoc),resetTryEntry(entry),ContinueSentinel;}},catch:function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if("throw"===record.type){var thrown=record.arg;resetTryEntry(entry);}return thrown;}}throw new Error("illegal catch attempt");},delegateYield:function(iterable,resultName,nextLoc){return this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc},"next"===this.method&&(this.arg=undefined),ContinueSentinel;}},exports;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.y;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.customElement;},function(_nileDropdownCssCjsJs){o=_nileDropdownCssCjsJs.s;},function(_internalAnimateCjsJs){n=_internalAnimateCjsJs.s;h=_internalAnimateCjsJs.a;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_utilitiesAnimationRegistryCjsJs){a=_utilitiesAnimationRegistryCjsJs.s;d=_utilitiesAnimationRegistryCjsJs.g;},function(_internalTabbableCjsJs){l=_internalTabbableCjsJs.g;},function(_internalEventCjsJs){p=_internalEventCjsJs.w;},function(_internalWatchCjsJs){c=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){m=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){u=_property002CjsJs.e;},function(_lit){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){w=/*#__PURE__*/function(_m){_inherits(w,_m);var _super=_createSuper(w);function w(){var _this;_classCallCheck(this,w);_this=_super.apply(this,arguments),_this.open=!1,_this.placement="bottom-start",_this.disabled=!1,_this.stayOpenOnSelect=!1,_this.distance=0,_this.noOpenOnClick=!1,_this.skidding=0,_this.hoist=!1;return _this;}_createClass(w,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(w.prototype),"connectedCallback",this).call(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this);}},{key:"firstUpdated",value:function firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(w.prototype),"disconnectedCallback",this).call(this),this.removeOpenListeners(),this.hide();}},{key:"focusOnTrigger",value:function focusOnTrigger(){var t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(t===null||t===void 0?void 0:t.focus)&&t.focus();}},{key:"getMenu",value:function getMenu(){return this.panel.assignedElements({flatten:!0}).find(function(t){return"nile-menu"===t.tagName.toLowerCase();});}},{key:"handleKeyDown",value:function handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger());}},{key:"handleDocumentKeyDown",value:function handleDocumentKeyDown(t){var _this2=this;if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){var _document$activeEleme;if(this.open&&"nile-menu-item"===((_document$activeEleme=document.activeElement)===null||_document$activeEleme===void 0?void 0:_document$activeEleme.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout(function(){var _this2$containingElem,_document$activeEleme2,_document$activeEleme3;var t=((_this2$containingElem=_this2.containingElement)===null||_this2$containingElem===void 0?void 0:_this2$containingElem.getRootNode())instanceof ShadowRoot?(_document$activeEleme2=document.activeElement)===null||_document$activeEleme2===void 0?void 0:(_document$activeEleme3=_document$activeEleme2.shadowRoot)===null||_document$activeEleme3===void 0?void 0:_document$activeEleme3.activeElement:document.activeElement;_this2.containingElement&&(t===null||t===void 0?void 0:t.closest(_this2.containingElement.tagName.toLowerCase()))===_this2.containingElement||_this2.hide();});}}},{key:"handleDocumentMouseDown",value:function handleDocumentMouseDown(t){var i=t.composedPath();this.containingElement&&!i.includes(this.containingElement)&&this.hide();}},{key:"handlePanelSelect",value:function handlePanelSelect(t){var i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger());}},{key:"handleTriggerClick",value:function handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()));}},{key:"handleTriggerKeyDown",value:function handleTriggerKeyDown(t){var i=this.getMenu();if(i){var _s=i.getAllItems(),_e=_s[0],_o=_s[_s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),_s.length>0&&this.updateComplete.then(function(){"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(_e),_e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(_o),_o.focus());}));}}},{key:"handleTriggerKeyUp",value:function handleTriggerKeyUp(t){" "===t.key&&t.preventDefault();}},{key:"handleTriggerSlotChange",value:function handleTriggerSlotChange(){this.updateAccessibleTrigger();}},{key:"updateAccessibleTrigger",value:function updateAccessibleTrigger(){var t=this.trigger.assignedElements({flatten:!0}).find(function(t){return l(t).start;});var i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t;}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false");}}},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.open){_context2.next=2;break;}return _context2.abrupt("return",(this.open=!0,p(this,"nile-after-show")));case 2:case"end":return _context2.stop();}},_callee,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!this.open){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!1,p(this,"nile-after-hide")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"reposition",value:function reposition(){this.popup.reposition();}},{key:"addOpenListeners",value:function addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"removeOpenListeners",value:function removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _d,_t,_i,_d2,_t2,_i2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!this.disabled){_context4.next=4;break;}this.open=!1;_context4.next=27;break;case 4:if(!(this.updateAccessibleTrigger(),this.open)){_context4.next=17;break;}this.emit("nile-show");this.addOpenListeners();_context4.next=9;return n(this);case 9:this.panel.hidden=!1;this.popup.active=!0;_d=d(this,"dropdown.show",{dir:""}),_t=_d.keyframes,_i=_d.options;_context4.next=14;return h(this.popup.popup,_t,_i);case 14:this.emit("nile-after-show");_context4.next=27;break;case 17:this.emit("nile-hide");this.removeOpenListeners();_context4.next=21;return n(this);case 21:_d2=d(this,"dropdown.hide",{dir:""}),_t2=_d2.keyframes,_i2=_d2.options;_context4.next=24;return h(this.popup.popup,_t2,_i2);case 24:this.panel.hidden=!0;this.popup.active=!1;this.emit("nile-after-hide");case 27:case"end":return _context4.stop();}},_callee3,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=","\n distance=","\n skidding=","\n strategy=","\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=","\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=","\n @keydown=","\n @keyup=","\n @slotchange=","\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=","\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n "])),this.placement,this.distance,this.skidding,this.hoist?"fixed":"absolute",r({dropdown:!0,"dropdown--open":this.open}),this.handleTriggerClick,this.handleTriggerKeyDown,this.handleTriggerKeyUp,this.handleTriggerSlotChange,this.open?"false":"true");}}]);return w;}(m);w.styles=o,t([s(".dropdown")],w.prototype,"popup",void 0),t([s(".dropdown__trigger")],w.prototype,"trigger",void 0),t([s(".dropdown__panel")],w.prototype,"panel",void 0),t([u({type:Boolean,reflect:!0})],w.prototype,"open",void 0),t([u({reflect:!0})],w.prototype,"placement",void 0),t([u({type:Boolean,reflect:!0})],w.prototype,"disabled",void 0),t([u({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],w.prototype,"stayOpenOnSelect",void 0),t([u({attribute:!1})],w.prototype,"containingElement",void 0),t([u({type:Number})],w.prototype,"distance",void 0),t([u({type:Boolean})],w.prototype,"noOpenOnClick",void 0),t([u({type:Number})],w.prototype,"skidding",void 0),t([u({type:Boolean})],w.prototype,"hoist",void 0),t([c("open",{waitUntilFirstUpdate:!0})],w.prototype,"handleOpenChange",null),w=t([e("nile-dropdown")],w),a("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),a("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});}};});
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-dropdown.css.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","../utilities/animation-registry.cjs.js","../internal/tabbable.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../nile-popup/nile-popup.cjs.js","../property-0f6a51ec.cjs.js","lit","../nile-popup/nile-popup.css.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,o,n,h,r,a,d,l,p,c,m,u,_templateObject,w;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(typeof e+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.customElement;},function(_nileDropdownCssCjsJs){o=_nileDropdownCssCjsJs.s;},function(_internalAnimateCjsJs){n=_internalAnimateCjsJs.s;h=_internalAnimateCjsJs.a;},function(_litDirectivesClassMapJs){r=_litDirectivesClassMapJs.classMap;},function(_utilitiesAnimationRegistryCjsJs){a=_utilitiesAnimationRegistryCjsJs.s;d=_utilitiesAnimationRegistryCjsJs.g;},function(_internalTabbableCjsJs){l=_internalTabbableCjsJs.g;},function(_internalEventCjsJs){p=_internalEventCjsJs.w;},function(_internalWatchCjsJs){c=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){m=_internalNileElementCjsJs.N;},function(_nilePopupNilePopupCjsJs){},function(_property002CjsJs){u=_property002CjsJs.n;},function(_lit){},function(_nilePopupNilePopupCssCjsJs){}],execute:function(){_export("N",w=/*#__PURE__*/function(_m){_inherits(w,_m);var _super=_createSuper(w);function w(){var _this;_classCallCheck(this,w);_this=_super.apply(this,arguments),_this.open=!1,_this.placement="bottom-start",_this.disabled=!1,_this.stayOpenOnSelect=!1,_this.distance=0,_this.noOpenOnClick=!1,_this.skidding=0,_this.hoist=!1;return _this;}_createClass(w,[{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(w.prototype),"connectedCallback",this).call(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this);}},{key:"firstUpdated",value:function firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(w.prototype),"disconnectedCallback",this).call(this),this.removeOpenListeners(),this.hide();}},{key:"focusOnTrigger",value:function focusOnTrigger(){var t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(t===null||t===void 0?void 0:t.focus)&&t.focus();}},{key:"getMenu",value:function getMenu(){return this.panel.assignedElements({flatten:!0}).find(function(t){return"nile-menu"===t.tagName.toLowerCase();});}},{key:"handleKeyDown",value:function handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger());}},{key:"handleDocumentKeyDown",value:function handleDocumentKeyDown(t){var _this2=this;if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){var _document$activeEleme;if(this.open&&"nile-menu-item"===((_document$activeEleme=document.activeElement)===null||_document$activeEleme===void 0?void 0:_document$activeEleme.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout(function(){var _this2$containingElem,_document$activeEleme2;var t=((_this2$containingElem=_this2.containingElement)===null||_this2$containingElem===void 0?void 0:_this2$containingElem.getRootNode())instanceof ShadowRoot?(_document$activeEleme2=document.activeElement)===null||_document$activeEleme2===void 0||(_document$activeEleme2=_document$activeEleme2.shadowRoot)===null||_document$activeEleme2===void 0?void 0:_document$activeEleme2.activeElement:document.activeElement;_this2.containingElement&&(t===null||t===void 0?void 0:t.closest(_this2.containingElement.tagName.toLowerCase()))===_this2.containingElement||_this2.hide();});}}},{key:"handleDocumentMouseDown",value:function handleDocumentMouseDown(t){var i=t.composedPath();this.containingElement&&!i.includes(this.containingElement)&&this.hide();}},{key:"handlePanelSelect",value:function handlePanelSelect(t){var i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger());}},{key:"handleTriggerClick",value:function handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()));}},{key:"handleTriggerKeyDown",value:function handleTriggerKeyDown(t){var i=this.getMenu();if(i){var _s=i.getAllItems(),_e=_s[0],_o=_s[_s.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),_s.length>0&&this.updateComplete.then(function(){"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(_e),_e.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(_o),_o.focus());}));}}},{key:"handleTriggerKeyUp",value:function handleTriggerKeyUp(t){" "===t.key&&t.preventDefault();}},{key:"handleTriggerSlotChange",value:function handleTriggerSlotChange(){this.updateAccessibleTrigger();}},{key:"updateAccessibleTrigger",value:function updateAccessibleTrigger(){var t=this.trigger.assignedElements({flatten:!0}).find(function(t){return l(t).start;});var i;if(t){switch(t.tagName.toLowerCase()){case"nile-button":case"nile-icon-button":i=t.button;break;default:i=t;}i.setAttribute("aria-haspopup","true"),i.setAttribute("aria-expanded",this.open?"true":"false");}}},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(this.open){_context2.next=2;break;}return _context2.abrupt("return",(this.open=!0,p(this,"nile-after-show")));case 2:case"end":return _context2.stop();}},_callee,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!this.open){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!1,p(this,"nile-after-hide")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"reposition",value:function reposition(){this.popup.reposition();}},{key:"addOpenListeners",value:function addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"removeOpenListeners",value:function removeOpenListeners(){this.panel&&(this.panel.removeEventListener("nile-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown);}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var _d,_t,_i,_d2,_t2,_i2;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!this.disabled){_context4.next=4;break;}this.open=!1;_context4.next=27;break;case 4:if(!(this.updateAccessibleTrigger(),this.open)){_context4.next=17;break;}this.emit("nile-show");this.addOpenListeners();_context4.next=9;return n(this);case 9:this.panel.hidden=!1;this.popup.active=!0;_d=d(this,"dropdown.show",{dir:""}),_t=_d.keyframes,_i=_d.options;_context4.next=14;return h(this.popup.popup,_t,_i);case 14:this.emit("nile-after-show");_context4.next=27;break;case 17:this.emit("nile-hide");this.removeOpenListeners();_context4.next=21;return n(this);case 21:_d2=d(this,"dropdown.hide",{dir:""}),_t2=_d2.keyframes,_i2=_d2.options;_context4.next=24;return h(this.popup.popup,_t2,_i2);case 24:this.panel.hidden=!0;this.popup.active=!1;this.emit("nile-after-hide");case 27:case"end":return _context4.stop();}},_callee3,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=","\n distance=","\n skidding=","\n strategy=","\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=","\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=","\n @keydown=","\n @keyup=","\n @slotchange=","\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=","\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n "])),this.placement,this.distance,this.skidding,this.hoist?"fixed":"absolute",r({dropdown:!0,"dropdown--open":this.open}),this.handleTriggerClick,this.handleTriggerKeyDown,this.handleTriggerKeyUp,this.handleTriggerSlotChange,this.open?"false":"true");}}]);return w;}(m));w.styles=o,t([s(".dropdown")],w.prototype,"popup",void 0),t([s(".dropdown__trigger")],w.prototype,"trigger",void 0),t([s(".dropdown__panel")],w.prototype,"panel",void 0),t([u({type:Boolean,reflect:!0})],w.prototype,"open",void 0),t([u({reflect:!0})],w.prototype,"placement",void 0),t([u({type:Boolean,reflect:!0})],w.prototype,"disabled",void 0),t([u({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],w.prototype,"stayOpenOnSelect",void 0),t([u({attribute:!1})],w.prototype,"containingElement",void 0),t([u({type:Number})],w.prototype,"distance",void 0),t([u({type:Boolean})],w.prototype,"noOpenOnClick",void 0),t([u({type:Number})],w.prototype,"skidding",void 0),t([u({type:Boolean})],w.prototype,"hoist",void 0),t([c("open",{waitUntilFirstUpdate:!0})],w.prototype,"handleOpenChange",null),_export("N",w=t([e("nile-dropdown")],w)),a("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),a("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});}};});
|
2
2
|
//# sourceMappingURL=nile-dropdown.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-dropdown.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-dropdown.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\n\n/**\n * Nile icon component.\n *\n * @tag nile-dropdown\n * @summary Dropdowns expose additional content that \"drops down\" in a panel.\n * @dependency nile-popup\n *\n * @slot - The dropdown's main content.\n * @slot trigger - The dropdown's trigger, usually a `<nile-button>` element.\n *\n * @event nile-show - Emitted when the dropdown opens.\n * @event nile-after-show - Emitted after the dropdown opens and all animations are complete.\n * @event nile-hide - Emitted when the dropdown closes.\n * @event nile-after-hide - Emitted after the dropdown closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart trigger - The container that wraps the trigger.\n * @csspart panel - The panel that gets shown when the dropdown is open.\n *\n * @animation dropdown.show - The animation to use when showing the dropdown.\n * @animation dropdown.hide - The animation to use when hiding the dropdown.\n */\n@customElement('nile-dropdown')\nexport class NileDropdown extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.dropdown') popup: NilePopup;\n @query('.dropdown__trigger') trigger: HTMLSlotElement;\n @query('.dropdown__panel') panel: HTMLSlotElement;\n\n\n /**\n * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * 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' = 'bottom-start';\n\n /** Disables the dropdown so the panel will not open. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\n * dropdowns that allow for multiple interactions.\n */\n @property({ attribute: 'stay-open-on-select', type: Boolean, reflect: true }) stayOpenOnSelect = false;\n\n /**\n * The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\n * components that use a dropdown internally.\n */\n @property({ attribute: false }) containingElement?: HTMLElement;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @property({ type: Number }) distance = 0;\n\n\n @property({ type: Boolean }) noOpenOnClick = false;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n\n if (!this.containingElement) {\n this.containingElement = this;\n }\n }\n\n firstUpdated() {\n this.panel.hidden = !this.open;\n\n // If the dropdown is visible on init, update its position\n if (this.open) {\n this.addOpenListeners();\n this.popup.active = true;\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.hide();\n }\n\n focusOnTrigger() {\n const trigger = this.trigger.assignedElements({ flatten: true })[0] as HTMLElement | undefined;\n if (typeof trigger?.focus === 'function') {\n trigger.focus();\n }\n }\n\n getMenu() {\n return this.panel.assignedElements({ flatten: true }).find(el => el.tagName.toLowerCase() === 'nile-menu') as\n | NileMenu\n | undefined;\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed inside an open dropdown. We need to listen on the panel itself and stop propagation\n // in case any ancestors are also listening for this key.\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape or tab is pressed\n if (event.key === 'Escape' && this.open) {\n event.stopPropagation();\n this.focusOnTrigger();\n this.hide();\n return;\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement?.tagName.toLowerCase() === 'nile-menu-item') {\n event.preventDefault();\n this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.containingElement?.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (\n !this.containingElement ||\n activeElement?.closest(this.containingElement.tagName.toLowerCase()) !== this.containingElement\n ) {\n this.hide();\n }\n });\n }\n }\n\n handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of the containing element\n const path = event.composedPath();\n if (this.containingElement && !path.includes(this.containingElement)) {\n this.hide();\n }\n }\n\n handlePanelSelect(event: any) {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === 'nile-menu') {\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerClick() {\n if(this.noOpenOnClick){\n return;\n }\n if (this.open) {\n this.hide();\n } else {\n this.show();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n // if (['Enter'].includes(event.key)) {\n // event.preventDefault();\n // this.handleTriggerClick();\n // return;\n // }\n\n const menu = this.getMenu();\n\n if (menu) {\n const menuItems = menu.getAllItems();\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n this.show();\n }\n\n if (menuItems.length > 0) {\n // Focus on the first/last menu item after showing\n this.updateComplete.then(() => {\n if (event.key === 'ArrowDown' || event.key === 'Home') {\n menu.setCurrentItem(firstMenuItem);\n firstMenuItem.focus();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'End') {\n menu.setCurrentItem(lastMenuItem);\n lastMenuItem.focus();\n }\n });\n }\n }\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <nile-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const assignedElements = this.trigger.assignedElements({ flatten: true }) as HTMLElement[];\n const accessibleTrigger = assignedElements.find(el => getTabbableBoundary(el).start);\n let target: HTMLElement;\n\n if (accessibleTrigger) {\n switch (accessibleTrigger.tagName.toLowerCase()) {\n // nile buttons have to update the internal button so it's announced correctly by screen readers\n case 'nile-button':\n case 'nile-icon-button':\n target = (accessibleTrigger as NileButton | NileIconButton).button;\n break;\n\n default:\n target = accessibleTrigger;\n }\n\n target.setAttribute('aria-haspopup', 'true');\n target.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n /** Shows the dropdown panel. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dropdown panel */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n reposition() {\n this.popup.reposition();\n }\n\n addOpenListeners() {\n this.panel.addEventListener('nile-select', this.handlePanelSelect);\n this.panel.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n removeOpenListeners() {\n if (this.panel) {\n this.panel.removeEventListener('nile-select', this.handlePanelSelect);\n this.panel.removeEventListener('keydown', this.handleKeyDown);\n }\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.disabled) {\n this.open = false;\n return;\n }\n\n this.updateAccessibleTrigger();\n\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n\n await stopAnimations(this);\n this.panel.hidden = false;\n this.popup.active = true;\n const { keyframes, options } = getAnimation(this, 'dropdown.show', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, 'dropdown.hide', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n this.panel.hidden = true;\n this.popup.active = false;\n\n this.emit('nile-after-hide');\n }\n }\n\n render() {\n return html`\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=${this.placement}\n distance=${this.distance}\n skidding=${this.skidding}\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': this.open\n })}\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=${this.handleTriggerClick}\n @keydown=${this.handleTriggerKeyDown}\n @keyup=${this.handleTriggerKeyUp}\n @slotchange=${this.handleTriggerSlotChange}\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n `;\n }\n}\n\nsetDefaultAnimation('dropdown.show', {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nsetDefaultAnimation('dropdown.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nexport default NileDropdown;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dropdown': NileDropdown;\n }\n}\n"],"names":["NileDropdown","constructor","this","open","placement","disabled","stayOpenOnSelect","distance","noOpenOnClick","skidding","hoist","connectedCallback","super","handlePanelSelect","bind","handleKeyDown","handleDocumentKeyDown","handleDocumentMouseDown","containingElement","firstUpdated","panel","hidden","addOpenListeners","popup","active","disconnectedCallback","removeOpenListeners","hide","focusOnTrigger","trigger","assignedElements","flatten","focus","getMenu","find","el","tagName","toLowerCase","event","key","stopPropagation","document","activeElement","preventDefault","setTimeout","getRootNode","ShadowRoot","shadowRoot","closest","path","composedPath","includes","target","handleTriggerClick","show","handleTriggerKeyDown","menu","menuItems","getAllItems","firstMenuItem","lastMenuItem","length","updateComplete","then","setCurrentItem","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","accessibleTrigger","getTabbableBoundary","start","button","setAttribute","async","waitForEvent","reposition","addEventListener","removeEventListener","emit","stopAnimations","getAnimation","dir","keyframes","options","animateTo","render","html","classMap","dropdown","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","attribute","Number","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity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AA,mBAAA,IA5VU7F,CAAAA,CAAAA,CAAAA,CAAY2F,CAAA,CAAA,CADxBW,EAAc,eACFtG,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAsYbuG,EAAoB,eAAiB,CAAA,CACnCrB,UAAW,CACT,CAAEsB,QAAS,CAAGC,CAAAA,KAAAA,CAAO,IACrB,CAAED,OAAAA,CAAS,EAAGC,KAAO,CAAA,CAAA,CAAA,CAAA,CAEvBtB,QAAS,CAAEuB,QAAAA,CAAU,IAAKC,MAAQ,CAAA,MAAA,CAAA,CAAA,CAAA,CAGpCJ,EAAoB,eAAiB,CAAA,CACnCrB,UAAW,CACT,CAAEsB,QAAS,CAAGC,CAAAA,KAAAA,CAAO,GACrB,CAAED,OAAAA,CAAS,EAAGC,KAAO,CAAA,EAAA,CAAA,CAAA,CAEvBtB,QAAS,CAAEuB,QAAAA,CAAU,IAAKC,MAAQ,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA"}
|
1
|
+
{"version":3,"file":"nile-dropdown.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-dropdown.css';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { getTabbableBoundary } from '../internal/tabbable';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport type NileButton from '../nile-button/nile-button';\nimport type NileIconButton from '../nile-icon-button/nile-icon-button';\nimport type { NileMenu } from '../nile-menu';\nimport type { NilePopup } from '../nile-popup';\nimport '../nile-popup';\n\n/**\n * Nile icon component.\n *\n * @tag nile-dropdown\n * @summary Dropdowns expose additional content that \"drops down\" in a panel.\n * @dependency nile-popup\n *\n * @slot - The dropdown's main content.\n * @slot trigger - The dropdown's trigger, usually a `<nile-button>` element.\n *\n * @event nile-show - Emitted when the dropdown opens.\n * @event nile-after-show - Emitted after the dropdown opens and all animations are complete.\n * @event nile-hide - Emitted when the dropdown closes.\n * @event nile-after-hide - Emitted after the dropdown closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart trigger - The container that wraps the trigger.\n * @csspart panel - The panel that gets shown when the dropdown is open.\n *\n * @animation dropdown.show - The animation to use when showing the dropdown.\n * @animation dropdown.hide - The animation to use when hiding the dropdown.\n */\n@customElement('nile-dropdown')\nexport class NileDropdown extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @query('.dropdown') popup: NilePopup;\n @query('.dropdown__trigger') trigger: HTMLSlotElement;\n @query('.dropdown__panel') panel: HTMLSlotElement;\n\n\n /**\n * Indicates whether or not the dropdown is open. You can toggle this attribute to show and hide the dropdown, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the dropdown's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The preferred placement of the dropdown panel. Note that the actual placement may vary as needed to keep the panel\n * 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' = 'bottom-start';\n\n /** Disables the dropdown so the panel will not open. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * By default, the dropdown is closed when an item is selected. This attribute will keep it open instead. Useful for\n * dropdowns that allow for multiple interactions.\n */\n @property({ attribute: 'stay-open-on-select', type: Boolean, reflect: true }) stayOpenOnSelect = false;\n\n /**\n * The dropdown will close when the user interacts outside of this element (e.g. clicking). Useful for composing other\n * components that use a dropdown internally.\n */\n @property({ attribute: false }) containingElement?: HTMLElement;\n\n /** The distance in pixels from which to offset the panel away from its trigger. */\n @property({ type: Number }) distance = 0;\n\n\n @property({ type: Boolean }) noOpenOnClick = false;\n\n /** The distance in pixels from which to offset the panel along its trigger. */\n @property({ type: Number }) skidding = 0;\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`. Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.\n */\n @property({ type: Boolean }) hoist = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handlePanelSelect = this.handlePanelSelect.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.handleDocumentMouseDown = this.handleDocumentMouseDown.bind(this);\n\n if (!this.containingElement) {\n this.containingElement = this;\n }\n }\n\n firstUpdated() {\n this.panel.hidden = !this.open;\n\n // If the dropdown is visible on init, update its position\n if (this.open) {\n this.addOpenListeners();\n this.popup.active = true;\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeOpenListeners();\n this.hide();\n }\n\n focusOnTrigger() {\n const trigger = this.trigger.assignedElements({ flatten: true })[0] as HTMLElement | undefined;\n if (typeof trigger?.focus === 'function') {\n trigger.focus();\n }\n }\n\n getMenu() {\n return this.panel.assignedElements({ flatten: true }).find(el => el.tagName.toLowerCase() === 'nile-menu') as\n | NileMenu\n | undefined;\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Close when escape is pressed inside an open dropdown. We need to listen on the panel itself and stop propagation\n // in case any ancestors are also listening for this key.\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleDocumentKeyDown(event: KeyboardEvent) {\n // Close when escape or tab is pressed\n if (event.key === 'Escape' && this.open) {\n event.stopPropagation();\n this.focusOnTrigger();\n this.hide();\n return;\n }\n\n // Handle tabbing\n if (event.key === 'Tab') {\n // Tabbing within an open menu should close the dropdown and refocus the trigger\n if (this.open && document.activeElement?.tagName.toLowerCase() === 'nile-menu-item') {\n event.preventDefault();\n this.hide();\n this.focusOnTrigger();\n return;\n }\n\n // Tabbing outside of the containing element closes the panel\n //\n // If the dropdown is used within a shadow DOM, we need to obtain the activeElement within that shadowRoot,\n // otherwise `document.activeElement` will only return the name of the parent shadow DOM element.\n setTimeout(() => {\n const activeElement =\n this.containingElement?.getRootNode() instanceof ShadowRoot\n ? document.activeElement?.shadowRoot?.activeElement\n : document.activeElement;\n\n if (\n !this.containingElement ||\n activeElement?.closest(this.containingElement.tagName.toLowerCase()) !== this.containingElement\n ) {\n this.hide();\n }\n });\n }\n }\n\n handleDocumentMouseDown(event: MouseEvent) {\n // Close when clicking outside of the containing element\n const path = event.composedPath();\n if (this.containingElement && !path.includes(this.containingElement)) {\n this.hide();\n }\n }\n\n handlePanelSelect(event: any) {\n const target = event.target as HTMLElement;\n\n // Hide the dropdown when a menu item is selected\n if (!this.stayOpenOnSelect && target.tagName.toLowerCase() === 'nile-menu') {\n this.hide();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerClick() {\n if(this.noOpenOnClick){\n return;\n }\n if (this.open) {\n this.hide();\n } else {\n this.show();\n this.focusOnTrigger();\n }\n }\n\n handleTriggerKeyDown(event: KeyboardEvent) {\n // When spacebar/enter is pressed, show the panel but don't focus on the menu. This let's the user press the same\n // key again to hide the menu in case they don't want to make a selection.\n // if (['Enter'].includes(event.key)) {\n // event.preventDefault();\n // this.handleTriggerClick();\n // return;\n // }\n\n const menu = this.getMenu();\n\n if (menu) {\n const menuItems = menu.getAllItems();\n const firstMenuItem = menuItems[0];\n const lastMenuItem = menuItems[menuItems.length - 1];\n\n // When up/down is pressed, we make the assumption that the user is familiar with the menu and plans to make a\n // selection. Rather than toggle the panel, we focus on the menu (if one exists) and activate the first item for\n // faster navigation.\n if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {\n event.preventDefault();\n\n // Show the menu if it's not already open\n if (!this.open) {\n this.show();\n }\n\n if (menuItems.length > 0) {\n // Focus on the first/last menu item after showing\n this.updateComplete.then(() => {\n if (event.key === 'ArrowDown' || event.key === 'Home') {\n menu.setCurrentItem(firstMenuItem);\n firstMenuItem.focus();\n }\n\n if (event.key === 'ArrowUp' || event.key === 'End') {\n menu.setCurrentItem(lastMenuItem);\n lastMenuItem.focus();\n }\n });\n }\n }\n }\n }\n\n handleTriggerKeyUp(event: KeyboardEvent) {\n // Prevent space from triggering a click event in Firefox\n if (event.key === ' ') {\n event.preventDefault();\n }\n }\n\n handleTriggerSlotChange() {\n this.updateAccessibleTrigger();\n }\n\n //\n // Slotted triggers can be arbitrary content, but we need to link them to the dropdown panel with `aria-haspopup` and\n // `aria-expanded`. These must be applied to the \"accessible trigger\" (the tabbable portion of the trigger element\n // that gets slotted in) so screen readers will understand them. The accessible trigger could be the slotted element,\n // a child of the slotted element, or an element in the slotted element's shadow root.\n //\n // For example, the accessible trigger of an <nile-button> is a <button> located inside its shadow root.\n //\n // To determine this, we assume the first tabbable element in the trigger slot is the \"accessible trigger.\"\n //\n updateAccessibleTrigger() {\n const assignedElements = this.trigger.assignedElements({ flatten: true }) as HTMLElement[];\n const accessibleTrigger = assignedElements.find(el => getTabbableBoundary(el).start);\n let target: HTMLElement;\n\n if (accessibleTrigger) {\n switch (accessibleTrigger.tagName.toLowerCase()) {\n // nile buttons have to update the internal button so it's announced correctly by screen readers\n case 'nile-button':\n case 'nile-icon-button':\n target = (accessibleTrigger as NileButton | NileIconButton).button;\n break;\n\n default:\n target = accessibleTrigger;\n }\n\n target.setAttribute('aria-haspopup', 'true');\n target.setAttribute('aria-expanded', this.open ? 'true' : 'false');\n }\n }\n\n /** Shows the dropdown panel. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dropdown panel */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n /**\n * Instructs the dropdown menu to reposition. Useful when the position or size of the trigger changes when the menu\n * is activated.\n */\n reposition() {\n this.popup.reposition();\n }\n\n addOpenListeners() {\n this.panel.addEventListener('nile-select', this.handlePanelSelect);\n this.panel.addEventListener('keydown', this.handleKeyDown);\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n document.addEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n removeOpenListeners() {\n if (this.panel) {\n this.panel.removeEventListener('nile-select', this.handlePanelSelect);\n this.panel.removeEventListener('keydown', this.handleKeyDown);\n }\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n document.removeEventListener('mousedown', this.handleDocumentMouseDown);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.disabled) {\n this.open = false;\n return;\n }\n\n this.updateAccessibleTrigger();\n\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n\n await stopAnimations(this);\n this.panel.hidden = false;\n this.popup.active = true;\n const { keyframes, options } = getAnimation(this, 'dropdown.show', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n await stopAnimations(this);\n const { keyframes, options } = getAnimation(this, 'dropdown.hide', { dir: '' });\n await animateTo(this.popup.popup, keyframes, options);\n this.panel.hidden = true;\n this.popup.active = false;\n\n this.emit('nile-after-hide');\n }\n }\n\n render() {\n return html`\n <nile-popup\n part=\"base\"\n id=\"dropdown\"\n placement=${this.placement}\n distance=${this.distance}\n skidding=${this.skidding}\n strategy=${this.hoist ? 'fixed' : 'absolute'}\n flip\n shift\n auto-size=\"both\"\n auto-size-padding=\"10\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': this.open\n })}\n >\n <slot\n name=\"trigger\"\n slot=\"anchor\"\n part=\"trigger\"\n class=\"dropdown__trigger\"\n @click=${this.handleTriggerClick}\n @keydown=${this.handleTriggerKeyDown}\n @keyup=${this.handleTriggerKeyUp}\n @slotchange=${this.handleTriggerSlotChange}\n ></slot>\n\n <slot\n part=\"panel\"\n class=\"dropdown__panel\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-labelledby=\"dropdown\"\n ></slot>\n </nile-popup>\n `;\n }\n}\n\nsetDefaultAnimation('dropdown.show', {\n keyframes: [\n { opacity: 0, scale: 0.9 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nsetDefaultAnimation('dropdown.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.9 }\n ],\n options: { duration: 100, easing: 'ease' }\n});\n\nexport default NileDropdown;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dropdown': NileDropdown;\n }\n}\n"],"names":["NileDropdown","w","this","open","placement","disabled","stayOpenOnSelect","distance","noOpenOnClick","skidding","hoist","_this","_createClass","key","value","connectedCallback","super","handlePanelSelect","bind","handleKeyDown","handleDocumentKeyDown","handleDocumentMouseDown","containingElement","firstUpdated","panel","hidden","addOpenListeners","popup","active","disconnectedCallback","removeOpenListeners","hide","focusOnTrigger","trigger","assignedElements","flatten","focus","getMenu","find","el","tagName","toLowerCase","event","stopPropagation","_document$activeEleme","document","activeElement","preventDefault","setTimeout","getRootNode","ShadowRoot","shadowRoot","closest","path","composedPath","includes","target","handleTriggerClick","show","handleTriggerKeyDown","menu","menuItems","getAllItems","firstMenuItem","lastMenuItem","length","updateComplete","then","setCurrentItem","handleTriggerKeyUp","handleTriggerSlotChange","updateAccessibleTrigger","accessibleTrigger","getTabbableBoundary","start","button","setAttribute","_show","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","waitForEvent","stop","apply","arguments","_hide","_callee2","_callee2$","_context3","abrupt","reposition","addEventListener","removeEventListener","_handleOpenChange","_callee3","_d","_t","_i","_d2","_t2","_i2","_callee3$","_context4","emit","stopAnimations","getAnimation","dir","animateTo","keyframes","options","handleOpenChange","render","html","_templateObject","_taggedTemplateLiteral","classMap","dropdown","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","attribute","Number","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity","scale","duration","easing"],"mappings":"wqaAgDaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,qEAYuCC,EAAAA,KAAAA,CAAIC,IAAG,CAAA,CAAA,CAAA,CAMtBD,KAAAA,CAASE,SAYrB,CAAA,cAAA,CAG2BF,KAAAA,CAAQG,QAAAA,CAAAA,CAAG,CAMuBH,CAAAA,KAAAA,CAAgBI,gBAAG,CAAA,CAAA,CAAA,CASrEJ,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAGVL,KAAAA,CAAaM,aAAAA,CAAAA,CAAG,CAGjBN,CAAAA,KAAAA,CAAQO,QAAG,CAAA,CAAA,CAMVP,KAAAA,CAAKQ,KAAG,CAAA,CAAA,CAwUtC,QAAAC,KAAA,EAtUCC,YAAA,CAAAX,CAAA,GAAAY,GAAA,qBAAAC,KAAA,UAAAC,kBAAA,EACEC,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4BAAAA,IAAAA,OACAd,IAAKe,CAAAA,iBAAAA,CAAoBf,KAAKe,iBAAkBC,CAAAA,IAAAA,CAAKhB,IACrDA,CAAAA,CAAAA,IAAAA,CAAKiB,aAAgBjB,CAAAA,IAAAA,CAAKiB,aAAcD,CAAAA,IAAAA,CAAKhB,MAC7CA,IAAKkB,CAAAA,qBAAAA,CAAwBlB,IAAKkB,CAAAA,qBAAAA,CAAsBF,IAAKhB,CAAAA,IAAAA,CAAAA,CAC7DA,IAAKmB,CAAAA,uBAAAA,CAA0BnB,KAAKmB,uBAAwBH,CAAAA,IAAAA,CAAKhB,IAE5DA,CAAAA,CAAAA,IAAAA,CAAKoB,iBACRpB,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){"use strict";var o,_templateObject,t;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",t=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n:host {\n display: inline-block;\n }\n\n .dropdown::part(popup) {\n z-index: 900;\n }\n\n .dropdown[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .dropdown[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .dropdown[data-current-placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .dropdown[data-current-placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .dropdown__trigger {\n display: block;\n }\n\n .dropdown__panel {\n font-size: 1rem;\n font-weight: 400;\n box-shadow: 0 2px 8px hsl(240 3.8% 46.1% / 12%);\n border-radius: 0.25rem;\n pointer-events: none;\n }\n\n .dropdown--open .dropdown__panel {\n display: block;\n pointer-events: all;\n }\n\n /* When users slot a menu, make sure it conforms to the popup's auto-size */\n ::slotted(nile-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-dropdown.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-dropdown.css.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.css.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 {css} from 'lit-element';\n\n/**\n * Dropdown CSS\n */\nexport const styles = css`\n:host {\n display: inline-block;\n }\n\n .dropdown::part(popup) {\n z-index: 900;\n }\n\n .dropdown[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .dropdown[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .dropdown[data-current-placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .dropdown[data-current-placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .dropdown__trigger {\n display: block;\n }\n\n .dropdown__panel {\n font-size: 1rem;\n font-weight: 400;\n box-shadow: 0 2px 8px hsl(240 3.8% 46.1% / 12%);\n border-radius: 0.25rem;\n pointer-events: none;\n }\n\n .dropdown--open .dropdown__panel {\n display: block;\n pointer-events: all;\n }\n\n /* When users slot a menu, make sure it conforms to the popup's auto-size */\n ::slotted(nile-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG"}
|
1
|
+
{"version":3,"file":"nile-dropdown.css.cjs.js","sources":["../../../src/nile-dropdown/nile-dropdown.css.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 {css} from 'lit-element';\n\n/**\n * Dropdown CSS\n */\nexport const styles = css`\n:host {\n display: inline-block;\n }\n\n .dropdown::part(popup) {\n z-index: 900;\n }\n\n .dropdown[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .dropdown[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n .dropdown[data-current-placement^='left']::part(popup) {\n transform-origin: right;\n }\n\n .dropdown[data-current-placement^='right']::part(popup) {\n transform-origin: left;\n }\n\n .dropdown__trigger {\n display: block;\n }\n\n .dropdown__panel {\n font-size: 1rem;\n font-weight: 400;\n box-shadow: 0 2px 8px hsl(240 3.8% 46.1% / 12%);\n border-radius: 0.25rem;\n pointer-events: none;\n }\n\n .dropdown--open .dropdown__panel {\n display: block;\n pointer-events: all;\n }\n\n /* When users slot a menu, make sure it conforms to the popup's auto-size */\n ::slotted(nile-menu) {\n max-width: var(--auto-size-available-width) !important;\n max-height: var(--auto-size-available-height) !important;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|