q2-tecton-elements 1.70.2 → 1.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle-report.json +556 -231
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-action-sheet.cjs.entry.js +4 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +17 -8
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +8 -6
- package/dist/cjs/q2-card-image.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +108 -74
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-form.cjs.entry.js +1 -1
- package/dist/cjs/q2-formatted-text.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-link_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-meter.cjs.entry.js +1 -1
- package/dist/cjs/q2-modal.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +18 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-search.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +32 -9
- package/dist/cjs/q2-stepper.cjs.entry.js +18 -4
- package/dist/cjs/q2-surface.cjs.entry.js +3 -3
- package/dist/cjs/q2-tab-container.cjs.entry.js +89 -20
- package/dist/cjs/q2-tab-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +26 -15
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/components/q2-action-group/q2-action-group.css +22 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +24 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +3 -2
- package/dist/collection/components/q2-avatar/q2-avatar.css +23 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +13 -1
- package/dist/collection/components/q2-badge/q2-badge.css +26 -4
- package/dist/collection/components/q2-badge/test/q2-badge-test.vr.js +13 -1
- package/dist/collection/components/q2-btn/q2-btn.css +53 -9
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +19 -1
- package/dist/collection/components/q2-calendar/q2-calendar.css +26 -4
- package/dist/collection/components/q2-calendar/q2-calendar.js +7 -5
- package/dist/collection/components/q2-calendar/q2-month-picker.css +22 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +34 -1
- package/dist/collection/components/q2-card/q2-card.css +23 -1
- package/dist/collection/components/q2-card/test/q2-card-test.vr.js +10 -1
- package/dist/collection/components/q2-card-image/q2-card-image.css +23 -1
- package/dist/collection/components/q2-card-image/test/q2-card-image-test.vr.js +9 -1
- package/dist/collection/components/q2-carousel/q2-carousel.css +29 -39
- package/dist/collection/components/q2-carousel/q2-carousel.js +122 -69
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +5 -4
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.css +22 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +22 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +22 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +24 -2
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +13 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.css +23 -1
- package/dist/collection/components/q2-checkbox/test/q2-checkbox-test.vr.js +11 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +23 -1
- package/dist/collection/components/q2-checkbox-group/test/q2-checkbox-group-test.vr.js +11 -1
- package/dist/collection/components/q2-currency/q2-currency.css +25 -3
- package/dist/collection/components/q2-currency/test/q2-currency-test.vr.js +13 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +24 -2
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +11 -1
- package/dist/collection/components/q2-detail/q2-detail.css +32 -10
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +22 -0
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.css +22 -0
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-example/q2-example.css +23 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +57 -10
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.vr.js +14 -1
- package/dist/collection/components/q2-form/q2-form.css +22 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.css +25 -3
- package/dist/collection/components/q2-formatted-text/test/q2-formatted-text-test.vr.js +13 -1
- package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
- package/dist/collection/components/q2-icon/q2-icon.css +22 -0
- package/dist/collection/components/q2-input/q2-input.css +26 -4
- package/dist/collection/components/q2-input/q2-input.js +39 -7
- package/dist/collection/components/q2-input/test/q2-input-test.vr.js +36 -1
- package/dist/collection/components/q2-item/q2-item.css +46 -2
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +12 -1
- package/dist/collection/components/q2-legend/q2-legend.css +24 -2
- package/dist/collection/components/q2-link/q2-link.css +22 -0
- package/dist/collection/components/q2-list/q2-list.css +46 -2
- package/dist/collection/components/q2-list/test/q2-list-test.vr.js +12 -1
- package/dist/collection/components/q2-loading/q2-loading.css +23 -0
- package/dist/collection/components/q2-message/q2-message.css +22 -0
- package/dist/collection/components/q2-meter/q2-meter.css +25 -3
- package/dist/collection/components/q2-meter/test/q2-meter-test.vr.js +12 -1
- package/dist/collection/components/q2-modal/q2-modal.css +23 -1
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +12 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.css +23 -1
- package/dist/collection/components/q2-option/q2-option.css +22 -0
- package/dist/collection/components/q2-option-list/q2-option-list.css +22 -0
- package/dist/collection/components/q2-otp/q2-otp.css +27 -4
- package/dist/collection/components/q2-otp/test/q2-otp-test.vr.js +12 -1
- package/dist/collection/components/q2-pagination/q2-pagination.css +22 -0
- package/dist/collection/components/q2-pill/q2-pill.css +42 -2
- package/dist/collection/components/q2-pill/q2-pill.js +18 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +27 -1
- package/dist/collection/components/q2-popover/q2-popover.css +22 -7
- package/dist/collection/components/q2-radio/q2-radio.css +24 -2
- package/dist/collection/components/q2-radio/test/q2-radio-test.vr.js +12 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +23 -1
- package/dist/collection/components/q2-radio-group/test/q2-radio-group-test.vr.js +11 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.css +22 -0
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.css +22 -0
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.css +22 -0
- package/dist/collection/components/q2-search/q2-search.js +1 -1
- package/dist/collection/components/q2-section/q2-section.css +23 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-section/test/q2-section-test.vr.js +11 -1
- package/dist/collection/components/q2-select/q2-select.css +22 -0
- package/dist/collection/components/q2-stepper/q2-stepper.css +38 -4
- package/dist/collection/components/q2-stepper/q2-stepper.js +17 -3
- package/dist/collection/components/q2-stepper/test/q2-stepper-test.vr.js +12 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.css +22 -0
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.css +39 -5
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +31 -8
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.vr.js +16 -1
- package/dist/collection/components/q2-surface/q2-surface.css +71 -32
- package/dist/collection/components/q2-surface/q2-surface.js +7 -7
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +54 -0
- package/dist/collection/components/q2-tab-container/q2-tab-container.css +112 -6
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +114 -21
- package/dist/collection/components/q2-tab-container/test/q2-tab-container-test.vr.js +24 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.css +22 -0
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.css +25 -2
- package/dist/collection/components/q2-tag/q2-tag.js +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.vr.js +21 -1
- package/dist/collection/components/q2-textarea/q2-textarea.css +24 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +2 -2
- package/dist/collection/components/q2-textarea/test/q2-textarea-test.vr.js +16 -1
- package/dist/collection/components/q2-toast/q2-toast.css +22 -0
- package/dist/collection/components/q2-tooltip/q2-tooltip.css +27 -19
- package/dist/collection/components/q2-tooltip/q2-tooltip.js +32 -21
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +13 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.css +22 -0
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +29 -6
- package/dist/collection/utils/test/vr-helpers.js +7 -0
- package/dist/components/q2-action-group2.js +1 -1
- package/dist/components/q2-action-sheet.js +21 -18
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-badge2.js +1 -1
- package/dist/components/q2-btn2.js +15 -15
- package/dist/components/q2-calendar.js +306 -301
- package/dist/components/q2-card-image.js +6 -6
- package/dist/components/q2-card.js +14 -14
- package/dist/components/q2-carousel-pane2.js +1 -1
- package/dist/components/q2-carousel.js +633 -585
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +70 -70
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +42 -42
- package/dist/components/q2-checkbox2.js +1 -1
- package/dist/components/q2-currency.js +32 -32
- package/dist/components/q2-data-table.js +34 -34
- package/dist/components/q2-detail.js +5 -5
- package/dist/components/q2-dropdown-item2.js +11 -11
- package/dist/components/q2-dropdown.js +17 -17
- package/dist/components/q2-editable-field.js +12 -11
- package/dist/components/q2-example.js +15 -15
- package/dist/components/q2-file-picker.js +25 -25
- package/dist/components/q2-form.js +11 -11
- package/dist/components/q2-formatted-text.js +5 -5
- package/dist/components/q2-icon2.js +1 -1
- package/dist/components/q2-input2.js +24 -13
- package/dist/components/q2-item2.js +1 -1
- package/dist/components/q2-legend2.js +56 -56
- package/dist/components/q2-link2.js +6 -6
- package/dist/components/q2-list2.js +22 -22
- package/dist/components/q2-loading2.js +1 -1
- package/dist/components/q2-message2.js +20 -20
- package/dist/components/q2-meter.js +1 -1
- package/dist/components/q2-modal.js +3 -3
- package/dist/components/q2-month-picker.js +10 -10
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +34 -34
- package/dist/components/q2-option2.js +13 -13
- package/dist/components/q2-otp.js +5 -5
- package/dist/components/q2-pagination.js +58 -58
- package/dist/components/q2-pill.js +66 -54
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-radio-group.js +5 -5
- package/dist/components/q2-radio.js +14 -14
- package/dist/components/q2-relative-time.js +10 -10
- package/dist/components/q2-resize-observer2.js +9 -9
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +22 -22
- package/dist/components/q2-select2.js +1 -1
- package/dist/components/q2-stepper-pane.js +33 -33
- package/dist/components/q2-stepper-vertical.js +84 -60
- package/dist/components/q2-stepper.js +79 -65
- package/dist/components/q2-surface.js +14 -14
- package/dist/components/q2-tab-container.js +110 -55
- package/dist/components/q2-tab-pane.js +7 -7
- package/dist/components/q2-tag2.js +39 -39
- package/dist/components/q2-textarea.js +16 -16
- package/dist/components/q2-toast.js +22 -22
- package/dist/components/q2-tooltip2.js +26 -25
- package/dist/components/tecton-tab-pane.js +11 -11
- package/dist/esm/click-elsewhere_3.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group_2.entry.js +3 -3
- package/dist/esm/q2-action-sheet.entry.js +4 -3
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +17 -8
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +8 -6
- package/dist/esm/q2-card-image.entry.js +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +104 -70
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox_2.entry.js +3 -3
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +1 -1
- package/dist/esm/q2-form.entry.js +1 -1
- package/dist/esm/q2-formatted-text.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-meter.entry.js +1 -1
- package/dist/esm/q2-modal.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +18 -2
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-search.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +32 -9
- package/dist/esm/q2-stepper.entry.js +18 -4
- package/dist/esm/q2-surface.entry.js +3 -3
- package/dist/esm/q2-tab-container.entry.js +89 -20
- package/dist/esm/q2-tab-pane.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +27 -16
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-action-group_2.entry.js +42 -42
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +21 -18
- package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +25 -15
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-calendar.entry.js +120 -115
- package/dist/q2-tecton-elements/q2-card-image.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-carousel.entry.js +572 -540
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +166 -166
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +190 -190
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-currency.entry.js +40 -40
- package/dist/q2-tecton-elements/q2-data-table.entry.js +64 -64
- package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +18 -17
- package/dist/q2-tecton-elements/q2-example.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-form.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-link_2.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-message.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-meter.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-modal.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +39 -39
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-option.entry.js +22 -22
- package/dist/q2-tecton-elements/q2-otp.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +11 -11
- package/dist/q2-tecton-elements/q2-pill.entry.js +30 -18
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +24 -24
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-search.entry.js +12 -12
- package/dist/q2-tecton-elements/q2-section.entry.js +25 -25
- package/dist/q2-tecton-elements/q2-select.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +77 -53
- package/dist/q2-tecton-elements/q2-stepper.entry.js +44 -30
- package/dist/q2-tecton-elements/q2-surface.entry.js +5 -5
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +109 -56
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-toast.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +25 -24
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +11 -11
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +14 -0
- package/dist/types/components/q2-input/q2-input.d.ts +7 -1
- package/dist/types/components/q2-pill/q2-pill.d.ts +2 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +1 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +3 -2
- package/dist/types/components/q2-surface/q2-surface.d.ts +3 -3
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +17 -3
- package/dist/types/components/q2-tooltip/q2-tooltip.d.ts +2 -1
- package/dist/types/components.d.ts +50 -21
- package/dist/types/utils/helpers.d.ts +16 -1
- package/dist/types/utils/test/vr-helpers.d.ts +11 -0
- package/package.json +12 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement as
|
|
1
|
+
import { proxyCustomElement as t, HTMLElement as e, createEvent as a, h as i, transformTag as r } from "@stencil/core/internal/client";
|
|
2
2
|
|
|
3
3
|
import { d as n } from "./index3.js";
|
|
4
4
|
|
|
@@ -22,118 +22,118 @@ import { d as D } from "./q2-message2.js";
|
|
|
22
22
|
|
|
23
23
|
import { d as w } from "./q2-popover2.js";
|
|
24
24
|
|
|
25
|
-
function formatDateISO(
|
|
26
|
-
const
|
|
27
|
-
if (n.isValid(
|
|
25
|
+
function formatDateISO(t) {
|
|
26
|
+
const e = new Date(t);
|
|
27
|
+
if (n.isValid(e)) return n.formatISO(e, {
|
|
28
28
|
representation: "date"
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
let
|
|
32
|
+
let x, k, T;
|
|
33
33
|
|
|
34
|
-
function formatDateShort(
|
|
35
|
-
const
|
|
36
|
-
if (!n.isValid(
|
|
37
|
-
const a =
|
|
38
|
-
return
|
|
34
|
+
function formatDateShort(t) {
|
|
35
|
+
const e = new Date(t);
|
|
36
|
+
if (!n.isValid(e)) return;
|
|
37
|
+
const a = e.toISOString();
|
|
38
|
+
return x || (x = new Intl.DateTimeFormat("en-US", {
|
|
39
39
|
month: "2-digit",
|
|
40
40
|
day: "2-digit",
|
|
41
41
|
year: "numeric",
|
|
42
42
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
43
|
-
})),
|
|
43
|
+
})), x.format(new Date(a));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function formatDateLong(
|
|
47
|
-
const
|
|
48
|
-
if (n.isValid(
|
|
46
|
+
function formatDateLong(t) {
|
|
47
|
+
const e = new Date(t);
|
|
48
|
+
if (n.isValid(e)) return k || (k = new Intl.DateTimeFormat("en-US", {
|
|
49
49
|
month: "short",
|
|
50
50
|
day: "numeric",
|
|
51
51
|
year: "numeric"
|
|
52
|
-
})),
|
|
52
|
+
})), k.format(e);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
function stringToDate(
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
55
|
+
function stringToDate(t) {
|
|
56
|
+
const e = "string" == typeof t;
|
|
57
|
+
if (!e && t && n.isValid(new Date(t || void 0))) t = formatDateISO(t); else if (!t || !n.isValid(new Date(t))) return;
|
|
58
58
|
let a;
|
|
59
|
-
const i =
|
|
60
|
-
if (r)
|
|
59
|
+
const i = t.split(/[\/\-]/).map((t => t.padStart(2, "0"))), r = e && t.length >= 24 && "T" === t[10], s = 3 === i.length, o = i.length < 3;
|
|
60
|
+
if (r) t = t.split("T")[0], a = new Date(t); else if (s) {
|
|
61
61
|
// Reorder mm/dd/yyyy dates for ISO formatting
|
|
62
62
|
// [mm, dd, yyyy] -> [yyyy, mm, dd]
|
|
63
|
-
|
|
63
|
+
t.includes("/") && 4 === i[2].length && i.unshift(i.pop()), a = new Date(Date.UTC(parseInt(i[0]), parseInt(i[1]) - 1, parseInt(i[2])));
|
|
64
64
|
} else if (o) {
|
|
65
|
-
const
|
|
66
|
-
let
|
|
65
|
+
const t = new Date;
|
|
66
|
+
let e, r, n;
|
|
67
67
|
switch (i.length) {
|
|
68
68
|
case 1:
|
|
69
|
-
|
|
69
|
+
e = t.getFullYear(), r = i[0], n = "01";
|
|
70
70
|
break;
|
|
71
71
|
|
|
72
72
|
case 2:
|
|
73
|
-
|
|
73
|
+
e = t.getFullYear(), r = i[0], n = i[1];
|
|
74
74
|
}
|
|
75
|
-
a = new Date(`${
|
|
75
|
+
a = new Date(`${e}-${r}-${n}`);
|
|
76
76
|
}
|
|
77
77
|
if (n.isValid(a))
|
|
78
78
|
// result = setHours(result, 0);
|
|
79
79
|
return a = removeTimezoneOffset(a), n.isValid(a) ? a : void 0;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
function removeTimezoneOffset(
|
|
83
|
-
const
|
|
82
|
+
function removeTimezoneOffset(t) {
|
|
83
|
+
const e = t.getTimezoneOffset();
|
|
84
84
|
// Minutes compensation for some timezones like India, Central Australia and etc use GMT+5:30, GMT+9:30
|
|
85
|
-
return n.setMinutes(
|
|
85
|
+
return n.setMinutes(t, e + Math.abs(e % 60));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
function stringArrayToDate(
|
|
89
|
-
return Array.isArray(
|
|
88
|
+
function stringArrayToDate(t) {
|
|
89
|
+
return Array.isArray(t) && 0 !== t.length ? t.map((t => stringToDate(t))) : [];
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
function setupMonthYear(
|
|
92
|
+
function setupMonthYear(t = new Date) {
|
|
93
93
|
return {
|
|
94
|
-
monthIndex:
|
|
95
|
-
selectedYear:
|
|
94
|
+
monthIndex: t.getMonth(),
|
|
95
|
+
selectedYear: t.getFullYear()
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
function validateInput(
|
|
99
|
+
function validateInput(t = "", e = [], a = [], // white list
|
|
100
100
|
i = [], // black list
|
|
101
101
|
r, o, l = "mm/dd/yyyy", d) {
|
|
102
102
|
let c = !1, h = !1, u = "info", p = `${s("tecton.element.calendar.hint.format")}: ${l}`;
|
|
103
|
-
if (!
|
|
103
|
+
if (!t) return {
|
|
104
104
|
isValid: c,
|
|
105
105
|
inputDate: new Date(""),
|
|
106
106
|
isAvailable: h,
|
|
107
107
|
messageType: u,
|
|
108
108
|
message: p
|
|
109
109
|
};
|
|
110
|
-
const v = function(
|
|
110
|
+
const v = function(t, e) {
|
|
111
111
|
const a = new Date;
|
|
112
112
|
// eslint-disable-next-line prefer-const
|
|
113
|
-
let [i, r, n] =
|
|
113
|
+
let [i, r, n] = t.split("/");
|
|
114
114
|
"0" === i && (i = "01");
|
|
115
115
|
"0" === r && (r = "01");
|
|
116
|
-
if (10 ===
|
|
116
|
+
if (10 === t.length) return new Date(t);
|
|
117
117
|
if (i && r && Number(r) > 0) {
|
|
118
|
-
const
|
|
119
|
-
const i = `${
|
|
118
|
+
const t = Number(r) < 10 ? "0" + Number(r) : r, a = !n || n.length < 4 ? function(t, e, a) {
|
|
119
|
+
const i = `${t}/${e}`, r = new Date, n = r.getMonth() < 9 ? "0" + (r.getMonth() + 1) : "" + (r.getMonth() + 1), s = r.getDate() < 10 ? "0" + r.getDate() : "" + r.getDate(), o = `${n}/${s}/${r.getFullYear()}`;
|
|
120
120
|
let l = r.getFullYear();
|
|
121
121
|
"future" === a && o.slice(0, 5) > i ? l = r.getFullYear() + 1 : "past" === a && o.slice(0, 5) < i && (l = r.getFullYear() - 1);
|
|
122
122
|
return l.toString();
|
|
123
|
-
}(i, r,
|
|
124
|
-
return new Date(`${i}/${
|
|
123
|
+
}(i, r, e) : n;
|
|
124
|
+
return new Date(`${i}/${t}/${a}`);
|
|
125
125
|
}
|
|
126
126
|
if (i) return new Date(`${i}/01/${a.getFullYear()}`);
|
|
127
|
-
}(
|
|
127
|
+
}(t, d), m = v.getMonth() + 1, f = v.getDate(), b = v.getFullYear(), g = [ m, f, b ];
|
|
128
128
|
if (n.isValid(v)) {
|
|
129
129
|
const n = getMonths()[v.getMonth()];
|
|
130
|
-
10 ===
|
|
130
|
+
10 === t.length && (c = !0, u = null, p = null), h = e.includes(v.getDay());
|
|
131
131
|
const d = formatDateISO(v);
|
|
132
132
|
if (h) {
|
|
133
|
-
const
|
|
134
|
-
(
|
|
133
|
+
const t = a.length && !a.includes(d), e = i.length && i.includes(d);
|
|
134
|
+
(t || e || r && r > d || o && o < d) && (h = !1);
|
|
135
135
|
}
|
|
136
|
-
if (
|
|
136
|
+
if (t.length >= 5 && !h) {
|
|
137
137
|
c = !1, u = "error";
|
|
138
138
|
p = !n || !f || !b ? `${s("tecton.element.calendar.hint.invalidDate")}: ${l}` : s("tecton.element.calendar.hint.notAvailableDate", [ formatDateLong(v) ]);
|
|
139
139
|
} else c = !0;
|
|
@@ -152,51 +152,51 @@ function getMonths() {
|
|
|
152
152
|
return [ s("tecton.element.calendar.months.January"), s("tecton.element.calendar.months.February"), s("tecton.element.calendar.months.March"), s("tecton.element.calendar.months.April"), s("tecton.element.calendar.months.May"), s("tecton.element.calendar.months.June"), s("tecton.element.calendar.months.July"), s("tecton.element.calendar.months.August"), s("tecton.element.calendar.months.September"), s("tecton.element.calendar.months.October"), s("tecton.element.calendar.months.November"), s("tecton.element.calendar.months.December") ];
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
function getValidDaysOfWeek(
|
|
155
|
+
function getValidDaysOfWeek(t = 127) {
|
|
156
156
|
/* tslint:disable:no-bitwise */
|
|
157
|
-
const
|
|
158
|
-
return
|
|
157
|
+
const e = 2 & t, a = 4 & t, i = 8 & t, r = 16 & t, n = 32 & t, s = 64 & t, o = [];
|
|
158
|
+
return t <= 0 || (1 & t && o.push(0), e && o.push(1), a && o.push(2), i && o.push(3),
|
|
159
159
|
r && o.push(4), n && o.push(5), s && o.push(6)), o;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
function validateAgainstChecksum(
|
|
163
|
-
return
|
|
162
|
+
function validateAgainstChecksum(t, e) {
|
|
163
|
+
return t.includes(e.getDay());
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
function validateAgainstBlacklist(
|
|
167
|
-
return !validateAgainstWhitelist(
|
|
166
|
+
function validateAgainstBlacklist(t, e) {
|
|
167
|
+
return !validateAgainstWhitelist(t, e);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
function validateAgainstWhitelist(
|
|
171
|
-
return
|
|
170
|
+
function validateAgainstWhitelist(t, e) {
|
|
171
|
+
return t.some((t => n.isSameDay(t, e)));
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
function buildDates(
|
|
174
|
+
function buildDates(t, e, a, i, r, s, o) {
|
|
175
175
|
const l = [ baseValidation.bind(null, s, new Date) ];
|
|
176
|
-
return (null ==
|
|
177
|
-
l.push(validateAgainstBlacklist.bind(null, a)), function({monthIndex:
|
|
178
|
-
const o = !n.isValid(new Date(s)), l = function(
|
|
179
|
-
const a = n.getDaysInMonth(new Date(
|
|
180
|
-
return [ ...Array(a).keys() ].reduce(((a, i) => (a.push(new Date(
|
|
176
|
+
return (null == e ? void 0 : e.length) ? l.push(validateAgainstWhitelist.bind(null, e)) : l.push(validateAgainstChecksum.bind(null, t)),
|
|
177
|
+
l.push(validateAgainstBlacklist.bind(null, a)), function({monthIndex: t, selectedYear: e}, a, i, r, s) {
|
|
178
|
+
const o = !n.isValid(new Date(s)), l = function(t, e) {
|
|
179
|
+
const a = n.getDaysInMonth(new Date(e, t));
|
|
180
|
+
return [ ...Array(a).keys() ].reduce(((a, i) => (a.push(new Date(e, t, i + 1)),
|
|
181
181
|
a)), []);
|
|
182
|
-
}(
|
|
183
|
-
const s = r.some((
|
|
182
|
+
}(t, e).map(((t, e) => {
|
|
183
|
+
const s = r.some((e => !e(t))), l = function(t, e, a) {
|
|
184
184
|
a || (a = new Date);
|
|
185
|
-
const i = a && n.isSameDay(a,
|
|
185
|
+
const i = a && n.isSameDay(a, t), r = n.isSameDay(t, new Date), s = n.isSameDay(t, null == e ? void 0 : e.startDate), o = n.isSameDay(t, null == e ? void 0 : e.endDate);
|
|
186
186
|
return {
|
|
187
187
|
isSelected: i,
|
|
188
188
|
isToday: r,
|
|
189
189
|
isStartDate: s,
|
|
190
190
|
isEndDate: o
|
|
191
191
|
};
|
|
192
|
-
}(
|
|
192
|
+
}(t, i, a), d = function({isInvalid: t, isSelected: e, isEndDate: a, isStartDate: i, isToday: r, isIncompleteDate: n}) {
|
|
193
193
|
const s = [];
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
t || s.push("is-valid");
|
|
195
|
+
e && s.push("is-selected");
|
|
196
196
|
a && s.push("is-end-date");
|
|
197
197
|
i && s.push("is-start-date");
|
|
198
198
|
r && s.push("is-today");
|
|
199
|
-
|
|
199
|
+
e && t && !n && s.push("is-unavailable");
|
|
200
200
|
return s.join(" ");
|
|
201
201
|
}({
|
|
202
202
|
...l,
|
|
@@ -206,25 +206,25 @@ function buildDates(e, t, a, i, r, s, o) {
|
|
|
206
206
|
return {
|
|
207
207
|
...l,
|
|
208
208
|
isValid: !s,
|
|
209
|
-
date:
|
|
210
|
-
integer:
|
|
209
|
+
date: t,
|
|
210
|
+
integer: e + 1,
|
|
211
211
|
isEmpty: !1,
|
|
212
212
|
isActivity: !1,
|
|
213
213
|
classList: d
|
|
214
214
|
};
|
|
215
|
-
})), d = function(
|
|
216
|
-
return addEmptyDates(0,
|
|
217
|
-
}(function(
|
|
218
|
-
return new Date(
|
|
219
|
-
}(
|
|
220
|
-
return 0 ===
|
|
215
|
+
})), d = function(t) {
|
|
216
|
+
return addEmptyDates(0, t);
|
|
217
|
+
}(function(t, e) {
|
|
218
|
+
return new Date(e, t, 1, 1, 1, 1, 1).getDay();
|
|
219
|
+
}(t, e)), c = function(t) {
|
|
220
|
+
return 0 === t ? [] : addEmptyDates(t, 7);
|
|
221
221
|
}((d.length + l.length) % 7);
|
|
222
222
|
return [ ...d, ...l, ...c ];
|
|
223
223
|
}(i, r, s, l, o);
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
function baseValidation(
|
|
227
|
-
const i = n.isAfter(null ==
|
|
226
|
+
function baseValidation(t, e, a) {
|
|
227
|
+
const i = n.isAfter(null == t ? void 0 : t.startDate, a), r = n.isBefore(null == t ? void 0 : t.endDate, a), s = n.isSameDay(e, a) && n.isAfter(e, null == t ? void 0 : t.cutOffTime);
|
|
228
228
|
return !(i || s || r);
|
|
229
229
|
}
|
|
230
230
|
|
|
@@ -241,15 +241,15 @@ const I = {
|
|
|
241
241
|
classList: ""
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
-
function addEmptyDates(
|
|
245
|
-
return 7 ===
|
|
244
|
+
function addEmptyDates(t, e) {
|
|
245
|
+
return 7 === t && (t = 0), [ ...Array(e - t).keys() ].map((() => ({
|
|
246
246
|
...I
|
|
247
247
|
})));
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
const O =
|
|
251
|
-
constructor(
|
|
252
|
-
super(), !1 !==
|
|
250
|
+
const O = t(class extends e {
|
|
251
|
+
constructor(t) {
|
|
252
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.change = a(this, "change", 7),
|
|
253
253
|
this.error = a(this, "error", 7), this.success = a(this, "success", 7), this.tctChange = a(this, "tctChange", 7),
|
|
254
254
|
this.tctError = a(this, "tctError", 7), this.tctSuccess = a(this, "tctSuccess", 7),
|
|
255
255
|
this.dayAbbrStrings = [ s("tecton.element.calendar.days.short.Sunday"), s("tecton.element.calendar.days.short.Monday"), s("tecton.element.calendar.days.short.Tuesday"), s("tecton.element.calendar.days.short.Wednesday"), s("tecton.element.calendar.days.short.Thursday"), s("tecton.element.calendar.days.short.Friday"), s("tecton.element.calendar.days.short.Saturday") ],
|
|
@@ -279,74 +279,74 @@ const O = e(class extends t {
|
|
|
279
279
|
/** Show success styles when the calendar is in a valid state. The error state takes precedence when both are set. */
|
|
280
280
|
this.valid = !1, this.closeCalendar = () => {
|
|
281
281
|
this.open && (this.open = !1, this.focusInput());
|
|
282
|
-
}, this.goToMonthYear = (
|
|
283
|
-
|
|
284
|
-
monthIndex:
|
|
285
|
-
selectedYear:
|
|
282
|
+
}, this.goToMonthYear = (t, e) => {
|
|
283
|
+
t < 0 ? (t = 11, e--) : t > 11 && (t = 0, e++), this.selectedMonthYear = {
|
|
284
|
+
monthIndex: t,
|
|
285
|
+
selectedYear: e
|
|
286
286
|
}, this.dateList = this.buildDateList(this.selectedMonthYear), this.scheduledAfterRender.push((() => this.checkActiveCellForBlankness()));
|
|
287
|
-
}, this.onClickElsewhere =
|
|
288
|
-
"click-elsewhere" ===
|
|
289
|
-
}, this.onDateKeydown =
|
|
290
|
-
const {monthIndex:
|
|
291
|
-
switch (
|
|
287
|
+
}, this.onClickElsewhere = t => {
|
|
288
|
+
"click-elsewhere" === t.target.localName && (t.stopPropagation(), this.closeCalendar());
|
|
289
|
+
}, this.onDateKeydown = t => {
|
|
290
|
+
const {monthIndex: e, selectedYear: a} = this.selectedMonthYear, i = parseInt(t.target.dataset.day), r = this.generateDateFromDay(i);
|
|
291
|
+
switch (t.key) {
|
|
292
292
|
case "ArrowUp":
|
|
293
|
-
|
|
293
|
+
t.preventDefault(), this.activateDay(n.addDays(r, -7));
|
|
294
294
|
break;
|
|
295
295
|
|
|
296
296
|
case "ArrowDown":
|
|
297
|
-
|
|
297
|
+
t.preventDefault(), this.activateDay(n.addDays(r, 7));
|
|
298
298
|
break;
|
|
299
299
|
|
|
300
300
|
case "ArrowRight":
|
|
301
|
-
|
|
301
|
+
t.preventDefault(), this.activateDay(n.addDays(r, 1));
|
|
302
302
|
break;
|
|
303
303
|
|
|
304
304
|
case "ArrowLeft":
|
|
305
|
-
|
|
305
|
+
t.preventDefault(), this.activateDay(n.addDays(r, -1));
|
|
306
306
|
break;
|
|
307
307
|
|
|
308
308
|
case "PageUp":
|
|
309
|
-
|
|
309
|
+
t.preventDefault(), t.shiftKey ? this.goToMonthYear(e, a - 1) : this.goToMonthYear(e - 1, a);
|
|
310
310
|
break;
|
|
311
311
|
|
|
312
312
|
case "PageDown":
|
|
313
|
-
|
|
313
|
+
t.preventDefault(), t.shiftKey ? this.goToMonthYear(e, a + 1) : this.goToMonthYear(e + 1, a);
|
|
314
314
|
break;
|
|
315
315
|
|
|
316
316
|
case "Home":
|
|
317
|
-
|
|
317
|
+
t.preventDefault(), this.activateDay(n.addDays(r, -r.getDay()));
|
|
318
318
|
break;
|
|
319
319
|
|
|
320
320
|
case "End":
|
|
321
|
-
|
|
321
|
+
t.preventDefault(), this.activateDay(n.addDays(r, 6 - r.getDay()));
|
|
322
322
|
break;
|
|
323
323
|
|
|
324
324
|
case "Escape":
|
|
325
|
-
|
|
325
|
+
t.preventDefault(), this.closeCalendar(), this.focusInput();
|
|
326
326
|
break;
|
|
327
327
|
|
|
328
328
|
case "Enter":
|
|
329
329
|
case " ":
|
|
330
|
-
if (
|
|
330
|
+
if (t.preventDefault(), !this.dateList.find((({date: t}) => n.isSameDay(t, r))).isValid) return;
|
|
331
331
|
this.selectDate(r), this.closeCalendar(), this.focusInput();
|
|
332
332
|
}
|
|
333
|
-
}, this.onDateSelection =
|
|
334
|
-
const
|
|
335
|
-
if (!
|
|
336
|
-
const a = removeTimezoneOffset(new Date(
|
|
333
|
+
}, this.onDateSelection = t => {
|
|
334
|
+
const e = t.target.closest("td:not([aria-hidden])");
|
|
335
|
+
if (!e) return;
|
|
336
|
+
const a = removeTimezoneOffset(new Date(e.dataset.date));
|
|
337
337
|
this.selectDate(a), this.closeCalendar();
|
|
338
|
-
}, this.onHeaderControlKeydown =
|
|
339
|
-
var
|
|
340
|
-
const a = this.generateDateFromDay(1), i = null === (
|
|
341
|
-
"Tab" !==
|
|
338
|
+
}, this.onHeaderControlKeydown = t => {
|
|
339
|
+
var e;
|
|
340
|
+
const a = this.generateDateFromDay(1), i = null === (e = this.calendarBody) || void 0 === e ? void 0 : e.querySelector('[aria-selected="true"]');
|
|
341
|
+
"Tab" !== t.key || i || (t.preventDefault(), this.activateDay(a));
|
|
342
342
|
}, this.onInputBlur = () => {
|
|
343
343
|
if (!this.isTypeable) return;
|
|
344
|
-
const
|
|
345
|
-
|
|
344
|
+
const t = getValidDaysOfWeek(this.daysOfWeekChecksum), {typedValue: e} = this, {isValid: a, inputDate: i, isAvailable: r} = validateInput(this.typedValue, t, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
|
|
345
|
+
e || "Invalid Date" !== (null == i ? void 0 : i.toString()) ? a || e && e.length > 4 && // at least mm/dd provided
|
|
346
346
|
i && n.isValid(i) && r ? this.setCompleteInput(i) : this.value && (this.valueOnBlur = this.value,
|
|
347
347
|
this.value = null, p(this, [ "change", "tctChange" ], {
|
|
348
348
|
value: null
|
|
349
|
-
}), this.typedValue =
|
|
349
|
+
}), this.typedValue = e) :
|
|
350
350
|
// initial/clear state
|
|
351
351
|
this.setHints({
|
|
352
352
|
isValid: !0,
|
|
@@ -354,73 +354,73 @@ const O = e(class extends t {
|
|
|
354
354
|
messageType: "info"
|
|
355
355
|
});
|
|
356
356
|
}, this.onInputClick = () => {
|
|
357
|
-
this.disabled || this.toggleCalendar();
|
|
358
|
-
}, this.onInputFocus =
|
|
359
|
-
if (this.isTypeable &&
|
|
357
|
+
this.disabled || this.readonly || this.toggleCalendar();
|
|
358
|
+
}, this.onInputFocus = t => {
|
|
359
|
+
if (this.isTypeable && t.target === this.controlElement) {
|
|
360
360
|
if (this.valueOnBlur && !this.value) {
|
|
361
|
-
const
|
|
362
|
-
this.value = this.valueOnBlur, this.typedValue =
|
|
361
|
+
const t = this.typedValue;
|
|
362
|
+
this.value = this.valueOnBlur, this.typedValue = t, this.valueOnBlur = null;
|
|
363
363
|
}
|
|
364
364
|
this.closeCalendar();
|
|
365
365
|
}
|
|
366
|
-
}, this.onInputInput = ({detail: {value:
|
|
367
|
-
this.typedValue =
|
|
368
|
-
}, this.onInputKeydown =
|
|
369
|
-
const {dateValue:
|
|
370
|
-
if (!this.disabled) switch (
|
|
366
|
+
}, this.onInputInput = ({detail: {value: t}}) => {
|
|
367
|
+
this.typedValue = t;
|
|
368
|
+
}, this.onInputKeydown = t => {
|
|
369
|
+
const {dateValue: e} = this;
|
|
370
|
+
if (!this.disabled) switch (t.key) {
|
|
371
371
|
case "ArrowDown":
|
|
372
|
-
|
|
372
|
+
t.preventDefault(), this.openCalendar(), this.activateDay(e || new Date);
|
|
373
373
|
break;
|
|
374
374
|
|
|
375
375
|
case "Enter":
|
|
376
376
|
case " ":
|
|
377
377
|
if (this.typeable) break;
|
|
378
|
-
|
|
378
|
+
t.preventDefault(), this.open ? this.closeCalendar() : (this.openCalendar(), this.activateDay(e || new Date));
|
|
379
379
|
}
|
|
380
|
-
}, this.onInputKeyup =
|
|
380
|
+
}, this.onInputKeyup = t => {
|
|
381
381
|
if (this.disabled) return;
|
|
382
|
-
if ("Escape" ===
|
|
382
|
+
if ("Escape" === t.key) this.onInputBlur(), this.closeCalendar();
|
|
383
383
|
if (!this.isTypeable) return;
|
|
384
384
|
// handle missing zero in month and date
|
|
385
|
-
this.typedValue = function(
|
|
386
|
-
if (!
|
|
387
|
-
if (
|
|
388
|
-
if (
|
|
389
|
-
const
|
|
390
|
-
return `${
|
|
385
|
+
this.typedValue = function(t) {
|
|
386
|
+
if (!t) return "";
|
|
387
|
+
if (t.match(/^[1-9]\/$/)) return `0${t}/`;
|
|
388
|
+
if (t.match(/^[0-9]{2}\/[1-9]{1}\/$/)) {
|
|
389
|
+
const e = t.split("/");
|
|
390
|
+
return `${e[0]}/0${e[1]}/`;
|
|
391
391
|
}
|
|
392
|
-
return
|
|
392
|
+
return t;
|
|
393
393
|
}(this.typedValue);
|
|
394
|
-
const {typedValue:
|
|
394
|
+
const {typedValue: e} = this, a = getValidDaysOfWeek(this.daysOfWeekChecksum), {isValid: i, message: r, messageType: s, inputDate: o, isAvailable: l, calendarPosition: d} = validateInput(e, a, this.validDates, this.invalidDates, this.startDate, this.endDate, this.defaultFormatString, this.assume);
|
|
395
395
|
if (d) {
|
|
396
|
-
const [
|
|
396
|
+
const [t, e, a] = d, i = new Date(a, t - 1, e);
|
|
397
397
|
n.isValid(i) && (this.selectedMonthYear = setupMonthYear(i), this.dateList = this.buildDateList(this.selectedMonthYear),
|
|
398
398
|
this.validateDate());
|
|
399
399
|
}
|
|
400
|
-
"Enter" ===
|
|
400
|
+
"Enter" === t.key ? (i || e && e.length > 4 && // at least mm/dd provided
|
|
401
401
|
o && n.isValid(o) && l ? this.setCompleteInput(o) : this.value && (this.value = null,
|
|
402
402
|
p(this, [ "change", "tctChange" ], {
|
|
403
403
|
value: null
|
|
404
|
-
}), this.typedValue =
|
|
404
|
+
}), this.typedValue = e), this.keyboardSelection ? (this.keyboardSelection = !1,
|
|
405
405
|
this.closeCalendar()) : this.toggleCalendar()) : this.setHints({
|
|
406
406
|
isValid: i,
|
|
407
407
|
message: r,
|
|
408
408
|
messageType: s
|
|
409
409
|
});
|
|
410
|
-
}, this.onPopupKeyup =
|
|
411
|
-
"Escape" !==
|
|
410
|
+
}, this.onPopupKeyup = t => {
|
|
411
|
+
"Escape" !== t.key && "Esc" !== t.key || (this.onInputBlur(), this.closeCalendar());
|
|
412
412
|
}, this.onRefocus = () => {
|
|
413
|
-
var
|
|
414
|
-
null === (
|
|
413
|
+
var t;
|
|
414
|
+
null === (t = this.btnPrevMonth) || void 0 === t || t.dispatchEvent(new FocusEvent("focus"));
|
|
415
415
|
}, this.openCalendar = () => {
|
|
416
416
|
this.readonly || this.open || (this.selectedMonthYear = setupMonthYear(this.dateValue),
|
|
417
417
|
this.dateList = this.buildDateList(this.selectedMonthYear), this.open = !0);
|
|
418
|
-
}, this.selectDate =
|
|
419
|
-
const {isValid:
|
|
420
|
-
|
|
421
|
-
value: formatDateISO(
|
|
422
|
-
}), this.typedValue = formatDateShort(
|
|
423
|
-
value: formatDateISO(
|
|
418
|
+
}, this.selectDate = t => {
|
|
419
|
+
const {isValid: e} = this.dateList.find((({date: e}) => n.isSameDay(e, t)));
|
|
420
|
+
e && (p(this, [ "change", "tctChange" ], {
|
|
421
|
+
value: formatDateISO(t)
|
|
422
|
+
}), this.typedValue = formatDateShort(t), this.invalid = !1, p(this, [ "success", "tctSuccess" ], {
|
|
423
|
+
value: formatDateISO(t)
|
|
424
424
|
}));
|
|
425
425
|
}, this.toggleCalendar = () => {
|
|
426
426
|
this.readonly || (this.open ? this.closeCalendar() : this.openCalendar());
|
|
@@ -430,9 +430,9 @@ const O = e(class extends t {
|
|
|
430
430
|
// #region Component Lifecycle Events
|
|
431
431
|
connectedCallback() {
|
|
432
432
|
this.selectedMonthYear = setupMonthYear(this.dateValue), this.dateList = this.buildDateList(this.selectedMonthYear),
|
|
433
|
-
this.value && this.isTypeable && !this.typedValue && (this.typedValue = function(
|
|
434
|
-
const
|
|
435
|
-
return 3 !==
|
|
433
|
+
this.value && this.isTypeable && !this.typedValue && (this.typedValue = function(t) {
|
|
434
|
+
const e = (t || "").split("-");
|
|
435
|
+
return 3 !== e.length ? "" : `${e[1]}/${e[2]}/${e[0]}`;
|
|
436
436
|
}(this.value)), this.validateDate();
|
|
437
437
|
}
|
|
438
438
|
componentWillLoad() {
|
|
@@ -443,30 +443,30 @@ const O = e(class extends t {
|
|
|
443
443
|
}
|
|
444
444
|
componentDidRender() {
|
|
445
445
|
setTimeout((() => {
|
|
446
|
-
this.scheduledAfterRender.forEach((
|
|
446
|
+
this.scheduledAfterRender.forEach((t => t())), this.scheduledAfterRender = [];
|
|
447
447
|
}), 25);
|
|
448
448
|
}
|
|
449
449
|
// #endregion
|
|
450
450
|
// #region Listeners
|
|
451
|
-
defaultChangeHandler(
|
|
452
|
-
|
|
451
|
+
defaultChangeHandler(t) {
|
|
452
|
+
t.target === this.hostElement && !this.hostElement.onchange && t.detail && null !== t.detail.value && (this.value = t.detail.value);
|
|
453
453
|
}
|
|
454
454
|
handleClear() {
|
|
455
455
|
p(this, [ "change", "tctChange" ], {
|
|
456
456
|
value: null
|
|
457
457
|
}), this.value = null, this.typedValue = "";
|
|
458
458
|
}
|
|
459
|
-
defaultErrorHandler(
|
|
460
|
-
|
|
459
|
+
defaultErrorHandler(t) {
|
|
460
|
+
t.target !== this.hostElement || this.hostElement.onerror || ("error" === this.hintMessageType && this.hintMessage ? this.internalError = this.hintMessage : this.internalError = s("tecton.element.calendar.hint.invalidDate"));
|
|
461
461
|
}
|
|
462
|
-
delegateFocus(
|
|
463
|
-
c(
|
|
462
|
+
delegateFocus(t) {
|
|
463
|
+
c(t, this.hostElement) && this.controlElement.shadowRoot.querySelector(".input-field").focus();
|
|
464
464
|
}
|
|
465
|
-
popoverStateHandler({detail: {open:
|
|
466
|
-
this.open !==
|
|
465
|
+
popoverStateHandler({detail: {open: t}}) {
|
|
466
|
+
this.open !== t && (this.open = t);
|
|
467
467
|
}
|
|
468
|
-
defaultSuccessHandler(
|
|
469
|
-
|
|
468
|
+
defaultSuccessHandler(t) {
|
|
469
|
+
t.target === this.hostElement && ("function" == typeof this.onsuccess ? this.onsuccess(t) : (this.internalError = "",
|
|
470
470
|
"error" === this.hintMessageType && this.hintMessage && (this.hintMessage = null,
|
|
471
471
|
this.hintMessageType = null, this.invalid = !1)));
|
|
472
472
|
}
|
|
@@ -495,13 +495,13 @@ const O = e(class extends t {
|
|
|
495
495
|
* will not select the date.
|
|
496
496
|
*
|
|
497
497
|
* @testOnly
|
|
498
|
-
*/ async setValue(
|
|
499
|
-
var
|
|
500
|
-
const a = "string" == typeof
|
|
498
|
+
*/ async setValue(t) {
|
|
499
|
+
var e;
|
|
500
|
+
const a = "string" == typeof t ? stringToDate(t) : t;
|
|
501
501
|
if (!n.isValid(a)) return;
|
|
502
502
|
await this.openPopover(), await h(), this.goToMonthYear(a.getMonth(), a.getFullYear()),
|
|
503
503
|
await h();
|
|
504
|
-
const i = null === (
|
|
504
|
+
const i = null === (e = this.calendarTable) || void 0 === e ? void 0 : e.querySelector(`td[data-date="${formatDateISO(a)}"]`);
|
|
505
505
|
null == i || i.click();
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
@@ -514,10 +514,10 @@ const O = e(class extends t {
|
|
|
514
514
|
* Only applicable when the input is typeable.
|
|
515
515
|
*
|
|
516
516
|
* @testOnly
|
|
517
|
-
*/ async typeValue(
|
|
517
|
+
*/ async typeValue(t) {
|
|
518
518
|
if (!this.typeable) return;
|
|
519
|
-
const
|
|
520
|
-
if (!n.isValid(
|
|
519
|
+
const e = "string" == typeof t ? stringToDate(t) : t, a = formatDateShort(e);
|
|
520
|
+
if (!n.isValid(e)) return;
|
|
521
521
|
const {innerInputField: i, controlElement: r} = this;
|
|
522
522
|
i.focus(), i.dispatchEvent(new FocusEvent("focus")), i.value = a, i.dispatchEvent(new InputEvent("input")),
|
|
523
523
|
r.dispatchEvent(new KeyboardEvent("keyup"));
|
|
@@ -551,15 +551,15 @@ const O = e(class extends t {
|
|
|
551
551
|
validDatesObserver() {
|
|
552
552
|
this.dateList = this.buildDateList(this.selectedMonthYear), this.validateDate();
|
|
553
553
|
}
|
|
554
|
-
valueObserver(
|
|
554
|
+
valueObserver(t) {
|
|
555
555
|
// resetting by empty string
|
|
556
|
-
if ("" ===
|
|
556
|
+
if ("" === t) return this.value = void 0, void this.setHints({
|
|
557
557
|
isValid: !0,
|
|
558
558
|
message: this.defaultHintMessage,
|
|
559
559
|
messageType: "info"
|
|
560
560
|
});
|
|
561
|
-
const
|
|
562
|
-
this.isTypeable ? this.typedValue = a : (this.selectedMonthYear = setupMonthYear(
|
|
561
|
+
const e = t && "string" != typeof t && "toDate" in t ? t.toDate() : stringToDate(t), a = formatDateShort(e);
|
|
562
|
+
this.isTypeable ? this.typedValue = a : (this.selectedMonthYear = setupMonthYear(e),
|
|
563
563
|
this.dateList = this.buildDateList(this.selectedMonthYear), this.validateDate(),
|
|
564
564
|
this.controlElement ? this.controlElement.value = a : this.scheduledAfterRender.push((() => {
|
|
565
565
|
this.controlElement && (this.controlElement.value = a);
|
|
@@ -584,61 +584,61 @@ const O = e(class extends t {
|
|
|
584
584
|
return this.disabled && this.disabledMsg ? s(this.disabledMsg) : this.buttonLabel && (this.disabled || this.placeholder) ? s(this.buttonLabel) : this.placeholder && s(this.placeholder) || "";
|
|
585
585
|
}
|
|
586
586
|
get currentWeeks() {
|
|
587
|
-
return this.dateList.reduce(((
|
|
587
|
+
return this.dateList.reduce(((t, e, a) => {
|
|
588
588
|
const i = Math.floor(a / 7);
|
|
589
|
-
return
|
|
589
|
+
return t[i] || (t[i] = []), t[i].push(e), t;
|
|
590
590
|
}), []);
|
|
591
591
|
}
|
|
592
592
|
get dateValidators() {
|
|
593
|
-
const
|
|
593
|
+
const t = new Date(this.cutoffTime || "");
|
|
594
594
|
// should fallback to InvalidDate
|
|
595
595
|
return {
|
|
596
596
|
startDate: stringToDate(this.startDate),
|
|
597
597
|
endDate: stringToDate(this.endDate),
|
|
598
|
-
cutOffTime: n.isValid(
|
|
598
|
+
cutOffTime: n.isValid(t) ? t : void 0
|
|
599
599
|
};
|
|
600
600
|
}
|
|
601
601
|
get dateValue() {
|
|
602
602
|
if (this.isTypeable) return stringToDate(this.typedValue);
|
|
603
603
|
{
|
|
604
|
-
let {value:
|
|
605
|
-
if (
|
|
604
|
+
let {value: t} = this;
|
|
605
|
+
if (t && "string" != typeof t && "toDate" in t) return t.toDate();
|
|
606
606
|
// stringified moment value assigned in html template e.g.) handlebar
|
|
607
|
-
return "string" == typeof
|
|
608
|
-
stringToDate(
|
|
607
|
+
return "string" == typeof t && 6 === t.split(" ").length && /GMT-\d{4}/g.test(t) && (t = formatDateISO(t)),
|
|
608
|
+
stringToDate(t);
|
|
609
609
|
}
|
|
610
610
|
}
|
|
611
611
|
get defaultHintMessage() {
|
|
612
612
|
return this.typeable ? s("tecton.element.calendar.hint.format") + ": " + this.defaultFormatString : s("tecton.element.calendar.hint.select");
|
|
613
613
|
}
|
|
614
614
|
get errorList() {
|
|
615
|
-
const {errors:
|
|
615
|
+
const {errors: t, internalError: e, invalid: a} = this;
|
|
616
616
|
let i = [];
|
|
617
|
-
if (
|
|
617
|
+
if (e && (i = [ e ]), Array.isArray(t) && t.length) i = t.filter((t => !!t)).map((t => s(t))).concat(i); else if (!e && a) return [ "tecton.element.calendar.invalid" ];
|
|
618
618
|
return i;
|
|
619
619
|
}
|
|
620
620
|
get formattedValue() {
|
|
621
|
-
const {typedValue:
|
|
622
|
-
return i ?
|
|
623
|
-
return
|
|
621
|
+
const {typedValue: t, dateValue: e, displayFormat: a, isTypeable: i} = this;
|
|
622
|
+
return i ? t : void 0 === e ? "" : a ? n.format(e, function(t) {
|
|
623
|
+
return t.replace(/[d]/g, "E").replace(/[D]/g, "d").replace(/[Y]/g, "y").replace(/[l]/g, "P").replace(/[W]/g, "I");
|
|
624
624
|
}(a)) : new Intl.DateTimeFormat("en-US", {
|
|
625
625
|
year: "numeric",
|
|
626
626
|
month: "2-digit",
|
|
627
627
|
day: "2-digit",
|
|
628
628
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
629
|
-
}).format(
|
|
629
|
+
}).format(e);
|
|
630
630
|
}
|
|
631
631
|
get hintList() {
|
|
632
|
-
const {hints:
|
|
633
|
-
return Array.isArray(
|
|
632
|
+
const {hints: t, hintMessageType: e, hintMessage: a} = this;
|
|
633
|
+
return Array.isArray(t) && t.length ? t.filter((t => !!t)).map((t => s(t))) : "info" === e && a ? [ a ] : [];
|
|
634
634
|
}
|
|
635
635
|
get innerInputContainer() {
|
|
636
|
-
var
|
|
637
|
-
return null === (
|
|
636
|
+
var t, e;
|
|
637
|
+
return null === (e = null === (t = this.controlElement) || void 0 === t ? void 0 : t.shadowRoot) || void 0 === e ? void 0 : e.querySelector(".input-container");
|
|
638
638
|
}
|
|
639
639
|
get innerInputField() {
|
|
640
|
-
var
|
|
641
|
-
return null === (
|
|
640
|
+
var t, e;
|
|
641
|
+
return null === (e = null === (t = this.controlElement) || void 0 === t ? void 0 : t.shadowRoot) || void 0 === e ? void 0 : e.querySelector(".input-field");
|
|
642
642
|
}
|
|
643
643
|
get inputId() {
|
|
644
644
|
return "calendar-guid-" + this.guid;
|
|
@@ -647,78 +647,78 @@ const O = e(class extends t {
|
|
|
647
647
|
return this.typeable;
|
|
648
648
|
}
|
|
649
649
|
get selectedDate() {
|
|
650
|
-
var
|
|
651
|
-
const
|
|
652
|
-
return
|
|
650
|
+
var t;
|
|
651
|
+
const e = null === (t = this.calendarBody) || void 0 === t ? void 0 : t.querySelector('[aria-selected="true"]');
|
|
652
|
+
return e ? removeTimezoneOffset(new Date(e.dataset.date)) : null;
|
|
653
653
|
}
|
|
654
654
|
_togglePopover() {
|
|
655
|
-
const
|
|
656
|
-
null ==
|
|
655
|
+
const t = this.typeable ? this.btnCalendarToggle : this.innerInputField;
|
|
656
|
+
null == t || t.click(), null == t || t.focus(), t.dispatchEvent(new FocusEvent("focus"));
|
|
657
657
|
}
|
|
658
|
-
activateDay(
|
|
659
|
-
this.goToMonthYear(
|
|
658
|
+
activateDay(t) {
|
|
659
|
+
this.goToMonthYear(t.getMonth(), t.getFullYear()), this.scheduledAfterRender.push((() => this.focusDay(t)));
|
|
660
660
|
}
|
|
661
|
-
buildDateList(
|
|
662
|
-
const
|
|
663
|
-
return buildDates(getValidDaysOfWeek(this.daysOfWeekChecksum), stringArrayToDate(this.validDates),
|
|
661
|
+
buildDateList(t) {
|
|
662
|
+
const e = stringArrayToDate(this.invalidDates);
|
|
663
|
+
return buildDates(getValidDaysOfWeek(this.daysOfWeekChecksum), stringArrayToDate(this.validDates), e, t, this.dateValue, this.dateValidators, this.typedValue);
|
|
664
664
|
}
|
|
665
665
|
checkActiveCellForBlankness() {
|
|
666
|
-
const
|
|
667
|
-
if (!
|
|
668
|
-
const {calendarBody:
|
|
666
|
+
const t = this.hostElement.shadowRoot.activeElement;
|
|
667
|
+
if (!t || "TD" !== t.tagName || !t.hasAttribute("aria-hidden")) return;
|
|
668
|
+
const {calendarBody: e} = this, a = Array.from(e.querySelectorAll("td")), i = Array.from(a).indexOf(t) < 15 ? 1 : a.filter((t => !t.hasAttribute("aria-hidden"))).length;
|
|
669
669
|
this.focusDay(this.generateDateFromDay(i));
|
|
670
670
|
}
|
|
671
|
-
async focusDay(
|
|
672
|
-
var
|
|
673
|
-
|
|
671
|
+
async focusDay(t) {
|
|
672
|
+
var e;
|
|
673
|
+
t && (await h(), null === (e = this.calendarBody.querySelector(`td[data-day="${t.getDate()}"]`)) || void 0 === e || e.focus());
|
|
674
674
|
}
|
|
675
675
|
focusInput() {
|
|
676
|
-
var
|
|
677
|
-
null === (
|
|
676
|
+
var t;
|
|
677
|
+
null === (t = this.controlElement) || void 0 === t || t.focus();
|
|
678
678
|
}
|
|
679
|
-
generateDateFromDay(
|
|
680
|
-
const {monthIndex:
|
|
681
|
-
return new Date(a,
|
|
679
|
+
generateDateFromDay(t) {
|
|
680
|
+
const {monthIndex: e, selectedYear: a} = this.selectedMonthYear;
|
|
681
|
+
return new Date(a, e, t);
|
|
682
682
|
}
|
|
683
|
-
setCompleteInput(
|
|
684
|
-
const
|
|
683
|
+
setCompleteInput(t) {
|
|
684
|
+
const e = formatDateShort(t);
|
|
685
685
|
p(this, [ "change", "tctChange" ], {
|
|
686
|
-
value: formatDateISO(
|
|
687
|
-
}), this.typedValue =
|
|
686
|
+
value: formatDateISO(t)
|
|
687
|
+
}), this.typedValue = e, this.internalError = null, this.setHints({
|
|
688
688
|
isValid: !0,
|
|
689
689
|
message: null,
|
|
690
690
|
messageType: null
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
693
|
setCustomLabel() {
|
|
694
|
-
var
|
|
695
|
-
const
|
|
696
|
-
|
|
697
|
-
this.hostElement.removeChild(
|
|
694
|
+
var t;
|
|
695
|
+
const e = this.hostElement.querySelector('[slot="label"]');
|
|
696
|
+
e && (null === (t = this.controlElement) || void 0 === t || t.appendChild(e.cloneNode(!0)),
|
|
697
|
+
this.hostElement.removeChild(e));
|
|
698
698
|
}
|
|
699
|
-
setHints({isValid:
|
|
699
|
+
setHints({isValid: t, message: e, messageType: a}) {
|
|
700
700
|
var i;
|
|
701
|
-
if (
|
|
702
|
-
this.invalid = !
|
|
701
|
+
if (e === this.hintMessage) return null === (i = this.hintMessageElement) || void 0 === i ? void 0 : i.present();
|
|
702
|
+
this.invalid = !t, this.hintMessage = e, this.hintMessageType = a, "error" === a && e && (this.internalError = e,
|
|
703
703
|
p(this, [ "error", "tctError" ], {
|
|
704
704
|
errors: [ {
|
|
705
|
-
message:
|
|
705
|
+
message: e,
|
|
706
706
|
errorCode: "generalInvalid"
|
|
707
707
|
} ]
|
|
708
708
|
}));
|
|
709
709
|
}
|
|
710
710
|
validateDate() {
|
|
711
|
-
var
|
|
711
|
+
var t, e, a;
|
|
712
712
|
try {
|
|
713
713
|
if (this.value) {
|
|
714
|
-
const {dateValue: i} = this, r = null !== (
|
|
714
|
+
const {dateValue: i} = this, r = null !== (t = null == i ? void 0 : i.getMonth()) && void 0 !== t ? t : void 0, n = null !== (e = null == i ? void 0 : i.getFullYear()) && void 0 !== e ? e : void 0, {monthIndex: s, selectedYear: o} = this.selectedMonthYear;
|
|
715
715
|
let l = [];
|
|
716
716
|
l = i ? r === s && n === o ? this.dateList : this.buildDateList({
|
|
717
717
|
monthIndex: r,
|
|
718
718
|
selectedYear: n
|
|
719
719
|
}) : [];
|
|
720
720
|
const d = null !== (a = null == i ? void 0 : i.getDate()) && void 0 !== a ? a : void 0;
|
|
721
|
-
!d || !l.find((({integer:
|
|
721
|
+
!d || !l.find((({integer: t}) => t === d)).isValid ? p(this, [ "error", "tctError" ], {
|
|
722
722
|
errors: [ {
|
|
723
723
|
message: `Value passed is invalid: The date ${this.value} is not valid`,
|
|
724
724
|
errorCode: "generalInvalid"
|
|
@@ -727,7 +727,7 @@ const O = e(class extends t {
|
|
|
727
727
|
value: formatDateISO(i)
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
} catch (
|
|
730
|
+
} catch (t) {
|
|
731
731
|
console.warn("Invalid moment value ", this.dateValue);
|
|
732
732
|
}
|
|
733
733
|
}
|
|
@@ -737,50 +737,52 @@ const O = e(class extends t {
|
|
|
737
737
|
return i("table", {
|
|
738
738
|
role: "grid",
|
|
739
739
|
"aria-labelledby": "table-label",
|
|
740
|
-
ref:
|
|
741
|
-
}, i("
|
|
740
|
+
ref: t => this.calendarTable = t
|
|
741
|
+
}, i("caption", {
|
|
742
|
+
class: "sr"
|
|
743
|
+
}, s("tecton.element.calendar.caption")), i("thead", null, i("tr", null, [ ...[ , , , , , , , ].keys() ].map((t => i("th", {
|
|
742
744
|
scope: "col",
|
|
743
|
-
"aria-label": this.dayStrings[
|
|
744
|
-
}, this.dayAbbrStrings[
|
|
745
|
+
"aria-label": this.dayStrings[t]
|
|
746
|
+
}, this.dayAbbrStrings[t]))))), i("tbody", {
|
|
745
747
|
onClick: this.onDateSelection,
|
|
746
748
|
onKeyDown: this.onDateKeydown,
|
|
747
|
-
ref:
|
|
749
|
+
ref: t => this.calendarBody = t,
|
|
748
750
|
"test-id": "calendarTableBody"
|
|
749
|
-
}, this.currentWeeks.map((
|
|
750
|
-
var
|
|
751
|
+
}, this.currentWeeks.map((t => i("tr", null, t.map((t => {
|
|
752
|
+
var e;
|
|
751
753
|
let a = "";
|
|
752
|
-
return
|
|
753
|
-
if (!
|
|
754
|
-
const
|
|
755
|
-
return n.isValid(
|
|
754
|
+
return t.isToday && (a = s("tecton.element.calendar.today") + ", "), a += function(t) {
|
|
755
|
+
if (!t) return;
|
|
756
|
+
const e = new Date(t);
|
|
757
|
+
return n.isValid(e) ? (T || (T = new Intl.DateTimeFormat("en-US", {
|
|
756
758
|
month: "long",
|
|
757
759
|
day: "numeric",
|
|
758
760
|
year: "numeric",
|
|
759
761
|
weekday: "long",
|
|
760
762
|
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
761
|
-
})), T.format(
|
|
762
|
-
}(
|
|
763
|
+
})), T.format(e)) : void 0;
|
|
764
|
+
}(t.date), t.isSelected && (a += ` (${s("tecton.element.calendar.selected")})`),
|
|
763
765
|
i("td", {
|
|
764
|
-
class:
|
|
765
|
-
"aria-hidden":
|
|
766
|
-
tabindex:
|
|
767
|
-
role:
|
|
768
|
-
"aria-selected": "" +
|
|
769
|
-
"aria-disabled":
|
|
770
|
-
"data-day":
|
|
771
|
-
"data-date":
|
|
772
|
-
}, (null ==
|
|
766
|
+
class: t.classList,
|
|
767
|
+
"aria-hidden": t.isEmpty ? "true" : void 0,
|
|
768
|
+
tabindex: t.isSelected ? 0 : -1,
|
|
769
|
+
role: t.isSelected ? "gridcell" : void 0,
|
|
770
|
+
"aria-selected": "" + t.isSelected,
|
|
771
|
+
"aria-disabled": t.isValid ? void 0 : "true",
|
|
772
|
+
"data-day": t.integer || void 0,
|
|
773
|
+
"data-date": t.date ? formatDateISO(t.date) : void 0
|
|
774
|
+
}, (null == t ? void 0 : t.isToday) && i("div", {
|
|
773
775
|
class: "today-decorator",
|
|
774
776
|
"aria-hidden": "true"
|
|
775
777
|
}, s("tecton.element.calendar.today")), i("div", {
|
|
776
778
|
class: "day-integer",
|
|
777
779
|
"aria-label": a,
|
|
778
780
|
role: "text"
|
|
779
|
-
}, null !== (
|
|
781
|
+
}, null !== (e = null == t ? void 0 : t.integer) && void 0 !== e ? e : ""));
|
|
780
782
|
})))))));
|
|
781
783
|
}
|
|
782
784
|
renderCalendarPopover() {
|
|
783
|
-
const {monthIndex:
|
|
785
|
+
const {monthIndex: t, selectedYear: e} = this.selectedMonthYear;
|
|
784
786
|
return i("div", {
|
|
785
787
|
class: "calendar-field-popup",
|
|
786
788
|
onKeyUp: this.onPopupKeyup
|
|
@@ -791,30 +793,30 @@ const O = e(class extends t {
|
|
|
791
793
|
}, i("q2-btn", {
|
|
792
794
|
label: s("tecton.element.calendar.previousMonth"),
|
|
793
795
|
"hide-label": !0,
|
|
794
|
-
ref:
|
|
796
|
+
ref: t => this.btnPrevMonth = t,
|
|
795
797
|
class: "cal-nav-btn prev-month",
|
|
796
798
|
"test-id": "previousMonthButton",
|
|
797
|
-
onTctClick: () => this.goToMonthYear(
|
|
799
|
+
onTctClick: () => this.goToMonthYear(t - 1, e)
|
|
798
800
|
}, i("q2-icon", {
|
|
799
801
|
type: "chevron-left"
|
|
800
802
|
})), i("span", {
|
|
801
803
|
class: "cal-month-text"
|
|
802
|
-
}, this.monthStrings[
|
|
804
|
+
}, this.monthStrings[t]), i("q2-btn", {
|
|
803
805
|
label: s("tecton.element.calendar.nextMonth"),
|
|
804
806
|
"hide-label": !0,
|
|
805
807
|
class: "cal-nav-btn next-month",
|
|
806
|
-
ref:
|
|
808
|
+
ref: t => this.btnNextMonth = t,
|
|
807
809
|
"test-id": "nextMonthButton",
|
|
808
|
-
onTctClick: () => this.goToMonthYear(
|
|
810
|
+
onTctClick: () => this.goToMonthYear(t + 1, e)
|
|
809
811
|
}, i("q2-icon", {
|
|
810
812
|
type: "chevron-right"
|
|
811
813
|
})), i("q2-btn", {
|
|
812
814
|
label: s("tecton.element.calendar.previousYear"),
|
|
813
815
|
"hide-label": !0,
|
|
814
816
|
class: "cal-nav-btn prev-year",
|
|
815
|
-
ref:
|
|
817
|
+
ref: t => this.btnPrevYear = t,
|
|
816
818
|
"test-id": "previousYearButton",
|
|
817
|
-
onTctClick: () => this.goToMonthYear(
|
|
819
|
+
onTctClick: () => this.goToMonthYear(t, e - 1)
|
|
818
820
|
}, i("q2-icon", {
|
|
819
821
|
type: "chevron-left"
|
|
820
822
|
})), i("span", {
|
|
@@ -823,9 +825,9 @@ const O = e(class extends t {
|
|
|
823
825
|
label: s("tecton.element.calendar.nextYear"),
|
|
824
826
|
"hide-label": !0,
|
|
825
827
|
class: "cal-nav-btn next-year",
|
|
826
|
-
ref:
|
|
828
|
+
ref: t => this.btnNextYear = t,
|
|
827
829
|
"test-id": "nextYearButton",
|
|
828
|
-
onTctClick: () => this.goToMonthYear(
|
|
830
|
+
onTctClick: () => this.goToMonthYear(t, e + 1),
|
|
829
831
|
onKeyDown: this.onHeaderControlKeydown
|
|
830
832
|
}, i("q2-icon", {
|
|
831
833
|
type: "chevron-right"
|
|
@@ -833,7 +835,7 @@ const O = e(class extends t {
|
|
|
833
835
|
class: "sr",
|
|
834
836
|
"aria-live": "polite",
|
|
835
837
|
id: "table-label"
|
|
836
|
-
}, `${this.monthStrings[
|
|
838
|
+
}, `${this.monthStrings[t]} ${e}`), this.renderCalendarDays(), this.disclaimer && i("div", {
|
|
837
839
|
class: "calendar-disclaimer"
|
|
838
840
|
}, s(this.disclaimer)), i("div", {
|
|
839
841
|
tabindex: "0",
|
|
@@ -844,17 +846,17 @@ const O = e(class extends t {
|
|
|
844
846
|
renderHintField() {
|
|
845
847
|
if (this.hintMessage) return i("q2-message", {
|
|
846
848
|
class: "calendar-hint sr",
|
|
847
|
-
ref:
|
|
849
|
+
ref: t => this.hintMessageElement = t,
|
|
848
850
|
type: this.hintMessageType
|
|
849
851
|
}, this.hintMessage);
|
|
850
852
|
}
|
|
851
853
|
renderInputField() {
|
|
852
|
-
const {isTypeable: e} = this;
|
|
854
|
+
const {isTypeable: t, label: e} = this;
|
|
853
855
|
return i("q2-input", {
|
|
854
|
-
ref:
|
|
856
|
+
ref: t => this.controlElement = t,
|
|
855
857
|
class: "calendar-input-field",
|
|
856
858
|
value: this.formattedValue,
|
|
857
|
-
label: s(
|
|
859
|
+
label: s(e),
|
|
858
860
|
hideLabel: this.hideLabel,
|
|
859
861
|
disabled: !!this.disabled,
|
|
860
862
|
readonly: !!this.readonly,
|
|
@@ -862,45 +864,48 @@ const O = e(class extends t {
|
|
|
862
864
|
placeholder: this.computedPlaceholder,
|
|
863
865
|
optional: !!this.optional,
|
|
864
866
|
valid: this.valid,
|
|
865
|
-
|
|
866
|
-
|
|
867
|
+
ariaExpanded: "" + !!this.open,
|
|
868
|
+
ariaControls: "calendar-popover",
|
|
869
|
+
ariaHaspopup: "dialog",
|
|
867
870
|
hints: this.hintList,
|
|
868
871
|
errors: this.errorList,
|
|
869
|
-
onClick:
|
|
870
|
-
onChange:
|
|
871
|
-
onTctChange:
|
|
872
|
-
onInput:
|
|
872
|
+
onClick: t ? void 0 : this.onInputClick,
|
|
873
|
+
onChange: t => t.stopImmediatePropagation(),
|
|
874
|
+
onTctChange: t => t.stopImmediatePropagation(),
|
|
875
|
+
onInput: t => t.stopImmediatePropagation(),
|
|
873
876
|
onTctInput: this.onInputInput,
|
|
874
877
|
onKeyDown: this.onInputKeydown,
|
|
875
878
|
onKeyUp: this.onInputKeyup,
|
|
876
879
|
onBlur: this.onInputBlur,
|
|
877
880
|
onFocus: this.onInputFocus,
|
|
878
|
-
"icon-right":
|
|
879
|
-
"format-modifier":
|
|
881
|
+
"icon-right": t ? void 0 : "calendar",
|
|
882
|
+
"format-modifier": t ? this.formatModifier : this.displayFormat || this.formatModifier,
|
|
880
883
|
type: "date",
|
|
881
|
-
"hide-messages": !
|
|
884
|
+
"hide-messages": !t,
|
|
882
885
|
"test-id": "inputAndCalendarToggle",
|
|
883
886
|
_role: "combobox",
|
|
884
|
-
_preventEntry: !
|
|
885
|
-
},
|
|
886
|
-
ref:
|
|
887
|
+
_preventEntry: !t
|
|
888
|
+
}, t && i("q2-btn", {
|
|
889
|
+
ref: t => this.btnCalendarToggle = t,
|
|
887
890
|
slot: "input-right",
|
|
888
891
|
onClick: this.onInputClick,
|
|
889
892
|
"test-id": "calendarToggle",
|
|
890
|
-
label: "tecton.element.calendar.toggleAriaLabel",
|
|
891
|
-
"
|
|
893
|
+
label: s("tecton.element.calendar.toggleAriaLabel", [ s(e || "tecton.element.calendar.defaultLabel") ]),
|
|
894
|
+
ariaExpanded: "" + !!this.open,
|
|
895
|
+
"hide-label": !0,
|
|
896
|
+
disabled: !!this.disabled || !!this.readonly
|
|
892
897
|
}, i("q2-icon", {
|
|
893
898
|
type: "calendar"
|
|
894
899
|
})));
|
|
895
900
|
}
|
|
896
901
|
render() {
|
|
897
902
|
return i("click-elsewhere", {
|
|
898
|
-
key: "
|
|
903
|
+
key: "e7bcb2f1aec6ca1149742b0b3edc0a7bbf9ce925",
|
|
899
904
|
class: this.open ? "dropdown-open" : void 0,
|
|
900
905
|
onChange: this.onClickElsewhere
|
|
901
906
|
}, this.renderInputField(), i("q2-popover", {
|
|
902
|
-
key: "
|
|
903
|
-
ref:
|
|
907
|
+
key: "c80c5d1ecfb42a319bba294b20f519a2be6808e1",
|
|
908
|
+
ref: t => this.popoverElement = t,
|
|
904
909
|
id: "calendar-popover",
|
|
905
910
|
controlElement: this.innerInputContainer,
|
|
906
911
|
open: this.open,
|
|
@@ -949,7 +954,7 @@ const O = e(class extends t {
|
|
|
949
954
|
};
|
|
950
955
|
}
|
|
951
956
|
static get style() {
|
|
952
|
-
return
|
|
957
|
+
return '*{box-sizing:border-box}*:active{outline:none}*:focus-visible{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}@container style(--t-prefers-motion: "reduced"){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}@container (not style(--t-prefers-motion: "normal")) and (not style(--t-prefers-motion: "reduced")){@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:0.01ms !important;transition-duration:0.01ms !important;animation-delay:0ms !important;transition-delay:0ms !important}}}:host{--comp-default-calendar-margin:var(--tct-calendar-margin-top, var(--t-calendar-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-calendar-margin-bottom, var(--t-calendar-margin-bottom, var(--app-scale-5x, 25px)));display:block;margin:var(--tct-calendar-margin, var(--comp-default-calendar-margin))}:host[hidden]{display:none}click-elsewhere{position:relative;display:block}q2-input{margin:0;cursor:pointer;--tct-input-btn-hover-background:var(--tct-calendar-btn-hover-background, var(--app-gray-l3, #f2f2f2));--tct-input-btn-icon-stroke-primary:var(--tct-calendar-btn-icon-stroke-primary, var(--app-gray, #747474));--tct-input-btn-icon-stroke-secondary:var(--tct-calendar-btn-icon-stroke-secondary, var(--app-gray, #747474))}q2-popover{--comp-min-tappable-size:44px;--comp-table-border-spacing:2px;--comp-min-tappable-size-and-spacing:calc(var(--comp-min-tappable-size) + var(--comp-table-border-spacing));--comp-popover-padding:var(--tct-calendar-popover-padding, var(--t-calendar-popover-padding, var(--app-scale-1x, 5px)));--comp-min-table-width:calc(var(--comp-min-tappable-size-and-spacing) * 7);--comp-table-container-border-spacing:calc(var(--comp-table-border-spacing) * 2);--comp-popover-total-padding:calc(var(--comp-popover-padding) * 2);--tct-popover-min-width:calc( var(--comp-min-table-width) + var(--comp-table-container-border-spacing) + var(--comp-popover-total-padding) )}.calendar-field-popup{padding:var(--comp-popover-padding)}.calendar-label{--comp-label-padding:var(--tct-calendar-label-padding, var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);font-size:var(--tct-calendar-label-font-size, var(--t-calendar-label-font-size, var(--const-px-16, 16px)));flex:1 1;flex-basis:calc(100% - var(--tct-btn-icon-width, 44px));margin:0;padding:var(--comp-label-padding)}.cal-month-heading{padding:0 0 0.75rem;display:flex;justify-content:center;align-items:center;font-size:var(--tct-calendar-month-font-size, var(--t-calendar-month-font-size, var(--const-px-16, 16px)));font-weight:var(--tct-calendar-month-font-weight, var(--t-calendar-month-font-weight, 600));text-align:center}.cal-month-text{min-width:82px;display:inline-block}.cal-year-text{min-width:50px;display:inline-block}table{width:100%;margin-bottom:2px;text-align:center;border-spacing:var(--comp-table-border-spacing)}th{font-size:var(--tct-calendar-day-heading-font-size, var(--t-calendar-day-heading-font-size, inherit));font-weight:var(--tct-calendar-day-heading-font-weight, var(--t-calendar-day-heading-font-weight, 600));width:14.285714%}td{height:var(--comp-min-tappable-size);cursor:pointer;border:var(--tct-calendar-day-border, var(--t-calendar-day-border, 0));border-radius:var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))}td.is-unavailable{border:1px solid var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a))}td.is-valid:hover{border:var(--tct-calendar-day-hover-border, var(--t-calendar-day-hover-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-hover-border-radius, var(--t-calendar-day-hover-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--app-gray14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2)))))));color:var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))}td[aria-hidden],td[aria-disabled]{pointer-events:none;cursor:not-allowed}td[aria-disabled]{opacity:var(--tct-calendar-day-disabled-opacity, var(--t-calendar-day-disabled-opacity, var(--app-disabled-opacity, 0.4)))}td[aria-selected=true]{border:var(--tct-calendar-day-selected-border, var(--t-calendar-day-selected-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-selected-border-radius, var(--t-calendar-day-selected-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background:var(--tct-calendar-day-selected-background, var(--tct-calendar-day-selected-bg, var(--t-calendar-day-selected-bg, var(--tct-calendar-day-hover-background, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))))))));color:var(--tct-calendar-day-selected-font-color, var(--t-calendar-day-selected-font-color, var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))));box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}td[aria-selected=true]:focus{box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1)))), 0 0 0 4px var(--tct-calendar-day-focused-outer-ring-color, var(--const-focus-color, #0066cc))}td:focus-visible{box-shadow:0 0 0 2px var(--tct-calendar-day-focus-visible-inner-ring-color, #ffffff), 0 0 0 4px var(--tct-calendar-day-focus-visible-outer-ring-color, var(--const-focus-color, #0066cc))}.today-decorator{text-transform:uppercase;font-weight:700;font-size:var(--tct-calendar-today-decorator-font-size, var(--const-px-10, 10px));height:12px}.day-integer{font-size:var(--tct-calendar-day-integer-font-size, inherit)}.calendar-disclaimer{font-size:var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, var(--const-px-12, 12px)))));border-style:solid;border-width:var(--tct-calendar-disclaimer-border-width, var(--t-calendar-disclaimer-border-width, 1px 0 0 0));border-color:var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));padding:var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));text-align:left}';
|
|
953
958
|
}
|
|
954
959
|
}, [ 1, "q2-calendar", {
|
|
955
960
|
ariaLabel: [ 1537, "aria-label" ],
|
|
@@ -1027,46 +1032,46 @@ const O = e(class extends t {
|
|
|
1027
1032
|
} ]
|
|
1028
1033
|
} ]);
|
|
1029
1034
|
|
|
1030
|
-
const
|
|
1035
|
+
const E = O, defineCustomElement = function() {
|
|
1031
1036
|
if ("undefined" == typeof customElements) return;
|
|
1032
|
-
[ "q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover" ].forEach((
|
|
1033
|
-
switch (
|
|
1037
|
+
[ "q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover" ].forEach((t => {
|
|
1038
|
+
switch (t) {
|
|
1034
1039
|
case "q2-calendar":
|
|
1035
|
-
customElements.get(r(
|
|
1040
|
+
customElements.get(r(t)) || customElements.define(r(t), O);
|
|
1036
1041
|
break;
|
|
1037
1042
|
|
|
1038
1043
|
case "click-elsewhere":
|
|
1039
|
-
customElements.get(r(
|
|
1044
|
+
customElements.get(r(t)) || v();
|
|
1040
1045
|
break;
|
|
1041
1046
|
|
|
1042
1047
|
case "q2-badge":
|
|
1043
|
-
customElements.get(r(
|
|
1048
|
+
customElements.get(r(t)) || m();
|
|
1044
1049
|
break;
|
|
1045
1050
|
|
|
1046
1051
|
case "q2-btn":
|
|
1047
|
-
customElements.get(r(
|
|
1052
|
+
customElements.get(r(t)) || f();
|
|
1048
1053
|
break;
|
|
1049
1054
|
|
|
1050
1055
|
case "q2-icon":
|
|
1051
|
-
customElements.get(r(
|
|
1056
|
+
customElements.get(r(t)) || b();
|
|
1052
1057
|
break;
|
|
1053
1058
|
|
|
1054
1059
|
case "q2-input":
|
|
1055
|
-
customElements.get(r(
|
|
1060
|
+
customElements.get(r(t)) || g();
|
|
1056
1061
|
break;
|
|
1057
1062
|
|
|
1058
1063
|
case "q2-loading":
|
|
1059
|
-
customElements.get(r(
|
|
1064
|
+
customElements.get(r(t)) || y();
|
|
1060
1065
|
break;
|
|
1061
1066
|
|
|
1062
1067
|
case "q2-message":
|
|
1063
|
-
customElements.get(r(
|
|
1068
|
+
customElements.get(r(t)) || D();
|
|
1064
1069
|
break;
|
|
1065
1070
|
|
|
1066
1071
|
case "q2-popover":
|
|
1067
|
-
customElements.get(r(
|
|
1072
|
+
customElements.get(r(t)) || w();
|
|
1068
1073
|
}
|
|
1069
1074
|
}));
|
|
1070
1075
|
};
|
|
1071
1076
|
|
|
1072
|
-
export {
|
|
1077
|
+
export { E as Q2Calendar, defineCustomElement }
|