q2-tecton-elements 1.72.0 → 1.73.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/bundle-report.json +39545 -34361
- package/dist/cjs/{charting-ClN1ldqv.js → charting-CdNTrVBe.js} +80 -0
- package/dist/cjs/click-elsewhere_3.cjs.entry.js +81 -14
- package/dist/cjs/{dataSample-BYR-wrOn.js → dataSample-B4blhlH4.js} +1 -1
- package/dist/cjs/date-picker-helpers-UYvPn98R.js +257 -0
- package/dist/cjs/{index-BY3aao8R.js → index-BqyWHpNu.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +98 -18
- package/dist/cjs/q2-avatar.cjs.entry.js +34 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +3 -3
- package/dist/cjs/q2-btn_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-calendar.cjs.entry.js +9 -4
- package/dist/cjs/q2-card-image.cjs.entry.js +3 -3
- 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 +20 -6
- package/dist/cjs/q2-chart-area.cjs.entry.js +38 -7
- package/dist/cjs/q2-chart-bar.cjs.entry.js +39 -8
- package/dist/cjs/q2-chart-donut.cjs.entry.js +31 -13
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox_2.cjs.entry.js +8 -5
- package/dist/cjs/q2-context.cjs.entry.js +4 -4
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +7 -7
- package/dist/cjs/q2-date-calendar.cjs.entry.js +452 -0
- package/dist/cjs/q2-date-picker_2.cjs.entry.js +968 -0
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/q2-editable-field.cjs.entry.js +20 -7
- package/dist/cjs/q2-example.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +2 -2
- 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 +20 -2
- 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-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-meter.cjs.entry.js +2 -2
- package/dist/cjs/q2-modal.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-mutation-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-otp.cjs.entry.js +5 -5
- package/dist/cjs/q2-pagination.cjs.entry.js +12 -6
- package/dist/cjs/q2-pill.cjs.entry.js +8 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio.cjs.entry.js +2 -2
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-search.cjs.entry.js +3 -3
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +8 -4
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-surface.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-toast.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/{sectorHelper-9TWL-3dw.js → sectorHelper-CxhDl5ql.js} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.css +52 -0
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +98 -18
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.vr.js +124 -0
- package/dist/collection/components/q2-avatar/q2-avatar.js +34 -1
- package/dist/collection/components/q2-avatar/test/q2-avatar-test.vr.js +79 -4
- package/dist/collection/components/q2-btn/q2-btn.css +84 -136
- package/dist/collection/components/q2-btn/q2-btn.js +10 -4
- package/dist/collection/components/q2-btn/test/q2-btn-test.vr.js +99 -43
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -5
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.vr.js +3 -13
- package/dist/collection/components/q2-card-image/q2-card-image.js +2 -2
- package/dist/collection/components/q2-carousel/q2-carousel.js +19 -5
- package/dist/collection/components/q2-carousel/test/q2-carousel-test.vr.js +32 -0
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.css +11 -0
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +53 -7
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.css +11 -0
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +50 -4
- package/dist/collection/components/q2-chart-bar/test/q2-chart-bar-test.vr.js +14 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +30 -10
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.vr.js +25 -0
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +6 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +6 -3
- package/dist/collection/components/q2-context/q2-context.js +3 -3
- package/dist/collection/components/q2-context/test/q2-context-test.vr.js +3 -3
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.css +3 -0
- package/dist/collection/components/q2-data-table/q2-data-table.js +5 -5
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.vr.js +47 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.css +393 -0
- package/dist/collection/components/q2-date-calendar/q2-date-calendar.js +1022 -0
- package/dist/collection/components/q2-date-calendar/test/q2-date-calendar-test.vr.js +111 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.css +138 -0
- package/dist/collection/components/q2-date-picker/q2-date-picker.js +2010 -0
- package/dist/collection/components/q2-date-picker/test/q2-date-picker-test.vr.js +179 -0
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +5 -5
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +27 -8
- package/dist/collection/components/q2-example/q2-example.js +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +1 -1
- package/dist/collection/components/q2-form/q2-form.js +1 -1
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/formatting/phone-number-formats.js +1 -1
- package/dist/collection/components/q2-input/q2-input.js +6 -3
- package/dist/collection/components/q2-item/q2-item.js +19 -1
- package/dist/collection/components/q2-item/test/q2-item-test.vr.js +2 -2
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js +1 -1
- package/dist/collection/components/q2-message/q2-message.css +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-message/test/q2-message-test.vr.js +11 -2
- package/dist/collection/components/q2-meter/q2-meter.js +1 -1
- package/dist/collection/components/q2-modal/q2-modal.js +1 -1
- package/dist/collection/components/q2-modal/test/q2-modal-test.vr.js +7 -7
- package/dist/collection/components/q2-mutation-observer/q2-mutation-observer.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +36 -4
- package/dist/collection/components/q2-otp/q2-otp.js +4 -4
- package/dist/collection/components/q2-pagination/q2-pagination.css +17 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +10 -4
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.vr.js +39 -0
- package/dist/collection/components/q2-pill/q2-pill.css +14 -10
- package/dist/collection/components/q2-pill/q2-pill.js +6 -3
- package/dist/collection/components/q2-pill/test/q2-pill-test.vr.js +25 -0
- package/dist/collection/components/q2-popover/q2-popover.css +1 -0
- package/dist/collection/components/q2-popover/q2-popover.js +43 -8
- package/dist/collection/components/q2-radio/q2-radio.js +5 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +6 -3
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-search/q2-search.js +6 -3
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +12 -5
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-surface/q2-surface.js +1 -1
- package/dist/collection/components/q2-surface/test/q2-surface-test.vr.js +2 -2
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +6 -3
- package/dist/collection/components/q2-textarea/q2-textarea.js +6 -3
- package/dist/collection/components/q2-tooltip/test/q2-tooltip-test.vr.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/chart-keyboard.js +76 -0
- package/dist/collection/utils/date-picker/date-picker-helpers.js +239 -0
- package/dist/collection/utils/date-picker/date-picker-types.js +1 -0
- package/dist/collection/utils/index.js +1 -1
- package/dist/components/charting.js +1603 -1532
- package/dist/components/dataSample.js +7 -7
- package/dist/components/index.js +57 -53
- package/dist/components/index2.js +2 -2
- package/dist/components/q2-action-sheet.js +224 -103
- package/dist/components/q2-avatar2.js +41 -27
- package/dist/components/q2-btn2.js +2 -2
- package/dist/components/q2-calendar.js +6 -3
- package/dist/components/q2-card-image.js +2 -2
- package/dist/components/q2-carousel-pane2.js +3 -3
- package/dist/components/q2-carousel.js +37 -24
- package/dist/components/q2-chart-area.js +415 -369
- package/dist/components/q2-chart-bar.js +193 -148
- package/dist/components/q2-chart-donut.js +185 -158
- package/dist/components/q2-checkbox-group.js +6 -6
- package/dist/components/q2-checkbox2.js +11 -11
- package/dist/components/q2-context.js +20 -20
- package/dist/components/q2-currency.js +9 -9
- package/dist/components/q2-data-table.js +111 -111
- package/dist/components/q2-date-calendar.d.ts +11 -0
- package/dist/components/q2-date-calendar.js +5 -0
- package/dist/components/q2-date-calendar2.js +678 -0
- package/dist/components/q2-date-picker.d.ts +11 -0
- package/dist/components/q2-date-picker.js +5 -0
- package/dist/components/q2-date-picker2.js +875 -0
- package/dist/components/q2-detail.js +3 -3
- package/dist/components/q2-dropdown.js +17 -17
- package/dist/components/q2-editable-field.js +16 -5
- package/dist/components/q2-example.js +11 -11
- package/dist/components/q2-file-picker.js +1 -1
- package/dist/components/q2-form.js +6 -6
- package/dist/components/q2-formatted-text.js +2 -2
- package/dist/components/q2-input2.js +6 -6
- package/dist/components/q2-item2.js +32 -22
- package/dist/components/q2-legend2.js +7 -7
- package/dist/components/q2-list2.js +6 -6
- package/dist/components/q2-message2.js +10 -10
- package/dist/components/q2-meter.js +7 -7
- package/dist/components/q2-modal.js +22 -22
- package/dist/components/q2-month-picker.js +17 -17
- package/dist/components/q2-mutation-observer.js +1 -1
- package/dist/components/q2-optgroup2.js +7 -7
- package/dist/components/q2-option-list2.js +55 -34
- package/dist/components/q2-otp.js +8 -8
- package/dist/components/q2-pagination.js +70 -68
- package/dist/components/q2-pill.js +51 -46
- package/dist/components/q2-popover2.js +70 -49
- package/dist/components/q2-radio-group.js +7 -7
- package/dist/components/q2-radio.js +6 -6
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +17 -17
- package/dist/components/q2-select2.js +2 -2
- package/dist/components/q2-stepper-pane.js +29 -29
- package/dist/components/q2-stepper-vertical.js +4 -4
- package/dist/components/q2-stepper.js +57 -57
- package/dist/components/q2-surface.js +3 -3
- package/dist/components/q2-tab-container.js +21 -21
- package/dist/components/q2-tab-pane.js +6 -6
- package/dist/components/q2-tag2.js +8 -6
- package/dist/components/q2-textarea.js +3 -3
- package/dist/components/sectorHelper.js +78 -78
- package/dist/components/tecton-tab-pane.js +10 -10
- package/dist/esm/{charting-DOZct-UB.js → charting-DFXJklqs.js} +79 -1
- package/dist/esm/click-elsewhere_3.entry.js +81 -14
- package/dist/esm/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +1 -1
- package/dist/esm/date-picker-helpers-D8QnN_AS.js +242 -0
- package/dist/esm/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +99 -19
- package/dist/esm/q2-avatar.entry.js +34 -1
- package/dist/esm/q2-badge_2.entry.js +3 -3
- package/dist/esm/q2-btn_2.entry.js +2 -2
- package/dist/esm/q2-calendar.entry.js +9 -4
- package/dist/esm/q2-card-image.entry.js +3 -3
- 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 +20 -6
- package/dist/esm/q2-chart-area.entry.js +38 -7
- package/dist/esm/q2-chart-bar.entry.js +39 -8
- package/dist/esm/q2-chart-donut.entry.js +31 -13
- package/dist/esm/q2-checkbox-group.entry.js +2 -2
- package/dist/esm/q2-checkbox_2.entry.js +8 -5
- package/dist/esm/q2-context.entry.js +4 -4
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +7 -7
- package/dist/esm/q2-date-calendar.entry.js +450 -0
- package/dist/esm/q2-date-picker_2.entry.js +965 -0
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +3 -3
- package/dist/esm/q2-editable-field.entry.js +20 -7
- package/dist/esm/q2-example.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +2 -2
- 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 +20 -2
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-link_2.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-meter.entry.js +2 -2
- package/dist/esm/q2-modal.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-mutation-observer.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-otp.entry.js +5 -5
- package/dist/esm/q2-pagination.entry.js +12 -6
- package/dist/esm/q2-pill.entry.js +8 -5
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio.entry.js +2 -2
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-search.entry.js +3 -3
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +8 -4
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-surface.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-toast.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/{charting-DOZct-UB.js → charting-DFXJklqs.js} +1625 -1554
- package/dist/q2-tecton-elements/click-elsewhere_3.entry.js +85 -43
- package/dist/q2-tecton-elements/{dataSample-Dm1zpQNi.js → dataSample-CP_VKNqt.js} +33 -33
- package/dist/q2-tecton-elements/date-picker-helpers-D8QnN_AS.js +153 -0
- package/dist/q2-tecton-elements/{index-DJw6Feh0.js → index-CP8pXJ-l.js} +1 -1
- package/dist/q2-tecton-elements/q2-action-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +169 -84
- package/dist/q2-tecton-elements/q2-avatar.entry.js +24 -10
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-btn_2.entry.js +23 -23
- package/dist/q2-tecton-elements/q2-calendar.entry.js +7 -4
- package/dist/q2-tecton-elements/q2-card-image.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-carousel.entry.js +24 -11
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +187 -141
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +377 -333
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +184 -158
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-checkbox_2.entry.js +20 -18
- package/dist/q2-tecton-elements/q2-context.entry.js +21 -21
- package/dist/q2-tecton-elements/q2-currency.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-data-table.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-date-calendar.entry.js +438 -0
- package/dist/q2-tecton-elements/q2-date-picker_2.entry.js +792 -0
- package/dist/q2-tecton-elements/q2-detail.entry.js +4 -4
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +16 -16
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +17 -6
- package/dist/q2-tecton-elements/q2-example.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-form.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-icon.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +26 -16
- package/dist/q2-tecton-elements/q2-legend.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-link_2.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +29 -29
- package/dist/q2-tecton-elements/q2-meter.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-modal.entry.js +18 -18
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +14 -14
- package/dist/q2-tecton-elements/q2-mutation-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-otp.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-pagination.entry.js +51 -49
- package/dist/q2-tecton-elements/q2-pill.entry.js +22 -17
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +8 -8
- package/dist/q2-tecton-elements/q2-radio.entry.js +7 -7
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +6 -6
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-search.entry.js +31 -31
- package/dist/q2-tecton-elements/q2-section.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-select.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +10 -10
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-stepper.entry.js +45 -45
- package/dist/q2-tecton-elements/q2-surface.entry.js +15 -15
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +9 -9
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +3 -3
- package/dist/q2-tecton-elements/q2-toast.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/{sectorHelper--RMGWGAy.js → sectorHelper-DBtkWtpl.js} +56 -56
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +9 -9
- package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +21 -1
- package/dist/types/components/q2-action-sheet/test/q2-action-sheet-test.vr.d.ts +1 -0
- package/dist/types/components/q2-avatar/q2-avatar.d.ts +5 -0
- package/dist/types/components/q2-btn/q2-btn.d.ts +7 -3
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +10 -2
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +5 -0
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +11 -2
- package/dist/types/components/q2-chart-bar/q2-chart-bar.d.ts +9 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +1 -0
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +4 -3
- package/dist/types/components/q2-checkbox-group/q2-checkbox-group.d.ts +4 -2
- package/dist/types/components/q2-date-calendar/q2-date-calendar.d.ts +122 -0
- package/dist/types/components/q2-date-calendar/test/q2-date-calendar-test.vr.d.ts +1 -0
- package/dist/types/components/q2-date-picker/q2-date-picker.d.ts +304 -0
- package/dist/types/components/q2-date-picker/test/q2-date-picker-test.vr.d.ts +1 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +3 -3
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +14 -1
- package/dist/types/components/q2-input/q2-input.d.ts +4 -2
- package/dist/types/components/q2-item/q2-item.d.ts +3 -0
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +1 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +4 -0
- package/dist/types/components/q2-radio/q2-radio.d.ts +3 -2
- package/dist/types/components/q2-radio-group/q2-radio-group.d.ts +4 -2
- package/dist/types/components/q2-search/q2-search.d.ts +3 -1
- package/dist/types/components/q2-select/q2-select.d.ts +4 -2
- package/dist/types/components/q2-textarea/q2-textarea.d.ts +4 -2
- package/dist/types/components.d.ts +858 -49
- package/dist/types/global.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/chart-keyboard.d.ts +16 -0
- package/dist/types/utils/date-picker/date-picker-helpers.d.ts +47 -0
- package/dist/types/utils/date-picker/date-picker-types.d.ts +42 -0
- package/package.json +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +0 -70
- package/dist/esm/q2-optgroup.entry.js +0 -68
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +0 -88
|
@@ -0,0 +1,875 @@
|
|
|
1
|
+
import { proxyCustomElement as t, HTMLElement as e, createEvent as i, h as s, transformTag as a } from "@stencil/core/internal/client";
|
|
2
|
+
|
|
3
|
+
import { d as r } from "./index3.js";
|
|
4
|
+
|
|
5
|
+
import { f as n, o as h, i as o, w as d, l, b as c } from "./index2.js";
|
|
6
|
+
|
|
7
|
+
import { s as p } from "./action-sheet.js";
|
|
8
|
+
|
|
9
|
+
import { m as u } from "./mirror-emit.js";
|
|
10
|
+
|
|
11
|
+
import { f as m, p as g, n as v, a as f, b, c as C, i as y, e as D, l as w, g as k, d as E } from "./q2-date-calendar2.js";
|
|
12
|
+
|
|
13
|
+
import { d as T } from "./click-elsewhere2.js";
|
|
14
|
+
|
|
15
|
+
import { d as q } from "./q2-badge2.js";
|
|
16
|
+
|
|
17
|
+
import { d as x } from "./q2-btn2.js";
|
|
18
|
+
|
|
19
|
+
import { d as S } from "./q2-icon2.js";
|
|
20
|
+
|
|
21
|
+
import { d as $ } from "./q2-input2.js";
|
|
22
|
+
|
|
23
|
+
import { d as V } from "./q2-loading2.js";
|
|
24
|
+
|
|
25
|
+
import { d as F } from "./q2-message2.js";
|
|
26
|
+
|
|
27
|
+
import { d as P } from "./q2-popover2.js";
|
|
28
|
+
|
|
29
|
+
const j = t(class extends e {
|
|
30
|
+
constructor(t) {
|
|
31
|
+
var e;
|
|
32
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.change = i(this, "change", 7),
|
|
33
|
+
this.error = i(this, "error", 7), this.success = i(this, "success", 7), this.tctCancel = i(this, "tctCancel", 7),
|
|
34
|
+
this.tctChange = i(this, "tctChange", 7), this.tctClose = i(this, "tctClose", 7),
|
|
35
|
+
this.tctError = i(this, "tctError", 7), this.tctSuccess = i(this, "tctSuccess", 7),
|
|
36
|
+
this.committingValue = !1, this.normalizedDateLists = new WeakMap,
|
|
37
|
+
// #endregion
|
|
38
|
+
// #region State Properties
|
|
39
|
+
this.activePopoverDirection = "down", this.typeableValue = "",
|
|
40
|
+
// #endregion
|
|
41
|
+
// #region Public Property API
|
|
42
|
+
/**
|
|
43
|
+
* Renders the calendar panel inline with behavior specific to being hosted by `q2-action-sheet`.
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
this._actionSheet = !1,
|
|
47
|
+
/**
|
|
48
|
+
* Determines the year for a committed month/day typeable date with no year.
|
|
49
|
+
* `future` selects the next year for dates before today, while `past` selects the prior year for dates after today.
|
|
50
|
+
* Only applies to `single-typeable` mode with a month-first or day-first display format.
|
|
51
|
+
*/
|
|
52
|
+
this.assume = "current",
|
|
53
|
+
/** Displays a button in the input field allowing the user to clear the selected date or range. */
|
|
54
|
+
this.clearable = !1,
|
|
55
|
+
/** Delay in milliseconds before the popover closes after selection. Explicitly undefined or non-positive values close immediately. */
|
|
56
|
+
this.closeDelay = 400,
|
|
57
|
+
/** Indicates the date picker cannot be focused or interacted with. */
|
|
58
|
+
this.disabled = !1,
|
|
59
|
+
/**
|
|
60
|
+
* Hides the input field's visible label while retaining its accessible name.
|
|
61
|
+
* @warning
|
|
62
|
+
* Hides the label visually. `label` text is still required for screenreader compliance.
|
|
63
|
+
*/
|
|
64
|
+
this.hideLabel = !1,
|
|
65
|
+
/**
|
|
66
|
+
* Instructs the component to use the action sheet workflow for displaying its calendar.
|
|
67
|
+
*
|
|
68
|
+
* For more information, see [Action Sheets](https://tecton.q2developer.com/guides/action-sheets/).
|
|
69
|
+
*/
|
|
70
|
+
this.hoist = !!(null === (e = window.Tecton) || void 0 === e ? void 0 : e.useActionSheets) || void 0,
|
|
71
|
+
/** Shows the input field's error visual state. */
|
|
72
|
+
this.invalid = !1,
|
|
73
|
+
/** Formats selected dates using the provided locale. Accepts multiple locales in an array as sequential fallbacks. */
|
|
74
|
+
this.locale = document.documentElement.lang || "en-US",
|
|
75
|
+
/**
|
|
76
|
+
* Selects calendar or typeable behavior for a single date or date range.
|
|
77
|
+
* Enabling the legacy `typeable` prop uses `single-typeable` when `mode` is left at its default; an explicit mode takes precedence.
|
|
78
|
+
*/
|
|
79
|
+
this.mode = "single",
|
|
80
|
+
/** Controls whether the date picker popover is open or closed. */
|
|
81
|
+
this.open = !1,
|
|
82
|
+
/** Appends "(optional)" to the input label and marks the field as not required. */
|
|
83
|
+
this.optional = !1,
|
|
84
|
+
/** Aligns the calendar popover to the left or right side of the input field. */
|
|
85
|
+
this.popoverAlignment = "left",
|
|
86
|
+
/** @deprecated Retained for compatibility with `q2-date-picker`. */
|
|
87
|
+
this.popoverMinHeight = 355,
|
|
88
|
+
/**
|
|
89
|
+
* Uses absolute positioning for the popover when set to `legacy`.
|
|
90
|
+
*
|
|
91
|
+
* This compatibility option supports layouts where transformed ancestors interfere with fixed positioning.
|
|
92
|
+
*/
|
|
93
|
+
this.popoverMode = null,
|
|
94
|
+
/**
|
|
95
|
+
* The field's content is not editable, but the field remains focusable.
|
|
96
|
+
*
|
|
97
|
+
* Appends "(read only)" to the field label.
|
|
98
|
+
*/
|
|
99
|
+
this.readonly = !1,
|
|
100
|
+
/** Enables the legacy single-date typeable input behavior. */
|
|
101
|
+
this.typeable = !1,
|
|
102
|
+
/** Shows the input field's success visual state when no errors are active. */
|
|
103
|
+
this.valid = !1, this.onCalendarCancel = t => {
|
|
104
|
+
t.stopPropagation(), this.calendarError = "", this._actionSheet ? this.tctCancel.emit() : this.closeCalendar();
|
|
105
|
+
}, this.onCalendarCommit = t => {
|
|
106
|
+
if (t.stopPropagation(), this.disabled || this.readonly) return;
|
|
107
|
+
if (!t.detail) return;
|
|
108
|
+
this.calendarError = "";
|
|
109
|
+
const {value: e, rangeStart: i, rangeEnd: s} = t.detail;
|
|
110
|
+
if (this.isRangeMode) {
|
|
111
|
+
if (!i || !s) return;
|
|
112
|
+
return this.rangeStart = i, this.rangeEnd = s, u(this, [ "change", "tctChange" ], {
|
|
113
|
+
rangeStart: i,
|
|
114
|
+
rangeEnd: s
|
|
115
|
+
}), void this.closeCalendar(!0, !0);
|
|
116
|
+
}
|
|
117
|
+
e && (this.commitSingleValue(e), this.closeAfterSelection());
|
|
118
|
+
}, this.onCalendarDismiss = t => {
|
|
119
|
+
t.stopPropagation(), this.calendarError = "", this._actionSheet ? this.tctCancel.emit() : this.closeCalendar();
|
|
120
|
+
}, this.onCalendarError = t => {
|
|
121
|
+
t.stopPropagation(), this.calendarError = t.detail, this._actionSheet ? this.tctClose.emit({
|
|
122
|
+
error: t.detail
|
|
123
|
+
}) : this.closeCalendar(!0, !0);
|
|
124
|
+
}, this.onCalendarToggleClick = t => {
|
|
125
|
+
t.stopPropagation(), this.toggleCalendar();
|
|
126
|
+
}, this.onClear = () => {
|
|
127
|
+
if (this.calendarError = "", this.typeableError = "", this.typeableValue = "", this.isRangeMode) return this.rangeStart = void 0,
|
|
128
|
+
this.rangeEnd = void 0, void u(this, [ "change", "tctChange" ], {
|
|
129
|
+
rangeStart: null,
|
|
130
|
+
rangeEnd: null
|
|
131
|
+
});
|
|
132
|
+
this.value = void 0, u(this, [ "change", "tctChange" ], {
|
|
133
|
+
value: null
|
|
134
|
+
});
|
|
135
|
+
}, this.onClickElsewhere = t => {
|
|
136
|
+
"click-elsewhere" === t.target.localName && (t.stopPropagation(), this.closeCalendar(!1));
|
|
137
|
+
}, this.onInputClick = () => {
|
|
138
|
+
this.acceptsTypeableInput || this.toggleCalendar();
|
|
139
|
+
}, this.onInputKeydown = t => {
|
|
140
|
+
if (!this.disabled && !this.readonly) {
|
|
141
|
+
if (!this.acceptsTypeableInput) return p({
|
|
142
|
+
hoist: this.hoist
|
|
143
|
+
}, t) ? (t.preventDefault(), void this.showActionSheet()) : "Escape" === t.key && this.open ? (t.preventDefault(),
|
|
144
|
+
void this.closeCalendar()) : void ([ "Enter", " ", "ArrowDown" ].includes(t.key) && !this.open && (t.preventDefault(),
|
|
145
|
+
this.setActivePopoverDirection(), this.open = !0, requestAnimationFrame((() => this.focusRenderedDate()))));
|
|
146
|
+
if (t.metaKey || t.ctrlKey || t.altKey || 1 !== t.key.length) return;
|
|
147
|
+
this.typeableAllowedCharacters.test(t.key) || t.preventDefault();
|
|
148
|
+
}
|
|
149
|
+
}, this.onTypeableChange = t => {
|
|
150
|
+
if (t.stopImmediatePropagation(), this.disabled || this.readonly) return;
|
|
151
|
+
if (this.isSingleTypeable) {
|
|
152
|
+
const t = this.parseTypeableDate(this.typeableValue);
|
|
153
|
+
if (!t || !this.isDateValid(t)) return void this.setTypeableError(this.dateFormatValidationError);
|
|
154
|
+
this.setTypeableError("");
|
|
155
|
+
const e = m(t);
|
|
156
|
+
return void this.commitSingleValue(e);
|
|
157
|
+
}
|
|
158
|
+
const [e, i] = this.typeableValue.split(" - "), s = this.parseTypeableDate(e), a = this.parseTypeableDate(i);
|
|
159
|
+
if (!s || !a) return void this.setTypeableError(this.rangeFormatValidationError);
|
|
160
|
+
const r = this.typeableRangeError(s, a);
|
|
161
|
+
if (r) return void this.setTypeableError(r);
|
|
162
|
+
this.setTypeableError("");
|
|
163
|
+
const n = m(s), h = m(a);
|
|
164
|
+
this.rangeStart = n, this.rangeEnd = h, u(this, [ "change", "tctChange" ], {
|
|
165
|
+
rangeStart: n,
|
|
166
|
+
rangeEnd: h
|
|
167
|
+
});
|
|
168
|
+
}, this.onTypeableInput = t => {
|
|
169
|
+
var e;
|
|
170
|
+
if (t.stopImmediatePropagation(), this.disabled || this.readonly) return;
|
|
171
|
+
const i = this.isRangeTypeable ? 16 : 8, s = String((null === (e = t.detail) || void 0 === e ? void 0 : e.value) || "").replace(/\D/g, "").slice(0, i);
|
|
172
|
+
this.typeableValue = this.isRangeTypeable && s.length > 8 ? `${this.formatTypeableDate(s.slice(0, 8))} - ${this.formatTypeableDate(s.slice(8))}` : this.formatTypeableDate(s),
|
|
173
|
+
this.validateTypeableValue();
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
// #endregion
|
|
177
|
+
// #region Component Lifecycle Events
|
|
178
|
+
connectedCallback() {
|
|
179
|
+
const t = this.normalizedValue;
|
|
180
|
+
t && this.value !== t && (this.value = t), this.activePopoverDirection = this.effectivePopoverDirection || "down",
|
|
181
|
+
this.typeableValue = this.formattedTypeableValue, this.validateCurrentValue();
|
|
182
|
+
}
|
|
183
|
+
disconnectedCallback() {
|
|
184
|
+
clearTimeout(this.closeTimeout);
|
|
185
|
+
}
|
|
186
|
+
componentWillLoad() {
|
|
187
|
+
this.popDirection && n(this, "popDirection", "prop");
|
|
188
|
+
}
|
|
189
|
+
componentDidLoad() {
|
|
190
|
+
h(this.hostElement);
|
|
191
|
+
}
|
|
192
|
+
componentDidRender() {
|
|
193
|
+
this.open && "up" === this.activePopoverDirection && this.scrollUpCalendarToBottom();
|
|
194
|
+
}
|
|
195
|
+
// #endregion
|
|
196
|
+
// #region Listeners
|
|
197
|
+
beforeInputHandler(t) {
|
|
198
|
+
this.acceptsTypeableInput && t.data && !this.typeableAllowedCharacters.test(t.data) && t.preventDefault();
|
|
199
|
+
}
|
|
200
|
+
delegateFocus(t) {
|
|
201
|
+
var e;
|
|
202
|
+
o(t, this.hostElement) && (null === (e = this.controlElement) || void 0 === e || e.focus());
|
|
203
|
+
}
|
|
204
|
+
popoverStateHandler({detail: {open: t}}) {
|
|
205
|
+
this.open !== t && (this.open = t);
|
|
206
|
+
}
|
|
207
|
+
// #endregion
|
|
208
|
+
// #region Public Methods API
|
|
209
|
+
/** Closes the calendar popover if it is open. */
|
|
210
|
+
async closePopover() {
|
|
211
|
+
this.closeCalendar();
|
|
212
|
+
}
|
|
213
|
+
/** Moves the visible month to the provided date and focuses that day. */ async focusDate(t) {
|
|
214
|
+
var e;
|
|
215
|
+
r.isValid(t) && (await d(), await (null === (e = this.calendarElement) || void 0 === e ? void 0 : e.focusDate(t)));
|
|
216
|
+
}
|
|
217
|
+
/** Opens the calendar popover if it is closed. */ async openPopover() {
|
|
218
|
+
var t;
|
|
219
|
+
if (this.open || this.disabled || this.readonly || this._actionSheet) return;
|
|
220
|
+
this.setActivePopoverDirection(), this.open = !0, await d();
|
|
221
|
+
const e = this.acceptsTypeableInput ? null === (t = this.controlElement) || void 0 === t ? void 0 : t.querySelector('[test-id="datePickerCalendarToggle"]') : this.controlElement;
|
|
222
|
+
null == e || e.focus(), null == e || e.dispatchEvent(new FocusEvent("focus"));
|
|
223
|
+
}
|
|
224
|
+
/** Clears selected values, uncommitted typeable input, and error state without changing configuration props. */ async reset() {
|
|
225
|
+
clearTimeout(this.closeTimeout), this.value = void 0, this.rangeStart = void 0,
|
|
226
|
+
this.rangeEnd = void 0, this.errors = void 0, this.invalid = !1, this.calendarError = "",
|
|
227
|
+
this.typeableError = "", this.typeableValue = "";
|
|
228
|
+
}
|
|
229
|
+
/** Opens the calendar and selects the provided date when it is valid. */ async setValue(t) {
|
|
230
|
+
var e;
|
|
231
|
+
const i = g(v(t));
|
|
232
|
+
this.disabled || this.readonly || this.isRangeTypeable || !r.isValid(i) || !this.isDateValid(i) || (this._actionSheet || (this.setActivePopoverDirection(),
|
|
233
|
+
this.open = !0, await d()), await (null === (e = this.calendarElement) || void 0 === e ? void 0 : e.setValue(i)));
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Focuses the single typeable input and stages a valid date without committing it.
|
|
237
|
+
*
|
|
238
|
+
* @warning
|
|
239
|
+
* Only applicable when the effective mode is `single-typeable`.
|
|
240
|
+
*/ async typeValue(t) {
|
|
241
|
+
var e;
|
|
242
|
+
if (!this.isSingleTypeable) return;
|
|
243
|
+
const i = g(v(t));
|
|
244
|
+
r.isValid(i) && await (null === (e = this.controlElement) || void 0 === e ? void 0 : e.setValue(this.formatDateWithModifier(i)));
|
|
245
|
+
}
|
|
246
|
+
// #endregion
|
|
247
|
+
// #region Watchers
|
|
248
|
+
constraintsChanged() {
|
|
249
|
+
this.committingValue || (this.acceptsTypeableInput && this.revalidateTypeableValue(),
|
|
250
|
+
this.typeableError || this.validateCurrentValue());
|
|
251
|
+
}
|
|
252
|
+
disabledChanged(t) {
|
|
253
|
+
t && this.closeCalendar(!1);
|
|
254
|
+
}
|
|
255
|
+
displayFormatChanged() {
|
|
256
|
+
this.calendarError = "", this.typeableError = "", this.typeableValue = this.formattedTypeableValue;
|
|
257
|
+
}
|
|
258
|
+
modeChanged() {
|
|
259
|
+
this.open = !1, this.calendarError = "", this.typeableError = "", this.typeableValue = this.formattedTypeableValue;
|
|
260
|
+
}
|
|
261
|
+
openChanged(t) {
|
|
262
|
+
t && (this.setActivePopoverDirection(), this.isRangeMode && "down" === this.activePopoverDirection && this.scrollDownCalendarToTop());
|
|
263
|
+
}
|
|
264
|
+
popDirectionChanged() {
|
|
265
|
+
this.popDirection && n(this, "popDirection", "prop"), this.setActivePopoverDirection();
|
|
266
|
+
}
|
|
267
|
+
popoverDirectionChanged() {
|
|
268
|
+
this.setActivePopoverDirection();
|
|
269
|
+
}
|
|
270
|
+
rangeEndChanged() {
|
|
271
|
+
this.isRangeMode && (this.calendarError = "", this.isRangeTypeable && this.syncTypeableValue());
|
|
272
|
+
}
|
|
273
|
+
rangeStartChanged() {
|
|
274
|
+
this.isRangeMode && (this.calendarError = "", this.isRangeTypeable && this.syncTypeableValue());
|
|
275
|
+
}
|
|
276
|
+
readonlyChanged(t) {
|
|
277
|
+
t && this.closeCalendar(!1);
|
|
278
|
+
}
|
|
279
|
+
valueChanged(t) {
|
|
280
|
+
const e = v(t);
|
|
281
|
+
e && t !== e ? this.value = e : this.isRangeMode || this.committingValue || (this.calendarError = "",
|
|
282
|
+
this.isSingleTypeable && this.syncTypeableValue(), this.validateCurrentValue());
|
|
283
|
+
}
|
|
284
|
+
// #endregion
|
|
285
|
+
// #region Local Methods
|
|
286
|
+
get acceptsTypeableInput() {
|
|
287
|
+
return this.isRangeTypeable || this.isSingleTypeable;
|
|
288
|
+
}
|
|
289
|
+
get actionSheetData() {
|
|
290
|
+
return {
|
|
291
|
+
appearance: "date-picker",
|
|
292
|
+
title: this.localizeForLocale(this.calendarLabel || "Choose a date"),
|
|
293
|
+
datePickerProps: {
|
|
294
|
+
calendarLabel: this.calendarLabel,
|
|
295
|
+
closeDelay: this.closeDelay,
|
|
296
|
+
cutoffTime: this.cutoffTime,
|
|
297
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
298
|
+
disclaimer: this.disclaimer,
|
|
299
|
+
endDate: v(this.endDate),
|
|
300
|
+
displayFormat: this.normalizedDisplayFormat,
|
|
301
|
+
invalidDates: this.normalizedInvalidDates,
|
|
302
|
+
locale: this.locale,
|
|
303
|
+
mode: this.isRangeMode ? "range" : "single",
|
|
304
|
+
rangeEnd: v(this.rangeEnd),
|
|
305
|
+
rangeStart: v(this.rangeStart),
|
|
306
|
+
startDate: v(this.startDate),
|
|
307
|
+
validDates: this.normalizedValidDates,
|
|
308
|
+
value: this.normalizedValue
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
get automaticPopoverDirection() {
|
|
313
|
+
var t, e;
|
|
314
|
+
const {top: i = 0, bottom: s = 0} = (null === (e = null === (t = this.controlElement) || void 0 === t ? void 0 : t.getBoundingClientRect) || void 0 === e ? void 0 : e.call(t)) || {};
|
|
315
|
+
return i > window.innerHeight - s ? "up" : "down";
|
|
316
|
+
}
|
|
317
|
+
get canClear() {
|
|
318
|
+
return this.clearable && (this.isRangeMode ? !!this.rangeStart || !!this.rangeEnd : !!this.normalizedValue);
|
|
319
|
+
}
|
|
320
|
+
get computedErrors() {
|
|
321
|
+
const t = [ ...this.errors || [] ], e = this.typeableError || this.calendarError;
|
|
322
|
+
return e && t.push(e), !t.length && this.invalid && t.push("tecton.element.calendar.invalid"),
|
|
323
|
+
t.length ? [ t[0] ] : void 0;
|
|
324
|
+
}
|
|
325
|
+
get computedPlaceholder() {
|
|
326
|
+
return this.disabled && this.disabledMsg ? this.localizeForLocale(this.disabledMsg) : this.localizeForLocale(this.placeholder);
|
|
327
|
+
}
|
|
328
|
+
get dateFormatValidationError() {
|
|
329
|
+
return this.localizeForLocale("tecton.element.datePicker.validation.dateFormat", {
|
|
330
|
+
format: this.normalizedDisplayFormat
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
get effectiveMode() {
|
|
334
|
+
return "single" !== this.mode ? this.mode : this.typeable ? "single-typeable" : "single";
|
|
335
|
+
}
|
|
336
|
+
get effectivePopoverDirection() {
|
|
337
|
+
return this.popoverDirection || this.popDirection;
|
|
338
|
+
}
|
|
339
|
+
get formattedTypeableValue() {
|
|
340
|
+
return this.selectedDate ? this.isRangeTypeable ? this.rangeEndDate ? `${this.formatDateWithModifier(this.selectedDate)} - ${this.formatDateWithModifier(this.rangeEndDate)}` : "" : this.formatDateWithModifier(this.selectedDate) : "";
|
|
341
|
+
}
|
|
342
|
+
get formattedValue() {
|
|
343
|
+
if (!this.selectedDate) return "";
|
|
344
|
+
const formatDate = t => this.displayFormat ? f(t, this.displayFormat) : this.formatLongDate(t);
|
|
345
|
+
return "range" === this.effectiveMode && this.rangeEndDate ? `${formatDate(this.selectedDate)} – ${formatDate(this.rangeEndDate)}` : formatDate(this.selectedDate);
|
|
346
|
+
}
|
|
347
|
+
get isRangeMode() {
|
|
348
|
+
return "range" === this.effectiveMode || this.isRangeTypeable;
|
|
349
|
+
}
|
|
350
|
+
get isRangeTypeable() {
|
|
351
|
+
return "range-typeable" === this.effectiveMode;
|
|
352
|
+
}
|
|
353
|
+
get isSingleTypeable() {
|
|
354
|
+
return "single-typeable" === this.effectiveMode;
|
|
355
|
+
}
|
|
356
|
+
get normalizedDisplayFormat() {
|
|
357
|
+
return b(this.displayFormat);
|
|
358
|
+
}
|
|
359
|
+
get normalizedInvalidDates() {
|
|
360
|
+
return this.normalizeDateList(this.invalidDates);
|
|
361
|
+
}
|
|
362
|
+
get normalizedValidDates() {
|
|
363
|
+
return this.normalizeDateList(this.validDates);
|
|
364
|
+
}
|
|
365
|
+
get normalizedValue() {
|
|
366
|
+
return v(this.value);
|
|
367
|
+
}
|
|
368
|
+
get rangeEndDate() {
|
|
369
|
+
const t = g(v(this.rangeEnd));
|
|
370
|
+
return r.isValid(t) ? t : void 0;
|
|
371
|
+
}
|
|
372
|
+
get rangeFormatValidationError() {
|
|
373
|
+
return this.localizeForLocale("tecton.element.datePicker.validation.rangeFormat", {
|
|
374
|
+
format: this.rangeTypeableFormat
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
get rangeOrderValidationError() {
|
|
378
|
+
return this.localizeForLocale("tecton.element.datePicker.validation.rangeOrder");
|
|
379
|
+
}
|
|
380
|
+
get rangeTypeableFormat() {
|
|
381
|
+
return `${this.normalizedDisplayFormat} - ${this.normalizedDisplayFormat}`;
|
|
382
|
+
}
|
|
383
|
+
get rangeValidationError() {
|
|
384
|
+
return this.localizeForLocale("tecton.element.datePicker.validation.rangeUnavailable");
|
|
385
|
+
}
|
|
386
|
+
get selectedDate() {
|
|
387
|
+
const t = g(this.isRangeMode ? v(this.rangeStart) : this.normalizedValue);
|
|
388
|
+
return r.isValid(t) ? t : void 0;
|
|
389
|
+
}
|
|
390
|
+
get typeableAllowedCharacters() {
|
|
391
|
+
const t = `${this.normalizedDisplayFormat.replace(/[MDY]/g, "")}${this.isRangeTypeable ? " -" : ""}`.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
392
|
+
return new RegExp(`^[0-9${t}]+$`);
|
|
393
|
+
}
|
|
394
|
+
closeAfterSelection() {
|
|
395
|
+
clearTimeout(this.closeTimeout);
|
|
396
|
+
const t = Number(this.closeDelay);
|
|
397
|
+
!t || t <= 0 ? this.closeCalendar(!0, !0) : this.closeTimeout = setTimeout((() => this.closeCalendar(!0, !0)), t);
|
|
398
|
+
}
|
|
399
|
+
closeCalendar(t = !0, e = !1) {
|
|
400
|
+
var i;
|
|
401
|
+
this.open && (this.open = !1, e && this.tctClose.emit(), t && (null === (i = this.controlElement) || void 0 === i || i.focus()));
|
|
402
|
+
}
|
|
403
|
+
commitSingleValue(t) {
|
|
404
|
+
if (!this.committingValue) {
|
|
405
|
+
// Watchers and consumer change handlers may update constraints during either event alias.
|
|
406
|
+
this.committingValue = !0;
|
|
407
|
+
try {
|
|
408
|
+
this.value = t, u(this, [ "change", "tctChange" ], {
|
|
409
|
+
value: t
|
|
410
|
+
});
|
|
411
|
+
} finally {
|
|
412
|
+
this.committingValue = !1;
|
|
413
|
+
}
|
|
414
|
+
this.isSingleTypeable && this.syncTypeableValue(), this.typeableError || this.validateCurrentValue();
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
emitValidationError(t) {
|
|
418
|
+
this.isRangeMode || u(this, [ "error", "tctError" ], {
|
|
419
|
+
errors: [ {
|
|
420
|
+
message: t,
|
|
421
|
+
errorCode: "generalInvalid"
|
|
422
|
+
} ]
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
emitValidationSuccess(t) {
|
|
426
|
+
this.isRangeMode || u(this, [ "success", "tctSuccess" ], {
|
|
427
|
+
value: t
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
focusRenderedDate(t) {
|
|
431
|
+
var e;
|
|
432
|
+
null === (e = this.calendarElement) || void 0 === e || e.dispatchEvent(new CustomEvent("tctCalendarFocus", {
|
|
433
|
+
detail: {
|
|
434
|
+
value: t
|
|
435
|
+
}
|
|
436
|
+
}));
|
|
437
|
+
}
|
|
438
|
+
formatDateWithModifier(t) {
|
|
439
|
+
return C(t, this.normalizedDisplayFormat);
|
|
440
|
+
}
|
|
441
|
+
formatLongDate(t) {
|
|
442
|
+
return new Intl.DateTimeFormat(this.locale, {
|
|
443
|
+
year: "numeric",
|
|
444
|
+
month: "long",
|
|
445
|
+
day: "numeric"
|
|
446
|
+
}).format(t);
|
|
447
|
+
}
|
|
448
|
+
formatTypeableDate(t) {
|
|
449
|
+
const e = this.normalizedDisplayFormat.includes("-") ? "-" : "/";
|
|
450
|
+
return (this.normalizedDisplayFormat.startsWith("YYYY") ? [ t.slice(0, 4), t.slice(4, 6), t.slice(6, 8) ] : [ t.slice(0, 2), t.slice(2, 4), t.slice(4, 8) ]).filter(Boolean).join(e);
|
|
451
|
+
}
|
|
452
|
+
isDateValid(t) {
|
|
453
|
+
return y(t, {
|
|
454
|
+
cutoffTime: this.cutoffTime,
|
|
455
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
456
|
+
endDate: v(this.endDate),
|
|
457
|
+
invalidDates: this.normalizedInvalidDates,
|
|
458
|
+
startDate: v(this.startDate),
|
|
459
|
+
validDates: this.normalizedValidDates
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
isRangeValid(t, e) {
|
|
463
|
+
return D(t, e, {
|
|
464
|
+
cutoffTime: this.cutoffTime,
|
|
465
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
466
|
+
endDate: v(this.endDate),
|
|
467
|
+
invalidDates: this.normalizedInvalidDates,
|
|
468
|
+
startDate: v(this.startDate),
|
|
469
|
+
validDates: this.normalizedValidDates
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
isTypeableDatePrefixInvalid(t) {
|
|
473
|
+
const e = this.normalizedDisplayFormat.startsWith("YYYY"), i = this.normalizedDisplayFormat.startsWith("DD"), s = e ? t.slice(0, 4) : t.slice(0, 2), a = e ? t.slice(4, 6) : t.slice(2, 4), r = e || i ? a : s, n = e ? t.slice(6, 8) : i ? s : a, isSegmentInvalid = (t, e) => {
|
|
474
|
+
if (!t) return !1;
|
|
475
|
+
if (1 === t.length) return Number(t) > Math.floor(e / 10);
|
|
476
|
+
const i = Number(t);
|
|
477
|
+
return i < 1 || i > e;
|
|
478
|
+
};
|
|
479
|
+
return !(!isSegmentInvalid(r, 12) && !isSegmentInvalid(n, 31)) || !(r.length < 2 || n.length < 2) && Number(n) > new Date(2e3, Number(r), 0).getDate();
|
|
480
|
+
}
|
|
481
|
+
localizeForLocale(t, e = {}) {
|
|
482
|
+
return w(t, e);
|
|
483
|
+
}
|
|
484
|
+
normalizeDateList(t) {
|
|
485
|
+
if (t)
|
|
486
|
+
// Stable references prevent child constraint watchers from clearing errors on unrelated renders.
|
|
487
|
+
return this.normalizedDateLists.has(t) || this.normalizedDateLists.set(t, t.map((t => v(t))).filter((t => !!t))),
|
|
488
|
+
this.normalizedDateLists.get(t);
|
|
489
|
+
}
|
|
490
|
+
parseTypeableDate(t) {
|
|
491
|
+
var e;
|
|
492
|
+
const i = this.normalizedDisplayFormat.includes("-") ? "-" : "/", s = "-" === i ? "\\-" : "/", a = this.normalizedDisplayFormat.startsWith("YYYY");
|
|
493
|
+
if (!new RegExp(a ? `^\\d{4}${s}\\d{2}${s}\\d{2}$` : `^\\d{2}${s}\\d{2}(?:${s}\\d{4})?$`).test(t || "")) return;
|
|
494
|
+
const r = t.split(i), [n, h, o] = a ? r : this.normalizedDisplayFormat.startsWith("DD") ? [ r[2], r[1], r[0] ] : [ r[2], r[0], r[1] ], d = Number(h), l = Number(o), c = n ? Number(n) : null === (e = k(`${d}/${l}`, this.assume)) || void 0 === e ? void 0 : e.getFullYear();
|
|
495
|
+
if (!c) return;
|
|
496
|
+
const p = new Date(c, d - 1, l);
|
|
497
|
+
return p.getFullYear() === c && p.getMonth() === d - 1 && p.getDate() === l ? p : void 0;
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* Recomputes the typeable error from the current `typeableValue`, applying the same range checks the commit path
|
|
501
|
+
* uses so a stale error cannot outlive the text that produced it.
|
|
502
|
+
*/ revalidateTypeableValue() {
|
|
503
|
+
if (this.validateTypeableValue(), this.typeableError || !this.isRangeTypeable) return;
|
|
504
|
+
const [t, e] = this.typeableValue.split(" - "), i = this.parseTypeableDate(t), s = this.parseTypeableDate(e);
|
|
505
|
+
i && s && (this.typeableError = this.typeableRangeError(i, s));
|
|
506
|
+
}
|
|
507
|
+
async scrollDownCalendarToTop() {
|
|
508
|
+
var t;
|
|
509
|
+
this.open && this.isRangeMode && "down" === this.activePopoverDirection && (await d(),
|
|
510
|
+
await d(), this.open && this.isRangeMode && "down" === this.activePopoverDirection && await (null === (t = this.popoverElement) || void 0 === t ? void 0 : t.scrollContainerTo({
|
|
511
|
+
top: 0
|
|
512
|
+
})));
|
|
513
|
+
}
|
|
514
|
+
async scrollUpCalendarToBottom() {
|
|
515
|
+
var t;
|
|
516
|
+
this.open && "up" === this.activePopoverDirection && (await d(), await d(), this.open && "up" === this.activePopoverDirection && await (null === (t = this.popoverElement) || void 0 === t ? void 0 : t.scrollContainerTo({
|
|
517
|
+
top: Number.MAX_SAFE_INTEGER
|
|
518
|
+
})));
|
|
519
|
+
}
|
|
520
|
+
setActivePopoverDirection() {
|
|
521
|
+
this.activePopoverDirection = this.effectivePopoverDirection || this.automaticPopoverDirection;
|
|
522
|
+
}
|
|
523
|
+
setTypeableError(t) {
|
|
524
|
+
this.typeableError !== t && (this.typeableError = t, t && this.emitValidationError(t));
|
|
525
|
+
}
|
|
526
|
+
async showActionSheet() {
|
|
527
|
+
var t, e;
|
|
528
|
+
const i = await (null === (t = window.TectonElements) || void 0 === t ? void 0 : t.showActionSheet(this.actionSheetData));
|
|
529
|
+
if (null === (e = this.controlElement) || void 0 === e || e.focus(), null == i ? void 0 : i.error) return this.calendarError = i.error,
|
|
530
|
+
void this.tctClose.emit({
|
|
531
|
+
error: i.error
|
|
532
|
+
});
|
|
533
|
+
if (i && "cancel" !== i.type) {
|
|
534
|
+
if (this.isRangeMode) {
|
|
535
|
+
const {rangeStart: t, rangeEnd: e} = i;
|
|
536
|
+
if (!t || !e) return;
|
|
537
|
+
return this.rangeStart = t, this.rangeEnd = e, u(this, [ "change", "tctChange" ], {
|
|
538
|
+
rangeStart: t,
|
|
539
|
+
rangeEnd: e
|
|
540
|
+
}), void this.tctClose.emit();
|
|
541
|
+
}
|
|
542
|
+
i.value && (this.commitSingleValue(i.value), this.tctClose.emit());
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
syncTypeableValue() {
|
|
546
|
+
this.typeableValue = this.formattedTypeableValue, this.revalidateTypeableValue();
|
|
547
|
+
}
|
|
548
|
+
toggleCalendar() {
|
|
549
|
+
this.disabled || this.readonly || (p({
|
|
550
|
+
hoist: this.hoist
|
|
551
|
+
}) ? this.showActionSheet() : (this.open || this.setActivePopoverDirection(), this.open = !this.open));
|
|
552
|
+
}
|
|
553
|
+
typeableRangeError(t, e) {
|
|
554
|
+
return t.getTime() > e.getTime() ? this.rangeOrderValidationError : this.isRangeValid(t, e) ? "" : this.rangeValidationError;
|
|
555
|
+
}
|
|
556
|
+
validateCurrentValue(t = this.value) {
|
|
557
|
+
if (!t || this.isRangeMode) return;
|
|
558
|
+
const e = v(t), i = g(e);
|
|
559
|
+
e && r.isValid(i) && this.isDateValid(i) ? this.emitValidationSuccess(e) : this.emitValidationError(`Value passed is invalid: The date ${t} is not valid`);
|
|
560
|
+
}
|
|
561
|
+
validateTypeableValue() {
|
|
562
|
+
const t = this.typeableValue.replace(/\D/g, "");
|
|
563
|
+
if (!t) return void this.setTypeableError("");
|
|
564
|
+
const e = (this.isRangeTypeable ? [ t.slice(0, 8), t.slice(8) ] : [ t ]).some((t => {
|
|
565
|
+
if (this.isTypeableDatePrefixInvalid(t)) return !0;
|
|
566
|
+
if (8 !== t.length) return !1;
|
|
567
|
+
const e = this.parseTypeableDate(this.formatTypeableDate(t));
|
|
568
|
+
return !e || !this.isDateValid(e);
|
|
569
|
+
}));
|
|
570
|
+
this.setTypeableError(e ? this.isRangeTypeable ? this.rangeFormatValidationError : this.dateFormatValidationError : "");
|
|
571
|
+
}
|
|
572
|
+
// #endregion
|
|
573
|
+
// #region Render Methods
|
|
574
|
+
renderCalendar() {
|
|
575
|
+
return s("q2-date-calendar", {
|
|
576
|
+
ref: t => this.calendarElement = t,
|
|
577
|
+
class: this._actionSheet ? "is-action-sheet" : void 0,
|
|
578
|
+
accessibleLabel: this.calendarLabel || "Choose a date",
|
|
579
|
+
actionSheet: this._actionSheet,
|
|
580
|
+
calendarLabel: this.calendarLabel,
|
|
581
|
+
cutoffTime: this.cutoffTime,
|
|
582
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
583
|
+
direction: this.activePopoverDirection,
|
|
584
|
+
disabled: this.disabled,
|
|
585
|
+
disclaimer: this.disclaimer,
|
|
586
|
+
displayFormat: this.normalizedDisplayFormat,
|
|
587
|
+
endDate: v(this.endDate),
|
|
588
|
+
invalidDates: this.normalizedInvalidDates,
|
|
589
|
+
locale: this.locale,
|
|
590
|
+
mode: this.effectiveMode,
|
|
591
|
+
open: this.open,
|
|
592
|
+
rangeEnd: v(this.rangeEnd),
|
|
593
|
+
rangeStart: v(this.rangeStart),
|
|
594
|
+
readonly: this.readonly,
|
|
595
|
+
startDate: v(this.startDate),
|
|
596
|
+
validDates: this.normalizedValidDates,
|
|
597
|
+
value: this.normalizedValue,
|
|
598
|
+
onTctCalendarCancel: this.onCalendarCancel,
|
|
599
|
+
onTctCalendarCommit: this.onCalendarCommit,
|
|
600
|
+
onTctCalendarDismiss: this.onCalendarDismiss,
|
|
601
|
+
onTctCalendarError: this.onCalendarError
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
render() {
|
|
605
|
+
return this._actionSheet ? this.renderCalendar() : s("click-elsewhere", {
|
|
606
|
+
class: this.open ? "dropdown-open" : void 0,
|
|
607
|
+
onChange: this.onClickElsewhere
|
|
608
|
+
}, s("q2-input", {
|
|
609
|
+
ref: t => this.controlElement = t,
|
|
610
|
+
class: "date-picker-input",
|
|
611
|
+
clearable: this.canClear,
|
|
612
|
+
disabled: this.disabled,
|
|
613
|
+
errors: this.computedErrors,
|
|
614
|
+
hideLabel: this.hideLabel,
|
|
615
|
+
hints: this.hints,
|
|
616
|
+
readonly: this.readonly,
|
|
617
|
+
optional: this.optional,
|
|
618
|
+
valid: this.valid,
|
|
619
|
+
value: this.acceptsTypeableInput ? this.typeableValue : this.formattedValue,
|
|
620
|
+
label: l(this.label),
|
|
621
|
+
placeholder: this.computedPlaceholder,
|
|
622
|
+
"icon-right": this.acceptsTypeableInput ? void 0 : "calendar",
|
|
623
|
+
autocomplete: "off",
|
|
624
|
+
maxlength: this.isRangeTypeable ? 23 : this.isSingleTypeable ? 10 : void 0,
|
|
625
|
+
"aria-haspopup": "dialog",
|
|
626
|
+
"aria-expanded": `${this.open}`,
|
|
627
|
+
"aria-controls": "date-picker-popover",
|
|
628
|
+
onClick: this.acceptsTypeableInput ? void 0 : this.onInputClick,
|
|
629
|
+
onChange: t => t.stopImmediatePropagation(),
|
|
630
|
+
onTctChange: this.acceptsTypeableInput ? this.onTypeableChange : t => t.stopImmediatePropagation(),
|
|
631
|
+
onInput: t => t.stopImmediatePropagation(),
|
|
632
|
+
onTctInput: this.acceptsTypeableInput ? this.onTypeableInput : t => t.stopImmediatePropagation(),
|
|
633
|
+
onTctClear: this.onClear,
|
|
634
|
+
onKeyDown: this.onInputKeydown,
|
|
635
|
+
"test-id": "datePickerToggle",
|
|
636
|
+
_preventEntry: !this.acceptsTypeableInput
|
|
637
|
+
}, c(this.hostElement, "label") && s("slot", {
|
|
638
|
+
name: "label",
|
|
639
|
+
slot: "label"
|
|
640
|
+
}), this.acceptsTypeableInput && s("q2-btn", {
|
|
641
|
+
slot: "input-right",
|
|
642
|
+
"hide-label": !0,
|
|
643
|
+
disabled: this.disabled || this.readonly,
|
|
644
|
+
label: "tecton.element.calendar.toggleAriaLabel",
|
|
645
|
+
onClick: this.onCalendarToggleClick,
|
|
646
|
+
"test-id": "datePickerCalendarToggle"
|
|
647
|
+
}, s("q2-icon", {
|
|
648
|
+
type: "calendar"
|
|
649
|
+
}))), s("q2-popover", {
|
|
650
|
+
ref: t => this.popoverElement = t,
|
|
651
|
+
id: "date-picker-popover",
|
|
652
|
+
controlElement: this.controlElement,
|
|
653
|
+
open: this.open,
|
|
654
|
+
direction: this.effectivePopoverDirection,
|
|
655
|
+
align: this.popoverAlignment,
|
|
656
|
+
minHeight: this.popoverMinHeight,
|
|
657
|
+
mode: this.popoverMode || void 0
|
|
658
|
+
}, this.renderCalendar()));
|
|
659
|
+
}
|
|
660
|
+
get hostElement() {
|
|
661
|
+
return this;
|
|
662
|
+
}
|
|
663
|
+
static get watchers() {
|
|
664
|
+
return {
|
|
665
|
+
cutoffTime: [ {
|
|
666
|
+
constraintsChanged: 0
|
|
667
|
+
} ],
|
|
668
|
+
assume: [ {
|
|
669
|
+
constraintsChanged: 0
|
|
670
|
+
} ],
|
|
671
|
+
daysOfWeekChecksum: [ {
|
|
672
|
+
constraintsChanged: 0
|
|
673
|
+
} ],
|
|
674
|
+
endDate: [ {
|
|
675
|
+
constraintsChanged: 0
|
|
676
|
+
} ],
|
|
677
|
+
invalidDates: [ {
|
|
678
|
+
constraintsChanged: 0
|
|
679
|
+
} ],
|
|
680
|
+
startDate: [ {
|
|
681
|
+
constraintsChanged: 0
|
|
682
|
+
} ],
|
|
683
|
+
validDates: [ {
|
|
684
|
+
constraintsChanged: 0
|
|
685
|
+
} ],
|
|
686
|
+
disabled: [ {
|
|
687
|
+
disabledChanged: 0
|
|
688
|
+
} ],
|
|
689
|
+
displayFormat: [ {
|
|
690
|
+
displayFormatChanged: 0
|
|
691
|
+
} ],
|
|
692
|
+
mode: [ {
|
|
693
|
+
modeChanged: 0
|
|
694
|
+
} ],
|
|
695
|
+
typeable: [ {
|
|
696
|
+
modeChanged: 0
|
|
697
|
+
} ],
|
|
698
|
+
open: [ {
|
|
699
|
+
openChanged: 0
|
|
700
|
+
} ],
|
|
701
|
+
popDirection: [ {
|
|
702
|
+
popDirectionChanged: 0
|
|
703
|
+
} ],
|
|
704
|
+
popoverDirection: [ {
|
|
705
|
+
popoverDirectionChanged: 0
|
|
706
|
+
} ],
|
|
707
|
+
rangeEnd: [ {
|
|
708
|
+
rangeEndChanged: 0
|
|
709
|
+
} ],
|
|
710
|
+
rangeStart: [ {
|
|
711
|
+
rangeStartChanged: 0
|
|
712
|
+
} ],
|
|
713
|
+
readonly: [ {
|
|
714
|
+
readonlyChanged: 0
|
|
715
|
+
} ],
|
|
716
|
+
value: [ {
|
|
717
|
+
valueChanged: 0
|
|
718
|
+
} ]
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
static get style() {
|
|
722
|
+
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-date-picker-width:var(--tct-date-picker-width, var(--tct-date-calendar-width, 360px));box-sizing:border-box;display:block}:host[hidden]{display:none}click-elsewhere,.date-picker-input{display:block;width:100%}q2-date-calendar{--comp-date-calendar-width:var(--comp-date-picker-width);display:block;width:var(--comp-date-picker-width)}q2-date-calendar.is-action-sheet{--comp-date-calendar-width:100%;width:100%}q2-popover{--tct-popover-width:var(--comp-date-picker-width);--tct-popover-border-radius:var(--tct-date-picker-border-radius, var(--tct-date-calendar-border-radius, var(--app-border-radius-1, 4px)))}@media (max-width: 768px){:host{--comp-date-picker-width:min( 100%, calc( 100vw - var(--tct-date-picker-mobile-gutter, var(--tct-date-calendar-mobile-gutter, 24px)) - var(--tct-date-picker-mobile-gutter, var(--tct-date-calendar-mobile-gutter, 24px)) ), var(--tct-date-picker-mobile-max-width, var(--tct-date-calendar-mobile-max-width, 420px)) )}}';
|
|
723
|
+
}
|
|
724
|
+
}, [ 257, "q2-date-picker", {
|
|
725
|
+
_actionSheet: [ 4, "_action-sheet" ],
|
|
726
|
+
assume: [ 513 ],
|
|
727
|
+
calendarLabel: [ 513, "calendar-label" ],
|
|
728
|
+
clearable: [ 516 ],
|
|
729
|
+
closeDelay: [ 514, "close-delay" ],
|
|
730
|
+
cutoffTime: [ 513, "cutoff-time" ],
|
|
731
|
+
daysOfWeekChecksum: [ 514, "days-of-week-checksum" ],
|
|
732
|
+
disabled: [ 516 ],
|
|
733
|
+
disabledMsg: [ 513, "disabled-msg" ],
|
|
734
|
+
disclaimer: [ 513 ],
|
|
735
|
+
displayFormat: [ 513, "display-format" ],
|
|
736
|
+
endDate: [ 513, "end-date" ],
|
|
737
|
+
errors: [ 1040 ],
|
|
738
|
+
hideLabel: [ 1540, "hide-label" ],
|
|
739
|
+
hints: [ 1040 ],
|
|
740
|
+
hoist: [ 4 ],
|
|
741
|
+
invalid: [ 1540 ],
|
|
742
|
+
invalidDates: [ 16 ],
|
|
743
|
+
label: [ 1537 ],
|
|
744
|
+
locale: [ 513 ],
|
|
745
|
+
mode: [ 513 ],
|
|
746
|
+
open: [ 1540 ],
|
|
747
|
+
optional: [ 516 ],
|
|
748
|
+
placeholder: [ 513 ],
|
|
749
|
+
popDirection: [ 513, "pop-direction" ],
|
|
750
|
+
popoverAlignment: [ 513, "popover-alignment" ],
|
|
751
|
+
popoverDirection: [ 513, "popover-direction" ],
|
|
752
|
+
popoverMinHeight: [ 2, "popover-min-height" ],
|
|
753
|
+
popoverMode: [ 1025, "popover-mode" ],
|
|
754
|
+
rangeEnd: [ 1537, "range-end" ],
|
|
755
|
+
rangeStart: [ 1537, "range-start" ],
|
|
756
|
+
readonly: [ 516 ],
|
|
757
|
+
startDate: [ 513, "start-date" ],
|
|
758
|
+
typeable: [ 516 ],
|
|
759
|
+
valid: [ 516 ],
|
|
760
|
+
validDates: [ 16 ],
|
|
761
|
+
value: [ 1537 ],
|
|
762
|
+
activePopoverDirection: [ 32 ],
|
|
763
|
+
calendarError: [ 32 ],
|
|
764
|
+
typeableError: [ 32 ],
|
|
765
|
+
typeableValue: [ 32 ],
|
|
766
|
+
closePopover: [ 64 ],
|
|
767
|
+
focusDate: [ 64 ],
|
|
768
|
+
openPopover: [ 64 ],
|
|
769
|
+
reset: [ 64 ],
|
|
770
|
+
setValue: [ 64 ],
|
|
771
|
+
typeValue: [ 64 ]
|
|
772
|
+
}, [ [ 0, "beforeinput", "beforeInputHandler" ], [ 0, "focus", "delegateFocus" ], [ 0, "popoverStateChanged", "popoverStateHandler" ] ], {
|
|
773
|
+
cutoffTime: [ {
|
|
774
|
+
constraintsChanged: 0
|
|
775
|
+
} ],
|
|
776
|
+
assume: [ {
|
|
777
|
+
constraintsChanged: 0
|
|
778
|
+
} ],
|
|
779
|
+
daysOfWeekChecksum: [ {
|
|
780
|
+
constraintsChanged: 0
|
|
781
|
+
} ],
|
|
782
|
+
endDate: [ {
|
|
783
|
+
constraintsChanged: 0
|
|
784
|
+
} ],
|
|
785
|
+
invalidDates: [ {
|
|
786
|
+
constraintsChanged: 0
|
|
787
|
+
} ],
|
|
788
|
+
startDate: [ {
|
|
789
|
+
constraintsChanged: 0
|
|
790
|
+
} ],
|
|
791
|
+
validDates: [ {
|
|
792
|
+
constraintsChanged: 0
|
|
793
|
+
} ],
|
|
794
|
+
disabled: [ {
|
|
795
|
+
disabledChanged: 0
|
|
796
|
+
} ],
|
|
797
|
+
displayFormat: [ {
|
|
798
|
+
displayFormatChanged: 0
|
|
799
|
+
} ],
|
|
800
|
+
mode: [ {
|
|
801
|
+
modeChanged: 0
|
|
802
|
+
} ],
|
|
803
|
+
typeable: [ {
|
|
804
|
+
modeChanged: 0
|
|
805
|
+
} ],
|
|
806
|
+
open: [ {
|
|
807
|
+
openChanged: 0
|
|
808
|
+
} ],
|
|
809
|
+
popDirection: [ {
|
|
810
|
+
popDirectionChanged: 0
|
|
811
|
+
} ],
|
|
812
|
+
popoverDirection: [ {
|
|
813
|
+
popoverDirectionChanged: 0
|
|
814
|
+
} ],
|
|
815
|
+
rangeEnd: [ {
|
|
816
|
+
rangeEndChanged: 0
|
|
817
|
+
} ],
|
|
818
|
+
rangeStart: [ {
|
|
819
|
+
rangeStartChanged: 0
|
|
820
|
+
} ],
|
|
821
|
+
readonly: [ {
|
|
822
|
+
readonlyChanged: 0
|
|
823
|
+
} ],
|
|
824
|
+
value: [ {
|
|
825
|
+
valueChanged: 0
|
|
826
|
+
} ]
|
|
827
|
+
} ]);
|
|
828
|
+
|
|
829
|
+
function defineCustomElement() {
|
|
830
|
+
if ("undefined" == typeof customElements) return;
|
|
831
|
+
[ "q2-date-picker", "click-elsewhere", "q2-badge", "q2-btn", "q2-date-calendar", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover" ].forEach((t => {
|
|
832
|
+
switch (t) {
|
|
833
|
+
case "q2-date-picker":
|
|
834
|
+
customElements.get(a(t)) || customElements.define(a(t), j);
|
|
835
|
+
break;
|
|
836
|
+
|
|
837
|
+
case "click-elsewhere":
|
|
838
|
+
customElements.get(a(t)) || T();
|
|
839
|
+
break;
|
|
840
|
+
|
|
841
|
+
case "q2-badge":
|
|
842
|
+
customElements.get(a(t)) || q();
|
|
843
|
+
break;
|
|
844
|
+
|
|
845
|
+
case "q2-btn":
|
|
846
|
+
customElements.get(a(t)) || x();
|
|
847
|
+
break;
|
|
848
|
+
|
|
849
|
+
case "q2-date-calendar":
|
|
850
|
+
customElements.get(a(t)) || E();
|
|
851
|
+
break;
|
|
852
|
+
|
|
853
|
+
case "q2-icon":
|
|
854
|
+
customElements.get(a(t)) || S();
|
|
855
|
+
break;
|
|
856
|
+
|
|
857
|
+
case "q2-input":
|
|
858
|
+
customElements.get(a(t)) || $();
|
|
859
|
+
break;
|
|
860
|
+
|
|
861
|
+
case "q2-loading":
|
|
862
|
+
customElements.get(a(t)) || V();
|
|
863
|
+
break;
|
|
864
|
+
|
|
865
|
+
case "q2-message":
|
|
866
|
+
customElements.get(a(t)) || F();
|
|
867
|
+
break;
|
|
868
|
+
|
|
869
|
+
case "q2-popover":
|
|
870
|
+
customElements.get(a(t)) || P();
|
|
871
|
+
}
|
|
872
|
+
}));
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
export { j as Q, defineCustomElement as d }
|