q2-tecton-elements 1.72.0 → 1.73.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 +38990 -33801
- 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 +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +2 -2
- 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 +2 -2
- 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 +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +7 -4
- 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 +1 -1
- 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/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.js +1 -1
- 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.js +3 -3
- package/dist/collection/components/q2-pill/q2-pill.js +6 -3
- 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 +8 -8
- 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 +5 -5
- 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 +9 -9
- 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 +67 -67
- package/dist/components/q2-pill.js +16 -14
- 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 +23 -23
- package/dist/components/q2-search.js +5 -5
- package/dist/components/q2-section.js +19 -19
- package/dist/components/q2-select2.js +2 -2
- package/dist/components/q2-stepper-pane.js +9 -9
- 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 +17 -17
- package/dist/components/q2-tab-pane.js +2 -2
- 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 +1 -1
- package/dist/esm/q2-badge_2.entry.js +2 -2
- 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 +2 -2
- 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 +4 -4
- package/dist/esm/q2-pill.entry.js +7 -4
- 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 +8 -8
- package/dist/q2-tecton-elements/q2-badge_2.entry.js +5 -5
- 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 +28 -28
- 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 +20 -20
- package/dist/q2-tecton-elements/q2-pill.entry.js +42 -40
- 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 +5 -5
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +13 -13
- package/dist/q2-tecton-elements/q2-search.entry.js +6 -6
- 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 +13 -13
- 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 +3 -3
- package/dist/q2-tecton-elements/q2-tab-container.entry.js +20 -20
- package/dist/q2-tecton-elements/q2-tab-pane.entry.js +7 -7
- 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 +6 -6
- 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-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,678 @@
|
|
|
1
|
+
import { proxyCustomElement as t, HTMLElement as a, createEvent as e, h as r, transformTag as n } from "@stencil/core/internal/client";
|
|
2
|
+
|
|
3
|
+
import { d as i } from "./index3.js";
|
|
4
|
+
|
|
5
|
+
import { l as s } from "./index2.js";
|
|
6
|
+
|
|
7
|
+
import { d as o } from "./q2-btn2.js";
|
|
8
|
+
|
|
9
|
+
import { d } from "./q2-icon2.js";
|
|
10
|
+
|
|
11
|
+
import { d as c } from "./q2-loading2.js";
|
|
12
|
+
|
|
13
|
+
import { d as l } from "./q2-message2.js";
|
|
14
|
+
|
|
15
|
+
const h = "MM/DD/YYYY", u = [ h, "DD/MM/YYYY", "MM-DD-YYYY", "DD-MM-YYYY", "YYYY-MM-DD" ], p = {
|
|
16
|
+
"Choose a date": "tecton.element.datePicker.calendarLabel",
|
|
17
|
+
"Dates are shown in your local time zone.": "tecton.element.datePicker.disclaimer.localTimeZone"
|
|
18
|
+
}, f = /^\d{4}-\d{2}-\d{2}$/, m = /^(\d{4})-(\d{1,2})-(\d{1,2})(?:T.*)?$/, g = /^(\d{1,2})\/(\d{1,2})\/(\d{2}|\d{4})$/;
|
|
19
|
+
|
|
20
|
+
/** Determines a year for a month and day when typeable input omits the year. */
|
|
21
|
+
function buildInputDate(t, a) {
|
|
22
|
+
const [e, r, n] = t.split("/");
|
|
23
|
+
if (!e) return;
|
|
24
|
+
if (!r) return new Date((new Date).getFullYear(), Number(e) - 1, 1);
|
|
25
|
+
if (Number(r) <= 0) return;
|
|
26
|
+
const s = 4 === (null == n ? void 0 : n.length) ? Number(n) : Number(function(t, a, e) {
|
|
27
|
+
const r = `${t.padStart(2, "0")}/${a.padStart(2, "0")}`, n = new Date, i = `${n.getMonth() + 1}`.padStart(2, "0") + `/${n.getDate()}`.padStart(2, "0");
|
|
28
|
+
let s = n.getFullYear();
|
|
29
|
+
"future" === e && i > r && s++;
|
|
30
|
+
"past" === e && i < r && s--;
|
|
31
|
+
return `${s}`;
|
|
32
|
+
}(e, r, a)), o = new Date(s, Number(e) - 1, Number(r));
|
|
33
|
+
return i.isValid(o) ? o : void 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Formats a valid date as an ISO calendar date. */ function formatDateISO(t) {
|
|
37
|
+
if (i.isValid(t)) return i.formatISO(t, {
|
|
38
|
+
representation: "date"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Formats a date for an accessible day label. */ function formatDateFull(t) {
|
|
43
|
+
if (i.isValid(t)) return new Intl.DateTimeFormat("en-US", {
|
|
44
|
+
month: "long",
|
|
45
|
+
day: "numeric",
|
|
46
|
+
year: "numeric",
|
|
47
|
+
weekday: "long",
|
|
48
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
49
|
+
}).format(t);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Returns localized abbreviated day names beginning with Sunday. */
|
|
53
|
+
/** Parses the date picker's public ISO-only value contract. */
|
|
54
|
+
function parseDatePickerValue(t) {
|
|
55
|
+
if (!t || !f.test(t)) return;
|
|
56
|
+
const [a, e, r] = t.split("-").map(Number);
|
|
57
|
+
return dateFromParts(a, e, r);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** Normalizes a legacy string or Moment-like value for the date picker's ISO-only calendar. */ function normalizeDatePickerValue(t) {
|
|
61
|
+
if (!t) return;
|
|
62
|
+
let a;
|
|
63
|
+
if (t instanceof Date) a = t; else if (function(t) {
|
|
64
|
+
return "string" != typeof t && "function" == typeof (null == t ? void 0 : t.toDate);
|
|
65
|
+
}
|
|
66
|
+
/** Formats a date using one of the date picker's supported numeric display formats. */ (t)) try {
|
|
67
|
+
a = t.toDate();
|
|
68
|
+
} catch (t) {
|
|
69
|
+
return;
|
|
70
|
+
} else {
|
|
71
|
+
const e = t.trim();
|
|
72
|
+
if (!e) return;
|
|
73
|
+
if (a = parseDatePickerValue(e), !a) {
|
|
74
|
+
const t = e.match(m), r = e.match(g);
|
|
75
|
+
if (t) a = dateFromParts(Number(t[1]), Number(t[2]), Number(t[3])); else if (r) {
|
|
76
|
+
const t = Number(r[3]);
|
|
77
|
+
a = dateFromParts(t < 100 ? (t >= 69 ? 1900 : 2e3) + t : t, Number(r[1]), Number(r[2]));
|
|
78
|
+
} else {
|
|
79
|
+
const t = new Date(e);
|
|
80
|
+
a = i.isValid(t) ? dateFromParts(t.getFullYear(), t.getMonth() + 1, t.getDate()) : void 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return formatDateISO(a);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Returns the month and year used to initialize the date picker grid. */
|
|
88
|
+
/** Determines whether a date is present in a whitelist. */
|
|
89
|
+
function validateAgainstWhitelist(t, a) {
|
|
90
|
+
return t.some((t => i.isSameDay(t, a)));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function parseDatePickerValues(t) {
|
|
94
|
+
return (t || []).map(parseDatePickerValue).filter((t => !!t));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function dateFromParts(t, a, e) {
|
|
98
|
+
const r = new Date(0);
|
|
99
|
+
if (r.setFullYear(t, a - 1, e), r.setHours(0, 0, 0, 0), r.getFullYear() === t && r.getMonth() === a - 1 && r.getDate() === e) return r;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function formatDisplayDate(t, a) {
|
|
103
|
+
const e = a.includes("-") ? "-" : "/", r = `${t.getMonth() + 1}`.padStart(2, "0"), n = `${t.getDate()}`.padStart(2, "0"), i = `${t.getFullYear()}`;
|
|
104
|
+
return (a.startsWith("YYYY") ? [ i, r, n ] : a.startsWith("DD") ? [ n, r, i ] : [ r, n, i ]).join(e);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Formats a date using the legacy Moment-style tokens accepted by q2-calendar. */ function formatLegacyDisplayDate(t, a) {
|
|
108
|
+
const e = a.replace(/[d]/g, "E").replace(/[D]/g, "d").replace(/[Y]/g, "y").replace(/[l]/g, "P").replace(/[W]/g, "I");
|
|
109
|
+
return i.format(t, e);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Determines whether a date satisfies every configured selection constraint. */ function isDateSelectable(t, a) {
|
|
113
|
+
const e = new Date(a.cutoffTime || ""), r =
|
|
114
|
+
/** Determines whether a date satisfies the configured bounds and cutoff. */
|
|
115
|
+
function(t, a, e) {
|
|
116
|
+
const r = i.isAfter(null == t ? void 0 : t.startDate, e), n = i.isBefore(null == t ? void 0 : t.endDate, e), s = i.isSameDay(a, e) && i.isAfter(a, null == t ? void 0 : t.cutOffTime);
|
|
117
|
+
return !(r || s || n);
|
|
118
|
+
}
|
|
119
|
+
/** Determines whether a date's weekday is enabled. */ ({
|
|
120
|
+
startDate: parseDatePickerValue(a.startDate),
|
|
121
|
+
endDate: parseDatePickerValue(a.endDate),
|
|
122
|
+
cutOffTime: i.isValid(e) ? e : void 0
|
|
123
|
+
}, new Date, t), n = parseDatePickerValues(a.validDates), s = (null == n ? void 0 : n.length) ? validateAgainstWhitelist(n, t) : function(t, a) {
|
|
124
|
+
return t.includes(a.getDay());
|
|
125
|
+
}
|
|
126
|
+
/** Determines whether a date is absent from a blacklist. */ (
|
|
127
|
+
/** Returns the enabled day indexes represented by a calendar checksum. */
|
|
128
|
+
function(t = 127) {
|
|
129
|
+
const a = [];
|
|
130
|
+
for (let e = 0; e < 7; e++) t & 1 << e && a.push(e);
|
|
131
|
+
return t > 0 ? a : [];
|
|
132
|
+
}(a.daysOfWeekChecksum), t);
|
|
133
|
+
return r && s && function(t, a) {
|
|
134
|
+
return !validateAgainstWhitelist(t, a);
|
|
135
|
+
}(parseDatePickerValues(a.invalidDates), t);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Determines whether every date in an inclusive range is selectable. */ function isRangeSelectable(t, a, e) {
|
|
139
|
+
for (let r = t; r.getTime() <= a.getTime(); r = i.addDays(r, 1)) if (!isDateSelectable(r, e)) return !1;
|
|
140
|
+
return !0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Resolves a date-picker localization key or mapped default string. */ function localizeDatePickerString(t, a = {}) {
|
|
144
|
+
return t ? s(p[t] || t, a) : "";
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Returns a supported display format, falling back to the date-picker default. */ function normalizeDisplayFormat(t) {
|
|
148
|
+
const a = null == t ? void 0 : t.toUpperCase();
|
|
149
|
+
return u.includes(a) ? a : h;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
const v = t(class extends a {
|
|
153
|
+
constructor(t) {
|
|
154
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.tctCalendarCancel = e(this, "tctCalendarCancel", 1),
|
|
155
|
+
this.tctCalendarCommit = e(this, "tctCalendarCommit", 1), this.tctCalendarDismiss = e(this, "tctCalendarDismiss", 1),
|
|
156
|
+
this.tctCalendarError = e(this, "tctCalendarError", 1), this.tctChange = e(this, "tctChange", 1),
|
|
157
|
+
// #region Own Properties
|
|
158
|
+
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") ],
|
|
159
|
+
this.dayStrings = [ s("tecton.element.calendar.days.Sunday"), s("tecton.element.calendar.days.Monday"), s("tecton.element.calendar.days.Tuesday"), s("tecton.element.calendar.days.Wednesday"), s("tecton.element.calendar.days.Thursday"), s("tecton.element.calendar.days.Friday"), s("tecton.element.calendar.days.Saturday") ],
|
|
160
|
+
this.rangeError = "",
|
|
161
|
+
/** Uses the action-sheet calendar presentation. */
|
|
162
|
+
this.actionSheet = !1,
|
|
163
|
+
/** Controls whether navigation appears above or below the date grid. */
|
|
164
|
+
this.direction = "down",
|
|
165
|
+
/** Disables calendar interaction. */
|
|
166
|
+
this.disabled = !1,
|
|
167
|
+
/** Formats calendar and range labels using the provided locale. */
|
|
168
|
+
this.locale = document.documentElement.lang || "en-US",
|
|
169
|
+
/** Selects single-date or range calendar behavior. */
|
|
170
|
+
this.mode = "single",
|
|
171
|
+
/** Indicates that a new calendar session has opened. */
|
|
172
|
+
this.open = !1,
|
|
173
|
+
/** Prevents calendar selection while retaining calendar visibility. */
|
|
174
|
+
this.readonly = !1, this.onDateHover = t => {
|
|
175
|
+
const a = t.currentTarget;
|
|
176
|
+
if (a.disabled || !this.isRangeMode || !this.rangeDraftStart || this.rangeDraftEnd) return;
|
|
177
|
+
const e = parseDatePickerValue(a.dataset.date);
|
|
178
|
+
this.rangeHoverDate = i.isValid(e) && this.isDateValid(e) ? e : void 0;
|
|
179
|
+
}, this.onDateHoverEnd = () => {
|
|
180
|
+
this.rangeHoverDate = void 0;
|
|
181
|
+
}, this.onDateKeydown = t => {
|
|
182
|
+
const a = t.target.closest("button[data-date]");
|
|
183
|
+
if (!a) return;
|
|
184
|
+
const e = parseDatePickerValue(a.dataset.date);
|
|
185
|
+
let r, n;
|
|
186
|
+
switch (t.key) {
|
|
187
|
+
case "Escape":
|
|
188
|
+
return t.preventDefault(), this.resetRangeDraft(), void this.tctCalendarDismiss.emit();
|
|
189
|
+
|
|
190
|
+
case "ArrowUp":
|
|
191
|
+
r = i.addDays(e, -7), n = -1;
|
|
192
|
+
break;
|
|
193
|
+
|
|
194
|
+
case "ArrowDown":
|
|
195
|
+
r = i.addDays(e, 7), n = 1;
|
|
196
|
+
break;
|
|
197
|
+
|
|
198
|
+
case "ArrowLeft":
|
|
199
|
+
r = i.addDays(e, -1), n = -1;
|
|
200
|
+
break;
|
|
201
|
+
|
|
202
|
+
case "ArrowRight":
|
|
203
|
+
r = i.addDays(e, 1), n = 1;
|
|
204
|
+
break;
|
|
205
|
+
|
|
206
|
+
case "Home":
|
|
207
|
+
r = i.addDays(e, -e.getDay()), n = 1;
|
|
208
|
+
break;
|
|
209
|
+
|
|
210
|
+
case "End":
|
|
211
|
+
r = i.addDays(e, 6 - e.getDay()), n = -1;
|
|
212
|
+
break;
|
|
213
|
+
|
|
214
|
+
case "PageUp":
|
|
215
|
+
r = new Date(e.getFullYear() - (t.shiftKey ? 1 : 0), e.getMonth() - (t.shiftKey ? 0 : 1), e.getDate()),
|
|
216
|
+
n = -1;
|
|
217
|
+
break;
|
|
218
|
+
|
|
219
|
+
case "PageDown":
|
|
220
|
+
r = new Date(e.getFullYear() + (t.shiftKey ? 1 : 0), e.getMonth() + (t.shiftKey ? 0 : 1), e.getDate()),
|
|
221
|
+
n = 1;
|
|
222
|
+
break;
|
|
223
|
+
|
|
224
|
+
default:
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
t.preventDefault();
|
|
228
|
+
const s = this.findValidNavigationDate(r, n);
|
|
229
|
+
s && this.activateDate(s);
|
|
230
|
+
}, this.onDateSelection = t => {
|
|
231
|
+
const a = t.target.closest("button[data-date]");
|
|
232
|
+
!a || a.disabled || this.disabled || this.readonly || this.selectDate(parseDatePickerValue(a.dataset.date));
|
|
233
|
+
}, this.onRangeCancel = () => {
|
|
234
|
+
this.resetRangeDraft(), this.tctCalendarCancel.emit();
|
|
235
|
+
}, this.onRangeCommit = () => {
|
|
236
|
+
!this.disabled && !this.readonly && this.rangeDraftStart && this.rangeDraftEnd && (this.isRangeValid(this.rangeDraftStart, this.rangeDraftEnd) ? (this.setRangeError(""),
|
|
237
|
+
this.emitCommit({
|
|
238
|
+
rangeStart: formatDateISO(this.rangeDraftStart),
|
|
239
|
+
rangeEnd: formatDateISO(this.rangeDraftEnd)
|
|
240
|
+
})) : this.setRangeError(this.rangeValidationError));
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
// #endregion
|
|
244
|
+
// #region Component Lifecycle Events
|
|
245
|
+
connectedCallback() {
|
|
246
|
+
this.resetCalendarSession();
|
|
247
|
+
}
|
|
248
|
+
// #endregion
|
|
249
|
+
// #region Listeners
|
|
250
|
+
focusHandler(t) {
|
|
251
|
+
var a;
|
|
252
|
+
t.target === t.currentTarget && this.focusDate((null === (a = t.detail) || void 0 === a ? void 0 : a.value) || this.rovingDate);
|
|
253
|
+
}
|
|
254
|
+
// #endregion
|
|
255
|
+
// #region Public Methods API
|
|
256
|
+
/** Moves the visible month to the provided date and focuses that day. */
|
|
257
|
+
async focusDate(t) {
|
|
258
|
+
const a = "string" == typeof t ? parseDatePickerValue(t) : t;
|
|
259
|
+
i.isValid(a) && (this.activeDate = a, this.goToMonthYear(a.getMonth(), a.getFullYear()),
|
|
260
|
+
requestAnimationFrame((() => this.focusRenderedDate(a))));
|
|
261
|
+
}
|
|
262
|
+
/** Selects the provided date when it satisfies the calendar constraints. */ async setValue(t) {
|
|
263
|
+
const a = "string" == typeof t ? parseDatePickerValue(t) : t;
|
|
264
|
+
i.isValid(a) && this.isDateValid(a) && this.selectDate(a);
|
|
265
|
+
}
|
|
266
|
+
// #endregion
|
|
267
|
+
// #region Watchers
|
|
268
|
+
constraintsChanged() {
|
|
269
|
+
this.setRangeError("");
|
|
270
|
+
}
|
|
271
|
+
modeChanged() {
|
|
272
|
+
this.resetCalendarSession();
|
|
273
|
+
}
|
|
274
|
+
openChanged(t) {
|
|
275
|
+
t && this.resetCalendarSession();
|
|
276
|
+
}
|
|
277
|
+
rangeChanged() {
|
|
278
|
+
this.isRangeMode && this.resetCalendarSession();
|
|
279
|
+
}
|
|
280
|
+
valueChanged() {
|
|
281
|
+
this.isRangeMode || this.resetCalendarSession();
|
|
282
|
+
}
|
|
283
|
+
// #endregion
|
|
284
|
+
// #region Local Methods
|
|
285
|
+
get constraints() {
|
|
286
|
+
return {
|
|
287
|
+
cutoffTime: this.cutoffTime,
|
|
288
|
+
daysOfWeekChecksum: this.daysOfWeekChecksum,
|
|
289
|
+
endDate: this.endDate,
|
|
290
|
+
invalidDates: this.invalidDates,
|
|
291
|
+
startDate: this.startDate,
|
|
292
|
+
validDates: this.validDates
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
get currentWeeks() {
|
|
296
|
+
return this.dateList.reduce(((t, a, e) => {
|
|
297
|
+
const r = Math.floor(e / 7);
|
|
298
|
+
return t[r] || (t[r] = []), t[r].push(a), t;
|
|
299
|
+
}), []);
|
|
300
|
+
}
|
|
301
|
+
get dateList() {
|
|
302
|
+
const {monthIndex: t, selectedYear: a} = this.selectedMonthYear, e = new Date(a, t, 1), r = new Date(a, t + 1, 0).getDate(), n = 7 * Math.ceil((e.getDay() + r) / 7), s = this.actionSheet ? 42 : n, o = new Date(a, t, 1 - e.getDay());
|
|
303
|
+
return Array.from({
|
|
304
|
+
length: s
|
|
305
|
+
}, ((a, e) => {
|
|
306
|
+
const r = i.addDays(o, e), n = r.getMonth() !== t, s = this.rangeDraftStart, d = this.rangeDraftEnd || this.rangeHoverDate, c = s && d && s.getTime() > d.getTime() ? d : s, l = s && d && s.getTime() > d.getTime() ? s : d, h = this.isRangeMode && !!c && i.isSameDay(r, c), u = this.isRangeMode && !!l && i.isSameDay(r, l), p = this.isRangeMode ? h || u : !!this.selectedDate && i.isSameDay(r, this.selectedDate), f = this.isRangeMode && !!c && !!l && r.getTime() > c.getTime() && r.getTime() < l.getTime(), m = i.isSameDay(r, new Date), g = this.isDateValid(r), v = [ "cal-day" ];
|
|
307
|
+
return n && v.push("is-outside"), f && v.push("in-range"), p && v.push("is-selected"),
|
|
308
|
+
h && v.push("range-start"), (u || h && !l) && v.push("range-end"), m && v.push("is-today"),
|
|
309
|
+
g || v.push("is-disabled"), {
|
|
310
|
+
classList: v.join(" "),
|
|
311
|
+
date: r,
|
|
312
|
+
isOutside: n,
|
|
313
|
+
isSelected: p,
|
|
314
|
+
isToday: m,
|
|
315
|
+
isValid: g
|
|
316
|
+
};
|
|
317
|
+
}));
|
|
318
|
+
}
|
|
319
|
+
get isRangeMode() {
|
|
320
|
+
return "range" === this.mode || "range-typeable" === this.mode;
|
|
321
|
+
}
|
|
322
|
+
get normalizedDisplayFormat() {
|
|
323
|
+
return normalizeDisplayFormat(this.displayFormat);
|
|
324
|
+
}
|
|
325
|
+
get rangeConfirmDisabled() {
|
|
326
|
+
return !this.rangeDraftStart || !this.rangeDraftEnd;
|
|
327
|
+
}
|
|
328
|
+
get rangeEndDate() {
|
|
329
|
+
const t = parseDatePickerValue(this.rangeEnd);
|
|
330
|
+
return i.isValid(t) ? t : void 0;
|
|
331
|
+
}
|
|
332
|
+
get rangeSummary() {
|
|
333
|
+
return this.rangeDraftStart && this.rangeDraftEnd ? `${this.formatRangeDate(this.rangeDraftStart)} – ${this.formatRangeDate(this.rangeDraftEnd)}` : this.rangeDraftStart ? `${this.formatRangeDate(this.rangeDraftStart)} – ${localizeDatePickerString("tecton.element.datePicker.range.selectEnd")}` : localizeDatePickerString("tecton.element.datePicker.range.selectStart");
|
|
334
|
+
}
|
|
335
|
+
get rangeValidationError() {
|
|
336
|
+
return localizeDatePickerString("tecton.element.datePicker.validation.rangeUnavailable");
|
|
337
|
+
}
|
|
338
|
+
get rovingDate() {
|
|
339
|
+
const {monthIndex: t, selectedYear: a} = this.selectedMonthYear, e = [ this.activeDate, this.isRangeMode ? this.rangeDraftStart : this.selectedDate ];
|
|
340
|
+
for (const r of e) if ((null == r ? void 0 : r.getMonth()) === t && (null == r ? void 0 : r.getFullYear()) === a) return r;
|
|
341
|
+
const r = new Date;
|
|
342
|
+
return r.getMonth() === t && r.getFullYear() === a ? r : new Date(a, t, 1);
|
|
343
|
+
}
|
|
344
|
+
get selectedDate() {
|
|
345
|
+
const t = parseDatePickerValue(this.isRangeMode ? this.rangeStart : this.value);
|
|
346
|
+
return i.isValid(t) ? t : void 0;
|
|
347
|
+
}
|
|
348
|
+
get title() {
|
|
349
|
+
const {monthIndex: t, selectedYear: a} = this.selectedMonthYear;
|
|
350
|
+
return new Intl.DateTimeFormat(this.locale, {
|
|
351
|
+
month: "long",
|
|
352
|
+
year: "numeric"
|
|
353
|
+
}).format(new Date(a, t, 1));
|
|
354
|
+
}
|
|
355
|
+
activateDate(t) {
|
|
356
|
+
this.activeDate = t, this.goToMonthYear(t.getMonth(), t.getFullYear()), requestAnimationFrame((() => this.focusRenderedDate(t)));
|
|
357
|
+
}
|
|
358
|
+
emitCommit(t) {
|
|
359
|
+
this.tctCalendarCommit.emit(t), this.tctChange.emit(t);
|
|
360
|
+
}
|
|
361
|
+
findValidNavigationDate(t, a) {
|
|
362
|
+
let e = t;
|
|
363
|
+
for (let t = 0; t < 366; t++) {
|
|
364
|
+
if (this.isDateValid(e)) return e;
|
|
365
|
+
e = i.addDays(e, a);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
focusRenderedDate(t) {
|
|
369
|
+
var a, e, r;
|
|
370
|
+
null === (r = null === (e = null === (a = this.hostElement) || void 0 === a ? void 0 : a.shadowRoot) || void 0 === e ? void 0 : e.querySelector(`button[data-date="${formatDateISO(t)}"]`)) || void 0 === r || r.focus();
|
|
371
|
+
}
|
|
372
|
+
formatRangeDate(t) {
|
|
373
|
+
return this.displayFormat ? formatDisplayDate(t, this.normalizedDisplayFormat) : new Intl.DateTimeFormat(this.locale, {
|
|
374
|
+
year: "numeric",
|
|
375
|
+
month: "2-digit",
|
|
376
|
+
day: "2-digit"
|
|
377
|
+
}).format(t);
|
|
378
|
+
}
|
|
379
|
+
goToMonthYear(t, a) {
|
|
380
|
+
const e = new Date(a, t, 1);
|
|
381
|
+
this.selectedMonthYear = {
|
|
382
|
+
monthIndex: e.getMonth(),
|
|
383
|
+
selectedYear: e.getFullYear()
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
isDateValid(t) {
|
|
387
|
+
return isDateSelectable(t, this.constraints);
|
|
388
|
+
}
|
|
389
|
+
isRangeValid(t, a) {
|
|
390
|
+
return isRangeSelectable(t, a, this.constraints);
|
|
391
|
+
}
|
|
392
|
+
onNavigate(t) {
|
|
393
|
+
const {monthIndex: a, selectedYear: e} = this.selectedMonthYear, r = {
|
|
394
|
+
previousYear: [ a, e - 1 ],
|
|
395
|
+
previousMonth: [ a - 1, e ],
|
|
396
|
+
nextMonth: [ a + 1, e ],
|
|
397
|
+
nextYear: [ a, e + 1 ]
|
|
398
|
+
};
|
|
399
|
+
this.goToMonthYear(...r[t]);
|
|
400
|
+
}
|
|
401
|
+
resetCalendarSession() {
|
|
402
|
+
const t = this.selectedDate;
|
|
403
|
+
this.activeDate = t, this.selectedMonthYear = function(t = new Date) {
|
|
404
|
+
return {
|
|
405
|
+
monthIndex: t.getMonth(),
|
|
406
|
+
selectedYear: t.getFullYear()
|
|
407
|
+
};
|
|
408
|
+
}(t), this.resetRangeDraft();
|
|
409
|
+
}
|
|
410
|
+
resetRangeDraft() {
|
|
411
|
+
if (this.setRangeError(""), this.rangeHoverDate = void 0, !this.selectedDate || !this.rangeEndDate) return this.rangeDraftStart = void 0,
|
|
412
|
+
void (this.rangeDraftEnd = void 0);
|
|
413
|
+
[this.rangeDraftStart, this.rangeDraftEnd] = [ this.selectedDate, this.rangeEndDate ].sort(((t, a) => t.getTime() - a.getTime()));
|
|
414
|
+
}
|
|
415
|
+
selectDate(t) {
|
|
416
|
+
if (this.isDateValid(t)) {
|
|
417
|
+
if (this.activeDate = t, this.isRangeMode) return this.setRangeError(""), !this.rangeDraftStart || this.rangeDraftEnd ? (this.rangeDraftStart = t,
|
|
418
|
+
this.rangeDraftEnd = void 0) : t.getTime() < this.rangeDraftStart.getTime() ? (this.rangeDraftEnd = this.rangeDraftStart,
|
|
419
|
+
this.rangeDraftStart = t) : this.rangeDraftEnd = t, this.rangeHoverDate = void 0,
|
|
420
|
+
this.goToMonthYear(t.getMonth(), t.getFullYear()), void requestAnimationFrame((() => this.focusRenderedDate(t)));
|
|
421
|
+
this.goToMonthYear(t.getMonth(), t.getFullYear()), this.emitCommit({
|
|
422
|
+
value: formatDateISO(t)
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
setRangeError(t) {
|
|
427
|
+
this.rangeError !== t && (this.rangeError = t, this.tctCalendarError.emit(t));
|
|
428
|
+
}
|
|
429
|
+
// #endregion
|
|
430
|
+
// #region Render Methods
|
|
431
|
+
renderNavigation() {
|
|
432
|
+
return [ r("div", {
|
|
433
|
+
class: "cal-nav-controls cal-nav-controls-left"
|
|
434
|
+
}, this.renderNavigationButton("previousYear"), this.renderNavigationButton("previousMonth")), r("div", {
|
|
435
|
+
class: "cal-nav-title",
|
|
436
|
+
id: "date-picker-label",
|
|
437
|
+
"aria-live": "polite"
|
|
438
|
+
}, this.title), r("div", {
|
|
439
|
+
class: "cal-nav-controls cal-nav-controls-right"
|
|
440
|
+
}, this.renderNavigationButton("nextMonth"), this.renderNavigationButton("nextYear")) ];
|
|
441
|
+
}
|
|
442
|
+
renderNavigationButton(t) {
|
|
443
|
+
const a = "previousYear" === t || "nextYear" === t, e = "previousYear" === t || "previousMonth" === t;
|
|
444
|
+
return r("q2-btn", {
|
|
445
|
+
class: `cal-nav-btn ${t}`,
|
|
446
|
+
"hide-label": !0,
|
|
447
|
+
label: s(`tecton.element.calendar.${t}`),
|
|
448
|
+
onTctClick: () => this.onNavigate(t),
|
|
449
|
+
"test-id": `${t}Button`
|
|
450
|
+
}, r("q2-icon", {
|
|
451
|
+
type: `chevron-${a ? "double-" : ""}${e ? "left" : "right"}`
|
|
452
|
+
}));
|
|
453
|
+
}
|
|
454
|
+
render() {
|
|
455
|
+
const t = !this.actionSheet && "up" === this.direction, a = this.rovingDate, e = this.rangeValidationError;
|
|
456
|
+
return r("div", {
|
|
457
|
+
key: "84c278bd6817625fcf5f70528000edcc84d116a6",
|
|
458
|
+
class: `cal-panel direction-${t ? "up" : "down"}${this.actionSheet ? " is-action-sheet" : ""}`,
|
|
459
|
+
role: this.actionSheet ? void 0 : "dialog",
|
|
460
|
+
"aria-label": this.actionSheet ? void 0 : localizeDatePickerString(this.accessibleLabel || this.calendarLabel || "Choose a date")
|
|
461
|
+
}, this.calendarLabel && !this.actionSheet && r("p", {
|
|
462
|
+
key: "9a466d3509ed7ce45949039cfa11ce8485c4e278",
|
|
463
|
+
class: "calendar-label"
|
|
464
|
+
}, localizeDatePickerString(this.calendarLabel)), !t && r("div", {
|
|
465
|
+
key: "a8c6ef4c4098c81bb79cd2ca450f38c56c99c51d",
|
|
466
|
+
class: "cal-nav"
|
|
467
|
+
}, this.renderNavigation()), r("div", {
|
|
468
|
+
key: "45e7f43ee502ea2c19049112860b3690313f53d5",
|
|
469
|
+
class: "cal-grid",
|
|
470
|
+
role: "grid",
|
|
471
|
+
"aria-labelledby": "date-picker-label"
|
|
472
|
+
}, r("div", {
|
|
473
|
+
key: "2a1a4caebfb72b601b9dd282550b519a3f610329",
|
|
474
|
+
role: "rowgroup"
|
|
475
|
+
}, r("div", {
|
|
476
|
+
key: "6187b5b5b7391e389a4af9403a2b8c63f9606e35",
|
|
477
|
+
class: "cal-row cal-weekdays",
|
|
478
|
+
role: "row"
|
|
479
|
+
}, this.dayAbbrStrings.map(((t, a) => r("div", {
|
|
480
|
+
class: "cal-dow",
|
|
481
|
+
role: "columnheader",
|
|
482
|
+
"aria-label": this.dayStrings[a]
|
|
483
|
+
}, t))))), r("div", {
|
|
484
|
+
key: "f2c274adc93798dd8c20762a09fcc95bcb77992f",
|
|
485
|
+
class: "cal-days",
|
|
486
|
+
role: "rowgroup",
|
|
487
|
+
onClick: this.onDateSelection,
|
|
488
|
+
onKeyDown: this.onDateKeydown,
|
|
489
|
+
onMouseLeave: this.onDateHoverEnd
|
|
490
|
+
}, this.currentWeeks.map((t => r("div", {
|
|
491
|
+
class: "cal-row",
|
|
492
|
+
role: "row"
|
|
493
|
+
}, t.map((t => r("div", {
|
|
494
|
+
role: "gridcell",
|
|
495
|
+
"aria-selected": `${t.isSelected}`
|
|
496
|
+
}, r("button", {
|
|
497
|
+
type: "button",
|
|
498
|
+
class: t.classList,
|
|
499
|
+
"data-date": formatDateISO(t.date),
|
|
500
|
+
disabled: !t.isValid,
|
|
501
|
+
tabindex: i.isSameDay(t.date, a) ? 0 : -1,
|
|
502
|
+
"aria-disabled": t.isValid ? void 0 : "true",
|
|
503
|
+
"aria-current": t.isToday ? "date" : void 0,
|
|
504
|
+
"aria-label": formatDateFull(t.date),
|
|
505
|
+
onMouseEnter: this.onDateHover
|
|
506
|
+
}, t.date.getDate()))))))))), t && r("div", {
|
|
507
|
+
key: "14a8abe8669e403c4745eaf256783f37caf7fc43",
|
|
508
|
+
class: "cal-nav"
|
|
509
|
+
}, this.renderNavigation()), this.disclaimer && r("div", {
|
|
510
|
+
key: "f3ab74f66fca52d2499f52d20fdfd8a86cc154bc",
|
|
511
|
+
class: "calendar-disclaimer"
|
|
512
|
+
}, localizeDatePickerString(this.disclaimer)), this.isRangeMode && r("div", {
|
|
513
|
+
key: "276c870f99275bb582b250ed1a3632f5e95c17c3",
|
|
514
|
+
class: "cal-footer"
|
|
515
|
+
}, r("div", {
|
|
516
|
+
key: "1d753811c31360780fae551cb49c190561e292ed",
|
|
517
|
+
class: "cal-footer-summary"
|
|
518
|
+
}, r("q2-message", {
|
|
519
|
+
key: "9db690009d1efa45b4e852e16a5b47ab0262c751",
|
|
520
|
+
class: "is-placeholder",
|
|
521
|
+
appearance: "minimal",
|
|
522
|
+
type: "error",
|
|
523
|
+
"aria-hidden": "true"
|
|
524
|
+
}, e), r("span", {
|
|
525
|
+
key: "c1b41f3faf70207aa8dc65c8812dc91737cfe590"
|
|
526
|
+
}, this.rangeSummary)), r("div", {
|
|
527
|
+
key: "6af2f2741335e07737e61936cd480e90eb38918b",
|
|
528
|
+
class: "cal-footer-actions"
|
|
529
|
+
}, r("q2-btn", {
|
|
530
|
+
key: "62e02cab1e110559304475a1d0c29d1fc65f1d93",
|
|
531
|
+
intent: "workflow-escape",
|
|
532
|
+
size: "small",
|
|
533
|
+
label: localizeDatePickerString("tecton.element.datePicker.action.cancel"),
|
|
534
|
+
onTctClick: this.onRangeCancel
|
|
535
|
+
}), r("q2-btn", {
|
|
536
|
+
key: "14f1286e80e92b42168e3e6abe9718d40b4ded59",
|
|
537
|
+
intent: "workflow-primary",
|
|
538
|
+
size: "small",
|
|
539
|
+
label: localizeDatePickerString("tecton.element.datePicker.action.confirm"),
|
|
540
|
+
disabled: this.rangeConfirmDisabled,
|
|
541
|
+
onTctClick: this.onRangeCommit
|
|
542
|
+
}))));
|
|
543
|
+
}
|
|
544
|
+
get hostElement() {
|
|
545
|
+
return this;
|
|
546
|
+
}
|
|
547
|
+
static get watchers() {
|
|
548
|
+
return {
|
|
549
|
+
cutoffTime: [ {
|
|
550
|
+
constraintsChanged: 0
|
|
551
|
+
} ],
|
|
552
|
+
daysOfWeekChecksum: [ {
|
|
553
|
+
constraintsChanged: 0
|
|
554
|
+
} ],
|
|
555
|
+
endDate: [ {
|
|
556
|
+
constraintsChanged: 0
|
|
557
|
+
} ],
|
|
558
|
+
invalidDates: [ {
|
|
559
|
+
constraintsChanged: 0
|
|
560
|
+
} ],
|
|
561
|
+
startDate: [ {
|
|
562
|
+
constraintsChanged: 0
|
|
563
|
+
} ],
|
|
564
|
+
validDates: [ {
|
|
565
|
+
constraintsChanged: 0
|
|
566
|
+
} ],
|
|
567
|
+
mode: [ {
|
|
568
|
+
modeChanged: 0
|
|
569
|
+
} ],
|
|
570
|
+
open: [ {
|
|
571
|
+
openChanged: 0
|
|
572
|
+
} ],
|
|
573
|
+
rangeEnd: [ {
|
|
574
|
+
rangeChanged: 0
|
|
575
|
+
} ],
|
|
576
|
+
rangeStart: [ {
|
|
577
|
+
rangeChanged: 0
|
|
578
|
+
} ],
|
|
579
|
+
value: [ {
|
|
580
|
+
valueChanged: 0
|
|
581
|
+
} ]
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
static get style() {
|
|
585
|
+
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{box-sizing:border-box;display:block}:host[hidden]{display:none}.cal-panel{box-sizing:border-box;width:var(--comp-date-calendar-width, var(--tct-date-calendar-width, 360px));min-width:0;padding:var(--tct-date-calendar-padding, var(--app-scale-4x, 20px));border-radius:var(--tct-date-calendar-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-date-calendar-background, var(--t-base, #ffffff));box-shadow:var(--tct-date-calendar-box-shadow, var(--app-shadow-3))}.cal-panel.is-action-sheet{width:100%;padding:0;border-radius:0;background:transparent;box-shadow:none}.calendar-label{margin:0 0 var(--tct-date-calendar-label-margin-bottom, var(--tct-scale-2, var(--app-scale-2x, 10px)));color:var(--tct-date-calendar-label-font-color, var(--tct-text, var(--t-text, #4d4d4d)));font-size:var(--tct-date-calendar-label-font-size, var(--tct-font-size, var(--app-font-size, var(--const-px-14, 14px))));font-weight:var(--tct-date-calendar-label-font-weight, var(--tct-font-weight-semibold, 600))}.cal-nav{display:grid;grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);align-items:center;margin-bottom:var(--tct-date-calendar-navigation-margin-bottom, var(--app-scale-3x, 15px))}.cal-nav-controls{display:flex;gap:var(--tct-date-calendar-navigation-gap, 2px)}.cal-nav-controls-left{justify-self:start}.cal-nav-controls-right{justify-self:end}.cal-panel.direction-up .cal-nav{margin-top:var(--tct-date-calendar-navigation-margin-top, var(--app-scale-3x, 15px));margin-bottom:0}.cal-nav-btn{width:var(--tct-date-calendar-navigation-button-width, 40px);height:var(--tct-date-calendar-navigation-button-height, 40px);margin:0;--tct-btn-icon-width:var(--tct-date-calendar-navigation-button-width, 40px);--tct-btn-icon-height:var(--tct-date-calendar-navigation-button-height, 40px);--tct-btn-icon-size:var(--tct-date-calendar-navigation-icon-size, 22px);--tct-btn-icon-border-radius:var(--tct-date-calendar-navigation-button-border-radius, var(--app-border-radius-1, 4px))}.cal-nav-btn q2-icon{width:var(--tct-date-calendar-navigation-icon-size, 22px);min-width:var(--tct-date-calendar-navigation-icon-size, 22px);height:var(--tct-date-calendar-navigation-icon-size, 22px)}.cal-nav-title{overflow:hidden;color:var(--tct-date-calendar-month-font-color, var(--tct-text, var(--t-text, #4d4d4d)));font-size:var(--tct-date-calendar-month-font-size, var(--const-px-15, 15px));font-weight:var(--tct-date-calendar-month-font-weight, 700);text-align:center;text-overflow:ellipsis;white-space:nowrap}.cal-row{display:grid;grid-template-columns:repeat(7, 44px);gap:var(--tct-date-calendar-grid-gap, 2px);justify-content:center}.cal-days{display:flex;flex-direction:column;gap:var(--tct-date-calendar-grid-gap, 2px)}.cal-dow{padding:var(--tct-date-calendar-weekday-padding, 6px 0 10px);color:var(--tct-date-calendar-day-heading-font-color, var(--tct-gray-8, var(--t-gray-8, #747474)));font-size:var(--tct-date-calendar-day-heading-font-size, var(--app-font-size-small, var(--const-px-12, 12px)));font-weight:var(--tct-date-calendar-day-heading-font-weight, 600);text-align:center}[role=gridcell]{min-width:0}.cal-day{box-sizing:border-box;display:flex;width:100%;height:var(--tct-date-calendar-day-height, 44px);padding:0;align-items:center;justify-content:center;border:0;border-radius:var(--tct-date-calendar-day-border-radius, var(--app-border-radius-2, 8px));background:transparent;color:var(--tct-date-calendar-day-font-color, var(--t-gray-1, #0d0d0d));cursor:pointer;font:inherit;font-size:var(--tct-date-calendar-day-font-size, var(--app-font-size, var(--const-px-14, 14px)))}.cal-day:hover:not(:disabled):not(.is-selected){background:var(--tct-date-calendar-day-hover-background, var(--t-gray-14, #f2f2f2))}.cal-day:focus-visible{background:var(--tct-date-calendar-background, var(--t-base, #ffffff));outline:0;box-shadow:var(--tct-date-calendar-day-focus-ring, var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc))}.cal-day.is-outside{color:var(--tct-date-calendar-day-outside-font-color, var(--t-gray-8, #747474))}.cal-day:disabled{color:var(--tct-date-calendar-day-disabled-font-color, var(--t-gray-11, #cccccc));cursor:not-allowed}.cal-day.is-today{color:var(--tct-date-calendar-today-color, var(--t-primary, #6a4a9e));font-weight:var(--tct-date-calendar-today-font-weight, 600);box-shadow:inset 0 0 0 2px var(--tct-date-calendar-today-color, var(--t-primary, #6a4a9e))}.cal-day.is-selected{border-radius:var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px));background:var(--tct-date-calendar-day-selected-background, var(--t-primary, #6a4a9e));color:var(--tct-date-calendar-day-selected-font-color, var(--t-primary-text, #ffffff));font-weight:var(--tct-date-calendar-day-selected-font-weight, 700);box-shadow:none}.cal-day.in-range{border-radius:0;background:var(--tct-date-calendar-range-background, var(--t-primary-t4, #eee8f5));color:var(--tct-date-calendar-range-font-color, var(--t-primary, #6a4a9e))}.cal-day.in-range.is-disabled{background:var(--tct-date-calendar-range-disabled-background, var(--const-stoplight-alert, #d20a0a));color:var(--t-base, #ffffff)}.cal-day.range-start{border-radius:var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px)) 0 0 var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px))}.cal-day.range-end{border-radius:0 var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px)) var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px)) 0}.cal-day.range-start.range-end{border-radius:var(--tct-date-calendar-day-selected-border-radius, var(--app-border-radius-1, 4px))}.calendar-disclaimer{margin-top:var(--tct-date-calendar-disclaimer-margin-top, var(--app-scale-3x, 15px));padding-top:var(--tct-date-calendar-disclaimer-padding-top, var(--app-scale-2x, 10px));border-top:1px solid var(--tct-date-calendar-disclaimer-border-color, var(--t-gray-13, #e6e6e6));color:var(--tct-date-calendar-disclaimer-font-color, var(--t-text, #4d4d4d));font-size:var(--tct-date-calendar-disclaimer-font-size, var(--app-font-size-small, var(--const-px-12, 12px)))}.cal-footer{display:grid;gap:var(--tct-date-calendar-footer-gap, var(--app-scale-2x, 10px));margin-top:var(--tct-date-calendar-footer-margin-top, var(--app-scale-3x, 15px));padding-top:var(--tct-date-calendar-footer-padding-top, var(--app-scale-3x, 15px));border-top:1px solid var(--tct-date-calendar-footer-border-color, var(--t-gray-13, #e6e6e6))}.cal-footer-summary{display:grid;color:var(--tct-date-calendar-footer-font-color, var(--t-primary, #6a4a9e));font-size:var(--tct-date-calendar-footer-font-size, var(--app-font-size-small, var(--const-px-12, 12px)));font-weight:var(--tct-date-calendar-footer-font-weight, 600)}.cal-footer-summary>*{grid-area:1/1}.cal-footer-summary q2-message{color:var(--t-text, #4d4d4d)}.cal-footer-summary>span{display:flex;align-items:center}.cal-footer-summary q2-message.is-placeholder{visibility:hidden;pointer-events:none}.cal-footer-actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:var(--tct-date-calendar-footer-action-gap, var(--app-scale-1x, 5px));padding:var(--tct-date-calendar-footer-action-padding, var(--app-scale-1x, 5px))}.cal-footer-actions q2-btn{flex:0 0 auto;width:auto}@media (max-width: 768px){:host{max-width:none}.cal-panel{width:var(--comp-date-calendar-width, min(100%, 100vw - var(--tct-date-calendar-mobile-gutter, 24px) - var(--tct-date-calendar-mobile-gutter, 24px), var(--tct-date-calendar-mobile-max-width, 420px)));min-width:0}.cal-row{grid-template-columns:repeat(7, minmax(44px, 1fr))}.cal-day{height:auto;aspect-ratio:1}}@media (max-width: 360px){.cal-nav-btn{height:var(--tct-date-calendar-mobile-navigation-button-height, 32px);--tct-btn-icon-height:var(--tct-date-calendar-mobile-navigation-button-height, 32px)}}';
|
|
586
|
+
}
|
|
587
|
+
}, [ 1, "q2-date-calendar", {
|
|
588
|
+
accessibleLabel: [ 1, "accessible-label" ],
|
|
589
|
+
actionSheet: [ 4, "action-sheet" ],
|
|
590
|
+
calendarLabel: [ 1, "calendar-label" ],
|
|
591
|
+
cutoffTime: [ 1, "cutoff-time" ],
|
|
592
|
+
daysOfWeekChecksum: [ 2, "days-of-week-checksum" ],
|
|
593
|
+
direction: [ 1 ],
|
|
594
|
+
disabled: [ 4 ],
|
|
595
|
+
disclaimer: [ 1 ],
|
|
596
|
+
displayFormat: [ 1, "display-format" ],
|
|
597
|
+
endDate: [ 1, "end-date" ],
|
|
598
|
+
invalidDates: [ 16 ],
|
|
599
|
+
locale: [ 1 ],
|
|
600
|
+
mode: [ 1 ],
|
|
601
|
+
open: [ 4 ],
|
|
602
|
+
rangeEnd: [ 1, "range-end" ],
|
|
603
|
+
rangeStart: [ 1, "range-start" ],
|
|
604
|
+
readonly: [ 4 ],
|
|
605
|
+
startDate: [ 1, "start-date" ],
|
|
606
|
+
validDates: [ 16 ],
|
|
607
|
+
value: [ 1 ],
|
|
608
|
+
activeDate: [ 32 ],
|
|
609
|
+
rangeDraftEnd: [ 32 ],
|
|
610
|
+
rangeDraftStart: [ 32 ],
|
|
611
|
+
rangeError: [ 32 ],
|
|
612
|
+
rangeHoverDate: [ 32 ],
|
|
613
|
+
selectedMonthYear: [ 32 ],
|
|
614
|
+
focusDate: [ 64 ],
|
|
615
|
+
setValue: [ 64 ]
|
|
616
|
+
}, [ [ 0, "tctCalendarFocus", "focusHandler" ] ], {
|
|
617
|
+
cutoffTime: [ {
|
|
618
|
+
constraintsChanged: 0
|
|
619
|
+
} ],
|
|
620
|
+
daysOfWeekChecksum: [ {
|
|
621
|
+
constraintsChanged: 0
|
|
622
|
+
} ],
|
|
623
|
+
endDate: [ {
|
|
624
|
+
constraintsChanged: 0
|
|
625
|
+
} ],
|
|
626
|
+
invalidDates: [ {
|
|
627
|
+
constraintsChanged: 0
|
|
628
|
+
} ],
|
|
629
|
+
startDate: [ {
|
|
630
|
+
constraintsChanged: 0
|
|
631
|
+
} ],
|
|
632
|
+
validDates: [ {
|
|
633
|
+
constraintsChanged: 0
|
|
634
|
+
} ],
|
|
635
|
+
mode: [ {
|
|
636
|
+
modeChanged: 0
|
|
637
|
+
} ],
|
|
638
|
+
open: [ {
|
|
639
|
+
openChanged: 0
|
|
640
|
+
} ],
|
|
641
|
+
rangeEnd: [ {
|
|
642
|
+
rangeChanged: 0
|
|
643
|
+
} ],
|
|
644
|
+
rangeStart: [ {
|
|
645
|
+
rangeChanged: 0
|
|
646
|
+
} ],
|
|
647
|
+
value: [ {
|
|
648
|
+
valueChanged: 0
|
|
649
|
+
} ]
|
|
650
|
+
} ]);
|
|
651
|
+
|
|
652
|
+
function defineCustomElement() {
|
|
653
|
+
if ("undefined" == typeof customElements) return;
|
|
654
|
+
[ "q2-date-calendar", "q2-btn", "q2-icon", "q2-loading", "q2-message" ].forEach((t => {
|
|
655
|
+
switch (t) {
|
|
656
|
+
case "q2-date-calendar":
|
|
657
|
+
customElements.get(n(t)) || customElements.define(n(t), v);
|
|
658
|
+
break;
|
|
659
|
+
|
|
660
|
+
case "q2-btn":
|
|
661
|
+
customElements.get(n(t)) || o();
|
|
662
|
+
break;
|
|
663
|
+
|
|
664
|
+
case "q2-icon":
|
|
665
|
+
customElements.get(n(t)) || d();
|
|
666
|
+
break;
|
|
667
|
+
|
|
668
|
+
case "q2-loading":
|
|
669
|
+
customElements.get(n(t)) || c();
|
|
670
|
+
break;
|
|
671
|
+
|
|
672
|
+
case "q2-message":
|
|
673
|
+
customElements.get(n(t)) || l();
|
|
674
|
+
}
|
|
675
|
+
}));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export { v as Q, formatLegacyDisplayDate as a, normalizeDisplayFormat as b, formatDisplayDate as c, defineCustomElement as d, isRangeSelectable as e, formatDateISO as f, buildInputDate as g, isDateSelectable as i, localizeDatePickerString as l, normalizeDatePickerValue as n, parseDatePickerValue as p }
|