q2-tecton-elements 1.50.1 → 1.51.1
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/cjs/click-elsewhere_2.cjs.entry.js +21 -12
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/index-9aa4a776.js +235 -0
- package/dist/cjs/index-9aa4a776.js.map +1 -0
- package/dist/cjs/{index-43010ce4.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-43010ce4.js.map → index-f69742cf.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +50 -0
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1364 -3
- 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 +23 -13
- 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-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-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +16 -16
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- 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 +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +62 -62
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +79 -7
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +72 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- 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-link.cjs.entry.js +64 -0
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- 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.cjs.entry.js +9 -4
- package/dist/cjs/q2-option-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +90 -9
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +26 -5
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- 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 +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +96 -0
- package/dist/cjs/q2-resize-observer.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-section.cjs.entry.js +27 -3
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +7 -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 +39 -3
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +3 -2
- 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 +46 -11
- 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/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/q2-action-group/q2-action-group.css +99 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +120 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +30 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +156 -0
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js +14 -9
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js +14 -9
- package/dist/collection/components/q2-badge/test/q2-badge-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +14 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +227 -223
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js +12 -7
- package/dist/collection/components/q2-card/test/q2-card-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.e2e.js +49 -45
- 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-chart-area/q2-chart-area.js +2 -2
- 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 +12 -7
- 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 +2 -2
- 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 +16 -11
- 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 +15 -15
- 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 +32 -26
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.e2e.js +12 -7
- 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.js +2 -2
- 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 +22 -17
- 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/test/q2-currency-test.e2e.js +12 -7
- 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 +104 -104
- 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 +42 -24
- 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/test/q2-detail-test.e2e.js +12 -7
- package/dist/collection/components/q2-detail/test/q2-detail-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +207 -7
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +297 -135
- 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 +1 -1
- 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 +18 -13
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js +14 -18
- package/dist/collection/components/q2-editable-field/test/q2-editable-field-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +94 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +230 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js +430 -0
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js +14 -9
- package/dist/collection/components/q2-icon/test/q2-icon-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.css +9 -0
- package/dist/collection/components/q2-input/q2-input.js +7 -8
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +50 -33
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.js +32 -7
- package/dist/collection/components/q2-item/test/q2-item-test.e2e.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/test/q2-legend-test.e2e.js +13 -8
- package/dist/collection/components/q2-legend/test/q2-legend-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/q2-link.css +146 -0
- package/dist/collection/components/q2-link/q2-link.js +242 -0
- package/dist/collection/components/q2-link/q2-link.js.map +1 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +145 -0
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js +12 -7
- package/dist/collection/components/q2-list/test/q2-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loading/test/q2-loading-element-test.e2e.js +14 -9
- 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 +14 -9
- package/dist/collection/components/q2-loading/test/q2-loading-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +16 -11
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js +14 -9
- package/dist/collection/components/q2-message/test/q2-message-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js +20 -13
- package/dist/collection/components/q2-optgroup/test/q2-optgroup-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.js +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +28 -12
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.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 +415 -405
- package/dist/collection/components/q2-option-list/test/q2-option-list-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +230 -14
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +138 -15
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.css +12 -0
- package/dist/collection/components/q2-pill/q2-pill.js +43 -3
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +412 -212
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +37 -11
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-popover/test/q2-popover-test.e2e.js +296 -236
- 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 +3 -3
- package/dist/collection/components/q2-popover/test/q2-popover-test.spec.js.map +1 -1
- package/dist/collection/components/q2-radio/test/q2-radio-test.e2e.js +21 -7
- 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.js +2 -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 +32 -26
- 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/test/q2-relative-time-test.e2e.js +12 -7
- 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.css +71 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +166 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js +83 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.e2e.js.map +1 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js +66 -0
- package/dist/collection/components/q2-resize-observer/test/q2-resize-observer.spec.js.map +1 -0
- package/dist/collection/components/q2-section/q2-section.js +78 -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 +39 -9
- package/dist/collection/components/q2-section/test/q2-section-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +23 -5
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +695 -676
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +76 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.e2e.js +183 -87
- 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 +2 -2
- package/dist/collection/components/q2-stepper-pane/test/q2-stepper-pane-test.e2e.js +20 -9
- 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/test/q2-stepper-vertical-test.e2e.js +71 -67
- 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 +50 -7
- 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 +89 -65
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tab-pane/test/q2-tab-pane-test.e2e.js +14 -9
- 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.js +19 -1
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +47 -28
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +51 -13
- package/dist/collection/components/q2-textarea/q2-textarea.js.map +1 -1
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js +31 -10
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +5 -2
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.e2e.js +51 -13
- 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.js +2 -2
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js +18 -13
- package/dist/collection/components/tecton-tab-pane/test/tecton-tab-pane-test.e2e.js.map +1 -1
- package/dist/collection/utils/helpers.js +65 -0
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +11 -11
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/collection/utils/sanitize-html-string.js +10 -0
- package/dist/collection/utils/sanitize-html-string.js.map +1 -0
- package/dist/collection/utils/sanitize-regex-string.js +4 -0
- package/dist/collection/utils/sanitize-regex-string.js.map +1 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +11 -1356
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.d.ts +11 -0
- package/dist/components/q2-action-group.js +75 -0
- package/dist/components/q2-action-group.js.map +1 -0
- package/dist/components/q2-action-sheet.js +1363 -2
- package/dist/components/q2-action-sheet.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-btn2.js +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-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-bar.js.map +1 -1
- package/dist/components/q2-chart-donut.js +15 -15
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +2 -2
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +64 -64
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +1 -1
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +84 -7
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-formatted-text.d.ts +11 -0
- package/dist/components/q2-formatted-text.js +101 -0
- package/dist/components/q2-formatted-text.js.map +1 -0
- package/dist/components/q2-input2.js +4 -5
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +2 -2
- package/dist/components/q2-legend2.js.map +1 -1
- package/dist/components/q2-link.d.ts +11 -0
- package/dist/components/q2-link.js +93 -0
- package/dist/components/q2-link.js.map +1 -0
- package/dist/components/q2-list.js +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option-list2.js +8 -3
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +1 -1
- package/dist/components/q2-pagination.js +97 -10
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +29 -5
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +22 -12
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +2 -2
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer.d.ts +11 -0
- package/dist/components/q2-resize-observer.js +8 -0
- package/dist/components/q2-resize-observer.js.map +1 -0
- package/dist/components/q2-resize-observer2.js +112 -0
- package/dist/components/q2-resize-observer2.js.map +1 -0
- package/dist/components/q2-section.js +30 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +7 -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 +40 -3
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +20 -8
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +3 -1
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +49 -12
- 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/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +21 -12
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-c6d74f10.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-c6d74f10.js.map → index-3184c760.js.map} +1 -1
- package/dist/esm/index-844fc010.js +211 -0
- package/dist/esm/index-844fc010.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +46 -0
- package/dist/esm/q2-action-group.entry.js.map +1 -0
- package/dist/esm/q2-action-sheet.entry.js +1363 -2
- 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 +23 -13
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- 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-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js.map +1 -1
- package/dist/esm/q2-chart-donut.entry.js +16 -16
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- 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 +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +62 -62
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +79 -7
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +68 -0
- package/dist/esm/q2-formatted-text.entry.js.map +1 -0
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js.map +1 -1
- package/dist/esm/q2-link.entry.js +60 -0
- package/dist/esm/q2-link.entry.js.map +1 -0
- package/dist/esm/q2-list.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- 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.entry.js +9 -4
- package/dist/esm/q2-option-list.entry.js.map +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +90 -9
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +26 -5
- package/dist/esm/q2-pill.entry.js.map +1 -1
- 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 +3 -3
- package/dist/esm/q2-resize-observer.entry.js +92 -0
- package/dist/esm/q2-resize-observer.entry.js.map +1 -0
- package/dist/esm/q2-section.entry.js +27 -3
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +7 -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 +39 -3
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +3 -2
- 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 +47 -12
- 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/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js → p-06701928.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a3a804a.entry.js.map → p-06701928.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-5d936af5.entry.js → p-07d1c3ae.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js +2 -0
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-15ac45d6.js +2 -0
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +1 -0
- package/dist/q2-tecton-elements/{p-ce4e6b41.entry.js → p-16910682.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js +3 -0
- package/dist/q2-tecton-elements/p-188eb162.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-58cafc0d.entry.js → p-1c760a89.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-074ae80c.entry.js → p-1c88d057.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3b0d3cd4.entry.js → p-20a3d6ed.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js → p-2733583e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4116579f.entry.js → p-3e428290.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-072c5877.entry.js → p-4774e5b3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-77272c4c.entry.js → p-490ef8e5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0a1dff75.entry.js → p-4e10550d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js → p-50f7328f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-5637c486.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5637c486.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +2 -0
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34856c71.entry.js → p-5a834214.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-34856c71.entry.js.map → p-5a834214.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +2 -0
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-3c7be0bb.entry.js → p-7903cd15.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7903cd15.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js → p-7906f49e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d2e1631a.entry.js.map → p-7906f49e.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js → p-7aef0c08.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8a4b106d.entry.js → p-7c9a0122.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +2 -0
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-cf32b5db.entry.js → p-81fbe718.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-6237c775.entry.js → p-896c7008.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-395904b4.entry.js → p-8d07cf91.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fffb54e9.entry.js → p-8d2b02e1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6e6d9793.entry.js → p-95a7c042.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-45407ecc.entry.js → p-96b1406c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-cb3f48de.entry.js → p-a47597dd.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +2 -0
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2c26295e.entry.js → p-ac6aa392.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-376a0589.entry.js → p-ad057d10.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ad998f71.entry.js → p-b0e5e9dc.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-34696e3f.entry.js → p-b1784be3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-259b728a.entry.js → p-b7de110e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-8111547c.entry.js → p-c235ab3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +2 -0
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-c81d299a.entry.js → p-e216ef3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +2 -0
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f135b265.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-721365be.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js → p-f5f23659.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +2 -0
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +2 -0
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +2 -0
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +1 -0
- 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/types/components/q2-action-group/q2-action-group.d.ts +30 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +1 -1
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +1 -1
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +2 -0
- package/dist/types/components/q2-data-table/q2-data-table.d.ts +15 -13
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +41 -2
- package/dist/types/components/q2-formatted-text/q2-formatted-text.d.ts +34 -0
- package/dist/types/components/q2-input/q2-input.d.ts +10 -9
- package/dist/types/components/q2-legend/q2-legend.d.ts +1 -0
- package/dist/types/components/q2-link/q2-link.d.ts +36 -0
- package/dist/types/components/q2-pagination/q2-pagination.d.ts +60 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +11 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +7 -1
- package/dist/types/components/q2-resize-observer/q2-resize-observer.d.ts +28 -0
- package/dist/types/components/q2-section/q2-section.d.ts +12 -0
- package/dist/types/components/q2-select/q2-select.d.ts +5 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +10 -1
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +8 -2
- package/dist/types/components/q2-tag/q2-tag.d.ts +5 -0
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +8 -3
- package/dist/types/components.d.ts +396 -18
- package/dist/types/utils/helpers.d.ts +28 -0
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/types/utils/sanitize-html-string.d.ts +1 -0
- package/dist/types/utils/sanitize-regex-string.d.ts +1 -0
- package/package.json +4 -4
- package/dist/cjs/index-64d8b839.js +0 -1580
- package/dist/cjs/index-64d8b839.js.map +0 -1
- package/dist/esm/index-4a80972c.js +0 -1556
- package/dist/esm/index-4a80972c.js.map +0 -1
- package/dist/q2-tecton-elements/p-0a1dff75.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3b0d3cd4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-3c7be0bb.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-403bf3d4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4116579f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-661ed976.entry.js +0 -2
- package/dist/q2-tecton-elements/p-661ed976.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-9a1a4bc0.js +0 -3
- package/dist/q2-tecton-elements/p-9a1a4bc0.js.map +0 -1
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a7a0b8aa.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-aa57b657.entry.js +0 -2
- package/dist/q2-tecton-elements/p-aa57b657.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad998f71.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adec9275.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adec9275.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js +0 -2
- package/dist/q2-tecton-elements/p-adf0a7c9.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b72fd065.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b72fd065.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c0c658d1.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cb3f48de.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ce4e6b41.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf32b5db.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-cf966a0f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js +0 -2
- package/dist/q2-tecton-elements/p-dc77bf66.entry.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-5d936af5.entry.js.map → p-07d1c3ae.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-58cafc0d.entry.js.map → p-1c760a89.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-074ae80c.entry.js.map → p-1c88d057.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77a0cc0c.entry.js.map → p-2733583e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-072c5877.entry.js.map → p-4774e5b3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-77272c4c.entry.js.map → p-490ef8e5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2ca6d44f.entry.js.map → p-50f7328f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2fcaf2d6.entry.js.map → p-7aef0c08.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8a4b106d.entry.js.map → p-7c9a0122.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6237c775.entry.js.map → p-896c7008.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-395904b4.entry.js.map → p-8d07cf91.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fffb54e9.entry.js.map → p-8d2b02e1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6e6d9793.entry.js.map → p-95a7c042.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-45407ecc.entry.js.map → p-96b1406c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2c26295e.entry.js.map → p-ac6aa392.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-376a0589.entry.js.map → p-ad057d10.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-34696e3f.entry.js.map → p-b1784be3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-259b728a.entry.js.map → p-b7de110e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-8111547c.entry.js.map → p-c235ab3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c81d299a.entry.js.map → p-e216ef3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-721365be.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6b7c53a8.entry.js.map → p-f5f23659.entry.js.map} +0 -0
|
@@ -91,6 +91,87 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
// #endregion
|
|
94
|
+
// #region Public Methods API
|
|
95
|
+
/**
|
|
96
|
+
* Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.
|
|
97
|
+
*
|
|
98
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
99
|
+
* @testOnly
|
|
100
|
+
*/
|
|
101
|
+
async clickFirstPage() {
|
|
102
|
+
const button = this.firstPageBtn;
|
|
103
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
104
|
+
return;
|
|
105
|
+
button.click();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.
|
|
109
|
+
*
|
|
110
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
111
|
+
* @testOnly
|
|
112
|
+
*/
|
|
113
|
+
async clickLastPage() {
|
|
114
|
+
const button = this.lastPageBtn;
|
|
115
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
116
|
+
return;
|
|
117
|
+
button.click();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.
|
|
121
|
+
*
|
|
122
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
123
|
+
* @testOnly
|
|
124
|
+
*/
|
|
125
|
+
async clickNextPage() {
|
|
126
|
+
const button = this.nextPageBtn;
|
|
127
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
128
|
+
return;
|
|
129
|
+
button.click();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.
|
|
133
|
+
*
|
|
134
|
+
* If the `<button>` is disabled, this method does nothing.
|
|
135
|
+
* @testOnly
|
|
136
|
+
*/
|
|
137
|
+
async clickPreviousPage() {
|
|
138
|
+
const button = this.prevPageBtn;
|
|
139
|
+
if (button === null || button === void 0 ? void 0 : button.disabled)
|
|
140
|
+
return;
|
|
141
|
+
button.click();
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,
|
|
145
|
+
* and updates the value of the `perPage` property.
|
|
146
|
+
*
|
|
147
|
+
* If `value` is not in the `perPageIncrements` array, this method does nothing.
|
|
148
|
+
* @testOnly
|
|
149
|
+
*/
|
|
150
|
+
async selectPerPageIncrementValue(value) {
|
|
151
|
+
var _a;
|
|
152
|
+
if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value))
|
|
153
|
+
return;
|
|
154
|
+
this.perPageSelect.focus();
|
|
155
|
+
this.perPageSelect.click();
|
|
156
|
+
const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));
|
|
157
|
+
(_a = options.find(option => option.value === `${value}`)) === null || _a === void 0 ? void 0 : _a.click();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Emulates setting the page value in the `<input>` field,
|
|
161
|
+
* and emitting a change event with the updated page number.
|
|
162
|
+
*
|
|
163
|
+
* If `value` is invalid, this method does nothing.
|
|
164
|
+
* @testOnly
|
|
165
|
+
*/
|
|
166
|
+
async setPageValue(value) {
|
|
167
|
+
var _a, _b;
|
|
168
|
+
if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages)
|
|
169
|
+
return;
|
|
170
|
+
(_a = this.inputField) === null || _a === void 0 ? void 0 : _a.focus();
|
|
171
|
+
this.inputField.value = `${value}`;
|
|
172
|
+
(_b = this.inputField) === null || _b === void 0 ? void 0 : _b.blur();
|
|
173
|
+
}
|
|
174
|
+
// #endregion
|
|
94
175
|
// #region Watchers
|
|
95
176
|
manageResizeObserver() {
|
|
96
177
|
if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {
|
|
@@ -137,6 +218,10 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
137
218
|
get recordTypeWithDefault() {
|
|
138
219
|
return this.recordType || loc('tecton.element.pagination.defaultRecordType');
|
|
139
220
|
}
|
|
221
|
+
get showPerPageSelect() {
|
|
222
|
+
var _a;
|
|
223
|
+
return ((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) > 1;
|
|
224
|
+
}
|
|
140
225
|
get totalPages() {
|
|
141
226
|
const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;
|
|
142
227
|
if (pagesOnly && pages && !isNaN(parseInt(`${pages}`)))
|
|
@@ -157,21 +242,17 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
157
242
|
// #endregion
|
|
158
243
|
// #region Render Methods
|
|
159
244
|
renderPerPage() {
|
|
160
|
-
var _a;
|
|
161
|
-
if (!((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
162
|
-
return '';
|
|
163
|
-
}
|
|
164
245
|
this.perPageIncrements = this.perPageIncrements
|
|
165
246
|
.filter(perPage => !isNaN(perPage))
|
|
166
247
|
.map(perPage => perPage * 1)
|
|
167
248
|
.sort((a, b) => a - b);
|
|
168
249
|
if (this.perPage === undefined)
|
|
169
250
|
this.perPage = this.perPageIncrements[0];
|
|
170
|
-
return (h("q2-select", { onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
|
|
251
|
+
return (h("q2-select", { ref: el => (this.perPageSelect = el), onChange: this.handlePerPageChange, value: this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined }, this.perPageIncrements.map(perPage => (h("q2-option", { value: `${perPage}`, display: `${loc('tecton.element.pagination.view')} ${perPage}` }, `${loc('tecton.element.pagination.view')} ${perPage}`)))));
|
|
171
252
|
}
|
|
172
253
|
render() {
|
|
173
254
|
var _a;
|
|
174
|
-
const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, } = this;
|
|
255
|
+
const { pagesOnly, recordsOnly, isFullViewHidden, recordTypeWithDefault: recordType, totalPages, totalWithDefault: total, pageWithDefault: page, currentRange, nextRange, prevRange, showPerPageSelect, } = this;
|
|
175
256
|
const onFirstPage = page === 1;
|
|
176
257
|
const onLastPage = page === totalPages;
|
|
177
258
|
let nextButtonLabel = loc('tecton.element.pagination.goToNext');
|
|
@@ -192,7 +273,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
192
273
|
total,
|
|
193
274
|
});
|
|
194
275
|
}
|
|
195
|
-
return (h("nav", { key: '
|
|
276
|
+
return (h("nav", { key: '417a7242c4873c1f2d4c12382f63f5e7534bda04', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '5234d2c6d9f2249788d52970f69be1a0d38ad52e', class: "description", "test-id": "description" }, pagesOnly
|
|
196
277
|
? loc('tecton.element.pagination.pages', {
|
|
197
278
|
current: page,
|
|
198
279
|
total: totalPages,
|
|
@@ -201,7 +282,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
201
282
|
range: currentRange,
|
|
202
283
|
recordType: recordType.toLowerCase(),
|
|
203
284
|
total: total.toLocaleString(),
|
|
204
|
-
})), h("div", { key: '
|
|
285
|
+
})), h("div", { key: 'f1809000bd2d37a8eedad140329ef72ad326bb6b', class: "btn-group" }, h("q2-btn", { key: '62612892b86508d1a834f18e9c242812ac339a21', ref: el => (this.firstPageBtn = el), label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '2ff44c03d569a60d28b411b233818e8a8ed09af6', type: "chevron-double-left" })), h("q2-btn", { key: 'e36a4f8c021fd18248f4fc864aff5f194f248095', ref: el => (this.prevPageBtn = el), label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: 'd103f86c52b8ed6809552126de4d3b52cda6b724', type: "chevron-left" }))), h("div", { key: 'e6f515d392ddb8e4a97b6406e6c7ed09503c4f9f', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '1ad86adf8bd04f8c658b8035d6f4c878b7214e38', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '3d701869101717b2c4f73478e33013a923fd8f44', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: '63cf49a1292cc983fba7214116b73d423cabc64c', ref: el => (this.inputField = el), type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page" })), h("span", { key: '526fd412a6dd8312d6bcf7a5c8baff1257642e4a', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '069656ae8ee3523040eed22b8f2436fdde926358', class: "btn-group" }, h("q2-btn", { key: 'f215824b3c39eaf84cb6e974912ad2cd3e0ea71a', ref: el => (this.nextPageBtn = el), label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'd6d32de9af991e629b00632514ed2a96be42b825', type: "chevron-right" })), h("q2-btn", { key: '74ad02e29e5fadb2bff39cee2d7c6d2f62139bb7', ref: el => (this.lastPageBtn = el), label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '970487bac61e8ad48acc77ce34f67a16f2d57dda', type: "chevron-double-right" }))), h("div", { key: 'dbd712331f2f14a3db1c8a247d36d7457fedeb8e', class: "per-page", hidden: isFullViewHidden || !((_a = this.perPageIncrements) === null || _a === void 0 ? void 0 : _a.length) }, showPerPageSelect && this.renderPerPage())));
|
|
205
286
|
}
|
|
206
287
|
get hostElement() { return this; }
|
|
207
288
|
static get watchers() { return {
|
|
@@ -216,12 +297,18 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
216
297
|
"page": [1538],
|
|
217
298
|
"pages": [1538],
|
|
218
299
|
"pagesOnly": [1540, "pages-only"],
|
|
219
|
-
"perPage": [
|
|
300
|
+
"perPage": [1538, "per-page"],
|
|
220
301
|
"perPageIncrements": [16],
|
|
221
302
|
"recordsOnly": [1540, "records-only"],
|
|
222
303
|
"recordType": [1, "record-type"],
|
|
223
304
|
"total": [514],
|
|
224
|
-
"isSmall": [32]
|
|
305
|
+
"isSmall": [32],
|
|
306
|
+
"clickFirstPage": [64],
|
|
307
|
+
"clickLastPage": [64],
|
|
308
|
+
"clickNextPage": [64],
|
|
309
|
+
"clickPreviousPage": [64],
|
|
310
|
+
"selectPerPageIncrementValue": [64],
|
|
311
|
+
"setPageValue": [64]
|
|
225
312
|
}, [[0, "focus", "onHostElementFocus"]], {
|
|
226
313
|
"recordsOnly": ["manageResizeObserver"],
|
|
227
314
|
"pagesOnly": ["manageResizeObserver"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-pagination.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,6+EAA6+E,CAAC;AACtgF,2BAAe,eAAe;;MCcjBA,cAAY;;;;;;QAkLrB,cAAS,GAAG;YACR,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;YAC/C,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,GAAG,WAAW,CAAC,WAAW,CAAC;YACpE,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;YAC7B,IAAI,aAAa;gBAAE,OAAO;YAE1B,SAAS,CAAC;gBACN,MAAM,2BAA2B,GAAG,IAAI,CAAC,cAAc,KAAK,gBAAgB,CAAC,WAAW,CAAC;gBACzF,IAAI,2BAA2B;oBAAE,OAAO;gBACxC,IAAI,CAAC,cAAc,GAAG,gBAAgB,CAAC,WAAW,CAAC;gBACnD,IAAI,CAAC,SAAS,EAAE,CAAC;aACpB,CAAC,CAAC;SACN,CAAC;QAEF,qBAAgB,GAAG,CAAC,IAAY;YAC5B,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;YACxC,IAAI,IAAI,GAAG,CAAC,EAAE;gBACV,IAAI,GAAG,CAAC,CAAC;aACZ;iBAAM,IAAI,IAAI,GAAG,UAAU,EAAE;gBAC1B,IAAI,GAAG,UAAU,CAAC;aACrB;YAED,IAAI,UAAU,CAAC,KAAK,KAAK,GAAG,IAAI,EAAE;gBA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AC,aACtC,aAAa,wBAGrB,gEAAS,IAAI,EAAC,eAAe,GAAG,CAC3B,EACT,+DACI,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,aACxC,aAAa,wBAGrB,gEAAS,IAAI,EAAC,sBAAsB,GAAG,CAClC,CACP,EACN,4DACI,KAAK,EAAC,UAAU,EAChB,MAAM,EAAE,gBAAgB,IAAI,EAAC,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAA,IAE1D,IAAI,CAAC,aAAa,EAAE,CACnB,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2Pagination"],"sources":["src/components/q2-pagination/q2-pagination.scss?tag=q2-pagination&encapsulation=shadow","src/components/q2-pagination/q2-pagination.tsx"],"sourcesContent":["@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n display: flex;\n width: 100%;\n justify-content: flex-end;\n}\n\n:host([alignment=\"center\"]) {\n justify-content: center;\n}\n\n:host([alignment=\"left\"]) {\n justify-content: flex-start;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.container {\n display: inline-flex;\n column-gap: var-list(var-prefixer(pagination-column-gap), --app-scale-2x, 10px);\n align-items: center;\n height: var-list(var-prefixer(pagination-height), 44px);\n}\n\n.btn-group {\n display: flex;\n gap: var-list(var-prefixer(pagination-btn-gap), 0);\n}\n\n.description,\n.controls {\n white-space: nowrap;\n}\n\n.controls {\n display: grid;\n grid-template-columns: auto 50px auto;\n align-items: center;\n gap: var-list(var-prefixer(pagination-controls-gap), --app-scale-1x, 5px);\n\n &[hidden] {\n display: none;\n }\n}\n\n.input-wrapper {\n height: var-list(var-prefixer(pagination-height), 44px);\n display: flex;\n align-items: center;\n}\n\nq2-btn {\n --tct-btn-border-radius: #{var-list(var-prefixer(pagination-btn-border-radius))};\n --tct-btn-border: #{var-list(var-prefixer(pagination-btn-border))};\n}\n\nq2-icon {\n --tct-icon-size: #{var-list(var-prefixer(pagination-icon-size), 12px)};\n color: var-list(var-prefixer(pagination-icon-color), --t-text, #4d4d4d);\n}\n\nq2-input {\n --tct-input-margin-top: 0;\n --tct-input-margin-bottom: 0;\n --tct-input-height: #{var-list(var-prefixer(pagination-input-height), 30px)};\n --tct-input-min-height: var(--tct-input-height);\n --tct-input-align: center;\n}\n\nq2-select {\n --tct-select-input-min-height: #{var-list(var-prefixer(pagination-select-height), 30px)};\n --tct-select-input-max-height: #{var-list(var-prefixer(pagination-select-height), 30px)};\n width: #{var-list(var-prefixer(pagination-perpage-width), 100%)};\n min-width: #{var-list(var-prefixer(pagination-perpage-min-width), 110px)};\n}\n\n","import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Watch,\n Listen,\n Element,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n inputField: HTMLQ2InputElement;\n resizeObserver: ResizeObserver;\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 isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to only display the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop()\n perPage: number;\n\n /** The list of perPage to operate pagination. e.g.) [10, 25, 50] */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to only display the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n if (!this.perPageIncrements?.length) {\n return '';\n }\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ref={el => (this.inputField = el)}\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-pagination.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,eAA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G,CAAC,mCAAmC,EAAE,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAC,CACrE,CACL,EACN,4DAAK,KAAK,EAAC,WAAW,IAClB,+DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,CAAC,aACtC,aAAa,wBAGrB,gEAAS,IAAI,EAAC,eAAe,GAAG,CAC3B,EACT,+DACI,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,EAClC,KAAK,EAAC,wCAAwC,EAC9C,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,aACxC,aAAa,wBAGrB,gEAAS,IAAI,EAAC,sBAAsB,GAAG,CAClC,CACP,EACN,4DACI,KAAK,EAAC,UAAU,EAChB,MAAM,EAAE,gBAAgB,IAAI,EAAC,MAAA,IAAI,CAAC,iBAAiB,0CAAE,MAAM,CAAA,IAE1D,iBAAiB,IAAI,IAAI,CAAC,aAAa,EAAE,CACxC,CACJ,EACR;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2Pagination"],"sources":["src/components/q2-pagination/q2-pagination.scss?tag=q2-pagination&encapsulation=shadow","src/components/q2-pagination/q2-pagination.tsx"],"sourcesContent":["@import '../../styles/host';\n@import '../../styles/functions';\n\n:host {\n display: flex;\n width: 100%;\n justify-content: flex-end;\n}\n\n:host([alignment=\"center\"]) {\n justify-content: center;\n}\n\n:host([alignment=\"left\"]) {\n justify-content: flex-start;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.container {\n display: inline-flex;\n column-gap: var-list(var-prefixer(pagination-column-gap), --app-scale-2x, 10px);\n align-items: center;\n height: var-list(var-prefixer(pagination-height), 44px);\n}\n\n.btn-group {\n display: flex;\n gap: var-list(var-prefixer(pagination-btn-gap), 0);\n}\n\n.description,\n.controls {\n white-space: nowrap;\n}\n\n.controls {\n display: grid;\n grid-template-columns: auto 50px auto;\n align-items: center;\n gap: var-list(var-prefixer(pagination-controls-gap), --app-scale-1x, 5px);\n\n &[hidden] {\n display: none;\n }\n}\n\n.input-wrapper {\n height: var-list(var-prefixer(pagination-height), 44px);\n display: flex;\n align-items: center;\n}\n\nq2-btn {\n --tct-btn-border-radius: #{var-list(var-prefixer(pagination-btn-border-radius))};\n --tct-btn-border: #{var-list(var-prefixer(pagination-btn-border))};\n}\n\nq2-icon {\n --tct-icon-size: #{var-list(var-prefixer(pagination-icon-size), 12px)};\n color: var-list(var-prefixer(pagination-icon-color), --t-text, #4d4d4d);\n}\n\nq2-input {\n --tct-input-margin-top: 0;\n --tct-input-margin-bottom: 0;\n --tct-input-height: #{var-list(var-prefixer(pagination-input-height), 30px)};\n --tct-input-min-height: var(--tct-input-height);\n --tct-input-align: center;\n}\n\nq2-select {\n --tct-select-input-min-height: #{var-list(var-prefixer(pagination-select-height), 30px)};\n --tct-select-input-max-height: #{var-list(var-prefixer(pagination-select-height), 30px)};\n width: #{var-list(var-prefixer(pagination-perpage-width), 100%)};\n min-width: #{var-list(var-prefixer(pagination-perpage-min-width), 110px)};\n}\n\n","import {\n Component,\n State,\n Prop,\n h,\n ComponentInterface,\n Watch,\n Listen,\n Element,\n Method,\n Event,\n EventEmitter,\n} from '@stencil/core';\nimport { isEventFromElement, loc, nextPaint, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-pagination', shadow: true, styleUrl: 'q2-pagination.scss' })\nexport class Q2Pagination implements ComponentInterface {\n // #region Own Properties\n\n containerElement: HTMLElement;\n containerWidth: number;\n firstPageBtn: HTMLQ2BtnElement;\n inputField: HTMLQ2InputElement;\n lastPageBtn: HTMLQ2BtnElement;\n nextPageBtn: HTMLQ2BtnElement;\n perPageSelect: HTMLQ2SelectElement;\n prevPageBtn: HTMLQ2BtnElement;\n resizeObserver: ResizeObserver;\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 isSmall: boolean;\n\n // #endregion\n // #region Public Property API\n\n /** Indicates the horizontal alignment of children elements */\n @Prop()\n alignment: string;\n\n /** Determines whether the component uses the dynamic resizing behavior. */\n @Prop({ reflect: true, mutable: true })\n autoSize: boolean = true;\n\n /** The current page that is being displayed. */\n @Prop({ reflect: true, mutable: true })\n page: number;\n\n /**\n * The number of pages that can be displayed.\n * @info\n * Only referenced when `pagesOnly` is true.\n */\n @Prop({ reflect: true, mutable: true })\n pages: number;\n\n /** Indicates to display only the current and total pages. */\n @Prop({ reflect: true, mutable: true })\n pagesOnly: boolean;\n\n /** The total number of records displayed on each page. */\n @Prop({ reflect: true, mutable: true })\n perPage: number;\n\n /**\n * A list of perPage values.\n * This generates a [Select](https://tecton.q2developer.com/design-system/q2-select/) element that allows the user to modify the `perPage` value.\n *\n * **Example:**\n * @snippet\n * this.perPageIncrements = [10, 25, 50];\n */\n @Prop()\n perPageIncrements: number[];\n\n /** Indicates to display only the current and total records. */\n @Prop({ reflect: true, mutable: true })\n recordsOnly: boolean;\n\n /** Description of the record type to be displayed alongside the record count. */\n @Prop()\n recordType: string;\n\n /** The total number of records to paginate. */\n @Prop({ reflect: true })\n total: number;\n\n // #endregion\n // #region Events\n\n /**\n * Emitted when the page is changed.\n * @legacyEvent\n */\n @Event()\n change: EventEmitter<{ page: number }>;\n\n // #endregion\n // #region Component Lifecycle Events\n\n disconnectedCallback() {\n this.removeResizeObserver();\n }\n\n componentWillLoad(): void {\n this.manageResizeObserver();\n }\n\n componentDidLoad(): void {\n this.containerWidth = this.containerElement.clientWidth;\n\n overrideFocus(this.hostElement);\n }\n\n // #endregion\n // #region Listeners\n\n @Listen('focus')\n onHostElementFocus(event) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const { isFullViewHidden, containerElement, inputField } = this;\n if (isFullViewHidden) {\n containerElement.querySelector<HTMLElement>('q2-btn:not([disabled])')?.focus();\n } else {\n inputField.focus();\n }\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * Emulates clicking the button that controls moving to the first page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickFirstPage() {\n const button = this.firstPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the last page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickLastPage() {\n const button = this.lastPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the next page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickNextPage() {\n const button = this.nextPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates clicking the button that controls moving to the previous page, and emitting a change event with the updated page number.\n *\n * If the `<button>` is disabled, this method does nothing.\n * @testOnly\n */\n @Method()\n async clickPreviousPage() {\n const button = this.prevPageBtn;\n if (button?.disabled) return;\n button.click();\n }\n\n /**\n * Emulates selecting a `perPage` value from the `perPageIncrements` dropdown,\n * and updates the value of the `perPage` property.\n *\n * If `value` is not in the `perPageIncrements` array, this method does nothing.\n * @testOnly\n */\n @Method()\n async selectPerPageIncrementValue(value: number) {\n if (isNaN(value) || !this.showPerPageSelect || !this.perPageIncrements.includes(value)) return;\n this.perPageSelect.focus();\n this.perPageSelect.click();\n const options = Array.from(this.perPageSelect.querySelectorAll('q2-option'));\n options.find(option => option.value === `${value}`)?.click();\n }\n\n /**\n * Emulates setting the page value in the `<input>` field,\n * and emitting a change event with the updated page number.\n *\n * If `value` is invalid, this method does nothing.\n * @testOnly\n */\n @Method()\n async setPageValue(value: number) {\n if (!this.inputField || isNaN(value) || value < 1 || value > this.totalPages) return;\n this.inputField?.focus();\n this.inputField.value = `${value}`;\n this.inputField?.blur();\n }\n\n // #endregion\n // #region Watchers\n\n @Watch('recordsOnly')\n @Watch('pagesOnly')\n @Watch('autoSize')\n manageResizeObserver() {\n if (this.autoSize && !this.recordsOnly && !this.pagesOnly) {\n if (this.resizeObserver) return;\n this.resizeObserver = new ResizeObserver(() => this.checkSize());\n this.resizeObserver.observe(this.hostElement);\n window.addEventListener('resize', this.checkSize);\n } else {\n this.isSmall = false;\n this.removeResizeObserver();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n get currentRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = (page - 1) * perPage + 1;\n const end = Math.min(page * perPage, total);\n return `${start} - ${end}`;\n }\n\n get isFullViewHidden() {\n return this.isSmall || this.recordsOnly || this.pagesOnly;\n }\n\n get nextRange() {\n const { perPageWithDefault: perPage, totalWithDefault: total, pageWithDefault: page } = this;\n const start = page * perPage + 1;\n const end = Math.min((page + 1) * perPage, total);\n return `${start} - ${end}`;\n }\n\n get pageWithDefault() {\n return this.page || 1;\n }\n\n get perPageWithDefault() {\n return this.perPage || 10;\n }\n\n get prevRange() {\n const { perPageWithDefault: perPage, pageWithDefault: page } = this;\n const start = Math.max(1, (page - 2) * perPage + 1);\n const end = (page - 1) * perPage;\n return `${start} - ${end}`;\n }\n\n get recordTypeWithDefault() {\n return this.recordType || loc('tecton.element.pagination.defaultRecordType');\n }\n\n get showPerPageSelect() {\n return this.perPageIncrements?.length > 1;\n }\n\n get totalPages() {\n const { pagesOnly, totalWithDefault: total, perPageWithDefault: perPage, pages } = this;\n\n if (pagesOnly && pages && !isNaN(parseInt(`${pages}`))) return pages;\n\n return Math.ceil(total / perPage);\n }\n\n get totalWithDefault() {\n return this.total || 0;\n }\n\n checkSize = () => {\n const { hostElement, containerElement } = this;\n const isOverflowing = this.containerWidth > hostElement.clientWidth;\n this.isSmall = isOverflowing;\n if (isOverflowing) return;\n\n nextPaint(() => {\n const containerWidthHasNotChanged = this.containerWidth === containerElement.clientWidth;\n if (containerWidthHasNotChanged) return;\n this.containerWidth = containerElement.clientWidth;\n this.checkSize();\n });\n };\n\n handlePageChange = (page: number) => {\n const { totalPages, inputField } = this;\n if (page < 1) {\n page = 1;\n } else if (page > totalPages) {\n page = totalPages;\n }\n\n if (inputField.value !== `${page}`) inputField.value = `${page}`;\n\n if (!this.hostElement.onchange) {\n this.page = page;\n }\n\n this.change.emit({ page });\n };\n\n handlePerPageChange = (event: CustomEvent) => {\n this.perPage = event.detail.value * 1;\n };\n\n removeResizeObserver() {\n if (this.resizeObserver) {\n this.resizeObserver?.unobserve(this.hostElement);\n this.resizeObserver = null;\n window.removeEventListener('resize', this.checkSize);\n }\n }\n\n // #endregion\n // #region Render Methods\n\n renderPerPage() {\n this.perPageIncrements = this.perPageIncrements\n .filter(perPage => !isNaN(perPage))\n .map(perPage => perPage * 1)\n .sort((a, b) => a - b);\n if (this.perPage === undefined) this.perPage = this.perPageIncrements[0];\n return (\n <q2-select\n ref={el => (this.perPageSelect = el)}\n onChange={this.handlePerPageChange}\n value={this.perPageIncrements.includes(this.perPage) ? `${this.perPage}` : undefined}\n >\n {this.perPageIncrements.map(perPage => (\n <q2-option\n value={`${perPage}`}\n display={`${loc('tecton.element.pagination.view')} ${perPage}`}\n >{`${loc('tecton.element.pagination.view')} ${perPage}`}</q2-option>\n ))}\n </q2-select>\n );\n }\n\n render() {\n const {\n pagesOnly,\n recordsOnly,\n isFullViewHidden,\n recordTypeWithDefault: recordType,\n totalPages,\n totalWithDefault: total,\n pageWithDefault: page,\n currentRange,\n nextRange,\n prevRange,\n showPerPageSelect,\n } = this;\n const onFirstPage = page === 1;\n const onLastPage = page === totalPages;\n\n let nextButtonLabel: string = loc('tecton.element.pagination.goToNext');\n let prevButtonLabel: string = loc('tecton.element.pagination.goToPrevious');\n if (pagesOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToPages', { next: page - 1, total: totalPages });\n nextButtonLabel = loc('tecton.element.pagination.goToPages', { next: page + 1, total: totalPages });\n } else if (recordsOnly) {\n prevButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: prevRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n nextButtonLabel = loc('tecton.element.pagination.goToRecords', {\n range: nextRange,\n recordType: recordType.toLowerCase(),\n total,\n });\n }\n\n return (\n <nav\n class=\"container\"\n ref={el => (this.containerElement = el)}\n aria-label={loc('tecton.element.pagination.title')}\n >\n <div\n class=\"description\"\n test-id=\"description\"\n >\n {pagesOnly\n ? loc('tecton.element.pagination.pages', {\n current: page,\n total: totalPages,\n })\n : loc('tecton.element.pagination.description', {\n range: currentRange,\n recordType: recordType.toLowerCase(),\n total: total.toLocaleString(),\n })}\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.firstPageBtn = el)}\n label={loc('tecton.element.pagination.goToFirstPage')}\n disabled={onFirstPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(1)}\n test-id=\"firstPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-left\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.prevPageBtn = el)}\n label={prevButtonLabel}\n disabled={onFirstPage}\n onClick={() => this.handlePageChange(page - 1)}\n test-id=\"prevPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-left\" />\n </q2-btn>\n </div>\n <div\n class=\"controls\"\n hidden={isFullViewHidden}\n test-id=\"controls\"\n >\n <span aria-hidden=\"true\">{loc('tecton.element.pagination.page')}</span>\n <div\n class=\"input-wrapper\"\n onClick={() => this.inputField.dispatchEvent(new FocusEvent('focus'))}\n >\n <q2-input\n ref={el => (this.inputField = el)}\n type=\"number\"\n value={`${page}`}\n min={1}\n max={this.totalPages}\n hideLabel\n optional\n label={`${loc('tecton.element.pagination.page')} (${loc(\n 'tecton.element.pagination.ofPages',\n [totalPages.toLocaleString()]\n )})`}\n onChange={event => this.handlePageChange(event.detail.value)}\n test-id=\"pageInput\"\n current=\"page\"\n ></q2-input>\n </div>\n <span aria-hidden=\"true\">\n {loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])}\n </span>\n </div>\n <div class=\"btn-group\">\n <q2-btn\n ref={el => (this.nextPageBtn = el)}\n label={nextButtonLabel}\n disabled={onLastPage}\n onClick={() => this.handlePageChange(page + 1)}\n test-id=\"nextPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-right\" />\n </q2-btn>\n <q2-btn\n ref={el => (this.lastPageBtn = el)}\n label=\"tecton.element.pagination.goToLastPage\"\n disabled={onLastPage}\n hidden={isFullViewHidden}\n onClick={() => this.handlePageChange(totalPages)}\n test-id=\"lastPageBtn\"\n hide-label\n >\n <q2-icon type=\"chevron-double-right\" />\n </q2-btn>\n </div>\n <div\n class=\"per-page\"\n hidden={isFullViewHidden || !this.perPageIncrements?.length}\n >\n {showPerPageSelect && this.renderPerPage()}\n </div>\n </nav>\n );\n }\n\n // #endregion\n}\n"],"version":3}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { e as resizeIframe, o as overrideFocus, i as isEventFromElement, w as waitForNextPaint, l as loc } from './index2.js';
|
|
3
3
|
import { s as showActionSheetList, a as shouldShowActionSheet } from './action-sheet.js';
|
|
4
4
|
import { d as defineCustomElement$5 } from './click-elsewhere2.js';
|
|
5
5
|
import { d as defineCustomElement$4 } from './q2-icon2.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './q2-option-list2.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './q2-popover2.js';
|
|
8
8
|
|
|
9
|
-
const q2PillCss = "*{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-block;position:relative;line-height:0}:host(:not(:last-child)){margin-inline-end:var(--tct-pill-margin, var(--t-pill-margin, var(--app-scale-2x, 10px)))}q2-popover,.btn-wrapper{--comp-pill-min-height:var(--tct-pill-min-height, var(--t-pill-min-height, 44px));--comp-pill-btn-height:var(--tct-pill-btn-height, var(--t-pill-btn-height, 30px))}.btn-wrapper{--comp-pill-btn-border-width:var(--tct-pill-btn-border-width, var(--t-pill-btn-border-width, 2px));--comp-close-size:0px;--comp-btn-background:var(--tct-pill-btn-background, var(--t-pill-btn-background, var(--t-base, #ffffff)));--comp-hover-btn-background:var(--tct-pill-hover-btn-background, var(--t-pill-hover-btn-background, var(--t-gray-13, #e6e6e6)));--comp-btn-padding:var(--tct-pill-btn-padding-inline, var(--t-pill-btn-padding-inline, var(--app-scale-3x, 15px)));--comp-btn-color:var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));--comp-active-btn-color:var(--comp-btn-background);--comp-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-7, #666666)));--comp-active-btn-border-color:var(--tct-pill-active-btn-border-color, var(--t-pill-active-btn-border-color, var(--t-gray-7, #666666)));--comp-hover-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));--comp-hover-active-btn-border-color:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));position:relative}.btn-wrapper.has-options,.btn-wrapper.has-icon{--comp-close-size:var(--comp-pill-btn-height)}:host([active]) .btn-wrapper{--comp-btn-color:var(--tct-pill-active-btn-color, var(--t-pill-active-btn-color, var(--t-base, #ffffff)))}:host([theme=primary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-primary-active-background, var(--t-primary, #0079c1));--comp-active-btn-color:var(--tct-pill-primary-active-font-color, var(--t-primary-text, #ffffff));--comp-active-btn-border-color:var(--tct-pill-primary-active-border-color, var(--t-primary, #0079c1));--comp-hover-active-btn-background:var(--tct-pill-primary-active-hover-background, var(--t-primary-l3, #21acff));--comp-hover-active-btn-border-color:var(--tct-pill-primary-active-hover-border-color, var(--t-primary-l3, #21acff))}:host([theme=secondary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-secondary-active-background, var(--t-secondary, #b3c2cc));--comp-active-btn-color:var(--tct-pill-secondary-active-font-color, var(--t-secondary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-secondary-active-border-color, var(--t-secondary, #b3c2cc));--comp-hover-active-btn-background:var(--tct-pill-secondary-active-hover-background, var(--t-secondary-l3, #c9d5db));--comp-hover-active-btn-border-color:var(--tct-pill-secondary-active-hover-border-color, var(--t-secondary-l3, #c9d5db))}:host([theme=tertiary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-tertiary-active-background, var(--t-tertiary, #e8f5fc));--comp-active-btn-color:var(--tct-pill-tertiary-active-font-color, var(--t-tertiary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-tertiary-active-border-color, var(--t-tertiary, #e8f5fc));--comp-hover-active-btn-background:var(--tct-pill-tertiary-active-hover-background, var(--t-tertiary-l3, #eff8fd));--comp-hover-active-btn-border-color:var(--tct-pill-tertiary-active-hover-border-color, var(--t-tertiary-l3, #eff8fd))}.btn-height-wrapper{height:var(--comp-pill-min-height);display:flex;align-items:center;cursor:pointer}.btn-height-wrapper:focus{box-shadow:none}:host([disabled]) .btn-height-wrapper{cursor:not-allowed}.btn-close,.btn-primary{cursor:pointer;height:var(--comp-pill-btn-height);border-style:solid;border-radius:var(--tct-pill-btn-border-radius, var(--t-pill-btn-border-radius, 30px));transition-property:background, color, padding, width, opacity;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}:host([disabled]) .btn-close,:host([disabled]) .btn-primary,:host([disabled]) q2-icon{opacity:var(--tct-pill-disabled-opacity, var(--t-pill-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));cursor:not-allowed}.btn-primary{background:var(--comp-btn-background);border-width:var(--comp-pill-btn-border-width);border-color:var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));padding-inline:var(--comp-btn-padding);padding-right:calc(var(--comp-btn-padding) + var(--comp-close-size));font-size:var(--tct-pill-btn-font-size, var(--t-pill-btn-font-size, var(--app-font-size, 14px)));color:var(--comp-btn-color);display:block;width:100%;text-align:start}.btn-primary:focus,.btn-primary:hover{background:var(--comp-hover-btn-background)}.has-options .btn-primary,.has-icon .btn-primary{padding-right:calc(var(--tct-pill-icon-gap, var(--t-pill-icon-gap, var(--app-scale-1x, 5px))) + var(--comp-close-size))}.has-options .btn-primary{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:var(--tct-pill-max-width, var(--t-pill-max-width, 200px))}:host([active]) .btn-primary{background:var(--comp-active-btn-background);border-color:var(--comp-active-btn-border-color);color:var(--comp-active-btn-color)}:host([active]) .btn-primary:focus,:host([active]) .btn-primary:hover{background:var(--comp-hover-active-btn-background);border-color:var(--comp-hover-active-btn-border-color)}.btn-close{background:transparent;border-color:transparent;border-width:var(--comp-pill-btn-border-width);width:var(--comp-close-size);height:var(--comp-close-size);padding:0;border:0;display:inline-flex;justify-content:center;align-items:center;position:absolute;right:0;top:50%;transform:translateY(-50%);opacity:0}:host([active]) .btn-close{color:var(--comp-active-btn-color)}.has-options .btn-close,.has-icon .btn-close{opacity:1}q2-icon{--t-icon-stroke-primary:currentcolor;width:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));height:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));transition-property:transform;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}div.btn-close{pointer-events:none}:host([open]) div.btn-close q2-icon{transform:rotate(180deg)}:host([active]) button.btn-close:focus,:host([active]) button.btn-close:hover{background:var(--tct-pill-hover-close-btn-background, var(--t-pill-hover-close-btn-background, var(--t-top-a1, rgba(13, 13, 13, 0.35))));border-color:var(--tct-pill-hover-close-btn-border-color, var(--t-pill-hover-close-btn-border-color, var(--t-top-a1, rgba(13, 13, 13, 0.35))))}q2-popover{top:calc(var(--comp-pill-min-height) - (var(--comp-pill-min-height) - var(--comp-pill-btn-height)) / 2)}:host([borderless]:not([borderless=false])) button{border-style:none}";
|
|
9
|
+
const q2PillCss = "*{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-block;position:relative;line-height:0}:host(:not(:last-child)){margin-inline-end:var(--tct-pill-margin, var(--t-pill-margin, var(--app-scale-2x, 10px)))}q2-popover,.btn-wrapper{--comp-pill-min-height:var(--tct-pill-min-height, var(--t-pill-min-height, 44px));--comp-pill-btn-height:var(--tct-pill-btn-height, var(--t-pill-btn-height, 30px))}.popover-top-container{position:sticky;top:0;z-index:5}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.btn-wrapper{--comp-pill-btn-border-width:var(--tct-pill-btn-border-width, var(--t-pill-btn-border-width, 2px));--comp-close-size:0px;--comp-btn-background:var(--tct-pill-btn-background, var(--t-pill-btn-background, var(--t-base, #ffffff)));--comp-hover-btn-background:var(--tct-pill-hover-btn-background, var(--t-pill-hover-btn-background, var(--t-gray-13, #e6e6e6)));--comp-btn-padding:var(--tct-pill-btn-padding-inline, var(--t-pill-btn-padding-inline, var(--app-scale-3x, 15px)));--comp-btn-color:var(--tct-pill-btn-color, var(--t-pill-btn-color, var(--t-gray-3, #262626)));--comp-active-btn-color:var(--comp-btn-background);--comp-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-7, #666666)));--comp-active-btn-border-color:var(--tct-pill-active-btn-border-color, var(--t-pill-active-btn-border-color, var(--t-gray-7, #666666)));--comp-hover-active-btn-background:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));--comp-hover-active-btn-border-color:var(--tct-pill-active-btn-background, var(--t-pill-active-btn-background, var(--t-gray-6, #4d4d4d)));position:relative}.btn-wrapper.has-options,.btn-wrapper.has-icon{--comp-close-size:var(--comp-pill-btn-height)}:host([active]) .btn-wrapper{--comp-btn-color:var(--tct-pill-active-btn-color, var(--t-pill-active-btn-color, var(--t-base, #ffffff)))}:host([theme=primary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-primary-active-background, var(--t-primary, #0079c1));--comp-active-btn-color:var(--tct-pill-primary-active-font-color, var(--t-primary-text, #ffffff));--comp-active-btn-border-color:var(--tct-pill-primary-active-border-color, var(--t-primary, #0079c1));--comp-hover-active-btn-background:var(--tct-pill-primary-active-hover-background, var(--t-primary-l3, #21acff));--comp-hover-active-btn-border-color:var(--tct-pill-primary-active-hover-border-color, var(--t-primary-l3, #21acff))}:host([theme=secondary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-secondary-active-background, var(--t-secondary, #b3c2cc));--comp-active-btn-color:var(--tct-pill-secondary-active-font-color, var(--t-secondary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-secondary-active-border-color, var(--t-secondary, #b3c2cc));--comp-hover-active-btn-background:var(--tct-pill-secondary-active-hover-background, var(--t-secondary-l3, #c9d5db));--comp-hover-active-btn-border-color:var(--tct-pill-secondary-active-hover-border-color, var(--t-secondary-l3, #c9d5db))}:host([theme=tertiary]) .btn-wrapper{--comp-active-btn-background:var(--tct-pill-tertiary-active-background, var(--t-tertiary, #e8f5fc));--comp-active-btn-color:var(--tct-pill-tertiary-active-font-color, var(--t-tertiary-text, #141414));--comp-active-btn-border-color:var(--tct-pill-tertiary-active-border-color, var(--t-tertiary, #e8f5fc));--comp-hover-active-btn-background:var(--tct-pill-tertiary-active-hover-background, var(--t-tertiary-l3, #eff8fd));--comp-hover-active-btn-border-color:var(--tct-pill-tertiary-active-hover-border-color, var(--t-tertiary-l3, #eff8fd))}.btn-height-wrapper{height:var(--comp-pill-min-height);display:flex;align-items:center;cursor:pointer}.btn-height-wrapper:focus{box-shadow:none}:host([disabled]) .btn-height-wrapper{cursor:not-allowed}.btn-close,.btn-primary{cursor:pointer;height:var(--comp-pill-btn-height);border-style:solid;border-radius:var(--tct-pill-btn-border-radius, var(--t-pill-btn-border-radius, 30px));transition-property:background, color, padding, width, opacity;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}:host([disabled]) .btn-close,:host([disabled]) .btn-primary,:host([disabled]) q2-icon{opacity:var(--tct-pill-disabled-opacity, var(--t-pill-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))));cursor:not-allowed}.btn-primary{background:var(--comp-btn-background);border-width:var(--comp-pill-btn-border-width);border-color:var(--tct-pill-btn-border-color, var(--t-pill-btn-border-color, var(--t-a11y-gray-color-AA, #949494)));padding-inline:var(--comp-btn-padding);padding-right:calc(var(--comp-btn-padding) + var(--comp-close-size));font-size:var(--tct-pill-btn-font-size, var(--t-pill-btn-font-size, var(--app-font-size, 14px)));color:var(--comp-btn-color);display:block;width:100%;text-align:start}.btn-primary:focus,.btn-primary:hover{background:var(--comp-hover-btn-background)}.has-options .btn-primary,.has-icon .btn-primary{padding-right:calc(var(--tct-pill-icon-gap, var(--t-pill-icon-gap, var(--app-scale-1x, 5px))) + var(--comp-close-size))}.has-options .btn-primary{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;max-width:var(--tct-pill-max-width, var(--t-pill-max-width, 200px))}:host([active]) .btn-primary{background:var(--comp-active-btn-background);border-color:var(--comp-active-btn-border-color);color:var(--comp-active-btn-color)}:host([active]) .btn-primary:focus,:host([active]) .btn-primary:hover{background:var(--comp-hover-active-btn-background);border-color:var(--comp-hover-active-btn-border-color)}.btn-close{background:transparent;border-color:transparent;border-width:var(--comp-pill-btn-border-width);width:var(--comp-close-size);height:var(--comp-close-size);padding:0;border:0;display:inline-flex;justify-content:center;align-items:center;position:absolute;right:0;top:50%;transform:translateY(-50%);opacity:0}:host([active]) .btn-close{color:var(--comp-active-btn-color)}.has-options .btn-close,.has-icon .btn-close{opacity:1}q2-icon{--t-icon-stroke-primary:currentcolor;width:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));height:var(--tct-pill-icon-size, var(--t-pill-icon-size, 14px));transition-property:transform;transition:var(--tct-pill-btn-tween, var(--t-pill-btn-tween, var(--app-tween-1, 0.2s ease)))}div.btn-close{pointer-events:none}:host([open]) div.btn-close q2-icon{transform:rotate(180deg)}:host([active]) button.btn-close:focus,:host([active]) button.btn-close:hover{background:var(--tct-pill-hover-close-btn-background, var(--t-pill-hover-close-btn-background, var(--t-top-a1, rgba(13, 13, 13, 0.35))));border-color:var(--tct-pill-hover-close-btn-border-color, var(--t-pill-hover-close-btn-border-color, var(--t-top-a1, rgba(13, 13, 13, 0.35))))}q2-popover{top:calc(var(--comp-pill-min-height) - (var(--comp-pill-min-height) - var(--comp-pill-btn-height)) / 2)}:host([borderless]:not([borderless=false])) button{border-style:none}";
|
|
10
10
|
const Q2PillStyle0 = q2PillCss;
|
|
11
11
|
|
|
12
12
|
const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLElement {
|
|
@@ -90,7 +90,9 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
90
90
|
if (!this.optionCount || this.disabled || isTabMetaOrCtrl)
|
|
91
91
|
return;
|
|
92
92
|
event.preventDefault();
|
|
93
|
-
|
|
93
|
+
const hasSlot = this.hasPopoverTop || this.hasPopoverBottom;
|
|
94
|
+
// slots are incompatible with action sheet
|
|
95
|
+
if (shouldShowActionSheet(this, event) && !hasSlot) {
|
|
94
96
|
this.executeActionSheet(event);
|
|
95
97
|
}
|
|
96
98
|
else {
|
|
@@ -134,6 +136,22 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
134
136
|
popoverElement.open = false;
|
|
135
137
|
}
|
|
136
138
|
};
|
|
139
|
+
this.onMutationObserved = () => {
|
|
140
|
+
this.updateSlotState();
|
|
141
|
+
this.determineOptionCount();
|
|
142
|
+
this.updateSelectedOptionElements();
|
|
143
|
+
};
|
|
144
|
+
this.updateSlotState = () => {
|
|
145
|
+
const { hostElement, hasPopoverTop, hasPopoverBottom } = this;
|
|
146
|
+
const popTopSlot = hostElement.shadowRoot.querySelector('slot[name="popover-top"]');
|
|
147
|
+
const popBottomSlot = hostElement.shadowRoot.querySelector('slot[name="popover-bottom"]');
|
|
148
|
+
const topSlotHasNode = (popTopSlot === null || popTopSlot === void 0 ? void 0 : popTopSlot.assignedNodes().length) > 0;
|
|
149
|
+
const bottomSlotHasNode = (popBottomSlot === null || popBottomSlot === void 0 ? void 0 : popBottomSlot.assignedNodes().length) > 0;
|
|
150
|
+
if (hasPopoverTop !== topSlotHasNode)
|
|
151
|
+
this.hasPopoverTop = topSlotHasNode;
|
|
152
|
+
if (hasPopoverBottom !== bottomSlotHasNode)
|
|
153
|
+
this.hasPopoverBottom = bottomSlotHasNode;
|
|
154
|
+
};
|
|
137
155
|
this.syncValueProperties = () => {
|
|
138
156
|
const { value, selectedOptions } = this;
|
|
139
157
|
if (!!(selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.length))
|
|
@@ -150,6 +168,8 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
150
168
|
this.active = !!selectedValues.length;
|
|
151
169
|
this.selectedOptionElements = (options === null || options === void 0 ? void 0 : options.filter(option => selectedValues.includes(option.value))) || [];
|
|
152
170
|
};
|
|
171
|
+
this.hasPopoverTop = false;
|
|
172
|
+
this.hasPopoverBottom = false;
|
|
153
173
|
this.optionCount = undefined;
|
|
154
174
|
this.selectedOptionElements = [];
|
|
155
175
|
this.active = undefined;
|
|
@@ -163,6 +183,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
163
183
|
this.optionListLabel = undefined;
|
|
164
184
|
this.popoverAlignment = 'right';
|
|
165
185
|
this.popoverDirection = undefined;
|
|
186
|
+
this.popoverMaxHeight = undefined;
|
|
166
187
|
this.popoverMinHeight = 150;
|
|
167
188
|
this.selectedOptions = [];
|
|
168
189
|
this.theme = undefined;
|
|
@@ -175,7 +196,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
175
196
|
this.mutationObserver = null;
|
|
176
197
|
}
|
|
177
198
|
componentWillLoad() {
|
|
178
|
-
const observer = new MutationObserver(this.
|
|
199
|
+
const observer = new MutationObserver(this.onMutationObserved);
|
|
179
200
|
observer.observe(this.hostElement, { childList: true, attributes: true });
|
|
180
201
|
this.mutationObserver = observer;
|
|
181
202
|
}
|
|
@@ -327,7 +348,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
327
348
|
wrapperClassNames.push('has-icon');
|
|
328
349
|
if (optionCount)
|
|
329
350
|
wrapperClassNames.push('has-options');
|
|
330
|
-
return (h("click-elsewhere", { key: '
|
|
351
|
+
return (h("click-elsewhere", { key: '02e7f5f616daeb2b0e40259c1c99ac142f86b553', onChange: this.onClickElsewhere }, h("div", { key: '13ece1982239e075de4911cc76c806b9f30dc84b', class: wrapperClassNames.join(' ') }, h("div", { key: 'afff34dc889240fbbf32cb2401359f51ce5feee4', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '5f9b91813e5f4006137534fe5fe1820adf35d2f6', class: "btn-primary", "test-id": "btn-control", type: "button", role: (optionCount && 'combobox') || undefined, ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": (optionCount && 'option-list') || undefined, "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '084fb2e933da3e3f281a5480c74e917ebac38015', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.renderIcon(), !!optionCount && this.renderHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: '5fcab5d95192479ac7f0e2e911d51327044500ef', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, "max-height": this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("div", { key: 'b5d7756b724d76aa0cf487324c6790d7ca529293', class: "popover-content" }, h("div", { key: 'e191b41fcfa2a9f2fefc66dde961a24a867c73d8', ref: el => (this.popoverTopContainer = el), class: "popover-top-container", tabindex: "-1", hidden: !this.hasPopoverTop, onKeyDown: this.handleKeydown }, h("slot", { key: '8078c79efc74285ce9db259c28a1c6b2e957a09f', name: "popover-top" })), h("q2-option-list", { key: '1cd2a521a30af647a4ba5008f11d927209454061', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: '432d785fe233aaf875a1b601522bb5189edf1b82' })), h("div", { key: '22d1406b38ae6f991c7253f5b10b70f7fa6744e7', ref: el => (this.popoverBottomContainer = el), class: "popover-bottom-container", tabindex: "-1", hidden: !this.hasPopoverBottom, onKeyDown: this.handleKeydown }, h("slot", { key: '7619b7dabfaae3dea23363d7769e350a7f2ed51f', name: "popover-bottom" })))))));
|
|
331
352
|
}
|
|
332
353
|
get hostElement() { return this; }
|
|
333
354
|
static get watchers() { return {
|
|
@@ -347,10 +368,13 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
347
368
|
"optionListLabel": [1, "option-list-label"],
|
|
348
369
|
"popoverAlignment": [1025, "popover-alignment"],
|
|
349
370
|
"popoverDirection": [1, "popover-direction"],
|
|
371
|
+
"popoverMaxHeight": [2, "popover-max-height"],
|
|
350
372
|
"popoverMinHeight": [2, "popover-min-height"],
|
|
351
373
|
"selectedOptions": [1040],
|
|
352
374
|
"theme": [513],
|
|
353
375
|
"value": [1537],
|
|
376
|
+
"hasPopoverTop": [32],
|
|
377
|
+
"hasPopoverBottom": [32],
|
|
354
378
|
"optionCount": [32],
|
|
355
379
|
"selectedOptionElements": [32],
|
|
356
380
|
"closePopover": [64],
|