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
|
@@ -45,7 +45,7 @@ export class Q2Search {
|
|
|
45
45
|
/**
|
|
46
46
|
* Hides the field's `<label>` element from view.
|
|
47
47
|
* @warning
|
|
48
|
-
*
|
|
48
|
+
* Hides the label visually. `label` text is still required for screenreader compliance.
|
|
49
49
|
*/
|
|
50
50
|
this.hideLabel = false;
|
|
51
51
|
/**
|
|
@@ -771,7 +771,7 @@ export class Q2Search {
|
|
|
771
771
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: (_a = this.innerInputContainer) !== null && _a !== void 0 ? _a : undefined, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, align: useBlock ? undefined : this.popoverAlignment, block: useBlock }, h("div", { class: "popover-content", "data-loading": this.loading ? 'true' : 'false', "aria-busy": this.loading ? 'true' : null }, h("div", { class: "popover-top-container", hidden: !this.hasPopoverTop && !(this.multiple && this.showSelectedToggle), tabindex: "-1" }, h("slot", { name: "popover-top" }), !this.loading && this.renderMultiSelectHeader()), h("q2-option-list", { ref: el => (this.optionList = el), type: "listbox", id: this.optionListId, label: loc(this.listLabel), multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, showSelected: this.showSelected, customSearch: true, hidden: this.loading, onChange: (e) => e.stopPropagation(), onTctChange: this.onOptionListChange }, h("slot", null)), showEmpty && this.renderEmpty(), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" })), this.loading && (h("div", { class: "loading-overlay", "aria-hidden": "true" }, h("q2-loading", { type: "spinner" }))))));
|
|
772
772
|
}
|
|
773
773
|
render() {
|
|
774
|
-
return (h(Fragment, { key: '
|
|
774
|
+
return (h(Fragment, { key: '4b3787554c37521bc3467345cdd1d733cffba3a5' }, h("div", { key: '696caa142cffecf1e0d62afafd826dce37f75512', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("click-elsewhere", { key: 'f8b493ec8f7da09fad48f9fa30f0e9be7fbaedf4', class: this.wrapperClasses, role: "presentation", onChange: this.onClickElsewhere }, h("q2-input", { key: '44e0ad4b7825ac319dd4277ccb93d4dd66acef12', ref: el => (this.inputField = el), class: "q2-search-input", label: (this.label && loc(this.label)) || '', value: this.searchText, iconLeft: "search", clearable: this.clearable && !this.loading && !!this.searchText, disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder ? loc(this.placeholder) : undefined, hideLabel: this.hideLabel, errors: (Array.isArray(this.errors) && this.errors.length > 0 && this.errors.map(e => loc(e))) ||
|
|
775
775
|
(this.invalid && ['tecton.element.search.invalid']) ||
|
|
776
776
|
[], ariaExpanded: this.isInputOnlyMode ? undefined : `${this.open}`, ariaControls: this.isInputOnlyMode ? undefined : this.optionListId, ariaHaspopup: this.isInputOnlyMode ? undefined : 'listbox', hideMessages: true, _role: this.isInputOnlyMode ? undefined : 'combobox', onTctInput: this.inputInputHandler, onInput: (e) => e.stopImmediatePropagation(), onChange: (e) => e.stopPropagation(), onTctChange: (e) => e.stopPropagation(), badgeValue: this.badgeValue }, this.renderCustomDisplay()), this.renderOptionsDropdown())));
|
|
777
777
|
}
|
|
@@ -882,7 +882,7 @@ export class Q2Search {
|
|
|
882
882
|
"docs": {
|
|
883
883
|
"tags": [{
|
|
884
884
|
"name": "warning",
|
|
885
|
-
"text": "
|
|
885
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance."
|
|
886
886
|
}],
|
|
887
887
|
"text": "Hides the field's `<label>` element from view."
|
|
888
888
|
},
|
|
@@ -923,6 +923,9 @@ export class Q2Search {
|
|
|
923
923
|
"optional": false,
|
|
924
924
|
"docs": {
|
|
925
925
|
"tags": [{
|
|
926
|
+
"name": "warning",
|
|
927
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
928
|
+
}, {
|
|
926
929
|
"name": "localizable",
|
|
927
930
|
"text": undefined
|
|
928
931
|
}],
|
|
@@ -186,9 +186,9 @@ export class Q2Section {
|
|
|
186
186
|
wrapperClasses.push('is-transitioning');
|
|
187
187
|
}
|
|
188
188
|
const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
|
|
189
|
-
return (h("section", { key: '
|
|
189
|
+
return (h("section", { key: '5adb22a7e6cf098fa3cf2325c945c6aa1c20b2d5', class: "wrapper" }, h("header", { key: 'c04df6d07756c27374e4be85ad88848a0c1ac897', class: hasHeader ? 'has-header' : '' }, h("div", { key: '8cd09e8bf367a7510b91106b8ebd4f419faff861', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: '195e1523e68c83e294bd92d617b8c4d44e679494', class: "title" }, loc(this.label)), h("div", { key: 'e493986ee113d44bf74b11116003939f3db24bd7', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '44f2dc2ca76acfd800a1435608a75bf6e3258d37', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: 'b2602555b9282c8149780f65d2fbaa65febc1f50', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '62728524b58cf5cf7aa2531df1218d3bf0b40b0a', type: "chevron-up" })))), h("div", { key: '13ef854a01937880007fb4021b1528c1b83fe937', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
|
|
190
190
|
height: this.contentHeight,
|
|
191
|
-
} }, h("div", { key: '
|
|
191
|
+
} }, h("div", { key: '866d8b0301a9c5979f5b3bd31086d25f73373709', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '36c97155aa106dc1587537066e031c7d6c032295', ref: (el) => (this.contentSlot = el) })))));
|
|
192
192
|
}
|
|
193
193
|
static get is() { return "q2-section"; }
|
|
194
194
|
static get encapsulation() { return "shadow"; }
|
|
@@ -410,8 +410,12 @@ export class Q2Select {
|
|
|
410
410
|
this.inputKeydownHandler(event);
|
|
411
411
|
}
|
|
412
412
|
popoverStateChanged({ detail: { open } }) {
|
|
413
|
-
if (this.open
|
|
414
|
-
|
|
413
|
+
if (this.open === open)
|
|
414
|
+
return;
|
|
415
|
+
this.open = open;
|
|
416
|
+
if (open)
|
|
417
|
+
return;
|
|
418
|
+
this.focusInput();
|
|
415
419
|
}
|
|
416
420
|
handleTctClick() {
|
|
417
421
|
const { name, version } = getBrowserInfo();
|
|
@@ -846,7 +850,7 @@ export class Q2Select {
|
|
|
846
850
|
]), checked: showSelected, "test-id": "selectedOptionsButton", onClick: this.showSelectedOptions, onKeyDown: this.visibilityToggleKeyDown }), h("label", { htmlFor: "selected" }, loc('tecton.element.select.multiHeader.selected', [selectedOptionsCount]))))));
|
|
847
851
|
}
|
|
848
852
|
render() {
|
|
849
|
-
return (h("click-elsewhere", { key: '
|
|
853
|
+
return (h("click-elsewhere", { key: 'c5ee7401b7dc4350fb01992e9a8a76e6700cb63c', class: this.wrapperClasses, role: "presentation", onChange: this.clickedElsewhere }, this.renderSelectField()));
|
|
850
854
|
}
|
|
851
855
|
static get is() { return "q2-select"; }
|
|
852
856
|
static get encapsulation() { return "shadow"; }
|
|
@@ -956,9 +960,9 @@ export class Q2Select {
|
|
|
956
960
|
"docs": {
|
|
957
961
|
"tags": [{
|
|
958
962
|
"name": "warning",
|
|
959
|
-
"text": "
|
|
963
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance."
|
|
960
964
|
}],
|
|
961
|
-
"text": "
|
|
965
|
+
"text": "Hides the field's `<label>` element from view."
|
|
962
966
|
},
|
|
963
967
|
"getter": false,
|
|
964
968
|
"setter": false,
|
|
@@ -1019,6 +1023,9 @@ export class Q2Select {
|
|
|
1019
1023
|
"optional": false,
|
|
1020
1024
|
"docs": {
|
|
1021
1025
|
"tags": [{
|
|
1026
|
+
"name": "warning",
|
|
1027
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
1028
|
+
}, {
|
|
1022
1029
|
"name": "localizable",
|
|
1023
1030
|
"text": undefined
|
|
1024
1031
|
}],
|
|
@@ -295,7 +295,7 @@ export class Q2Stepper {
|
|
|
295
295
|
const containerClasses = ['step-container'];
|
|
296
296
|
if (scrollEnabled)
|
|
297
297
|
containerClasses.push('has-scroll');
|
|
298
|
-
return (h(Fragment, { key: '
|
|
298
|
+
return (h(Fragment, { key: '423f7d50f787abf21c14730ae9cd50cd3638b17b' }, h("div", { key: '2ffacd2f9792075956748eb6960975d9aeda28ad', class: containerClasses.join(' ') }, scrollEnabled && (h(Fragment, { key: 'da90a671295ce6702c3bc6f1ab71f671cda2c9c8' }, h("div", { key: '319c4a75dfafd7b03d3f7f13156f24bd1ca7b0c3', class: "gradient-left", hidden: !showScrollLeft }), h("div", { key: '80a08dc979685d94f6cfe20d66787d06e7d46014', class: "gradient-right", hidden: !showScrollRight }), h("q2-btn", { key: '43a71cb3212ddbe37c6e7d7051850efd49ced456', class: "btn-left", hideLabel: true, hidden: !this.showScrollLeft, label: loc('tecton.element.stepper.scrollLeft'), onTctClick: () => this.onScrollBtnClick('left') }, h("q2-icon", { key: '19ee5abc690bba84016fb8c692a74b5c233aa426', type: "chevron-left" })), h("q2-btn", { key: 'f26bc502269a5d60308aba041a6d9a75efcf2573', class: "btn-right", hideLabel: true, hidden: !this.showScrollRight, label: loc('tecton.element.stepper.scrollRight'), onTctClick: () => this.onScrollBtnClick('right') }, h("q2-icon", { key: '7f35a54468433010427213e18d213b1c227413a6', type: "chevron-right" })))), h("ul", { key: '0bc4eed617263c7e4a6138c3a884f6a1b8bc2ca6', onScroll: this.checkScrollState, ref: el => (this.listElement = el), role: "tablist" }, stepCount > 0 && [...Array(stepCount).keys()].map(stepIndex => this.renderStepBtn(stepIndex)))), h("div", { key: '87945c612fcaa70164faa50d78bb63c9b290e3f2', role: "list" }, h("slot", { key: '4b55529f41b4731dc1424c8be4fcd941ff2c2f33', onSlotchange: () => this.onSlotChange() }))));
|
|
299
299
|
}
|
|
300
300
|
static get is() { return "q2-stepper"; }
|
|
301
301
|
static get encapsulation() { return "shadow"; }
|
|
@@ -73,7 +73,7 @@ export class Q2StepperPane {
|
|
|
73
73
|
// #region Render Methods
|
|
74
74
|
render() {
|
|
75
75
|
const { label, isActive } = this;
|
|
76
|
-
return (h(Host, { key: '
|
|
76
|
+
return (h(Host, { key: '3929b6bdb716394892be2bcdd933864e43f0204e', role: "listitem" }, h(Fragment, { key: 'd913741a6b71aebef92be14fd7ee541a3d5568da' }, h("div", { key: '038d29ac861f70ad15350da7733b39eece30e538', role: "group", "aria-labelledby": "pane-label", tabindex: "0", hidden: !isActive && !(this.isChildActive && this.showWithChildren) }, h("slot", { key: '56f4c0d9edfe134886d46367f2c801348267b53d' })), h("div", { key: '88bf8a9e1a6124c39d9ac4ee8906f61ac026966a', hidden: true }, h("span", { key: 'db485a5e84ab67fe714f0861fcd05c4b0bd7722f', id: "pane-label" }, h("slot", { key: '940a9a3a8543fd4c64425db2b7ea7b9cf079c947', name: "label", onSlotchange: () => this.contentChange.emit() }, label && loc(label))), h("slot", { key: '74a78697ed1aa85fca66743023d303c7abea0116', name: "description", onSlotchange: () => this.contentChange.emit() })), h("slot", { key: '4fb660b547a2da7dca37de9106b20b93b72aaf83', name: "children" }))));
|
|
77
77
|
}
|
|
78
78
|
static get is() { return "q2-stepper-pane"; }
|
|
79
79
|
static get encapsulation() { return "shadow"; }
|
|
@@ -325,7 +325,7 @@ export class Q2StepperVertical {
|
|
|
325
325
|
return (h("li", { role: "presentation" }, h("button", { class: stepClasses.join(' '), type: "button", "aria-labelledby": labelledBy, "aria-describedBy": descriptionId, "aria-label": btnLabel, "aria-selected": `${isCurrentStep}`, "aria-expanded": !!pane.children.length ? `${isExpanded}` : null, id: id, "aria-disabled": isLocked ? 'true' : null, role: "tab", tabIndex: isCurrentStep ? 0 : -1, onKeyDown: ev => !isLocked && this.onStepKeyDown(ev, id), onClick: ev => !isPaneDisabled && !isLocked && this.onStepClick(ev, id) }, label && (h(Fragment, null, h("span", { class: "sr-only", id: positionId }, positionLabel), h("span", { class: "sr-only", id: statusId }, statusLabel))), statusIcon ? (h("div", { class: "step-icon" }, h("q2-icon", { "aria-hidden": "true", type: statusIcon }))) : (h("div", { class: "step-bubble" }, stepNumber)), label && (h("div", null, h("div", { class: "step-label", id: labelId, innerHTML: sanitizeHTMLString(stepLabel) }), description && (h("div", { class: "step-description", id: descriptionId, innerHTML: sanitizeHTMLString(description) }))))), this.renderSpacer(pane, isExpanded, isLastStep)));
|
|
326
326
|
}
|
|
327
327
|
render() {
|
|
328
|
-
return (h(Fragment, { key: '
|
|
328
|
+
return (h(Fragment, { key: 'd2e82613e91ef3acf210781f807807b0fba8e7fc' }, h("ul", { key: '1ad1e36d0fca4b0c1cf793de43d9ea9ccb76974f', role: "tablist" }, this.structuredPanes.map((pane, index) => this.renderStepBtn(pane, index))), h("div", { key: 'ee710c6cb41011be7a8223ec817563cfeaeb6b71', role: "list" }, h("slot", { key: '0d1f6f53b73f72f163fc219de8db9736f669720d' }))));
|
|
329
329
|
}
|
|
330
330
|
static get is() { return "q2-stepper-vertical"; }
|
|
331
331
|
static get encapsulation() { return "shadow"; }
|
|
@@ -84,7 +84,7 @@ export class Q2Surface {
|
|
|
84
84
|
// #endregion
|
|
85
85
|
// #region Render Methods
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: 'fba508447ca646c22aa4a14872d78e02294a2fa1' }, h("div", { key: '46ac755e4c071b2345be0ba4272f283ac2758a82', class: "container", role: this.clickable ? 'button' : undefined, tabIndex: this.clickable ? 0 : undefined }, h("slot", { key: '699fdd1427248cdff8ecf1b3b1ca1d4a892dd763' }))));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "q2-surface"; }
|
|
90
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -105,8 +105,8 @@ const VARIANTS = [
|
|
|
105
105
|
html: `<q2-surface border="default" inset="normal" radius="2">
|
|
106
106
|
<p>Body copy above the action group.</p>
|
|
107
107
|
<q2-action-group>
|
|
108
|
-
<q2-btn intent="
|
|
109
|
-
<q2-btn intent="
|
|
108
|
+
<q2-btn intent="primary">Confirm</q2-btn>
|
|
109
|
+
<q2-btn intent="secondary">Cancel</q2-btn>
|
|
110
110
|
</q2-action-group>
|
|
111
111
|
</q2-surface>`,
|
|
112
112
|
states: ['resting'],
|
|
@@ -335,7 +335,7 @@ export class Q2TabContainer {
|
|
|
335
335
|
}
|
|
336
336
|
render() {
|
|
337
337
|
const isVertical = this.computedOrientation === 'vertical';
|
|
338
|
-
return (h(Fragment, { key: '
|
|
338
|
+
return (h(Fragment, { key: '37c84e750a2494ea2b4302fd99e0cebc443d58ce' }, h("div", { key: '249effad5ab4e880c2c203ac0e4024557c310679', class: "tab-container" }, this.scrollEnabled && (h(Fragment, { key: '10a7d53d5bde829e5897722cd924d40ce90a0b82' }, h("div", { key: 'b2acc786c41a9d1a8d3e951fdc36ecea3a304664', class: "gradient-left", hidden: !this.showScrollBack }), h("div", { key: 'fa70173c7d845f88417c6b6b6d54884ead80f34f', class: "gradient-right", hidden: !this.showScrollForward }), h("q2-btn", { key: 'd953c160ff42503dce5bb7c60d8234bdd9196d73', class: "btn-left", hidden: !this.showScrollBack, onTctClick: () => this.onScrollBtnClick('back') }, h("q2-icon", { key: '3980ef873b5d7ae6c50eb868455839344dda9701', type: isVertical ? 'chevron-up' : 'chevron-left', label: isVertical ? 'scroll up' : 'scroll left' })), h("q2-btn", { key: 'a3b1f46355ab1de2f73ac7529b734b684194093f', class: "btn-right", hidden: !this.showScrollForward, onTctClick: () => this.onScrollBtnClick('forward') }, h("q2-icon", { key: 'a2ec50ff7e0cce3716ba890c626fa56e62ecddbb', type: isVertical ? 'chevron-down' : 'chevron-right', label: isVertical ? 'scroll down' : 'scroll right' })))), h("ul", { key: 'e42bbb379d396a25b3af96985504a8f4bae1bba0', onScroll: this.checkScrollState, ref: el => (this.listElement = el), class: this.noPrint ? 'no-print' : null, role: "tablist", "aria-orientation": this.computedOrientation }, this.tabs.map((tab, index) => this.renderTab(tab, index)))), h("div", { key: '7d1f6ac5262cccb0b7087b3d93f33e46390814af', class: "tab-content" }, h("slot", { key: 'fa341fadca5ba04fe21ef7186cc0e15b5c7357db', onSlotchange: () => this.onSlotChange() }))));
|
|
339
339
|
}
|
|
340
340
|
static get is() { return "q2-tab-container"; }
|
|
341
341
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +19,7 @@ export class Q2TabPane {
|
|
|
19
19
|
// #endregion
|
|
20
20
|
// #region Render Methods
|
|
21
21
|
render() {
|
|
22
|
-
return (h("div", { key: '
|
|
22
|
+
return (h("div", { key: '1a957a6a6fb4dee7e420d46ad5f576b5b25008c4', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, h("slot", { key: '9c9dc847674f0a829feb822808f7e3dac9ac3263' })));
|
|
23
23
|
}
|
|
24
24
|
static get is() { return "q2-tab-pane"; }
|
|
25
25
|
static get encapsulation() { return "shadow"; }
|
|
@@ -132,11 +132,14 @@ export class Q2Tag {
|
|
|
132
132
|
this.dropdownBtn.focus();
|
|
133
133
|
}
|
|
134
134
|
popoverStateHandler({ detail: { open } }) {
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
var _a;
|
|
136
|
+
if (this.open === open)
|
|
137
|
+
return;
|
|
138
|
+
this.open = open;
|
|
137
139
|
if (open)
|
|
138
140
|
return;
|
|
139
141
|
this.optionList.setActiveElement(null);
|
|
142
|
+
(_a = this.dropdownBtn) === null || _a === void 0 ? void 0 : _a.focus();
|
|
140
143
|
}
|
|
141
144
|
// #endregion
|
|
142
145
|
// #region Public Methods API
|
|
@@ -194,7 +197,7 @@ export class Q2Tag {
|
|
|
194
197
|
if (this.optionCount)
|
|
195
198
|
wrapperClassNames.push('has-options');
|
|
196
199
|
const shouldShowOptions = this.optionCount > 0;
|
|
197
|
-
return (h(Host, { key: '
|
|
200
|
+
return (h(Host, { key: 'a46abe562647fe64e55427bcc8284bbfc5f01e3f' }, h("click-elsewhere", { key: '667e76295c30be78462ee67128a8fb2c38c01285', onChange: this.onClickElsewhere }, shouldShowOptions ? (h(Fragment, null, h("button", { class: "tag-wrapper", ref: el => (this.dropdownBtn = el), "test-id": "btn-control", type: "button", role: "combobox", onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, "aria-controls": "option-list", "aria-expanded": open ? 'true' : 'false', "aria-describedby": "option-description", "aria-label": loc(this.label) }, h("div", { class: wrapperClassNames.join(' ') }, loc(this.label)), h("q2-icon", { type: "options" })), this.renderHiddenElement())) : (h("div", { class: "tag-wrapper", onClick: e => e.stopPropagation() }, h("div", { class: wrapperClassNames.join(' ') }, h("slot", { name: "decorator" }), loc(this.label)))), shouldShowOptions && (h("q2-popover", { key: '805e64b738fc5a0b1a73968636a8843af33834ef', ref: el => (this.popoverElement = el), controlElement: this.dropdownBtn, open: this.open, maxHeight: this.popoverMaxHeight, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: '1d037878cfcf4785439edb9a5693d4dba700e947', id: "option-list", ref: el => (this.optionList = el), onChange: this.handleChange, type: "menu", align: "right", label: loc('tecton.element.optionList.label', [this.optionListLabel]), "no-select": true }, h("slot", { key: '1039cd355f5b1a7ec7cab1eca80479042060fef4' })))))));
|
|
198
201
|
}
|
|
199
202
|
static get is() { return "q2-tag"; }
|
|
200
203
|
static get encapsulation() { return "shadow"; }
|
|
@@ -277,7 +277,7 @@ export class Q2Textarea {
|
|
|
277
277
|
]))));
|
|
278
278
|
}
|
|
279
279
|
render() {
|
|
280
|
-
return (h("div", { key: '
|
|
280
|
+
return (h("div", { key: '21a303feabd0c8fc09d9cc7f0de8b9b50081a56a', class: this.wrapperClasses }, renderLabel(this), h("div", { key: '58b5be24312fe523d09efe176b1ecf42b884166a', class: "content-container", ref: el => (this.contentContainer = el) }, this.renderInput(), this.maxlength ? this.renderMaxLength() : '', renderMessages(this))));
|
|
281
281
|
}
|
|
282
282
|
static get is() { return "q2-textarea"; }
|
|
283
283
|
static get encapsulation() { return "shadow"; }
|
|
@@ -364,9 +364,9 @@ export class Q2Textarea {
|
|
|
364
364
|
"docs": {
|
|
365
365
|
"tags": [{
|
|
366
366
|
"name": "warning",
|
|
367
|
-
"text": "
|
|
367
|
+
"text": "Hides the label visually. `label` text is still required for screenreader compliance."
|
|
368
368
|
}],
|
|
369
|
-
"text": "
|
|
369
|
+
"text": "Hides the field's `<label>` element from view."
|
|
370
370
|
},
|
|
371
371
|
"getter": false,
|
|
372
372
|
"setter": false,
|
|
@@ -427,6 +427,9 @@ export class Q2Textarea {
|
|
|
427
427
|
"optional": false,
|
|
428
428
|
"docs": {
|
|
429
429
|
"tags": [{
|
|
430
|
+
"name": "warning",
|
|
431
|
+
"text": "Required for screen reader compliance even when `hideLabel` is `true`."
|
|
432
|
+
}, {
|
|
430
433
|
"name": "localizable",
|
|
431
434
|
"text": undefined
|
|
432
435
|
}],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { expect } from "@playwright/test";
|
|
2
2
|
import { test } from "@stencil/playwright";
|
|
3
3
|
import { setupPage, THEMES, FONT_SCALE_PX, FONT_SCALE_SUFFIX } from "../../../utils/test/vr-helpers";
|
|
4
|
-
const TRIGGER = `<q2-btn intent="
|
|
4
|
+
const TRIGGER = `<q2-btn intent="primary"><span>Trigger</span></q2-btn>`;
|
|
5
5
|
// Pad the wrapper so the tooltip has room to render in any direction without clipping.
|
|
6
6
|
const wrap = (inner) => `<div style="padding: 80px; display: inline-block;">${inner}</div>`;
|
|
7
7
|
// Use `immediate` so hover doesn't have to wait through the 1s delay before the
|
|
@@ -51,9 +51,9 @@ export class TectonTabPane {
|
|
|
51
51
|
// #endregion
|
|
52
52
|
// #region Render Methods
|
|
53
53
|
render() {
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
return (h("div", { key: '313fa13779cd8ecb5439b1a96cb7aaf17f6c871b', id: `tab-pane-${this.guid}-${this.index}`, class: `tab-pane${this.selected ? '' : ' hidden'}`, role: "tabpanel", tabindex: "-1", "aria-hidden": `${!this.selected}`, "aria-labelledby": `tab-${this.guid}-${this.index}` }, this.selected && this.provided !== undefined && !this.provided && (h("div", { key: '5207414b205d1e9a25fb1455ca21ff7cc913a5fd' }, h("slot", { key: 'd883e909e38981f315bc1cab9ef57957a616c0d5', name: "loading-wrapper" }), h("iframe", { key: '2f0233d04d3c5be619cb54bfe637252a7ef42d77', hidden: true, name: this.moduleId, scrolling: "no", src: this.showForm && this.authPayload.length ? '' : this.url || '', "data-module-id": this.moduleId, style: this.minHeight ? { minHeight: this.minHeight } : null, onLoad: this.onIFrameLoad, title: this.iframeTitle, allow: "geolocation; camera" }), this._showForm && this.authPayload ? (h("form", { hidden: true, method: "post", action: this.url, target: this.moduleId, encType: "multipart/form-data" }, this.authPayload.map(element => {
|
|
55
55
|
return (h("input", { type: "hidden", value: element.value, name: element.key }));
|
|
56
|
-
}))) : (''))), h("div", { key: '
|
|
56
|
+
}))) : (''))), h("div", { key: 'ae5ee8d5a5a7d1b798f4111b33120d301b86a16b', class: "slot-wrapper", hidden: this.selected && this.provided !== undefined && !this.provided }, h("slot", { key: 'cb1057d2b6cb467a25da1577610bfcc5b6300047' }))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "tecton-tab-pane"; }
|
|
59
59
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { loc } from "./index";
|
|
2
|
+
/** Localized feedback shared by chart keyboard controls. */
|
|
3
|
+
export function chartPointDescription(name, value, index, count) {
|
|
4
|
+
return loc('tecton.element.chart.pointDescription', [loc(name) || '', value, `${index + 1}`, `${count}`]);
|
|
5
|
+
}
|
|
6
|
+
/** Coordinates keyboard exploration with ECharts emphasis without changing chart data. */
|
|
7
|
+
export function createChartKeyboardNavigation(options) {
|
|
8
|
+
let index = null;
|
|
9
|
+
let focused = false;
|
|
10
|
+
const clear = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (index !== null) {
|
|
13
|
+
(_a = options.getChart()) === null || _a === void 0 ? void 0 : _a.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: index });
|
|
14
|
+
}
|
|
15
|
+
index = null;
|
|
16
|
+
options.onChange(null);
|
|
17
|
+
};
|
|
18
|
+
const select = (next) => {
|
|
19
|
+
var _a;
|
|
20
|
+
if (!options.getData()[next] || next === index)
|
|
21
|
+
return;
|
|
22
|
+
clear();
|
|
23
|
+
index = next;
|
|
24
|
+
(_a = options.getChart()) === null || _a === void 0 ? void 0 : _a.dispatchAction({ type: 'highlight', seriesIndex: 0, dataIndex: index });
|
|
25
|
+
options.onChange(index);
|
|
26
|
+
};
|
|
27
|
+
const order = () => { var _a, _b; return (_b = (_a = options.getOrder) === null || _a === void 0 ? void 0 : _a.call(options)) !== null && _b !== void 0 ? _b : options.getData().map((_, i) => i); };
|
|
28
|
+
return {
|
|
29
|
+
onFocus: () => {
|
|
30
|
+
focused = true;
|
|
31
|
+
select(order()[0]);
|
|
32
|
+
},
|
|
33
|
+
onBlur: () => {
|
|
34
|
+
focused = false;
|
|
35
|
+
clear();
|
|
36
|
+
},
|
|
37
|
+
onKeyDown: (event) => {
|
|
38
|
+
if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey)
|
|
39
|
+
return;
|
|
40
|
+
const indices = order();
|
|
41
|
+
if (!indices.length)
|
|
42
|
+
return;
|
|
43
|
+
const position = index === null ? -1 : indices.indexOf(index);
|
|
44
|
+
let next;
|
|
45
|
+
switch (event.key) {
|
|
46
|
+
case 'ArrowRight':
|
|
47
|
+
case 'ArrowDown':
|
|
48
|
+
next = Math.min(position + 1, indices.length - 1);
|
|
49
|
+
break;
|
|
50
|
+
case 'ArrowLeft':
|
|
51
|
+
case 'ArrowUp':
|
|
52
|
+
next = Math.max(position - 1, 0);
|
|
53
|
+
break;
|
|
54
|
+
case 'Home':
|
|
55
|
+
next = 0;
|
|
56
|
+
break;
|
|
57
|
+
case 'End':
|
|
58
|
+
next = indices.length - 1;
|
|
59
|
+
break;
|
|
60
|
+
case 'Escape':
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
clear();
|
|
63
|
+
return;
|
|
64
|
+
default:
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
event.preventDefault();
|
|
68
|
+
select(indices[next]);
|
|
69
|
+
},
|
|
70
|
+
refresh: () => {
|
|
71
|
+
clear();
|
|
72
|
+
if (focused)
|
|
73
|
+
select(order()[0]);
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { addDays, format as formatDate, formatISO, isAfter, isBefore, isSameDay, isValid as isValidDate, } from "date-fns";
|
|
2
|
+
import { loc } from "../index";
|
|
3
|
+
const defaultDisplayFormat = 'MM/DD/YYYY';
|
|
4
|
+
const supportedDisplayFormats = [
|
|
5
|
+
defaultDisplayFormat,
|
|
6
|
+
'DD/MM/YYYY',
|
|
7
|
+
'MM-DD-YYYY',
|
|
8
|
+
'DD-MM-YYYY',
|
|
9
|
+
'YYYY-MM-DD',
|
|
10
|
+
];
|
|
11
|
+
const defaultDatePickerStringKeys = {
|
|
12
|
+
'Choose a date': 'tecton.element.datePicker.calendarLabel',
|
|
13
|
+
'Dates are shown in your local time zone.': 'tecton.element.datePicker.disclaimer.localTimeZone',
|
|
14
|
+
};
|
|
15
|
+
const isoDatePattern = /^\d{4}-\d{2}-\d{2}$/;
|
|
16
|
+
const isoLikeDatePattern = /^(\d{4})-(\d{1,2})-(\d{1,2})(?:T.*)?$/;
|
|
17
|
+
const slashDatePattern = /^(\d{1,2})\/(\d{1,2})\/(\d{2}|\d{4})$/;
|
|
18
|
+
/** Determines a year for a month and day when typeable input omits the year. */
|
|
19
|
+
export function buildInputDate(input, assume) {
|
|
20
|
+
const [month, day, year] = input.split('/');
|
|
21
|
+
if (!month)
|
|
22
|
+
return;
|
|
23
|
+
if (!day)
|
|
24
|
+
return new Date(new Date().getFullYear(), Number(month) - 1, 1);
|
|
25
|
+
if (Number(day) <= 0)
|
|
26
|
+
return;
|
|
27
|
+
const selectedYear = (year === null || year === void 0 ? void 0 : year.length) === 4 ? Number(year) : Number(assumeYear(month, day, assume));
|
|
28
|
+
const date = new Date(selectedYear, Number(month) - 1, Number(day));
|
|
29
|
+
return isValidDate(date) ? date : undefined;
|
|
30
|
+
}
|
|
31
|
+
/** Formats a valid date as an ISO calendar date. */
|
|
32
|
+
export function formatDateISO(value) {
|
|
33
|
+
if (!isValidDate(value))
|
|
34
|
+
return;
|
|
35
|
+
return formatISO(value, { representation: 'date' });
|
|
36
|
+
}
|
|
37
|
+
/** Formats a date for an accessible day label. */
|
|
38
|
+
export function formatDateFull(value) {
|
|
39
|
+
if (!isValidDate(value))
|
|
40
|
+
return;
|
|
41
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
42
|
+
month: 'long',
|
|
43
|
+
day: 'numeric',
|
|
44
|
+
year: 'numeric',
|
|
45
|
+
weekday: 'long',
|
|
46
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
47
|
+
}).format(value);
|
|
48
|
+
}
|
|
49
|
+
/** Returns localized abbreviated day names beginning with Sunday. */
|
|
50
|
+
export function getDays() {
|
|
51
|
+
return [
|
|
52
|
+
loc('tecton.element.calendar.days.short.Sunday'),
|
|
53
|
+
loc('tecton.element.calendar.days.short.Monday'),
|
|
54
|
+
loc('tecton.element.calendar.days.short.Tuesday'),
|
|
55
|
+
loc('tecton.element.calendar.days.short.Wednesday'),
|
|
56
|
+
loc('tecton.element.calendar.days.short.Thursday'),
|
|
57
|
+
loc('tecton.element.calendar.days.short.Friday'),
|
|
58
|
+
loc('tecton.element.calendar.days.short.Saturday'),
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
/** Returns localized full day names beginning with Sunday. */
|
|
62
|
+
export function getDaysOfWeek() {
|
|
63
|
+
return [
|
|
64
|
+
loc('tecton.element.calendar.days.Sunday'),
|
|
65
|
+
loc('tecton.element.calendar.days.Monday'),
|
|
66
|
+
loc('tecton.element.calendar.days.Tuesday'),
|
|
67
|
+
loc('tecton.element.calendar.days.Wednesday'),
|
|
68
|
+
loc('tecton.element.calendar.days.Thursday'),
|
|
69
|
+
loc('tecton.element.calendar.days.Friday'),
|
|
70
|
+
loc('tecton.element.calendar.days.Saturday'),
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
/** Parses the date picker's public ISO-only value contract. */
|
|
74
|
+
export function parseDatePickerValue(value) {
|
|
75
|
+
if (!value || !isoDatePattern.test(value))
|
|
76
|
+
return;
|
|
77
|
+
const [year, month, day] = value.split('-').map(Number);
|
|
78
|
+
return dateFromParts(year, month, day);
|
|
79
|
+
}
|
|
80
|
+
/** Normalizes a legacy string or Moment-like value for the date picker's ISO-only calendar. */
|
|
81
|
+
export function normalizeDatePickerValue(value) {
|
|
82
|
+
if (!value)
|
|
83
|
+
return;
|
|
84
|
+
let date;
|
|
85
|
+
if (value instanceof Date) {
|
|
86
|
+
date = value;
|
|
87
|
+
}
|
|
88
|
+
else if (isMomentLike(value)) {
|
|
89
|
+
try {
|
|
90
|
+
date = value.toDate();
|
|
91
|
+
}
|
|
92
|
+
catch (_a) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
const input = value.trim();
|
|
98
|
+
if (!input)
|
|
99
|
+
return;
|
|
100
|
+
date = parseDatePickerValue(input);
|
|
101
|
+
if (!date) {
|
|
102
|
+
const isoLikeParts = input.match(isoLikeDatePattern);
|
|
103
|
+
const slashParts = input.match(slashDatePattern);
|
|
104
|
+
if (isoLikeParts) {
|
|
105
|
+
date = dateFromParts(Number(isoLikeParts[1]), Number(isoLikeParts[2]), Number(isoLikeParts[3]));
|
|
106
|
+
}
|
|
107
|
+
else if (slashParts) {
|
|
108
|
+
const parsedYear = Number(slashParts[3]);
|
|
109
|
+
const year = parsedYear < 100 ? (parsedYear >= 69 ? 1900 : 2000) + parsedYear : parsedYear;
|
|
110
|
+
date = dateFromParts(year, Number(slashParts[1]), Number(slashParts[2]));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const parsedDate = new Date(input);
|
|
114
|
+
date = isValidDate(parsedDate)
|
|
115
|
+
? dateFromParts(parsedDate.getFullYear(), parsedDate.getMonth() + 1, parsedDate.getDate())
|
|
116
|
+
: undefined;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return formatDateISO(date);
|
|
121
|
+
}
|
|
122
|
+
/** Returns the month and year used to initialize the date picker grid. */
|
|
123
|
+
export function setupMonthYear(value = new Date()) {
|
|
124
|
+
return {
|
|
125
|
+
monthIndex: value.getMonth(),
|
|
126
|
+
selectedYear: value.getFullYear(),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/** Returns the enabled day indexes represented by a calendar checksum. */
|
|
130
|
+
export function getValidDaysOfWeek(checksum = 127) {
|
|
131
|
+
const validDays = [];
|
|
132
|
+
for (let day = 0; day < 7; day++) {
|
|
133
|
+
if (checksum & (1 << day))
|
|
134
|
+
validDays.push(day);
|
|
135
|
+
}
|
|
136
|
+
return checksum > 0 ? validDays : [];
|
|
137
|
+
}
|
|
138
|
+
/** Determines whether a date satisfies the configured bounds and cutoff. */
|
|
139
|
+
export function baseValidation(dateValidators, now, newDate) {
|
|
140
|
+
const isNewDateBeforeStartDate = isAfter(dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.startDate, newDate);
|
|
141
|
+
const isNewDateAfterEndDate = isBefore(dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.endDate, newDate);
|
|
142
|
+
const isNowAfterCutoffTime = isSameDay(now, newDate) && isAfter(now, dateValidators === null || dateValidators === void 0 ? void 0 : dateValidators.cutOffTime);
|
|
143
|
+
return !(isNewDateBeforeStartDate || isNowAfterCutoffTime || isNewDateAfterEndDate);
|
|
144
|
+
}
|
|
145
|
+
/** Determines whether a date's weekday is enabled. */
|
|
146
|
+
export function validateAgainstChecksum(validDaysOfWeek, date) {
|
|
147
|
+
return validDaysOfWeek.includes(date.getDay());
|
|
148
|
+
}
|
|
149
|
+
/** Determines whether a date is absent from a blacklist. */
|
|
150
|
+
export function validateAgainstBlacklist(invalidDates, date) {
|
|
151
|
+
return !validateAgainstWhitelist(invalidDates, date);
|
|
152
|
+
}
|
|
153
|
+
/** Determines whether a date is present in a whitelist. */
|
|
154
|
+
export function validateAgainstWhitelist(validDates, date) {
|
|
155
|
+
return validDates.some(validDate => isSameDay(validDate, date));
|
|
156
|
+
}
|
|
157
|
+
function assumeYear(month, day, assume) {
|
|
158
|
+
const monthDay = `${month.padStart(2, '0')}/${day.padStart(2, '0')}`;
|
|
159
|
+
const now = new Date();
|
|
160
|
+
const currentMonthDay = `${now.getMonth() + 1}`.padStart(2, '0') + `/${now.getDate()}`.padStart(2, '0');
|
|
161
|
+
let year = now.getFullYear();
|
|
162
|
+
if (assume === 'future' && currentMonthDay > monthDay)
|
|
163
|
+
year++;
|
|
164
|
+
if (assume === 'past' && currentMonthDay < monthDay)
|
|
165
|
+
year--;
|
|
166
|
+
return `${year}`;
|
|
167
|
+
}
|
|
168
|
+
function parseDatePickerValues(values) {
|
|
169
|
+
return (values || []).map(parseDatePickerValue).filter((date) => !!date);
|
|
170
|
+
}
|
|
171
|
+
function dateFromParts(year, month, day) {
|
|
172
|
+
const date = new Date(0);
|
|
173
|
+
date.setFullYear(year, month - 1, day);
|
|
174
|
+
date.setHours(0, 0, 0, 0);
|
|
175
|
+
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day)
|
|
176
|
+
return;
|
|
177
|
+
return date;
|
|
178
|
+
}
|
|
179
|
+
function isMomentLike(value) {
|
|
180
|
+
return typeof value !== 'string' && typeof (value === null || value === void 0 ? void 0 : value.toDate) === 'function';
|
|
181
|
+
}
|
|
182
|
+
/** Formats a date using one of the date picker's supported numeric display formats. */
|
|
183
|
+
export function formatDisplayDate(date, displayFormat) {
|
|
184
|
+
const separator = displayFormat.includes('-') ? '-' : '/';
|
|
185
|
+
const month = `${date.getMonth() + 1}`.padStart(2, '0');
|
|
186
|
+
const day = `${date.getDate()}`.padStart(2, '0');
|
|
187
|
+
const year = `${date.getFullYear()}`;
|
|
188
|
+
const dateParts = displayFormat.startsWith('YYYY')
|
|
189
|
+
? [year, month, day]
|
|
190
|
+
: displayFormat.startsWith('DD')
|
|
191
|
+
? [day, month, year]
|
|
192
|
+
: [month, day, year];
|
|
193
|
+
return dateParts.join(separator);
|
|
194
|
+
}
|
|
195
|
+
/** Formats a date using the legacy Moment-style tokens accepted by q2-calendar. */
|
|
196
|
+
export function formatLegacyDisplayDate(date, displayFormat) {
|
|
197
|
+
const dateFnsFormat = displayFormat
|
|
198
|
+
.replace(/[d]/g, 'E')
|
|
199
|
+
.replace(/[D]/g, 'd')
|
|
200
|
+
.replace(/[Y]/g, 'y')
|
|
201
|
+
.replace(/[l]/g, 'P')
|
|
202
|
+
.replace(/[W]/g, 'I');
|
|
203
|
+
return formatDate(date, dateFnsFormat);
|
|
204
|
+
}
|
|
205
|
+
/** Determines whether a date satisfies every configured selection constraint. */
|
|
206
|
+
export function isDateSelectable(date, constraints) {
|
|
207
|
+
const cutoffTime = new Date(constraints.cutoffTime || '');
|
|
208
|
+
const withinBounds = baseValidation({
|
|
209
|
+
startDate: parseDatePickerValue(constraints.startDate),
|
|
210
|
+
endDate: parseDatePickerValue(constraints.endDate),
|
|
211
|
+
cutOffTime: isValidDate(cutoffTime) ? cutoffTime : undefined,
|
|
212
|
+
}, new Date(), date);
|
|
213
|
+
const validDates = parseDatePickerValues(constraints.validDates);
|
|
214
|
+
const matchesAllowedDates = (validDates === null || validDates === void 0 ? void 0 : validDates.length)
|
|
215
|
+
? validateAgainstWhitelist(validDates, date)
|
|
216
|
+
: validateAgainstChecksum(getValidDaysOfWeek(constraints.daysOfWeekChecksum), date);
|
|
217
|
+
return (withinBounds &&
|
|
218
|
+
matchesAllowedDates &&
|
|
219
|
+
validateAgainstBlacklist(parseDatePickerValues(constraints.invalidDates), date));
|
|
220
|
+
}
|
|
221
|
+
/** Determines whether every date in an inclusive range is selectable. */
|
|
222
|
+
export function isRangeSelectable(start, end, constraints) {
|
|
223
|
+
for (let date = start; date.getTime() <= end.getTime(); date = addDays(date, 1)) {
|
|
224
|
+
if (!isDateSelectable(date, constraints))
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
return true;
|
|
228
|
+
}
|
|
229
|
+
/** Resolves a date-picker localization key or mapped default string. */
|
|
230
|
+
export function localizeDatePickerString(value, substitutions = {}) {
|
|
231
|
+
if (!value)
|
|
232
|
+
return '';
|
|
233
|
+
return loc(defaultDatePickerStringKeys[value] || value, substitutions);
|
|
234
|
+
}
|
|
235
|
+
/** Returns a supported display format, falling back to the date-picker default. */
|
|
236
|
+
export function normalizeDisplayFormat(displayFormat) {
|
|
237
|
+
const normalizedFormat = displayFormat === null || displayFormat === void 0 ? void 0 : displayFormat.toUpperCase();
|
|
238
|
+
return supportedDisplayFormats.includes(normalizedFormat) ? normalizedFormat : defaultDisplayFormat;
|
|
239
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -336,7 +336,7 @@ export const resizeIframe = () => {
|
|
|
336
336
|
// Handling color attribute (deprecated)
|
|
337
337
|
export const handleColor = (target) => {
|
|
338
338
|
if (!target.intent && ['primary', 'secondary'].includes(target.color)) {
|
|
339
|
-
target.intent =
|
|
339
|
+
target.intent = target.color;
|
|
340
340
|
target.color = undefined;
|
|
341
341
|
}
|
|
342
342
|
};
|