q2-tecton-elements 1.54.3 → 1.55.0
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/dist/bundle-report.json +2135 -776
- package/dist/cjs/{index-76f63767.js → index-905f4c87.js} +3 -2
- package/dist/cjs/index-905f4c87.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +45 -14
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -1364
- package/dist/cjs/q2-action-sheet.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +59 -22
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +21 -21
- package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +22 -3
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
- package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-form.cjs.entry.js +23 -0
- package/dist/cjs/q2-form.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-item_3.cjs.entry.js +3 -3
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +20 -26
- package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +172 -0
- package/dist/cjs/q2-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list_2.cjs.entry.js +9 -7
- package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +37 -25
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +10 -6
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tag.cjs.entry.js +51 -9
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/q2-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/sanitize-html-string-b8e3b24b.js +1366 -0
- package/dist/cjs/sanitize-html-string-b8e3b24b.js.map +1 -0
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
- package/dist/collection/components/click-elsewhere/test/click-elsewhere-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-action-group/q2-action-group.css +11 -4
- package/dist/collection/components/q2-action-group/q2-action-group.js +47 -13
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js +365 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/{q2-action-group.spec.js → q2-action-group-test.spec.js} +67 -26
- package/dist/collection/components/q2-action-group/test/q2-action-group-test.spec.js.map +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js.map +1 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/q2-badge.css +52 -41
- package/dist/collection/components/q2-badge/q2-badge.js +88 -22
- package/dist/collection/components/q2-badge/q2-badge.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +35 -126
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js +415 -0
- package/dist/collection/components/q2-badge/test/q2-badge-test.spec.js.map +1 -0
- package/dist/collection/components/q2-btn/q2-btn.css +12 -10
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-helpers.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-types.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar-validation.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.css +2 -0
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/q2-month-picker.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/helpers-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/q2-calendar-month-picker-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/test/validation-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/q2-card.js.map +1 -1
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/test/q2-carousel-pane-test.spec.js.map +1 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +1 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +99 -62
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +19 -19
- package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +227 -208
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +8 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js.map +1 -1
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +38 -2
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +21 -2
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +43 -2
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js.map +1 -1
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-example/q2-example.js.map +1 -1
- package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -1
- package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +2 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -1
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -1
- package/dist/collection/components/q2-form/q2-form.css +93 -0
- package/dist/collection/components/q2-form/q2-form.js +44 -0
- package/dist/collection/components/q2-form/q2-form.js.map +1 -0
- package/dist/collection/components/q2-form/test/q2-form-test.e2e.js +93 -0
- package/dist/collection/components/q2-form/test/q2-form-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -1
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-icon/q2-icon-types.js.map +1 -1
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +1 -352
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js +464 -0
- package/dist/collection/components/q2-icon/test/q2-icon-test.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/alpha.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alphanumeric.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/credit-card.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/credit-card.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/currency.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/generic.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/number.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/numeric.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/phone.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/ssn.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/tin.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input-types.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.css +3 -2
- package/dist/collection/components/q2-input/q2-input.js +4 -3
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-credit-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js +10 -0
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-item/q2-item.js.map +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.spec.js.map +1 -1
- package/dist/collection/components/q2-legend/q2-legend.css +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js.map +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-legend/test/q2-legend-test.spec.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
- package/dist/collection/components/q2-loading/skeleton/q2-loading-element/index.js.map +1 -1
- package/dist/collection/components/q2-loading/skeleton/shapes.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +19 -37
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +1 -7
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +140 -82
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/q2-message.js.map +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-modal/q2-modal.css +223 -0
- package/dist/collection/components/q2-modal/q2-modal.js +470 -0
- package/dist/collection/components/q2-modal/q2-modal.js.map +1 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js +102 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js +127 -0
- package/dist/collection/components/q2-modal/test/q2-modal-test.spec.js.map +1 -0
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.js +51 -25
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +40 -94
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +137 -19
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +7 -5
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js.map +1 -1
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +4 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js.map +1 -1
- package/dist/collection/components/q2-relative-time/test/q2-relative-time-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +2 -2
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -1
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.css +2 -2
- package/dist/collection/components/q2-select/q2-select.js +15 -4
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +5 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js +85 -0
- package/dist/collection/components/q2-select/test/q2-select-test.spec.js.map +1 -0
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.spec.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/q2-tag.css +9 -0
- package/dist/collection/components/q2-tag/q2-tag.js +65 -15
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +131 -341
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js +719 -0
- package/dist/collection/components/q2-tag/test/q2-tag-test.spec.js.map +1 -0
- package/dist/collection/components/q2-textarea/q2-textarea.css +2 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +0 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.js.map +1 -1
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane-types.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/utils/action-sheet.js.map +1 -1
- package/dist/collection/utils/charting.js.map +1 -1
- package/dist/collection/utils/helpers.js +1 -25
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/mirror-emit.js +19 -0
- package/dist/collection/utils/mirror-emit.js.map +1 -0
- package/dist/collection/utils/sanitize-html-string.js.map +1 -1
- package/dist/collection/utils/sanitize-regex-string.js.map +1 -1
- package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/utils/test/index.spec.js.map +1 -1
- package/dist/components/index.js +4 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +2 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -116
- package/dist/components/q2-action-group.js.map +1 -1
- package/dist/components/q2-action-group2.js +151 -0
- package/dist/components/q2-action-group2.js.map +1 -0
- package/dist/components/q2-action-sheet.js +2 -1362
- package/dist/components/q2-action-sheet.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-badge2.js +54 -16
- package/dist/components/q2-badge2.js.map +1 -1
- package/dist/components/q2-btn2.js +1 -1
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-calendar.js +1 -1
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-checkbox2.js +20 -20
- package/dist/components/q2-checkbox2.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +21 -2
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-file-picker.js +1 -1
- package/dist/components/q2-file-picker.js.map +1 -1
- package/dist/components/q2-form.d.ts +11 -0
- package/dist/components/q2-form.js +39 -0
- package/dist/components/q2-form.js.map +1 -0
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-input2.js +5 -4
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +2 -2
- package/dist/components/q2-legend2.js.map +1 -1
- package/dist/components/q2-list2.js +1 -1
- package/dist/components/q2-loc.js +22 -33
- package/dist/components/q2-loc.js.map +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-modal.d.ts +11 -0
- package/dist/components/q2-modal.js +231 -0
- package/dist/components/q2-modal.js.map +1 -0
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.js +7 -5
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +38 -26
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +2 -2
- package/dist/components/q2-resize-observer2.js.map +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +9 -5
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +50 -8
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +2 -2
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/q2-tooltip.js +1 -1
- package/dist/components/q2-tooltip.js.map +1 -1
- package/dist/components/sanitize-html-string.js +1364 -0
- package/dist/components/sanitize-html-string.js.map +1 -0
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/{index-504f1a9e.js → index-f2a66217.js} +3 -2
- package/dist/esm/index-f2a66217.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +45 -14
- package/dist/esm/q2-action-group.entry.js.map +1 -1
- package/dist/esm/q2-action-sheet.entry.js +3 -1363
- package/dist/esm/q2-action-sheet.entry.js.map +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_7.entry.js +59 -22
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +21 -21
- package/dist/esm/q2-checkbox.entry.js.map +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +22 -3
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +2 -2
- package/dist/esm/q2-file-picker.entry.js.map +1 -1
- package/dist/esm/q2-form.entry.js +19 -0
- package/dist/esm/q2-form.entry.js.map +1 -0
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-item_3.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js.map +1 -1
- package/dist/esm/q2-loc.entry.js +21 -27
- package/dist/esm/q2-loc.entry.js.map +1 -1
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +168 -0
- package/dist/esm/q2-modal.entry.js.map +1 -0
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list_2.entry.js +9 -7
- package/dist/esm/q2-option-list_2.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +37 -25
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js.map +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +10 -6
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tag.entry.js +51 -9
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/q2-tooltip.entry.js.map +1 -1
- package/dist/esm/sanitize-html-string-735c19f5.js +1364 -0
- package/dist/esm/sanitize-html-string-735c19f5.js.map +1 -0
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/jest.setup.js +22 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{index-504f1a9e.js → index-f2a66217.js} +9 -8
- package/dist/q2-tecton-elements/index-f2a66217.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +49 -17
- package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +121 -1331
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +199 -164
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +180 -180
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +92 -88
- package/dist/q2-tecton-elements/q2-checkbox.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +23 -6
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-form.entry.js +25 -0
- package/dist/q2-tecton-elements/q2-form.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-item_3.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-legend.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-legend.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +23 -32
- package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-modal.entry.js +226 -0
- package/dist/q2-tecton-elements/q2-modal.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js +33 -27
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +60 -40
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +38 -38
- package/dist/q2-tecton-elements/q2-pill.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +28 -28
- package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +5 -2
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-select.entry.js +13 -9
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-tag.entry.js +84 -45
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-textarea.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-tooltip.entry.js.map +1 -1
- package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js +1214 -0
- package/dist/q2-tecton-elements/sanitize-html-string-735c19f5.js.map +1 -0
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +5 -2
- package/dist/types/components/q2-badge/q2-badge.d.ts +17 -3
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +3 -3
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +8 -0
- package/dist/types/components/q2-form/q2-form.d.ts +6 -0
- package/dist/types/components/q2-loc/q2-loc.d.ts +5 -5
- package/dist/types/components/q2-modal/q2-modal.d.ts +80 -0
- package/dist/types/components/q2-option/q2-option.d.ts +11 -4
- package/dist/types/components/q2-select/q2-select.d.ts +1 -0
- package/dist/types/components/q2-tag/q2-tag.d.ts +19 -0
- package/dist/types/components.d.ts +193 -6
- package/dist/types/util.d.ts +1 -8
- package/dist/types/utils/helpers.d.ts +1 -13
- package/dist/types/utils/index.d.ts +3 -2
- package/dist/types/utils/mirror-emit.d.ts +11 -0
- package/package.json +3 -3
- package/dist/cjs/index-76f63767.js.map +0 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +0 -166
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +0 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +0 -1
- package/dist/esm/index-504f1a9e.js.map +0 -1
- package/dist/q2-tecton-elements/index-504f1a9e.js.map +0 -1
package/dist/esm/q2-loc.entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance,
|
|
2
|
-
import { l as loc } from './index-
|
|
1
|
+
import { r as registerInstance, g as getElement } from './index-7a5365e2.js';
|
|
2
|
+
import { l as loc } from './index-f2a66217.js';
|
|
3
3
|
|
|
4
4
|
const q2LocCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:inline}";
|
|
5
5
|
const Q2LocStyle0 = q2LocCss;
|
|
@@ -7,31 +7,27 @@ const Q2LocStyle0 = q2LocCss;
|
|
|
7
7
|
const Q2Loc = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
|
-
// #endregion
|
|
11
|
-
// #region Local Methods
|
|
12
10
|
this.initMutationObserver = () => {
|
|
11
|
+
if (!('MutationObserver' in window))
|
|
12
|
+
return;
|
|
13
13
|
const observer = new MutationObserver(this.mutationHandler);
|
|
14
14
|
observer.observe(this.hostElement, { childList: true, subtree: true, characterData: true });
|
|
15
15
|
this.mutationObserver = observer;
|
|
16
16
|
};
|
|
17
|
-
this.initValue =
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
this.propHandler();
|
|
17
|
+
this.initValue = () => {
|
|
18
|
+
const { hostTextContent } = this;
|
|
19
|
+
this.hostElement.textContent = null;
|
|
20
|
+
if (!this.value && hostTextContent) {
|
|
21
|
+
this.value = hostTextContent;
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
|
-
this.mutationHandler =
|
|
28
|
-
const
|
|
29
|
-
if (
|
|
30
|
-
this.value = textContent;
|
|
24
|
+
this.mutationHandler = () => {
|
|
25
|
+
const { hostTextContent } = this;
|
|
26
|
+
if (hostTextContent && this.translatedValue !== hostTextContent) {
|
|
31
27
|
this.hostElement.textContent = null;
|
|
28
|
+
this.value = hostTextContent;
|
|
32
29
|
}
|
|
33
30
|
};
|
|
34
|
-
this.displayValue = undefined;
|
|
35
31
|
this.substitutions = undefined;
|
|
36
32
|
this.value = undefined;
|
|
37
33
|
}
|
|
@@ -46,24 +42,22 @@ const Q2Loc = class {
|
|
|
46
42
|
this.initValue();
|
|
47
43
|
}
|
|
48
44
|
componentDidLoad() {
|
|
49
|
-
|
|
50
|
-
this.initMutationObserver();
|
|
45
|
+
this.initMutationObserver();
|
|
51
46
|
}
|
|
52
47
|
// #endregion
|
|
53
|
-
// #region
|
|
54
|
-
|
|
55
|
-
|
|
48
|
+
// #region Local Methods
|
|
49
|
+
get hostTextContent() {
|
|
50
|
+
return this.hostElement.textContent.trim();
|
|
51
|
+
}
|
|
52
|
+
get translatedValue() {
|
|
53
|
+
return loc(this.value, this.substitutions);
|
|
56
54
|
}
|
|
57
55
|
// #endregion
|
|
58
56
|
// #region Render Methods
|
|
59
57
|
render() {
|
|
60
|
-
return
|
|
58
|
+
return this.translatedValue;
|
|
61
59
|
}
|
|
62
60
|
get hostElement() { return getElement(this); }
|
|
63
|
-
static get watchers() { return {
|
|
64
|
-
"value": ["propHandler"],
|
|
65
|
-
"substitutions": ["propHandler"]
|
|
66
|
-
}; }
|
|
67
61
|
};
|
|
68
62
|
Q2Loc.style = Q2LocStyle0;
|
|
69
63
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-loc.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,8qBAA8qB,CAAC;AAChsB,oBAAe,QAAQ;;MCGV,KAAK
|
|
1
|
+
{"file":"q2-loc.entry.js","mappings":";;;AAAA,MAAM,QAAQ,GAAG,8qBAA8qB,CAAC;AAChsB,oBAAe,QAAQ;;MCGV,KAAK;;;QAqDd,yBAAoB,GAAG;YACnB,IAAI,EAAE,kBAAkB,IAAI,MAAM,CAAC;gBAAE,OAAO;YAC5C,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YAC5D,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YAC5F,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC;SACpC,CAAC;QAEF,cAAS,GAAG;YACR,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;YACjC,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;YACpC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,eAAe,EAAE;gBAChC,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;aAChC;SACJ,CAAC;QAEF,oBAAe,GAAG;YACd,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;YACjC,IAAI,eAAe,IAAI,IAAI,CAAC,eAAe,KAAK,eAAe,EAAE;gBAC7D,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;gBACpC,IAAI,CAAC,KAAK,GAAG,eAAe,CAAC;aAChC;SACJ,CAAC;;;;;;IA7CF,oBAAoB;;QAChB,MAAA,IAAI,CAAC,gBAAgB,0CAAE,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;KAChC;IAED,iBAAiB;QACb,IAAI,CAAC,SAAS,EAAE,CAAC;KACpB;IAED,gBAAgB;QACZ,IAAI,CAAC,oBAAoB,EAAE,CAAC;KAC/B;;;IAKD,IAAI,eAAe;QACf,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;KAC9C;IAED,IAAI,eAAe;QACf,OAAO,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC9C;;;IA4BD,MAAM;QACF,OAAO,IAAI,CAAC,eAAe,CAAC;KAC/B;;;;;;;","names":[],"sources":["src/components/q2-loc/q2-loc.scss?tag=q2-loc","src/components/q2-loc/q2-loc.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n\n:host {\n display: inline\n}","import { Element, Component, Prop } from '@stencil/core';\nimport { loc } from 'src/utils';\n\n@Component({ tag: 'q2-loc', shadow: false, styleUrl: 'q2-loc.scss' })\nexport class Q2Loc {\n // #region Own Properties\n\n mutationObserver: MutationObserver;\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region Public Property API\n\n /** Any substitutions you would like to pass into the localization string. */\n @Prop()\n substitutions: string[];\n\n /**\n * The reference to the localization key you would like to display the localized output of.\n * If no value is provided, any text inside the element will be used as a fallback.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true })\n value: string;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.mutationObserver = null;\n }\n\n componentWillLoad() {\n this.initValue();\n }\n\n componentDidLoad() {\n this.initMutationObserver();\n }\n\n // #endregion\n // #region Local Methods\n\n get hostTextContent(): string {\n return this.hostElement.textContent.trim();\n }\n\n get translatedValue(): string {\n return loc(this.value, this.substitutions);\n }\n\n initMutationObserver = () => {\n if (!('MutationObserver' in window)) return;\n const observer = new MutationObserver(this.mutationHandler);\n observer.observe(this.hostElement, { childList: true, subtree: true, characterData: true });\n this.mutationObserver = observer;\n };\n\n initValue = () => {\n const { hostTextContent } = this;\n this.hostElement.textContent = null;\n if (!this.value && hostTextContent) {\n this.value = hostTextContent;\n }\n };\n\n mutationHandler = () => {\n const { hostTextContent } = this;\n if (hostTextContent && this.translatedValue !== hostTextContent) {\n this.hostElement.textContent = null;\n this.value = hostTextContent;\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n return this.translatedValue;\n }\n\n // #endregion\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-7a5365e2.js';
|
|
2
|
-
import { o as overrideFocus, i as isEventFromElement, n as nextPaint, t as isFirefox, l as loc } from './index-
|
|
2
|
+
import { o as overrideFocus, i as isEventFromElement, n as nextPaint, t as isFirefox, l as loc } from './index-f2a66217.js';
|
|
3
3
|
|
|
4
4
|
const q2MessageCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host([hidden]){display:none}.message{border-left-width:var(--tct-message-bar-width, var(--t-message-bar-width, var(--app-scale-1x, 5px)));border-left-style:solid;--comp-line-height:var(--tct-message-line-height, var(--t-message-line-height, var(--app-line-height, 1.428571429em)));display:grid;gap:var(--tct-scale-1, var(--app-scale-1x, 5px));align-items:flex-start;background:var(--tct-message-background, var(--tct-message-bg, var(--t-message-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, #f2f2f2)))))));color:var(--tct-message-font-color, var(--t-message-font-color, inherit));box-shadow:var(--tct-message-box-shadow, var(--t-message-box-shadow, inherit));border-radius:var(--tct-message-border-radius, var(--t-message-border-radius, inherit))}.message:focus{box-shadow:var(--const-global-focus)}.message-icon{--comp-top-offset:calc(calc(var(--comp-line-height) - var(--comp-icon-size)) / 2);--tct-icon-size:var(--comp-icon-size);top:var(--comp-top-offset);margin-bottom:calc(var(--comp-top-offset) * -1)}.message-content{flex:1;line-height:var(--comp-line-height)}::slotted(ul){--comp-list-default-padding:0 0 0 var(--app-scale-3x, 15px);padding:var(--tct-message-list-padding, var(--comp-list-default-padding))}:host(:not([appearance])),:host([appearance=standard]){--comp-default-margin:var(--app-scale-3x, 5px) 0;margin:var(--tct-message-margin, var(--comp-default-margin))}:host(:not([appearance])) .message,:host([appearance=standard]) .message{--comp-icon-size:var(--tct-message-icon-size, var(--t-message-icon-size, 24px));--comp-padding:var(--tct-message-padding, var(--t-message-padding, var(--app-scale-3x, 15px)));grid-template-columns:var(--comp-icon-size) 1fr;padding:var(--comp-padding);padding-left:calc(var(--comp-padding) - var(--tct-scale-2, var(--app-scale-2x, 10px)));padding-bottom:calc(var(--comp-padding) - var(--tct-scale-1, var(--app-scale-1x, 5px)))}:host(:not([appearance])) ::slotted(ul),:host([appearance=standard]) ::slotted(ul){--comp-list-default-margin:var(--app-scale-3x, 15px) 0;margin:var(--tct-message-list-margin, var(--comp-list-default-margin))}:host([appearance=minimal]){margin:0}:host([appearance=minimal]) .message{padding:var(--tct-message-minimal-padding, var(--t-message-minimal-padding, var(--app-scale-2x, 10px)));grid-template-columns:1fr}:host([appearance=minimal]) ::slotted(ul){margin:var(--tct-scale-1, var(--app-scale-1x, 5px)) 0}:host(:not([type])) .message,:host([type=info]) .message{border-left-color:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))}:host(:not([type])) .message-icon,:host([type=info]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1));--tct-icon-stroke-secondary:var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))}:host([type=success]) .message{border-left-color:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00))}:host([type=success]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00));--tct-icon-stroke-secondary:var(--tct-stoplight-success, var(--const-stoplight-success, #0e8a00))}:host([type=warning]) .message{border-left-color:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500))}:host([type=warning]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500));--tct-icon-stroke-secondary:var(--tct-stoplight-warning, var(--const-stoplight-warning, #c35500))}:host([type=error]) .message,:host([type=danger]) .message{border-left-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a))}:host([type=error]) .message-icon,:host([type=danger]) .message-icon{--tct-icon-stroke-primary:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));--tct-icon-stroke-secondary:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a))}";
|
|
5
5
|
const Q2MessageStyle0 = q2MessageCss;
|
|
@@ -62,7 +62,7 @@ const Q2Message = class {
|
|
|
62
62
|
const addDivForAriaLive = !isFirefox && this.presentToggle;
|
|
63
63
|
const { description } = this;
|
|
64
64
|
const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
|
|
65
|
-
return (h("div", { key: '
|
|
65
|
+
return (h("div", { key: 'ccca9e80908f73482c73f865743e5f7cd6438d99', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: 'a9937495e83a7e0852034c36639d8c60ea3c30ac', class: "sr" }), h("div", { key: 'e650f7ef7c2544e44f63ce7a23f33f04145a7e83', class: "sr message-label" }, messageLabel), h("div", { key: 'daa66069373ac3030fb33dc3c88c0621c91bb6a4', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '464a52a941be194c1267beee2c1b307ece17f964' }))));
|
|
66
66
|
}
|
|
67
67
|
get hostElement() { return getElement(this); }
|
|
68
68
|
};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7a5365e2.js';
|
|
2
|
+
import { p as debounce, w as waitForNextPaint, e as hasSlotContent } from './index-f2a66217.js';
|
|
3
|
+
import { s as sanitizeHTMLString } from './sanitize-html-string-735c19f5.js';
|
|
4
|
+
|
|
5
|
+
const q2ModalCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}@keyframes showBackdrop{from{opacity:0}}@keyframes hideBackdrop{to{opacity:0}}dialog{--comp-border-radius-default:var(--app-scale-3x, 15px);--comp-border-radius:var(--tct-modal-border-radius, var(--comp-border-radius-default));--comp-desktop-border-radius:var(--tct-modal-border-radius, var(--app-scale-3x, 15px));--comp-close-button-size:var(--tct-modal-close-button-size, var(--t-a11y-min-size, 44px));--comp-header-height:var(--tct-modal-header-height, var(--t-a11y-min-size, 44px));--comp-dialog-background:var(--tct-modal-background, var(--t-base, #ffffff));--comp-dialog-color:var(--tct-modal-color, var(--t-text, #4d4d4d));--comp-dialog-padding:var(--tct-modal-padding, var(--app-scale-3x, 15px));--comp-content-gradient-height:var(--tct-modal-content-gradient-height, var(--app-scale-2x, 10px));--comp-dialog-gap:var(--tct-modal-gap, var(--app-scale-2x, 10px));--comp-dialog-max-width:var(--tct-modal-max-width, 600px);--comp-dialog-max-height:var(--tct-modal-max-height, 100vh);--comp-dialog-min-height:var(--tct-modal-min-height, 40vh);--comp-dialog-box-shadow:var(--tct-modal-box-shadow, var(--app-shadow-2, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14)));position:fixed;top:100%;bottom:unset;color:var(--comp-dialog-color);background:var(--comp-dialog-background);transition:transform var(--tct-modal-tween, var(--app-tween-2, 0.4s ease)), opacity var(--tct-modal-tween, var(--app-tween-2, 0.4s ease));width:100%;max-width:var(--comp-dialog-max-width);border:0;border-radius:var(--comp-border-radius);box-shadow:var(--comp-dialog-box-shadow);padding:0;height:auto;overflow:hidden}dialog::backdrop{opacity:0;background:var(--tct-modal-backdrop-background, var(--t-top-a2, rgba(13, 13, 13, 0.6)))}dialog[open]{border-radius:var(--comp-desktop-border-radius);top:0px;bottom:0px;height:fit-content;transform:translateY(10%);opacity:1}dialog[open].is-opening,dialog[open].is-open{opacity:1;transform:translateY(0)}dialog[open].is-opening::backdrop,dialog[open].is-open::backdrop{opacity:1;animation:showBackdrop var(--tct-modal-tween, var(--app-tween-2, 0.4s ease))}dialog[open].is-closing{transform:translateY(10%)}dialog[open].is-closing::backdrop{animation:hideBackdrop var(--tct-modal-tween, var(--app-tween-2, 0.4s ease))}.content{overflow-y:auto;--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 4px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.content::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.content::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.content::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.content .icon{height:var(--tct-modal-icon-size, var(--app-scale-9x, 45px));margin:var(--tct-modal-icon-margin, var(--app-scale-2x, 10px));display:flex;justify-content:center}.content .icon q2-icon{width:var(--tct-modal-icon-size, var(--app-scale-9x, 45px))}.content .image{display:flex;justify-content:center}.content .image img{width:100%;border-radius:var(--tct-modal-image-border-radius, var(--app-border-radius-2, 8px))}.content .message{font-size:1rem}.content.more-gradient{-webkit-mask-image:linear-gradient(to bottom, red 85%, transparent 100%);mask-image:linear-gradient(to bottom, red 85%, transparent 100%)}.interior{display:grid;min-height:var(--comp-dialog-min-height);grid-template-rows:auto 1fr auto;gap:var(--comp-dialog-gap);max-height:calc(var(--comp-dialog-max-height) - var(--comp-dialog-padding));padding:var(--comp-dialog-padding)}.interior.is-list header,.interior.is-list footer{position:relative}.interior.is-list header:before,.interior.is-list footer:before{content:\"\";display:block;position:absolute;left:0;height:var(--comp-content-gradient-height);width:100%;z-index:1}header{display:flex;justify-content:space-between}header .title{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;text-align:left;font-weight:var(--tct-modal-title-font-weight, 400);margin:0;padding-top:0.5rem}header .btn-close{grid-area:close;width:var(--comp-close-button-size);height:var(--comp-close-button-size)}";
|
|
6
|
+
const Q2ModalStyle0 = q2ModalCss;
|
|
7
|
+
|
|
8
|
+
const Q2Modal = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.tctClick = createEvent(this, "tctClick", 7);
|
|
12
|
+
this.tctClose = createEvent(this, "tctClose", 7);
|
|
13
|
+
this.tctOpen = createEvent(this, "tctOpen", 7);
|
|
14
|
+
this.tctReady = createEvent(this, "tctReady", 3);
|
|
15
|
+
// #region Own Properties
|
|
16
|
+
// to prevent background scroll when modal scrolls
|
|
17
|
+
this.bodyOverflow = '';
|
|
18
|
+
this.scheduledAfterRender = [];
|
|
19
|
+
// #endregion
|
|
20
|
+
// #region Local Methods
|
|
21
|
+
// to be removed
|
|
22
|
+
this.iconStyle = () => {
|
|
23
|
+
const styleObject = {};
|
|
24
|
+
if (this.iconStrokePrimary)
|
|
25
|
+
styleObject['--tct-icon-stroke-primary'] = this.iconStrokePrimary;
|
|
26
|
+
if (this.iconStrokeSecondary)
|
|
27
|
+
styleObject['--tct-icon-stroke-secondary'] = this.iconStrokeSecondary;
|
|
28
|
+
if (this.iconFillColor)
|
|
29
|
+
styleObject['--tct-icon-fill'] = this.iconFillColor;
|
|
30
|
+
if (this.iconStrokeWidth)
|
|
31
|
+
styleObject['--tct-icon-stroke-width'] = this.iconStrokeWidth;
|
|
32
|
+
return styleObject;
|
|
33
|
+
};
|
|
34
|
+
this.initializeModal = () => {
|
|
35
|
+
// limits 4 buttons in action slot
|
|
36
|
+
this.hostElement.querySelectorAll('[slot="action"]').forEach((el, i) => {
|
|
37
|
+
if (i >= this.maxActionButtons) {
|
|
38
|
+
console.warn(`q2-modal allows up to ${this.maxActionButtons} action buttons, [${el.getAttribute('label') || el.textContent}] button is now hidden.`);
|
|
39
|
+
el.hidden = true;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this.contentElement.scrollTo({ top: 0 });
|
|
43
|
+
this.debouncedScroll();
|
|
44
|
+
};
|
|
45
|
+
this.onCancel = (event) => {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
this.closeModal();
|
|
48
|
+
};
|
|
49
|
+
this.onClick = (event) => {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
const eventTarget = event.target;
|
|
52
|
+
if (!(eventTarget instanceof HTMLElement))
|
|
53
|
+
return;
|
|
54
|
+
const slot = eventTarget.getAttribute('slot');
|
|
55
|
+
if (slot === 'action') {
|
|
56
|
+
this.tctClick.emit({ value: eventTarget.dataset.value });
|
|
57
|
+
this.onCancel(event);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const isInContent = !!eventTarget.closest('.interior , q2-modal');
|
|
61
|
+
if (isInContent)
|
|
62
|
+
return;
|
|
63
|
+
this.onCancel(event);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.onContentScroll = () => {
|
|
67
|
+
var _a;
|
|
68
|
+
const scrollHeight = this.contentElement.scrollHeight;
|
|
69
|
+
const scrollTop = Math.ceil(this.contentElement.scrollTop);
|
|
70
|
+
const contentHeight = Math.ceil(((_a = this.contentElement.getBoundingClientRect()) === null || _a === void 0 ? void 0 : _a.height) || 0);
|
|
71
|
+
// to show bottom gradient when more contents available
|
|
72
|
+
if (scrollHeight > contentHeight) {
|
|
73
|
+
scrollHeight <= contentHeight + scrollTop
|
|
74
|
+
? this.contentElement.classList.remove('more-gradient')
|
|
75
|
+
: this.contentElement.classList.add('more-gradient');
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.contentElement.classList.remove('more-gradient');
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
this.maxActionButtons = 4;
|
|
82
|
+
this.renderStatus = 'is-closing';
|
|
83
|
+
this.closable = true;
|
|
84
|
+
this.customMarkup = undefined;
|
|
85
|
+
this.description = undefined;
|
|
86
|
+
this.icon = undefined;
|
|
87
|
+
this.iconFillColor = undefined;
|
|
88
|
+
this.iconStrokePrimary = undefined;
|
|
89
|
+
this.iconStrokeSecondary = undefined;
|
|
90
|
+
this.iconStrokeWidth = undefined;
|
|
91
|
+
this.imageSrc = undefined;
|
|
92
|
+
this.title = undefined;
|
|
93
|
+
}
|
|
94
|
+
// #endregion
|
|
95
|
+
// #region Component Lifecycle Events
|
|
96
|
+
disconnectedCallback() {
|
|
97
|
+
var _a;
|
|
98
|
+
this.dialogElement.removeEventListener('cancel', this.onCancel);
|
|
99
|
+
(_a = this.contentElement) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', this.debouncedScroll);
|
|
100
|
+
}
|
|
101
|
+
componentDidLoad() {
|
|
102
|
+
this.dialogElement.addEventListener('cancel', this.onCancel);
|
|
103
|
+
this.tctReady.emit();
|
|
104
|
+
this.bodyOverflow = document.body.style.overflow;
|
|
105
|
+
this.debouncedScroll = debounce(this.onContentScroll, 100);
|
|
106
|
+
this.contentElement.addEventListener('scroll', this.debouncedScroll);
|
|
107
|
+
}
|
|
108
|
+
componentDidRender() {
|
|
109
|
+
var _a;
|
|
110
|
+
(_a = this.scheduledAfterRender) === null || _a === void 0 ? void 0 : _a.forEach(fn => fn());
|
|
111
|
+
this.scheduledAfterRender = [];
|
|
112
|
+
}
|
|
113
|
+
// #endregion
|
|
114
|
+
// #region Public Methods API
|
|
115
|
+
async closeModal(data) {
|
|
116
|
+
this.tctClose.emit(data);
|
|
117
|
+
this.renderStatus = 'is-closing';
|
|
118
|
+
document.body.style.overflow = this.bodyOverflow;
|
|
119
|
+
this.dialogElement.addEventListener('transitionend', () => {
|
|
120
|
+
if (this.renderStatus !== 'is-closing')
|
|
121
|
+
return;
|
|
122
|
+
this.dialogElement.close();
|
|
123
|
+
this.renderStatus = null;
|
|
124
|
+
}, { once: true });
|
|
125
|
+
}
|
|
126
|
+
async openModal(option) {
|
|
127
|
+
var _a;
|
|
128
|
+
if ((_a = this.dialogElement) === null || _a === void 0 ? void 0 : _a.open)
|
|
129
|
+
return;
|
|
130
|
+
this.tctOpen.emit(option);
|
|
131
|
+
await waitForNextPaint();
|
|
132
|
+
// overwrite the properties if option provided
|
|
133
|
+
if (option) {
|
|
134
|
+
this.title = (option === null || option === void 0 ? void 0 : option.title) || this.title;
|
|
135
|
+
this.description = (option === null || option === void 0 ? void 0 : option.description) || this.description;
|
|
136
|
+
this.imageSrc = (option === null || option === void 0 ? void 0 : option.imageSrc) || this.imageSrc;
|
|
137
|
+
this.icon = (option === null || option === void 0 ? void 0 : option.icon) || this.icon;
|
|
138
|
+
this.iconStrokePrimary = (option === null || option === void 0 ? void 0 : option.iconStrokePrimary) || this.iconStrokePrimary;
|
|
139
|
+
this.iconStrokeSecondary = (option === null || option === void 0 ? void 0 : option.imageSrc) || this.imageSrc;
|
|
140
|
+
this.iconFillColor = (option === null || option === void 0 ? void 0 : option.iconFillColor) || this.iconFillColor;
|
|
141
|
+
this.iconStrokeWidth = (option === null || option === void 0 ? void 0 : option.iconStrokeWidth) || this.iconStrokeWidth;
|
|
142
|
+
this.description = (option === null || option === void 0 ? void 0 : option.description) || this.description;
|
|
143
|
+
}
|
|
144
|
+
this.dialogElement.showModal();
|
|
145
|
+
this.dialogElement.open = true;
|
|
146
|
+
document.body.style.overflow = 'hidden';
|
|
147
|
+
this.initializeModal();
|
|
148
|
+
this.renderStatus = 'is-opening';
|
|
149
|
+
this.dialogElement.addEventListener('transitionend', () => {
|
|
150
|
+
if (this.renderStatus !== 'is-opening')
|
|
151
|
+
return;
|
|
152
|
+
this.renderStatus = 'is-open';
|
|
153
|
+
}, { once: true });
|
|
154
|
+
}
|
|
155
|
+
// #endregion
|
|
156
|
+
// #region Render Methods
|
|
157
|
+
render() {
|
|
158
|
+
const interiorClasses = `interior`;
|
|
159
|
+
const renderStatus = `${this.renderStatus || ''}`;
|
|
160
|
+
return (h("dialog", { key: '73f146b4e163c9395837b932588870487645b6ce', ref: el => (this.dialogElement = el), class: renderStatus, onClick: this.onClick }, h("div", { key: '4219e99c0186ffe1a7e0d3a9e81334adb02a4979', class: interiorClasses }, this.title && (h("header", { key: '77d134b2d00f7e4221b25917ab46714446c19b22' }, this.title && h("h2", { key: '0f43942c22bd5b9ca7784bcd4c637c6fc3fb1203', class: "title" }, this.title), !!this.closable && (h("q2-btn", { key: '6dcf3f2a05cf76a78cf8e2fddd4566d88ddb7421', class: "btn-close", "test-id": "btnClose", onClick: this.onCancel, label: "tecton.element.modal.close", "hide-label": true }, h("q2-icon", { key: '8cdf1b3e2b4990547381f04527e0ca3116802949', type: "close" }))))), h("div", { key: 'e1bcef9f5eca9e2f4504abbbd4d90ba690e4a6d2', class: "content", ref: el => (this.contentElement = el) }, this.icon && (h("div", { key: '0bd5d3ca0d3f13c3879b752202697841fffabf94', class: "icon" }, h("q2-icon", { key: 'f236ba5a6f0b14fa865ace8f69813634fa65494c', type: this.icon, style: this.iconStyle() }))), this.imageSrc && (h("div", { key: '9c2978ebff4bdc67930fe2a5232b5fb92822e3c9', class: "image" }, h("img", { key: '6c5ac47ad9f780e6496b3c8464f003a7f76cbb58', src: this.imageSrc }))), hasSlotContent(this.hostElement, 'content') && h("slot", { key: 'cd4bb02b38c02115a5c8601cc0c4371cbe01611d', name: "content" }), this.description && h("p", { key: 'e94d10a5b24629b9a8c965b28a5b439a83e1324b', class: "description" }, this.description), this.customMarkup && (h("p", { key: 'cfc781b852faeba9d089355a92809873f0efdda0', class: "customMarkup", innerHTML: sanitizeHTMLString(this.customMarkup) }))), h("footer", { key: '57c18d04f08e1e00bf3e869d84e8e2f9d8901ae5' }, h("q2-action-group", { key: '9f27a49f45568166416acf2a9df83d3d0da58cb2', "full-width": true }, h("slot", { key: '64a30e7f6ebaf5f5b99264235d5510835826f566', name: "action" }))))));
|
|
161
|
+
}
|
|
162
|
+
get hostElement() { return getElement(this); }
|
|
163
|
+
};
|
|
164
|
+
Q2Modal.style = Q2ModalStyle0;
|
|
165
|
+
|
|
166
|
+
export { Q2Modal as q2_modal };
|
|
167
|
+
|
|
168
|
+
//# sourceMappingURL=q2-modal.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"q2-modal.entry.js","mappings":"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","names":[],"sources":["src/components/q2-modal/q2-modal.scss?tag=q2-modal&encapsulation=shadow","src/components/q2-modal/q2-modal.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n@keyframes showBackdrop {\n from {\n opacity: 0;\n }\n}\n\n@keyframes hideBackdrop {\n to {\n opacity: 0;\n }\n}\n\n// CSS variables don't inherit into the ::backdrop pseudo-element\n$animation-tween: #{var-list(--tct-modal-tween, --app-tween-2, unquote('0.4s ease'))};\n\ndialog {\n --comp-border-radius-default: var(--app-scale-3x, 15px);\n --comp-border-radius: #{var-list(--tct-modal-border-radius, --comp-border-radius-default)};\n --comp-desktop-border-radius: #{var-list(--tct-modal-border-radius, --app-scale-3x, 15px)};\n --comp-close-button-size: #{var-list(--tct-modal-close-button-size, --t-a11y-min-size, 44px)};\n --comp-header-height: #{var-list(--tct-modal-header-height, --t-a11y-min-size, 44px)};\n --comp-dialog-background: #{var-list(--tct-modal-background, --t-base, #ffffff)};\n --comp-dialog-color: #{var-list(--tct-modal-color, --t-text, #4d4d4d)};\n --comp-dialog-padding: #{var-list(--tct-modal-padding, --app-scale-3x, 15px)};\n --comp-content-gradient-height: #{var-list(--tct-modal-content-gradient-height, --app-scale-2x, 10px)};\n --comp-dialog-gap: #{var-list(--tct-modal-gap, --app-scale-2x, 10px)};\n --comp-dialog-max-width: #{var-list(--tct-modal-max-width, 600px)};\n --comp-dialog-max-height: #{var-list(--tct-modal-max-height, 100vh)}; // should not use vh in the extension\n --comp-dialog-min-height: #{var-list(--tct-modal-min-height, 40vh)};\n --comp-dialog-box-shadow: #{var-list(\n --tct-modal-box-shadow,\n --app-shadow-2,\n unquote(\"0px 0px 2px rgba(0, 0, 0, 0.12), 0px 4px 8px rgba(0, 0, 0, 0.14)\")\n )};\n\n position: fixed;\n top: 100%;\n bottom: unset;\n color: var(--comp-dialog-color);\n background: var(--comp-dialog-background);\n transition: transform $animation-tween, opacity $animation-tween;\n width: 100%;\n max-width: var(--comp-dialog-max-width);\n border: 0;\n border-radius: var(--comp-border-radius);\n box-shadow: var(--comp-dialog-box-shadow);\n padding: 0;\n height: auto;\n overflow: hidden;\n &::backdrop {\n opacity: 0;\n background: var-list(--tct-modal-backdrop-background, --t-top-a2, rgba(13, 13, 13, 0.6));\n }\n\n &[open] {\n border-radius: var(--comp-desktop-border-radius);\n top: 0px;\n bottom: 0px;\n height: fit-content;\n transform: translateY(10%);\n opacity: 1;\n\n &.is-opening,\n &.is-open {\n opacity: 1;\n transform: translateY(0);\n &::backdrop {\n opacity: 1;\n animation: showBackdrop $animation-tween;\n }\n }\n\n &.is-closing {\n transform: translateY(10%);\n\n &::backdrop {\n animation: hideBackdrop $animation-tween;\n }\n }\n }\n}\n\n.content {\n overflow-y: auto;\n @include tiny-scrollbar();\n\n .icon {\n height: var-list(--tct-modal-icon-size --app-scale-9x, 45px);\n margin: var-list(--tct-modal-icon-margin, --app-scale-2x, 10px);\n display: flex;\n justify-content: center;\n q2-icon {\n width: var-list(--tct-modal-icon-size --app-scale-9x, 45px);\n }\n }\n .image {\n display: flex;\n justify-content: center;\n img {\n width: 100%;\n border-radius: var-list(--tct-modal-image-border-radius, --app-border-radius-2, 8px);\n }\n }\n .message {\n font-size: 1rem;\n }\n &.more-gradient {\n -webkit-mask-image: linear-gradient(to bottom, red 85%, transparent 100%);\n mask-image: linear-gradient(to bottom, red 85%, transparent 100%);\n }\n}\n\n.interior {\n display: grid;\n min-height: var(--comp-dialog-min-height);\n grid-template-rows: auto 1fr auto;\n gap: var(--comp-dialog-gap);\n max-height: calc(var(--comp-dialog-max-height) - var(--comp-dialog-padding));\n padding: var(--comp-dialog-padding);\n\n &.is-list {\n header,\n footer {\n position: relative;\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n height: var(--comp-content-gradient-height);\n width: 100%;\n z-index: 1;\n }\n }\n }\n}\n\nheader {\n display: flex;\n justify-content: space-between;\n .title {\n @include line-clamp(3);\n text-align: left;\n font-weight: var-list(--tct-modal-title-font-weight, 400);\n margin: 0;\n padding-top: 0.5rem;\n }\n\n .btn-close {\n grid-area: close;\n width: var(--comp-close-button-size);\n height: var(--comp-close-button-size);\n }\n}\n","import { Component, ComponentInterface, Prop, Method, h, State, Event, EventEmitter, Element } from '@stencil/core';\nimport { ModalOption, ModalResponse } from 'q2-tecton-common/lib/utility/modal';\nimport { debounce, hasSlotContent, waitForNextPaint } from 'src/utils';\nimport sanitizeHTMLString from '@/utils/sanitize-html-string';\n\n@Component({ tag: 'q2-modal', shadow: true, styleUrl: 'q2-modal.scss' })\nexport class Q2Modal implements ComponentInterface {\n // #region Own Properties\n\n // to prevent background scroll when modal scrolls\n bodyOverflow: string = '';\n contentElement: HTMLDivElement;\n debouncedScroll: () => void;\n dialogElement: HTMLDialogElement;\n scheduledAfterRender: (() => void)[] = [];\n\n // #endregion\n // #region Host HTML Element\n\n @Element()\n hostElement: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n @State()\n maxActionButtons: number = 4;\n\n @State()\n renderStatus: 'is-open' | 'is-closing' | 'is-opening' = 'is-closing';\n\n // #endregion\n // #region Public Property API\n\n /**\n * Controls visibility of close button on top right corner.\n */\n @Prop({ reflect: true })\n closable: boolean = true;\n\n /**\n * Allows HTML markup as modal content, but it'll be sanitized as needed for security purpose.\n */\n @Prop()\n customMarkup: string;\n\n /**\n * Plain text, description of the modal.\n */\n @Prop()\n description: string;\n\n /**\n * Icon type, [See Icon document](https://tecton.q2developer.com/design-system/q2-icon).\n */\n @Prop()\n icon: string;\n\n /**\n * Icon fill color, [See Icon document](https://tecton.q2developer.com/design-system/q2-icon).\n */\n @Prop()\n iconFillColor: string;\n\n /**\n * Icon primary stroke color, [See Icon document](https://tecton.q2developer.com/design-system/q2-icon).\n */\n @Prop()\n iconStrokePrimary: string;\n\n /**\n * Icon secondary stroke color, [See Icon document](https://tecton.q2developer.com/design-system/q2-icon).\n */\n @Prop()\n iconStrokeSecondary: string;\n\n /**\n * Icon secondary stroke width, [See Icon document](https://tecton.q2developer.com/design-system/q2-icon).\n */\n @Prop()\n iconStrokeWidth: string;\n\n /**\n * Image URL in modal content, it renders with 100% width.\n */\n @Prop({ reflect: true })\n imageSrc: string;\n\n /**\n * Plain text, title of the modal on top area.\n */\n @Prop({ mutable: true, reflect: true })\n title: string;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when one of action button is clicked.\n */\n @Event()\n tctClick: EventEmitter;\n\n /**\n * Emitted when modal is closed.\n */\n @Event()\n tctClose: EventEmitter;\n\n /**\n * Emitted when the modal is opened.\n */\n @Event()\n tctOpen: EventEmitter;\n\n /**\n * Emitted when the modal has finished rendering.\n * @private\n */\n @Event({ bubbles: false })\n tctReady: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.dialogElement.removeEventListener('cancel', this.onCancel);\n this.contentElement?.removeEventListener('scroll', this.debouncedScroll);\n }\n\n componentDidLoad() {\n this.dialogElement.addEventListener('cancel', this.onCancel);\n this.tctReady.emit();\n this.bodyOverflow = document.body.style.overflow;\n this.debouncedScroll = debounce(this.onContentScroll, 100);\n this.contentElement.addEventListener('scroll', this.debouncedScroll);\n }\n\n componentDidRender(): void {\n this.scheduledAfterRender?.forEach(fn => fn());\n this.scheduledAfterRender = [];\n }\n\n // #endregion\n // #region Public Methods API\n\n @Method()\n async closeModal(data?: ModalResponse) {\n this.tctClose.emit(data);\n this.renderStatus = 'is-closing';\n document.body.style.overflow = this.bodyOverflow;\n this.dialogElement.addEventListener(\n 'transitionend',\n () => {\n if (this.renderStatus !== 'is-closing') return;\n this.dialogElement.close();\n this.renderStatus = null;\n },\n { once: true }\n );\n }\n\n @Method()\n async openModal(option?: ModalOption) {\n if (this.dialogElement?.open) return;\n this.tctOpen.emit(option);\n await waitForNextPaint();\n // overwrite the properties if option provided\n if (option) {\n this.title = option?.title || this.title;\n this.description = option?.description || this.description;\n this.imageSrc = option?.imageSrc || this.imageSrc;\n this.icon = option?.icon || this.icon;\n this.iconStrokePrimary = option?.iconStrokePrimary || this.iconStrokePrimary;\n this.iconStrokeSecondary = option?.imageSrc || this.imageSrc;\n this.iconFillColor = option?.iconFillColor || this.iconFillColor;\n this.iconStrokeWidth = option?.iconStrokeWidth || this.iconStrokeWidth;\n this.description = option?.description || this.description;\n }\n this.dialogElement.showModal();\n this.dialogElement.open = true;\n document.body.style.overflow = 'hidden';\n this.initializeModal();\n this.renderStatus = 'is-opening';\n this.dialogElement.addEventListener(\n 'transitionend',\n () => {\n if (this.renderStatus !== 'is-opening') return;\n this.renderStatus = 'is-open';\n },\n { once: true }\n );\n }\n\n // #endregion\n // #region Local Methods\n\n // to be removed\n\n iconStyle = () => {\n const styleObject = {};\n if (this.iconStrokePrimary) styleObject['--tct-icon-stroke-primary'] = this.iconStrokePrimary;\n if (this.iconStrokeSecondary) styleObject['--tct-icon-stroke-secondary'] = this.iconStrokeSecondary;\n if (this.iconFillColor) styleObject['--tct-icon-fill'] = this.iconFillColor;\n if (this.iconStrokeWidth) styleObject['--tct-icon-stroke-width'] = this.iconStrokeWidth;\n return styleObject;\n };\n\n initializeModal = () => {\n // limits 4 buttons in action slot\n this.hostElement.querySelectorAll<HTMLElement>('[slot=\"action\"]').forEach((el, i) => {\n if (i >= this.maxActionButtons) {\n console.warn(\n `q2-modal allows up to ${this.maxActionButtons} action buttons, [${el.getAttribute('label') || el.textContent}] button is now hidden.`\n );\n el.hidden = true;\n }\n });\n this.contentElement.scrollTo({ top: 0 });\n this.debouncedScroll();\n };\n\n onCancel = (event: Event) => {\n event.preventDefault();\n this.closeModal();\n };\n\n onClick = (event: MouseEvent) => {\n event.stopPropagation();\n const eventTarget = event.target as HTMLElement;\n if (!(eventTarget instanceof HTMLElement)) return;\n const slot = eventTarget.getAttribute('slot');\n if (slot === 'action') {\n this.tctClick.emit({ value: eventTarget.dataset.value });\n this.onCancel(event);\n } else {\n const isInContent = !!eventTarget.closest('.interior , q2-modal');\n if (isInContent) return;\n this.onCancel(event);\n }\n };\n\n onContentScroll = () => {\n const scrollHeight = this.contentElement.scrollHeight;\n const scrollTop = Math.ceil(this.contentElement.scrollTop);\n const contentHeight = Math.ceil(this.contentElement.getBoundingClientRect()?.height || 0);\n // to show bottom gradient when more contents available\n if (scrollHeight > contentHeight) {\n scrollHeight <= contentHeight + scrollTop\n ? this.contentElement.classList.remove('more-gradient')\n : this.contentElement.classList.add('more-gradient');\n } else {\n this.contentElement.classList.remove('more-gradient');\n }\n };\n\n // #endregion\n // #region Render Methods\n\n render() {\n const interiorClasses = `interior`;\n const renderStatus = `${this.renderStatus || ''}`;\n return (\n <dialog\n ref={el => (this.dialogElement = el)}\n class={renderStatus}\n onClick={this.onClick}\n >\n <div class={interiorClasses}>\n {this.title && (\n <header>\n {this.title && <h2 class=\"title\">{this.title}</h2>}\n {!!this.closable && (\n <q2-btn\n class=\"btn-close\"\n test-id=\"btnClose\"\n onClick={this.onCancel}\n label=\"tecton.element.modal.close\"\n hide-label\n >\n <q2-icon type=\"close\" />\n </q2-btn>\n )}\n </header>\n )}\n <div\n class=\"content\"\n ref={el => (this.contentElement = el)}\n >\n {this.icon && (\n <div class=\"icon\">\n <q2-icon\n type={this.icon}\n style={this.iconStyle()}\n ></q2-icon>\n </div>\n )}\n {this.imageSrc && (\n <div class=\"image\">\n <img src={this.imageSrc}></img>\n </div>\n )}\n {hasSlotContent(this.hostElement, 'content') && <slot name=\"content\"></slot>}\n {this.description && <p class=\"description\">{this.description}</p>}\n {this.customMarkup && (\n <p\n class=\"customMarkup\"\n innerHTML={sanitizeHTMLString(this.customMarkup)}\n ></p>\n )}\n </div>\n <footer>\n <q2-action-group full-width>\n <slot name=\"action\"></slot>\n </q2-action-group>\n </footer>\n </div>\n </dialog>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-7a5365e2.js';
|
|
2
|
-
import { l as loc, o as overrideFocus } from './index-
|
|
2
|
+
import { l as loc, o as overrideFocus } from './index-f2a66217.js';
|
|
3
3
|
|
|
4
4
|
const q2MonthPickerCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.month-container{--comp-month-primary-background:var(--tct-btn-primary-background, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)));--comp-month-primary-font-color:var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--tct-white, var(--app-white, #ffffff))));--comp-month-primary-background:var(--tct-btn-secondary-background, var(--tct-btn-secondary-bg, var(--t-button-default-bg, #cccccc)));--comp-month-secondary-font-color:var(--tct-btn-secondary-font-color, var(--t-btn-secondary-font-color, var(--t-button-default-font-color, #2e2e2e)))}.month-container .navigation{display:flex;justify-content:space-between;flex-direction:row}.month-container .navigation .year-btn{padding:0 1rem;display:flex;align-items:center}.month-container .navigation .year-btn .year{margin-right:0.2rem}.month-container .navigation .year-btn .year-icon{--t-icon-stroke-width:2px;width:16px;height:16px;transition:all 0.3s ease-in-out}.month-container .navigation .year-btn .year-icon.on{transform:rotate(-180deg)}.month-container .navigation .month-controller{display:flex;align-items:center}.month-container .month-list{display:grid;grid-template-columns:auto auto auto}.month-container .month-list .month{display:flex;justify-content:center;align-items:center;padding:0.5rem 0}.month-container .month-list .month .month-button{border-radius:50%;aspect-ratio:1;width:50px;display:flex;justify-content:center;align-items:center}.month-container .month-list .month .month-button:hover{background:var(--comp-month-primary-background);color:var(--comp-month-secondary-font-color);cursor:pointer}.month-container .month-list .month .month-button:active,.month-container .month-list .month .month-button.active{background:var(--comp-month-primary-background);color:var(--comp-month-primary-font-color)}.month-container .today-label{padding:0.5rem 0;color:var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}";
|
|
5
5
|
const Q2MonthPickerStyle0 = q2MonthPickerCss;
|
|
@@ -141,10 +141,10 @@ const Q2MonthPicker = class {
|
|
|
141
141
|
// #endregion
|
|
142
142
|
// #region Render Methods
|
|
143
143
|
render() {
|
|
144
|
-
return (h("div", { key: '
|
|
144
|
+
return (h("div", { key: '9208eb9402c7bd1d9a9d52db3153d4b027e2d676', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: 'e6a68034e723e758d9c9824d1a88aeefa73d4ef5', class: "navigation" }, h("q2-btn", { key: '552ca23bfaedc6a787ca78b6db0c027f13b94713', class: "year-btn", onClick: () => this.viewChange.emit({
|
|
145
145
|
view: 'year',
|
|
146
146
|
selectedYear: this.year,
|
|
147
|
-
}) }, h("span", { key: '
|
|
147
|
+
}) }, h("span", { key: '758eeb0b67194fb19c191965684ec1f96663fb0e', class: "year" }, this.year), h("q2-icon", { key: 'c510bb62e965091cf52213ca7ea6b14fd5f00746', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'b523d3a4d99316266e494b1375ba0f7630e5a2b5', class: "month-controller" }, h("div", { key: '22ad01820573025add8690107ad17a173fee2551', class: "cal-year-prev-next" }, h("q2-btn", { key: '9305d7ea801adc18e2fa613f395c2ad3bcaf16b8', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '01e0409616245ff1f468a3945bf570697a745f7c', type: "arrow-left" })), h("q2-btn", { key: 'c89e7e4c668ab6c69caa767746e9eccbc127e321', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: 'd15cd07ed6ecc9d0ca4f6b2c1c66e7804195a912', type: "arrow-right" }))))), h("div", { key: 'bc5f547b283296e8caff1d10ab0babd269ff5d80', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '1ad90d319a3589309eec05791fe289c5a8813df9', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
|
|
148
148
|
}
|
|
149
149
|
get hostElement() { return getElement(this); }
|
|
150
150
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index-7a5365e2.js';
|
|
2
|
-
import { c as createGuid, l as loc } from './index-
|
|
2
|
+
import { c as createGuid, l as loc } from './index-f2a66217.js';
|
|
3
3
|
|
|
4
4
|
const q2OptgroupCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}.q2-optgroup-header{--comp-header-padding:var(--tct-scale-1, var(--app-scale-1x, 5px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--tct-optgroup-header-background, var(--tct-optgroup-header-bg, var(--t-optgroup-header-bg, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l2, var(--app-gray-l2, #e6e6e6)))))));color:var(--tct-optgroup-header-color, inherit);padding:var(--tct-optgroup-header-padding, var(--t-optgroup-header-padding, var(--comp-header-padding)));font-weight:var(--tct-optgroup-header-font-weight, var(--t-optgroup-header-font-weight, 600));text-transform:var(--tct-optgroup-header-text-transform, var(--t-optgroup-header-text-transform, uppercase));position:sticky;top:calc(var(--comp-popover-top-container-height, 0px) + var(--tct-optgroup-top, var(--t-optgroup-top, 0px)));z-index:5}";
|
|
5
5
|
const Q2OptgroupStyle0 = q2OptgroupCss;
|
|
@@ -49,7 +49,7 @@ const Q2Optgroup = class {
|
|
|
49
49
|
// #endregion
|
|
50
50
|
// #region Render Methods
|
|
51
51
|
render() {
|
|
52
|
-
return (h("div", { key: '
|
|
52
|
+
return (h("div", { key: '72e78e35e909a826dbff58572ccf2eb922992ad8', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: '3c25d95961cf0b41f1633782647a708043033bea', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '126e87b4daeb27564289a5c183f2fa155f8b086f', class: "q2-optgroup-options" }, h("slot", { key: '21e7c0f8f8992915b029343ce917ebb20f0579b5' }))));
|
|
53
53
|
}
|
|
54
54
|
get hostElement() { return getElement(this); }
|
|
55
55
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-7a5365e2.js';
|
|
2
|
-
import { n as nextPaint, l as loc, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, v as isVisible, h as handleDeprecationWarning } from './index-
|
|
2
|
+
import { n as nextPaint, l as loc, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, v as isVisible, h as handleDeprecationWarning } from './index-f2a66217.js';
|
|
3
3
|
|
|
4
4
|
function sanitizeRegexString(regexString) {
|
|
5
5
|
return regexString.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
@@ -130,24 +130,26 @@ const Q2OptionList = class {
|
|
|
130
130
|
this.searchOptions(key, false);
|
|
131
131
|
break;
|
|
132
132
|
}
|
|
133
|
-
event.preventDefault();
|
|
134
133
|
newOption = allOptions.find(element => element.active);
|
|
135
134
|
if (!newOption || newOption.disabled)
|
|
136
135
|
break;
|
|
137
136
|
this.selectOption(newOption);
|
|
138
137
|
if (multiple)
|
|
139
138
|
break;
|
|
140
|
-
this.
|
|
139
|
+
this.hostElement.addEventListener('tctClick', () => {
|
|
140
|
+
this.popoverState.emit({ open: false, action: 'select' });
|
|
141
|
+
}, { once: true });
|
|
141
142
|
break;
|
|
142
143
|
case 'Enter':
|
|
143
|
-
event.preventDefault();
|
|
144
144
|
newOption = allOptions.find(element => element.active);
|
|
145
145
|
if (!newOption || newOption.disabled)
|
|
146
146
|
break;
|
|
147
147
|
this.selectOption(newOption);
|
|
148
148
|
if (multiple)
|
|
149
149
|
break;
|
|
150
|
-
this.
|
|
150
|
+
this.hostElement.addEventListener('tctClick', () => {
|
|
151
|
+
this.popoverState.emit({ open: false, action: 'select' });
|
|
152
|
+
}, { once: true });
|
|
151
153
|
break;
|
|
152
154
|
case 'ArrowUp':
|
|
153
155
|
event.preventDefault();
|
|
@@ -571,7 +573,7 @@ const Q2OptionList = class {
|
|
|
571
573
|
// #endregion
|
|
572
574
|
// #region Render Methods
|
|
573
575
|
render() {
|
|
574
|
-
return (h(Host, { key: '
|
|
576
|
+
return (h(Host, { key: '5708785bddc01b545a3b2a94417ad415c6cba32e' }, h("div", { key: 'e6f36e235609824dae19e93edc14d8f8504eb860', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: 'cbdf42235da01a1fc10efcc0798edeb653fe26ae', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: 'cec72b3912c96f09a12c171e4227efd29a9097c9' })))));
|
|
575
577
|
}
|
|
576
578
|
get hostElement() { return getElement(this); }
|
|
577
579
|
static get watchers() { return {
|
|
@@ -879,7 +881,7 @@ const Q2Popover = class {
|
|
|
879
881
|
containerClasses.push('show');
|
|
880
882
|
if (this.mode === 'legacy')
|
|
881
883
|
containerClasses.push('legacy');
|
|
882
|
-
return (h("div", { key: '
|
|
884
|
+
return (h("div", { key: 'dec077f6a9efa7573210773db9eca95d48fb527b', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1 }, h("div", { key: '4e7ad06454bddbc6443922b4dac5d27f50a8b2c8', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '9128e4469499778c779b32561547358e1f6bd747' }))));
|
|
883
885
|
}
|
|
884
886
|
get hostElement() { return getElement(this); }
|
|
885
887
|
static get watchers() { return {
|