@aquera/nile-elements 0.0.4-1 → 0.0.4-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.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.css.js +29 -11
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js +17 -8
- 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/demo/index.html +2 -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 +234 -221
- 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 +30 -12
- package/dist/nile-checkbox/nile-checkbox.esm.js +13 -13
- 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.css.js +29 -11
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
- package/dist/src/nile-checkbox/nile-checkbox.js +17 -8
- 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-checkbox/nile-checkbox.css.ts +29 -11
- package/src/nile-checkbox/nile-checkbox.ts +21 -17
- 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-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","waitUntilFirstU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CAAA6F,CAAAA,SAAAA,CAAA,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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d83c5c8.cjs.js"],function(_export,_context){"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"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{__decorate as t}from"tslib";import{
|
1
|
+
import{__decorate as t}from"tslib";import{x as i}from"../index-cd2f9c12.esm.js";import{query as e,customElement as s}from"lit/decorators.js";import{s as o}from"./nile-dropdown.css.esm.js";import{s as n,a as h}from"../internal/animate.esm.js";import{classMap as r}from"lit/directives/class-map.js";import{s as a,g as d}from"../utilities/animation-registry.esm.js";import{g as l}from"../internal/tabbable.esm.js";import{w as p}from"../internal/event.esm.js";import{w as c}from"../internal/watch.esm.js";import{N as m}from"../internal/nile-element.esm.js";import"../nile-popup/nile-popup.esm.js";import{n as u}from"../property-09139d3c.esm.js";import"lit";import"../nile-popup/nile-popup.css.esm.js";let w=class extends m{constructor(){super(...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}connectedCallback(){super.connectedCallback(),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)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof t?.focus&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"nile-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if("Tab"===t.key){if(this.open&&"nile-menu-item"===document.activeElement?.tagName.toLowerCase())return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{const t=this.containingElement?.getRootNode()instanceof ShadowRoot?document.activeElement?.shadowRoot?.activeElement:document.activeElement;this.containingElement&&t?.closest(this.containingElement.tagName.toLowerCase())===this.containingElement||this.hide()}))}}handleDocumentMouseDown(t){const i=t.composedPath();this.containingElement&&!i.includes(this.containingElement)&&this.hide()}handlePanelSelect(t){const i=t.target;this.stayOpenOnSelect||"nile-menu"!==i.tagName.toLowerCase()||(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.noOpenOnClick||(this.open?this.hide():(this.show(),this.focusOnTrigger()))}handleTriggerKeyDown(t){const i=this.getMenu();if(i){const e=i.getAllItems(),s=e[0],o=e[e.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),e.length>0&&this.updateComplete.then((()=>{"ArrowDown"!==t.key&&"Home"!==t.key||(i.setCurrentItem(s),s.focus()),"ArrowUp"!==t.key&&"End"!==t.key||(i.setCurrentItem(o),o.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>l(t).start));let 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")}}async show(){if(!this.open)return this.open=!0,p(this,"nile-after-show")}async hide(){if(this.open)return this.open=!1,p(this,"nile-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("nile-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}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)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("nile-show"),this.addOpenListeners(),await n(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:i}=d(this,"dropdown.show",{dir:""});await h(this.popup.popup,t,i),this.emit("nile-after-show")}else{this.emit("nile-hide"),this.removeOpenListeners(),await n(this);const{keyframes:t,options:i}=d(this,"dropdown.hide",{dir:""});await h(this.popup.popup,t,i),this.panel.hidden=!0,this.popup.active=!1,this.emit("nile-after-hide")}}render(){return i`
|
2
2
|
<nile-popup
|
3
3
|
part="base"
|
4
4
|
id="dropdown"
|
@@ -30,4 +30,4 @@ import{__decorate as t}from"tslib";import{y as i}from"../index-f1b94546.esm.js";
|
|
30
30
|
aria-labelledby="dropdown"
|
31
31
|
></slot>
|
32
32
|
</nile-popup>
|
33
|
-
`}};w.styles=o,t([e(".dropdown")],w.prototype,"popup",void 0),t([e(".dropdown__trigger")],w.prototype,"trigger",void 0),t([e(".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([s("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"}});
|
33
|
+
`}};w.styles=o,t([e(".dropdown")],w.prototype,"popup",void 0),t([e(".dropdown__trigger")],w.prototype,"trigger",void 0),t([e(".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([s("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"}});export{w as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-error-message.cjs.js","tslib","../index-
|
1
|
+
System.register(["./nile-error-message.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-error-message.css.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileErrorMessageCjsJs){_export("NileErrorMessage",_nileErrorMessageCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileErrorMessageCssCjsJs){},function(_property002CjsJs){}],execute:function(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export{N as NileErrorMessage}from"./nile-error-message.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-error-message.css.esm.js";import"../property-09139d3c.esm.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-error-message.css.cjs.js","../property-0f6a51ec.cjs.js"],function(_export,_context){"use strict";var e,r,s,i,t,a,_templateObject,_templateObject2,o;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 _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(_index001CjsJs){r=_index001CjsJs.s;s=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.customElement;},function(_nileErrorMessageCssCjsJs){t=_nileErrorMessageCssCjsJs.s;},function(_property002CjsJs){a=_property002CjsJs.n;}],execute:function(){_export("N",o=/*#__PURE__*/function(_r){_inherits(o,_r);var _super=_createSuper(o);function o(){var _this;_classCallCheck(this,o);_this=_super.apply(this,arguments),_this.errorMessages=[],_this.expandedIndex=null;return _this;}_createClass(o,[{key:"expandText",value:function expandText(e,r){var s=r.querySelector(".nile-error-message__summary"),i=s.clientHeight;s.style.whiteSpace="normal",s.style.height="auto";var t=Math.min(s.clientHeight,66);s.style.height=i+"px",requestAnimationFrame(function(){s.style.height=t+"px";});}},{key:"collapseText",value:function collapseText(e){var r=e.querySelector(".nile-error-message__summary"),s=r.clientHeight;r.style.height=s+"px",requestAnimationFrame(function(){r.style.height="14px",r.style.whiteSpace="nowrap";});}},{key:"toggleExpand",value:function toggleExpand(e,r){if(this.shadowRoot&&null!==this.expandedIndex&&this.expandedIndex!==e){var _e=this.shadowRoot.querySelectorAll(".nile-error-message__expandable")[this.expandedIndex];_e&&this.collapseText(_e);}this.expandedIndex===e?(this.expandedIndex=null,this.collapseText(r.currentTarget)):(this.expandedIndex=e,this.expandText(e,r.currentTarget));}},{key:"render",value:function render(){var _this2=this;return s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-error-message\">\n <div class=\"nile-error-message__info\">\n <nile-icon\n name=\"info2\"\n size=\"14\"\n class=\"nile-error-message__icon\"\n part=\"icon\"\n ></nile-icon>\n ","\n "," are not\n valid\n </div>\n ","\n </div>\n "])),this.errorMessages.length,this.errorMessages.length>1?"attributes":"attribute",this.errorMessages.map(function(e,r){return s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <div\n class=\"nile-error-message__expandable "," ","\"\n @click=\"","\"\n >\n <div class=\"nile-error-message__content\">\n <nile-icon\n name=\"arrowright\"\n size=\"14\"\n class=\"nile-error-message__arrow\"\n ></nile-icon>\n <div class=\"nile-error-message__summary\">","</div>\n </div>\n </div>\n "])),0!==r?"bordered":"",_this2.expandedIndex===r?"expanded":"",function(e){return _this2.toggleExpand(r,e);},e);}));}}],[{key:"styles",get:function get(){return[t];}}]);return o;}(r));e([a({type:Array,attribute:"error-messages",hasChanged:function hasChanged(e,r){return JSON.stringify(e)!==JSON.stringify(r);},converter:{toAttribute:function toAttribute(e){return JSON.stringify(e);},fromAttribute:function fromAttribute(e){return function(e){return Array.isArray(e)?e.map(function(e){return String(e);}):[];}(JSON.parse(e||"[]"));}}})],o.prototype,"errorMessages",void 0),e([a({type:Number})],o.prototype,"expandedIndex",void 0),_export("N",o=e([i("nile-error-message")],o));}};});
|
2
2
|
//# sourceMappingURL=nile-error-message.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-error-message.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.ts"],"sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-error-message.css';\n\nconst convertToStringArray = (value: any): Array<string> => {\n if (Array.isArray(value)) {\n return value.map(item => String(item));\n }\n return [];\n};\n\n/**\n * A custom error message component that displays error information to the user.\n * @customElement nile-error-message\n */\n@customElement('nile-error-message')\nexport class NileErrorMessage extends LitElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({\n type: Array,\n attribute: 'error-messages',\n hasChanged: (newVal, oldVal) =>\n JSON.stringify(newVal) !== JSON.stringify(oldVal), // Optional: to detect deep changes\n converter: {\n toAttribute: value => JSON.stringify(value),\n fromAttribute: value => convertToStringArray(JSON.parse(value || '[]')),\n },\n })\n errorMessages: Array<string> = [];\n\n @property({ type: Number })\n expandedIndex: number | null = null;\n\n expandText(index: number, target: any) {\n const element = target.querySelector('.nile-error-message__summary');\n const originalHeight = element.clientHeight;\n element.style.whiteSpace = 'normal';\n element.style.height = 'auto';\n const expandedHeight = Math.min(element.clientHeight, 5.5 * 12);\n\n element.style.height = originalHeight + 'px';\n\n requestAnimationFrame(() => {\n element.style.height = expandedHeight + 'px';\n });\n }\n\n collapseText(target: any) {\n const element = target.querySelector('.nile-error-message__summary');\n const expandedHeight = element.clientHeight;\n element.style.height = expandedHeight + 'px';\n\n requestAnimationFrame(() => {\n element.style.height = '14px';\n element.style.whiteSpace = 'nowrap';\n });\n }\n\n toggleExpand(index: number, event: any) {\n if (this.shadowRoot) {\n if (this.expandedIndex !== null && this.expandedIndex !== index) {\n const prevExpandable = this.shadowRoot.querySelectorAll(\n '.nile-error-message__expandable'\n )[this.expandedIndex];\n if (prevExpandable) {\n this.collapseText(prevExpandable);\n }\n }\n }\n\n if (this.expandedIndex === index) {\n this.expandedIndex = null;\n this.collapseText(event.currentTarget);\n } else {\n this.expandedIndex = index;\n this.expandText(index, event.currentTarget);\n }\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"nile-error-message\">\n <div class=\"nile-error-message__info\">\n <nile-icon\n name=\"info2\"\n size=\"14\"\n class=\"nile-error-message__icon\"\n part=\"icon\"\n ></nile-icon>\n ${this.errorMessages.length}\n ${this.errorMessages.length > 1 ? 'attributes' : 'attribute'} are not\n valid\n </div>\n ${this.errorMessages.map(\n (errorMessage, index) => html`\n <div\n class=\"nile-error-message__expandable ${index !== 0\n ? 'bordered'\n : ''} ${this.expandedIndex === index ? 'expanded' : ''}\"\n @click=\"${(event: any) => this.toggleExpand(index, event)}\"\n >\n <div class=\"nile-error-message__content\">\n <nile-icon\n name=\"arrowright\"\n size=\"14\"\n class=\"nile-error-message__arrow\"\n ></nile-icon>\n <div class=\"nile-error-message__summary\">${errorMessage}</div>\n </div>\n </div>\n `\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-error-message': NileErrorMessage;\n }\n}\n"],"names":["NileErrorMessage","
|
1
|
+
{"version":3,"file":"nile-error-message.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.ts"],"sourcesContent":["import {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-error-message.css';\n\nconst convertToStringArray = (value: any): Array<string> => {\n if (Array.isArray(value)) {\n return value.map(item => String(item));\n }\n return [];\n};\n\n/**\n * A custom error message component that displays error information to the user.\n * @customElement nile-error-message\n */\n@customElement('nile-error-message')\nexport class NileErrorMessage extends LitElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({\n type: Array,\n attribute: 'error-messages',\n hasChanged: (newVal, oldVal) =>\n JSON.stringify(newVal) !== JSON.stringify(oldVal), // Optional: to detect deep changes\n converter: {\n toAttribute: value => JSON.stringify(value),\n fromAttribute: value => convertToStringArray(JSON.parse(value || '[]')),\n },\n })\n errorMessages: Array<string> = [];\n\n @property({ type: Number })\n expandedIndex: number | null = null;\n\n expandText(index: number, target: any) {\n const element = target.querySelector('.nile-error-message__summary');\n const originalHeight = element.clientHeight;\n element.style.whiteSpace = 'normal';\n element.style.height = 'auto';\n const expandedHeight = Math.min(element.clientHeight, 5.5 * 12);\n\n element.style.height = originalHeight + 'px';\n\n requestAnimationFrame(() => {\n element.style.height = expandedHeight + 'px';\n });\n }\n\n collapseText(target: any) {\n const element = target.querySelector('.nile-error-message__summary');\n const expandedHeight = element.clientHeight;\n element.style.height = expandedHeight + 'px';\n\n requestAnimationFrame(() => {\n element.style.height = '14px';\n element.style.whiteSpace = 'nowrap';\n });\n }\n\n toggleExpand(index: number, event: any) {\n if (this.shadowRoot) {\n if (this.expandedIndex !== null && this.expandedIndex !== index) {\n const prevExpandable = this.shadowRoot.querySelectorAll(\n '.nile-error-message__expandable'\n )[this.expandedIndex];\n if (prevExpandable) {\n this.collapseText(prevExpandable);\n }\n }\n }\n\n if (this.expandedIndex === index) {\n this.expandedIndex = null;\n this.collapseText(event.currentTarget);\n } else {\n this.expandedIndex = index;\n this.expandText(index, event.currentTarget);\n }\n }\n\n render(): TemplateResult {\n return html`\n <div class=\"nile-error-message\">\n <div class=\"nile-error-message__info\">\n <nile-icon\n name=\"info2\"\n size=\"14\"\n class=\"nile-error-message__icon\"\n part=\"icon\"\n ></nile-icon>\n ${this.errorMessages.length}\n ${this.errorMessages.length > 1 ? 'attributes' : 'attribute'} are not\n valid\n </div>\n ${this.errorMessages.map(\n (errorMessage, index) => html`\n <div\n class=\"nile-error-message__expandable ${index !== 0\n ? 'bordered'\n : ''} ${this.expandedIndex === index ? 'expanded' : ''}\"\n @click=\"${(event: any) => this.toggleExpand(index, event)}\"\n >\n <div class=\"nile-error-message__content\">\n <nile-icon\n name=\"arrowright\"\n size=\"14\"\n class=\"nile-error-message__arrow\"\n ></nile-icon>\n <div class=\"nile-error-message__summary\">${errorMessage}</div>\n </div>\n </div>\n `\n )}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-error-message': NileErrorMessage;\n }\n}\n"],"names":["NileErrorMessage","o","this","errorMessages","expandedIndex","_this","_createClass","key","value","expandText","index","target","element","querySelector","originalHeight","clientHeight","style","whiteSpace","height","expandedHeight","Math","min","requestAnimationFrame","collapseText","toggleExpand","event","shadowRoot","prevExpandable","querySelectorAll","currentTarget","render","html","_templateObject","_taggedTemplateLiteral","length","map","errorMessage","_templateObject2","get","styles","LitElement","__decorate","property","type","Array","attribute","hasChanged","newVal","oldVal","JSON","stringify","converter","toAttribute","fromAttribute","isArray","item","String","convertToStringArray","parse","prototype","Number","_export","customElement"],"mappings":"ssHAsBaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,EAAN,SAAAC,EAAA,qEAeLC,EAAAA,KAAAA,CAAaC,aAAkB,CAAA,EAAA,CAG/BD,KAAAA,CAAaE,aAAAA,CAAkB,IAoFhC,QAAAC,KAAA,EArGQC,YAAA,CAAAL,CAAA,GAAAM,GAAA,cAAAC,KAAA,CAmBP,SAAAC,WAAWC,EAAeC,CACxB,CAAA,CAAA,GAAMC,CAAAA,CAAUD,CAAAA,CAAAA,CAAOE,aAAc,CAAA,8BAAA,CAAA,CAC/BC,CAAiBF,CAAAA,CAAAA,CAAQG,aAC/BH,CAAQI,CAAAA,KAAAA,CAAMC,UAAa,CAAA,QAAA,CAC3BL,EAAQI,KAAME,CAAAA,MAAAA,CAAS,MACvB,CAAA,GAAMC,CAAAA,EAAiBC,IAAKC,CAAAA,GAAAA,CAAIT,CAAQG,CAAAA,YAAAA,CAAc,EAEtDH,CAAAA,CAAAA,CAAAA,CAAQI,KAAME,CAAAA,MAAAA,CAASJ,EAAiB,IAExCQ,CAAAA,qBAAAA,CAAsB,UACpBV,CAAAA,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qBR,IAAKS,CAAAA,KAAAA,CAAMlD,CAAS,EAAA,IAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAGnCR,CAAA2D,CAAAA,SAAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAGlClB,CAAA,CAAA,CADCC,CAAS,CAAA,CAAEC,IAAMiB,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CACkB5D,CAAA2D,CAAAA,SAAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAAE,OAAA,KAlBzB7D,CAAgByC,CAAAA,CAAAA,CAAA,CAD5BqB,CAAAA,CAAc,uBACF9D"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,r;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",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n width:100%;\n }\n\n .nile-error-message {\n width: 100%;\n font-size: var(--nile-font-size-small);\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-font-size-small);\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: var(--nile-radius-base-standard);\n background: var(--nile-colors-red-100);\n }\n\n .nile-error-message__info {\n color: var(--nile-colors-red-500);\n padding: 8px;\n display: flex;\n align-items: center;\n }\n\n .nile-error-message__icon,\n .nile-error-message__arrow {\n vertical-align: middle;\n margin-right: 6px;\n transition: transform 0.3s ease-in-out;\n }\n\n .nile-error-message__expandable {\n cursor: pointer;\n overflow: hidden;\n }\n\n .nile-error-message__content {\n display: flex;\n align-items: flex-start;\n padding: 8px 12px;\n }\n\n .nile-error-message__expandable.bordered {\n border-top: 1px solid var(--nile-colors-neutral-500);\n }\n\n .nile-error-message__summary {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: height 0.3s ease-in-out, white-space 1s ease-in-out;\n height: 14px;\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__summary {\n white-space: normal;\n max-height: 6em;\n overflow-y: scroll;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar {\n width: 8px;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar-thumb {\n border-radius: 20px;\n background: rgba(148, 159, 184, 0.25);\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__arrow {\n transform: rotate(90deg);\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-error-message.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-error-message.css.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.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 * ErrorMessage CSS\n */\nexport const styles = css`\n :host {\n width:100%;\n }\n\n .nile-error-message {\n width: 100%;\n font-size: var(--nile-font-size-small);\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-font-size-small);\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: var(--nile-radius-base-standard);\n background: var(--nile-colors-red-100);\n }\n\n .nile-error-message__info {\n color: var(--nile-colors-red-500);\n padding: 8px;\n display: flex;\n align-items: center;\n }\n\n .nile-error-message__icon,\n .nile-error-message__arrow {\n vertical-align: middle;\n margin-right: 6px;\n transition: transform 0.3s ease-in-out;\n }\n\n .nile-error-message__expandable {\n cursor: pointer;\n overflow: hidden;\n }\n\n .nile-error-message__content {\n display: flex;\n align-items: flex-start;\n padding: 8px 12px;\n }\n\n .nile-error-message__expandable.bordered {\n border-top: 1px solid var(--nile-colors-neutral-500);\n }\n\n .nile-error-message__summary {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: height 0.3s ease-in-out, white-space 1s ease-in-out;\n height: 14px;\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__summary {\n white-space: normal;\n max-height: 6em;\n overflow-y: scroll;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar {\n width: 8px;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar-thumb {\n border-radius: 20px;\n background: rgba(148, 159, 184, 0.25);\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__arrow {\n transform: rotate(90deg);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG"}
|
1
|
+
{"version":3,"file":"nile-error-message.css.cjs.js","sources":["../../../src/nile-error-message/nile-error-message.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 * ErrorMessage CSS\n */\nexport const styles = css`\n :host {\n width:100%;\n }\n\n .nile-error-message {\n width: 100%;\n font-size: var(--nile-font-size-small);\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-font-size-small);\n border: 1px solid var(--nile-colors-red-500);\n border-left: 6px solid var(--nile-colors-red-500);\n border-radius: var(--nile-radius-base-standard);\n background: var(--nile-colors-red-100);\n }\n\n .nile-error-message__info {\n color: var(--nile-colors-red-500);\n padding: 8px;\n display: flex;\n align-items: center;\n }\n\n .nile-error-message__icon,\n .nile-error-message__arrow {\n vertical-align: middle;\n margin-right: 6px;\n transition: transform 0.3s ease-in-out;\n }\n\n .nile-error-message__expandable {\n cursor: pointer;\n overflow: hidden;\n }\n\n .nile-error-message__content {\n display: flex;\n align-items: flex-start;\n padding: 8px 12px;\n }\n\n .nile-error-message__expandable.bordered {\n border-top: 1px solid var(--nile-colors-neutral-500);\n }\n\n .nile-error-message__summary {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: height 0.3s ease-in-out, white-space 1s ease-in-out;\n height: 14px;\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__summary {\n white-space: normal;\n max-height: 6em;\n overflow-y: scroll;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar {\n width: 8px;\n }\n\n .nile-error-message__expandable.expanded\n .nile-error-message__summary::-webkit-scrollbar-thumb {\n border-radius: 20px;\n background: rgba(148, 159, 184, 0.25);\n }\n\n .nile-error-message__expandable.expanded .nile-error-message__arrow {\n transform: rotate(90deg);\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 e}from"tslib";import{s as r,
|
1
|
+
import{__decorate as e}from"tslib";import{s as r,x as s}from"../index-cd2f9c12.esm.js";import{customElement as i}from"lit/decorators.js";import{s as t}from"./nile-error-message.css.esm.js";import{n as a}from"../property-09139d3c.esm.js";let o=class extends r{constructor(){super(...arguments),this.errorMessages=[],this.expandedIndex=null}static get styles(){return[t]}expandText(e,r){const s=r.querySelector(".nile-error-message__summary"),i=s.clientHeight;s.style.whiteSpace="normal",s.style.height="auto";const t=Math.min(s.clientHeight,66);s.style.height=i+"px",requestAnimationFrame((()=>{s.style.height=t+"px"}))}collapseText(e){const r=e.querySelector(".nile-error-message__summary"),s=r.clientHeight;r.style.height=s+"px",requestAnimationFrame((()=>{r.style.height="14px",r.style.whiteSpace="nowrap"}))}toggleExpand(e,r){if(this.shadowRoot&&null!==this.expandedIndex&&this.expandedIndex!==e){const e=this.shadowRoot.querySelectorAll(".nile-error-message__expandable")[this.expandedIndex];e&&this.collapseText(e)}this.expandedIndex===e?(this.expandedIndex=null,this.collapseText(r.currentTarget)):(this.expandedIndex=e,this.expandText(e,r.currentTarget))}render(){return s`
|
2
2
|
<div class="nile-error-message">
|
3
3
|
<div class="nile-error-message__info">
|
4
4
|
<nile-icon
|
@@ -27,4 +27,4 @@ import{__decorate as e}from"tslib";import{s as r,y as s}from"../index-f1b94546.e
|
|
27
27
|
</div>
|
28
28
|
`))}
|
29
29
|
</div>
|
30
|
-
`}};e([a({type:Array,attribute:"error-messages",hasChanged:(e,r)=>JSON.stringify(e)!==JSON.stringify(r),converter:{toAttribute:e=>JSON.stringify(e),fromAttribute:e=>(e=>Array.isArray(e)?e.map((e=>String(e))):[])(JSON.parse(e||"[]"))}})],
|
30
|
+
`}};e([a({type:Array,attribute:"error-messages",hasChanged:(e,r)=>JSON.stringify(e)!==JSON.stringify(r),converter:{toAttribute:e=>JSON.stringify(e),fromAttribute:e=>(e=>Array.isArray(e)?e.map((e=>String(e))):[])(JSON.parse(e||"[]"))}})],o.prototype,"errorMessages",void 0),e([a({type:Number})],o.prototype,"expandedIndex",void 0),o=e([i("nile-error-message")],o);export{o as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-footer.css.cjs.js"],function(_export,_context){"use strict";var s,t,r,o,e,_templateObject,i;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 _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){s=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.s;r=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileFooterCssCjsJs){e=_nileFooterCssCjsJs.s;}],execute:function(){i=/*#__PURE__*/function(_t){_inherits(i,_t);var _super=_createSuper(i);function i(){_classCallCheck(this,i);return _super.apply(this,arguments);}_createClass(i,[{key:"render",value:function render(){return r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<slot> </slot>\n\t\t\t"])));}}],[{key:"styles",get:function get(){return[e];}}]);return i;}(t);i=s([o("nile-footer")],i);}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../../src/nile-footer/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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-footer.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-footer\n *\n */\n@customElement('nile-footer')\nexport class NileFooter extends LitElement {\n\n\t/**\n\t * The styles for Footer\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t<slot> </slot>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFooter;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-footer': NileFooter;\n }\n}"],"names":["NileFooter","render","html","styles","LitElement","__decorate","customElement"],"mappings":"kkHAkBaA,
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../../src/nile-footer/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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-footer.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-footer\n *\n */\n@customElement('nile-footer')\nexport class NileFooter extends LitElement {\n\n\t/**\n\t * The styles for Footer\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t<slot> </slot>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFooter;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-footer': NileFooter;\n }\n}"],"names":["NileFooter","render","html","_templateObject","_taggedTemplateLiteral","key","get","styles","i","LitElement","__decorate","customElement"],"mappings":"kkHAkBaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,WAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,SAAAA,MAAAA,CAAAA,KAAAA,MAAAA,SAAAA,GAAAA,YAAAA,CAAAA,CAAAA,GAAAA,GAAAA,UAAAA,KAAAA,CAkBL,SAAAC,OAAA,CACN,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,uCAGX,CAAA,KAAAC,GAAA,UAAAC,GAAA,CAhBM,SAAAA,IAAA,EACN,MAAO,CAACC,EACR,EAUM,WAAAC,CAAA,GAlBwBC,CAMxB,EANKT,CAAUU,CAAAA,CAAAA,CAAA,CADtBC,CAAAA,CAAc,aACFX,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA"}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import{__decorate as s}from"tslib";import{s as t,
|
1
|
+
import{__decorate as s}from"tslib";import{s as t,x as r}from"../index-cd2f9c12.esm.js";import{customElement as e}from"lit/decorators.js";import{s as o}from"./nile-footer.css.esm.js";let i=class extends t{static get styles(){return[o]}render(){return r`
|
2
2
|
<slot> </slot>
|
3
3
|
`}};i=s([e("nile-footer")],i);
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var s,_templateObject,o;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){s=_index001CjsJs.i;}],execute:function(){_export("s",o=s(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t:host {\n\n\t}\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-footer.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-footer.css.cjs.js","sources":["../../../src/nile-footer/nile-footer.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 * Footer CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n`;\n\nexport default [styles];"],"names":["styles","css"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG"}
|
1
|
+
{"version":3,"file":"nile-footer.css.cjs.js","sources":["../../../src/nile-footer/nile-footer.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 * Footer CSS\n */\nexport const styles = css`\n\t:host {\n\n\t}\n`;\n\nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-form-error-message.cjs.js","tslib","../index-
|
1
|
+
System.register(["./nile-form-error-message.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-form-error-message.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileFormErrorMessageCjsJs){_export("NileFormErrorMessage",_nileFormErrorMessageCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileFormErrorMessageCssCjsJs){}],execute:function(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export{N as NileFormErrorMessage}from"./nile-form-error-message.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-form-error-message.css.esm.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-form-error-message.css.cjs.js"],function(_export,_context){"use strict";var r,s,e,o,i,_templateObject,t;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 _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){r=_tslib.__decorate;},function(_index001CjsJs){s=_index001CjsJs.s;e=_index001CjsJs.x;},function(_litDecoratorsJs){o=_litDecoratorsJs.customElement;},function(_nileFormErrorMessageCssCjsJs){i=_nileFormErrorMessageCssCjsJs.s;}],execute:function(){_export("N",t=/*#__PURE__*/function(_s){_inherits(t,_s);var _super=_createSuper(t);function t(){_classCallCheck(this,t);return _super.apply(this,arguments);}_createClass(t,[{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-form-error-message\">\n <nile-icon name=\"info2\" size=\"14\" class=\"nile-form-error-message__icon\" color=\"#A4121C\"> </nile-icon> <slot> </slot>\n </div>\n\t\t\t"])));}}],[{key:"styles",get:function get(){return[i];}}]);return t;}(s));_export("N",t=r([o("nile-form-error-message")],t));}};});
|
2
2
|
//# sourceMappingURL=nile-form-error-message.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-form-error-message.cjs.js","sources":["../../../src/nile-form-error-message/nile-form-error-message.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-form-error-message.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-error-message\n *\n */\n@customElement('nile-form-error-message')\nexport class NileFormErrorMessage extends LitElement {\n\n\t/**\n\t * The styles for FormErrorMessage\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n <div class=\"nile-form-error-message\">\n <nile-icon name=\"info2\" size=\"14\" class=\"nile-form-error-message__icon\" color=\"#A4121C\"> </nile-icon> <slot> </slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFormErrorMessage;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-error-message': NileFormErrorMessage;\n }\n}\n"],"names":["NileFormErrorMessage","render","html","styles","LitElement","__decorate","customElement"],"mappings":"
|
1
|
+
{"version":3,"file":"nile-form-error-message.cjs.js","sources":["../../../src/nile-form-error-message/nile-form-error-message.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-form-error-message.css';\n\n/**\n * Nile icon component.\n *\n * @tag nile-form-error-message\n *\n */\n@customElement('nile-form-error-message')\nexport class NileFormErrorMessage extends LitElement {\n\n\t/**\n\t * The styles for FormErrorMessage\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n <div class=\"nile-form-error-message\">\n <nile-icon name=\"info2\" size=\"14\" class=\"nile-form-error-message__icon\" color=\"#A4121C\"> </nile-icon> <slot> </slot>\n </div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileFormErrorMessage;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-form-error-message': NileFormErrorMessage;\n }\n}\n"],"names":["NileFormErrorMessage","render","html","_templateObject","_taggedTemplateLiteral","key","get","styles","t","LitElement","__decorate","customElement"],"mappings":"8mHAkBaA,CAAAA,uBAAAA,EAAAA,EAAAA,SAAAA,CAAAA,CAAAA,CAAAA,EAAAA,MAAAA,MAAAA,CAAAA,YAAAA,CAAAA,CAAAA,WAAAA,EAAAA,EAAAA,eAAAA,MAAAA,CAAAA,SAAAA,MAAAA,CAAAA,KAAAA,MAAAA,SAAAA,GAAAA,YAAAA,CAAAA,CAAAA,GAAAA,GAAAA,UAAAA,KAAAA,CAkBL,SAAAC,OAAA,CACN,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,qNAKX,CAAA,KAAAC,GAAA,UAAAC,GAAA,CAlBM,SAAAA,IAAA,EACN,MAAO,CAACC,EACR,EAUM,WAAAC,CAAA,GAlBkCC,CAMlC,GANKT,OAAAA,KAAAA,CAAoBU,CAAAA,CAAAA,CAAA,CADhCC,CAAAA,CAAc,4BACFX"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["../index-
|
1
|
+
System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,r;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",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .nile-form-error-message {\n display: flex;\n align-items: center;\n color: var(--nile-colors-red-700);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n }\n\n .nile-form-error-message__icon {\n margin-right: 6px;\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-form-error-message.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-form-error-message.css.cjs.js","sources":["../../../src/nile-form-error-message/nile-form-error-message.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 * FormErrorMessage CSS\n */\nexport const styles = css`\n :host {\n }\n\n .nile-form-error-message {\n display: flex;\n align-items: center;\n color: var(--nile-colors-red-700);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n }\n\n .nile-form-error-message__icon {\n margin-right: 6px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG"}
|
1
|
+
{"version":3,"file":"nile-form-error-message.css.cjs.js","sources":["../../../src/nile-form-error-message/nile-form-error-message.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 * FormErrorMessage CSS\n */\nexport const styles = css`\n :host {\n }\n\n .nile-form-error-message {\n display: flex;\n align-items: center;\n color: var(--nile-colors-red-700);\n font-family: Colfax-regular;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: 12px;\n letter-spacing: 0.2px;\n margin-top: 6px;\n }\n\n .nile-form-error-message__icon {\n margin-right: 6px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import{__decorate as e}from"tslib";import{s as r,
|
1
|
+
import{__decorate as e}from"tslib";import{s as r,x as s}from"../index-cd2f9c12.esm.js";import{customElement as o}from"lit/decorators.js";import{s as i}from"./nile-form-error-message.css.esm.js";let m=class extends r{static get styles(){return[i]}render(){return s`
|
2
2
|
<div class="nile-form-error-message">
|
3
3
|
<nile-icon name="info2" size="14" class="nile-form-error-message__icon" color="#A4121C"> </nile-icon> <slot> </slot>
|
4
4
|
</div>
|
5
|
-
`}};m=e([o("nile-form-error-message")],m);
|
5
|
+
`}};m=e([o("nile-form-error-message")],m);export{m as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["./nile-form-help-text.cjs.js","tslib","../index-
|
1
|
+
System.register(["./nile-form-help-text.cjs.js","tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-form-help-text.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileFormHelpTextCjsJs){_export("NileFormHelpText",_nileFormHelpTextCjsJs.N);},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileFormHelpTextCssCjsJs){}],execute:function(){}};});
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
export{N as NileFormHelpText}from"./nile-form-help-text.esm.js";import"tslib";import"../index-cd2f9c12.esm.js";import"lit/decorators.js";import"./nile-form-help-text.css.esm.js";
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-form-help-text.css.cjs.js"],function(_export,_context){"use strict";var t,s,e,r,o,_templateObject,l;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 _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){s=_index001CjsJs.s;e=_index001CjsJs.x;},function(_litDecoratorsJs){r=_litDecoratorsJs.customElement;},function(_nileFormHelpTextCssCjsJs){o=_nileFormHelpTextCssCjsJs.s;}],execute:function(){_export("N",l=/*#__PURE__*/function(_s){_inherits(l,_s);var _super=_createSuper(l);function l(){_classCallCheck(this,l);return _super.apply(this,arguments);}_createClass(l,[{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-form-help-text\">\n <slot> </slot>\n </div>\n\t\t\t"])));}}],[{key:"styles",get:function get(){return[o];}}]);return l;}(s));_export("N",l=t([r("nile-form-help-text")],l));}};});
|
2
2
|
//# sourceMappingURL=nile-form-help-text.cjs.js.map
|