q2-tecton-elements 1.51.1 → 1.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +16 -5
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-9aa4a776.js → index-07285783.js} +86 -2
- package/dist/cjs/index-07285783.js.map +1 -0
- package/dist/cjs/{index-14c3693c.js → index-e7e68b1e.js} +40 -5
- package/dist/cjs/index-e7e68b1e.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q2-action-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-action-sheet.cjs.entry.js +3 -3
- package/dist/cjs/q2-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q2-badge_7.cjs.entry.js +49 -44
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +17 -20
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +4 -2
- package/dist/cjs/q2-card.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +4 -4
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js +16 -3
- package/dist/cjs/q2-chart-area.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +3 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js +19 -3
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +6 -5
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-currency.cjs.entry.js +14 -2
- package/dist/cjs/q2-currency.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +3 -3
- package/dist/cjs/q2-data-table.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +3 -3
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +12 -14
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +7 -5
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +3 -3
- package/dist/cjs/q2-example.cjs.entry.js +145 -0
- package/dist/cjs/q2-example.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-formatted-text.cjs.entry.js +2 -2
- package/dist/cjs/q2-item.cjs.entry.js +3 -3
- package/dist/cjs/q2-legend.cjs.entry.js +2 -2
- package/dist/cjs/q2-link.cjs.entry.js +4 -4
- package/dist/cjs/q2-link.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +6 -7
- package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loading-element.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +52 -3
- package/dist/cjs/q2-loc.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +3 -3
- package/dist/cjs/q2-month-picker.cjs.entry.js +4 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js +5 -4
- package/dist/cjs/q2-optgroup.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +50 -33
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +11 -7
- package/dist/cjs/q2-pagination.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +19 -18
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +5 -5
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +3 -3
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-resize-observer.cjs.entry.js +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +8 -6
- package/dist/cjs/q2-section.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +6 -5
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +5 -4
- package/dist/cjs/q2-stepper-pane.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +16 -4
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +6 -4
- package/dist/cjs/q2-stepper.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +6 -4
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +2 -2
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/{shapes-be198cc0.js → shapes-5d45fc11.js} +2 -2
- package/dist/cjs/{shapes-be198cc0.js.map → shapes-5d45fc11.js.map} +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-group/q2-action-group.js +1 -1
- package/dist/collection/components/q2-action-sheet/q2-action-sheet.js +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.js +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -18
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js +27 -0
- package/dist/collection/components/q2-calendar/test/q2-calendar-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-card/q2-card.js +2 -0
- package/dist/collection/components/q2-card/q2-card.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +2 -2
- package/dist/collection/components/q2-chart-area/q2-chart-area.js +42 -1
- package/dist/collection/components/q2-chart-area/q2-chart-area.js.map +1 -1
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js +15 -0
- package/dist/collection/components/q2-chart-area/test/q2-chart-area-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-chart-bar/q2-chart-bar.js +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +41 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js +11 -0
- package/dist/collection/components/q2-chart-donut/test/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +30 -23
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +4 -3
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +37 -1
- package/dist/collection/components/q2-currency/q2-currency.js.map +1 -1
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js +34 -23
- package/dist/collection/components/q2-currency/test/q2-currency-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js.map +1 -1
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js +6 -4
- package/dist/collection/components/q2-data-table/test/q2-data-table-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.css +5 -0
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +10 -4
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +59 -14
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +29 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +9 -11
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js +108 -74
- package/dist/collection/components/q2-dropdown-item/test/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-editable-field/q2-editable-field.js +1 -1
- package/dist/collection/components/q2-example/q2-example.css +66 -0
- package/dist/collection/components/q2-example/q2-example.js +312 -0
- package/dist/collection/components/q2-example/q2-example.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js +27 -0
- package/dist/collection/components/q2-example/test/q2-example.e2e.js.map +1 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js +126 -0
- package/dist/collection/components/q2-example/test/q2-example.spec.js.map +1 -0
- package/dist/collection/components/q2-formatted-text/q2-formatted-text.js +1 -1
- package/dist/collection/components/q2-input/formatting/alpha.spec.js +10 -0
- package/dist/collection/components/q2-input/formatting/alpha.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/alphanumeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js +20 -0
- package/dist/collection/components/q2-input/formatting/currency.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/date.js +1 -1
- package/dist/collection/components/q2-input/formatting/date.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/date.spec.js +17 -0
- package/dist/collection/components/q2-input/formatting/date.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js +32 -0
- package/dist/collection/components/q2-input/formatting/numeric.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js +16 -0
- package/dist/collection/components/q2-input/formatting/phone.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/postal.js +1 -1
- package/dist/collection/components/q2-input/formatting/postal.js.map +1 -1
- package/dist/collection/components/q2-input/formatting/postal.spec.js +28 -0
- package/dist/collection/components/q2-input/formatting/postal.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/ssn.spec.js.map +1 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js +7 -0
- package/dist/collection/components/q2-input/formatting/tin.spec.js.map +1 -0
- package/dist/collection/components/q2-input/q2-input.js +58 -44
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js +259 -2106
- package/dist/collection/components/q2-input/test/q2-input-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js +4035 -0
- package/dist/collection/components/q2-input/test/q2-input-test.spec.js.map +1 -0
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-legend/q2-legend.js +1 -1
- package/dist/collection/components/q2-link/q2-link.css +17 -20
- package/dist/collection/components/q2-link/q2-link.js +2 -2
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +6 -6
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-list/q2-list.js +4 -5
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +66 -4
- package/dist/collection/components/q2-loc/q2-loc.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js +19 -30
- package/dist/collection/components/q2-loc/test/q2-loc-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js +164 -0
- package/dist/collection/components/q2-loc/test/q2-loc-test.spec.js.map +1 -0
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +3 -2
- package/dist/collection/components/q2-optgroup/q2-optgroup.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.css +1 -1
- package/dist/collection/components/q2-option/q2-option.js +57 -34
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js +110 -106
- package/dist/collection/components/q2-option/test/q2-option-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +532 -0
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +9 -5
- package/dist/collection/components/q2-pagination/q2-pagination.js.map +1 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js +18 -1
- package/dist/collection/components/q2-pagination/test/q2-pagination-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-pill/q2-pill.js +18 -17
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +128 -57
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +17 -4
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +19 -9
- package/dist/collection/components/q2-radio-group/q2-radio-group.js +2 -2
- package/dist/collection/components/q2-radio-group/q2-radio-group.js.map +1 -1
- package/dist/collection/components/q2-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-section/q2-section.js +6 -4
- package/dist/collection/components/q2-section/q2-section.js.map +1 -1
- package/dist/collection/components/q2-select/q2-select.js +5 -3
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +123 -62
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +4 -2
- package/dist/collection/components/q2-stepper/q2-stepper.js.map +1 -1
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +3 -2
- package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +46 -2
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js.map +1 -1
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js +26 -0
- package/dist/collection/components/q2-stepper-vertical/test/q2-stepper-vertical-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +4 -3
- package/dist/collection/components/q2-tab-container/q2-tab-container.js.map +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +5 -2
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +55 -4
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/helpers.js +63 -41
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/index.js +83 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +84 -1
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +1 -1
- package/dist/components/q2-action-sheet.js +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-calendar.js +16 -18
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-card.js +2 -0
- package/dist/components/q2-card.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-chart-area.js +16 -2
- package/dist/components/q2-chart-area.js.map +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +19 -2
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +5 -4
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-currency.js +15 -2
- package/dist/components/q2-currency.js.map +1 -1
- package/dist/components/q2-data-table.js +1 -1
- package/dist/components/q2-data-table.js.map +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +12 -26
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +6 -3
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-example.d.ts +11 -0
- package/dist/components/q2-example.js +170 -0
- package/dist/components/q2-example.js.map +1 -0
- package/dist/components/q2-formatted-text.js +1 -1
- package/dist/components/q2-input2.js +41 -37
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-link.js +3 -3
- package/dist/components/q2-link.js.map +1 -1
- package/dist/components/q2-list.js +4 -5
- package/dist/components/q2-list.js.map +1 -1
- package/dist/components/q2-loc.js +55 -2
- package/dist/components/q2-loc.js.map +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-month-picker.js +2 -2
- package/dist/components/q2-optgroup2.js +3 -2
- package/dist/components/q2-optgroup2.js.map +1 -1
- package/dist/components/q2-option-list2.js +1 -1
- package/dist/components/q2-option2.js +52 -33
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +9 -5
- package/dist/components/q2-pagination.js.map +1 -1
- package/dist/components/q2-pill.js +18 -17
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +16 -4
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +3 -3
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +6 -4
- package/dist/components/q2-section.js.map +1 -1
- package/dist/components/q2-select2.js +6 -4
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +3 -2
- package/dist/components/q2-stepper-pane.js.map +1 -1
- package/dist/components/q2-stepper-vertical.js +16 -3
- package/dist/components/q2-stepper-vertical.js.map +1 -1
- package/dist/components/q2-stepper.js +4 -2
- package/dist/components/q2-stepper.js.map +1 -1
- package/dist/components/q2-tab-container.js +4 -3
- package/dist/components/q2-tab-container.js.map +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +5 -2
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +16 -5
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-1e1ce94e.js → index-7a5365e2.js} +40 -5
- package/dist/esm/index-7a5365e2.js.map +1 -0
- package/dist/esm/{index-844fc010.js → index-d18e2a20.js} +86 -3
- package/dist/esm/index-d18e2a20.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q2-action-group.entry.js +2 -2
- package/dist/esm/q2-action-sheet.entry.js +3 -3
- package/dist/esm/q2-avatar.entry.js +2 -2
- package/dist/esm/q2-badge_7.entry.js +49 -44
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +17 -20
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +4 -2
- package/dist/esm/q2-card.entry.js.map +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +4 -4
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js +16 -3
- package/dist/esm/q2-chart-area.entry.js.map +1 -1
- package/dist/esm/q2-chart-bar.entry.js +3 -3
- package/dist/esm/q2-chart-donut.entry.js +19 -3
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +6 -5
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +2 -2
- package/dist/esm/q2-currency.entry.js +14 -2
- package/dist/esm/q2-currency.entry.js.map +1 -1
- package/dist/esm/q2-data-table.entry.js +3 -3
- package/dist/esm/q2-data-table.entry.js.map +1 -1
- package/dist/esm/q2-detail.entry.js +3 -3
- package/dist/esm/q2-dropdown-item.entry.js +12 -14
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +7 -5
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +3 -3
- package/dist/esm/q2-example.entry.js +141 -0
- package/dist/esm/q2-example.entry.js.map +1 -0
- package/dist/esm/q2-formatted-text.entry.js +2 -2
- package/dist/esm/q2-item.entry.js +3 -3
- package/dist/esm/q2-legend.entry.js +2 -2
- package/dist/esm/q2-link.entry.js +4 -4
- package/dist/esm/q2-link.entry.js.map +1 -1
- package/dist/esm/q2-list.entry.js +6 -7
- package/dist/esm/q2-list.entry.js.map +1 -1
- package/dist/esm/q2-loading-element.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +52 -3
- package/dist/esm/q2-loc.entry.js.map +1 -1
- package/dist/esm/q2-message.entry.js +3 -3
- package/dist/esm/q2-month-picker.entry.js +4 -4
- package/dist/esm/q2-optgroup.entry.js +5 -4
- package/dist/esm/q2-optgroup.entry.js.map +1 -1
- package/dist/esm/q2-option-list.entry.js +2 -2
- package/dist/esm/q2-option.entry.js +50 -33
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +11 -7
- package/dist/esm/q2-pagination.entry.js.map +1 -1
- package/dist/esm/q2-pill.entry.js +19 -18
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +5 -5
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +3 -3
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-resize-observer.entry.js +2 -2
- package/dist/esm/q2-section.entry.js +8 -6
- package/dist/esm/q2-section.entry.js.map +1 -1
- package/dist/esm/q2-select.entry.js +6 -5
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +5 -4
- package/dist/esm/q2-stepper-pane.entry.js.map +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +16 -4
- package/dist/esm/q2-stepper-vertical.entry.js.map +1 -1
- package/dist/esm/q2-stepper.entry.js +6 -4
- package/dist/esm/q2-stepper.entry.js.map +1 -1
- package/dist/esm/q2-tag.entry.js +6 -4
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +3 -3
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-tooltip.entry.js +2 -2
- package/dist/esm/{shapes-36183b2a.js → shapes-c7e1a3fa.js} +2 -2
- package/dist/esm/{shapes-36183b2a.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +3 -3
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +77 -0
- package/dist/q2-tecton-elements/{p-b7554a79.js.map → action-sheet-e64cb6f7.js.map} +1 -1
- package/dist/q2-tecton-elements/app-globals-0f993ce5.js +4 -0
- package/dist/q2-tecton-elements/{p-e1255160.js.map → app-globals-0f993ce5.js.map} +1 -1
- package/dist/q2-tecton-elements/charting-1abfb877.js +34872 -0
- package/dist/q2-tecton-elements/{p-2941aafa.js.map → charting-1abfb877.js.map} +1 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +410 -0
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +1 -0
- package/dist/q2-tecton-elements/dataSample-7b62e101.js +2602 -0
- package/dist/q2-tecton-elements/{p-ad80aef0.js.map → dataSample-7b62e101.js.map} +1 -1
- package/dist/q2-tecton-elements/index-3184c760.js +18168 -0
- package/dist/q2-tecton-elements/{p-f1e887f5.js.map → index-3184c760.js.map} +1 -1
- package/dist/q2-tecton-elements/index-7a5365e2.js +1792 -0
- package/dist/q2-tecton-elements/index-7a5365e2.js.map +1 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js +323 -0
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +56 -0
- package/dist/q2-tecton-elements/{p-5637c486.entry.js.map → q2-action-group.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1480 -0
- package/dist/q2-tecton-elements/{p-188eb162.entry.js.map → q2-action-sheet.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +101 -0
- package/dist/q2-tecton-elements/{p-07d1c3ae.entry.js.map → q2-avatar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +5449 -0
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1313 -0
- package/dist/q2-tecton-elements/q2-calendar.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-card.entry.js +170 -0
- package/dist/q2-tecton-elements/q2-card.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +130 -0
- package/dist/q2-tecton-elements/{p-7aef0c08.entry.js.map → q2-carousel-pane.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +4613 -0
- package/dist/q2-tecton-elements/{p-e216ef3f.entry.js.map → q2-carousel.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +4330 -0
- package/dist/q2-tecton-elements/q2-chart-area.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1479 -0
- package/dist/q2-tecton-elements/{p-7906f49e.entry.js.map → q2-chart-bar.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +4537 -0
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +166 -0
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +223 -0
- package/dist/q2-tecton-elements/{p-b7de110e.entry.js.map → q2-checkbox.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-currency.entry.js +153 -0
- package/dist/q2-tecton-elements/q2-currency.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-data-table.entry.js +622 -0
- package/dist/q2-tecton-elements/{p-7903cd15.entry.js.map → q2-data-table.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +128 -0
- package/dist/q2-tecton-elements/{p-f5f23659.entry.js.map → q2-detail.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +146 -0
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +430 -0
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +296 -0
- package/dist/q2-tecton-elements/{p-896c7008.entry.js.map → q2-editable-field.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-example.entry.js +152 -0
- package/dist/q2-tecton-elements/q2-example.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-formatted-text.entry.js +73 -0
- package/dist/q2-tecton-elements/{p-7c9f8b62.entry.js.map → q2-formatted-text.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +158 -0
- package/dist/q2-tecton-elements/{p-7c9a0122.entry.js.map → q2-item.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-legend.entry.js +146 -0
- package/dist/q2-tecton-elements/{p-ff8f1a32.entry.js.map → q2-legend.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-link.entry.js +83 -0
- package/dist/q2-tecton-elements/q2-link.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-list.entry.js +100 -0
- package/dist/q2-tecton-elements/q2-list.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-loading-element.entry.js +36 -0
- package/dist/q2-tecton-elements/{p-a068c84c.entry.js.map → q2-loading-element.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-loc.entry.js +82 -0
- package/dist/q2-tecton-elements/q2-loc.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-message.entry.js +99 -0
- package/dist/q2-tecton-elements/{p-8d2b02e1.entry.js.map → q2-message.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +198 -0
- package/dist/q2-tecton-elements/{p-8d07cf91.entry.js.map → q2-month-picker.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +88 -0
- package/dist/q2-tecton-elements/q2-optgroup.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-option-list.entry.js +585 -0
- package/dist/q2-tecton-elements/{p-a5d0e252.entry.js.map → q2-option-list.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-option.entry.js +110 -0
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js +377 -0
- package/dist/q2-tecton-elements/q2-pagination.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js +434 -0
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +227 -0
- package/dist/q2-tecton-elements/q2-radio-group.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-radio.entry.js +144 -0
- package/dist/q2-tecton-elements/{p-c235ab3f.entry.js.map → q2-radio.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +162 -0
- package/dist/q2-tecton-elements/{p-95a7c042.entry.js.map → q2-relative-time.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +100 -0
- package/dist/q2-tecton-elements/{p-e2c800ef.entry.js.map → q2-resize-observer.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +256 -0
- package/dist/q2-tecton-elements/q2-section.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-select.entry.js +684 -0
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +124 -0
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +356 -0
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js +332 -0
- package/dist/q2-tecton-elements/q2-stepper.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js +213 -0
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +21 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/q2-tecton-elements/q2-textarea.entry.js +364 -0
- package/dist/q2-tecton-elements/{p-f135b265.entry.js.map → q2-textarea.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +105 -0
- package/dist/q2-tecton-elements/{p-c5667d5d.entry.js.map → q2-tooltip.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/sectorHelper-183cedd0.js +949 -0
- package/dist/q2-tecton-elements/{p-eea5aa01.js.map → sectorHelper-183cedd0.js.map} +1 -1
- package/dist/q2-tecton-elements/shapes-c7e1a3fa.js +132 -0
- package/dist/q2-tecton-elements/{p-50b425de.js.map → shapes-c7e1a3fa.js.map} +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +134 -0
- package/dist/q2-tecton-elements/{p-96b1406c.entry.js.map → tecton-tab-pane.entry.js.map} +1 -1
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +4 -5
- package/dist/types/components/q2-chart-area/q2-chart-area.d.ts +6 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +6 -0
- package/dist/types/components/q2-currency/q2-currency.d.ts +7 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +1 -1
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +2 -2
- package/dist/types/components/q2-example/q2-example.d.ts +119 -0
- package/dist/types/components/q2-input/formatting/date.d.ts +22 -0
- package/dist/types/components/q2-input/formatting/postal.d.ts +197 -0
- package/dist/types/components/q2-input/q2-input.d.ts +15 -12
- package/dist/types/components/q2-loc/q2-loc.d.ts +15 -1
- package/dist/types/components/q2-option/q2-option.d.ts +11 -3
- package/dist/types/components/q2-pill/q2-pill.d.ts +3 -3
- package/dist/types/components/q2-popover/q2-popover.d.ts +1 -0
- package/dist/types/components/q2-select/q2-select.d.ts +1 -1
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +6 -0
- package/dist/types/components/q2-tag/q2-tag.d.ts +1 -1
- package/dist/types/components.d.ts +104 -14
- package/dist/types/utils/helpers.d.ts +13 -0
- package/dist/types/utils/index.d.ts +11 -0
- package/package.json +7 -7
- package/dist/cjs/index-14c3693c.js.map +0 -1
- package/dist/cjs/index-9aa4a776.js.map +0 -1
- package/dist/esm/index-1e1ce94e.js.map +0 -1
- package/dist/esm/index-844fc010.js.map +0 -1
- package/dist/q2-tecton-elements/p-06701928.entry.js +0 -2
- package/dist/q2-tecton-elements/p-06701928.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-07d1c3ae.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1305f7ca.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-15ac45d6.js +0 -2
- package/dist/q2-tecton-elements/p-15ac45d6.js.map +0 -1
- package/dist/q2-tecton-elements/p-16910682.entry.js +0 -2
- package/dist/q2-tecton-elements/p-16910682.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-188eb162.entry.js +0 -3
- package/dist/q2-tecton-elements/p-1c760a89.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c760a89.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-1c88d057.entry.js +0 -2
- package/dist/q2-tecton-elements/p-1c88d057.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js +0 -2
- package/dist/q2-tecton-elements/p-20a3d6ed.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2733583e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2733583e.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2941aafa.js +0 -39
- package/dist/q2-tecton-elements/p-3e428290.entry.js +0 -2
- package/dist/q2-tecton-elements/p-3e428290.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4774e5b3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js +0 -2
- package/dist/q2-tecton-elements/p-490ef8e5.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-4e10550d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-4e10550d.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-50b425de.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-50f7328f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5637c486.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js +0 -2
- package/dist/q2-tecton-elements/p-56df21b0.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5a834214.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5a834214.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js +0 -2
- package/dist/q2-tecton-elements/p-5f99a4a8.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-72d948b4.entry.js +0 -2
- package/dist/q2-tecton-elements/p-72d948b4.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-7903cd15.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7906f49e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7aef0c08.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9a0122.entry.js +0 -2
- package/dist/q2-tecton-elements/p-7c9f8b62.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js +0 -2
- package/dist/q2-tecton-elements/p-81fbe718.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-896c7008.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d07cf91.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8d2b02e1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-95a7c042.entry.js +0 -2
- package/dist/q2-tecton-elements/p-96b1406c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a068c84c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a47597dd.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-a5d0e252.entry.js +0 -2
- package/dist/q2-tecton-elements/p-a5f18e27.js +0 -3
- package/dist/q2-tecton-elements/p-a5f18e27.js.map +0 -1
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ac6aa392.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad057d10.entry.js +0 -2
- package/dist/q2-tecton-elements/p-ad057d10.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ad80aef0.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b0e5e9dc.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b1784be3.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b1784be3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b7554a79.js +0 -2
- package/dist/q2-tecton-elements/p-b7de110e.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c235ab3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c5667d5d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e1255160.js +0 -2
- package/dist/q2-tecton-elements/p-e216ef3f.entry.js +0 -2
- package/dist/q2-tecton-elements/p-e2c800ef.entry.js +0 -2
- package/dist/q2-tecton-elements/p-eea5aa01.js +0 -2
- package/dist/q2-tecton-elements/p-f135b265.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f1e887f5.js +0 -2
- package/dist/q2-tecton-elements/p-f5f23659.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js +0 -2
- package/dist/q2-tecton-elements/p-f7867f21.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-ff8f1a32.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fff01dc1.entry.js.map +0 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
+
export class Q2Example {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.someText = 'default';
|
|
5
|
+
this.isValidated = undefined;
|
|
6
|
+
this.status = 0;
|
|
7
|
+
this.content = undefined;
|
|
8
|
+
this.disabled = undefined;
|
|
9
|
+
this.type = 'overlay';
|
|
10
|
+
}
|
|
11
|
+
// #endregion
|
|
12
|
+
// #region Component Lifecycle Events
|
|
13
|
+
/**
|
|
14
|
+
* 6. Component lifecycle events
|
|
15
|
+
* Order by their natural call order.
|
|
16
|
+
*/
|
|
17
|
+
connectedCallback() { }
|
|
18
|
+
disconnectedCallback() { }
|
|
19
|
+
componentWillLoad() { }
|
|
20
|
+
componentDidLoad() { }
|
|
21
|
+
componentShouldUpdate(newVal, oldVal, propName) {
|
|
22
|
+
if (propName === 'content' && newVal !== oldVal) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
componentWillUpdate() { }
|
|
28
|
+
componentDidUpdate() { }
|
|
29
|
+
componentWillRender() { }
|
|
30
|
+
componentDidRender() { }
|
|
31
|
+
// #endregion
|
|
32
|
+
// #region Listeners
|
|
33
|
+
/**
|
|
34
|
+
* 7. Listeners
|
|
35
|
+
* Event listeners defined via the @Listen() decorator. List in
|
|
36
|
+
* alphabetical order of the event name. Recommend starting listener
|
|
37
|
+
* methods with "on".
|
|
38
|
+
*/
|
|
39
|
+
onClick(ev) {
|
|
40
|
+
this.tctClick.emit(ev);
|
|
41
|
+
}
|
|
42
|
+
onDrag(ev) {
|
|
43
|
+
this.tctDrag.emit(ev);
|
|
44
|
+
}
|
|
45
|
+
// #endregion
|
|
46
|
+
// #region Public Methods API
|
|
47
|
+
/**
|
|
48
|
+
* 8. Public methods API
|
|
49
|
+
* Methods exposed on the host element via the @Method() decorator.
|
|
50
|
+
* Document each using JSDoc comments and include the "@testOnly" tag for
|
|
51
|
+
* test methods. Must be async, and listed in alphabetical order.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Closes the menu.
|
|
55
|
+
*/
|
|
56
|
+
async close() {
|
|
57
|
+
// ...
|
|
58
|
+
}
|
|
59
|
+
/*
|
|
60
|
+
* Opens the menu. If the menu is already open or it can't be opened, it
|
|
61
|
+
* returns `false`.
|
|
62
|
+
*
|
|
63
|
+
* @testOnly
|
|
64
|
+
*/
|
|
65
|
+
async openMenu() {
|
|
66
|
+
// ...
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
// #endregion
|
|
70
|
+
// #region Watchers
|
|
71
|
+
/**
|
|
72
|
+
* 9. Watchers
|
|
73
|
+
* Methods that are called when a property is updated as specified via
|
|
74
|
+
* the @Watch() decorator. List in alphabetical order of the property.
|
|
75
|
+
*/
|
|
76
|
+
contentChanged(newContent, oldContent) {
|
|
77
|
+
if (newContent !== oldContent) {
|
|
78
|
+
this.updateState();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
statusChanged(newStatus, oldStatus) {
|
|
82
|
+
if (newStatus !== oldStatus) {
|
|
83
|
+
this.updateState();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
// #endregion
|
|
87
|
+
// #region Local Methods
|
|
88
|
+
/**
|
|
89
|
+
* 10. Local methods
|
|
90
|
+
* Methods that contain internal business logic. These methods cannot be
|
|
91
|
+
* called from the host element. This includes getters. List getters
|
|
92
|
+
* first in alphabetical order, then list the rest of the methods in
|
|
93
|
+
* alphabetical order.
|
|
94
|
+
*/
|
|
95
|
+
get menuState() {
|
|
96
|
+
//...
|
|
97
|
+
return 'open';
|
|
98
|
+
}
|
|
99
|
+
async prepareAnimation() {
|
|
100
|
+
// ...
|
|
101
|
+
}
|
|
102
|
+
updateState() {
|
|
103
|
+
// ...
|
|
104
|
+
}
|
|
105
|
+
// #endregion
|
|
106
|
+
// #region Render Methods
|
|
107
|
+
/**
|
|
108
|
+
* 11. Render methods
|
|
109
|
+
* The render() method and helper methods used by render() that return
|
|
110
|
+
* JSX. Names should start with "render". List in alphabetical order,
|
|
111
|
+
* except for the render() method which should always be last
|
|
112
|
+
*/
|
|
113
|
+
renderMenuInner() {
|
|
114
|
+
return (h(Fragment, null, h("div", { class: {
|
|
115
|
+
menu: true,
|
|
116
|
+
'page-inner': true,
|
|
117
|
+
disabled: this.disabled,
|
|
118
|
+
}, onClick: () => this.tctClick.emit(), role: "menu" }, h("slot", null))));
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
return h(Host, { key: 'e4df51465f7c14e0ff4ae2463613e73cc6100318', attribute: "navigation" }, this.renderMenuInner());
|
|
122
|
+
}
|
|
123
|
+
static get is() { return "q2-example"; }
|
|
124
|
+
static get encapsulation() { return "shadow"; }
|
|
125
|
+
static get originalStyleUrls() {
|
|
126
|
+
return {
|
|
127
|
+
"$": ["q2-example.scss"]
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
static get styleUrls() {
|
|
131
|
+
return {
|
|
132
|
+
"$": ["q2-example.css"]
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
static get properties() {
|
|
136
|
+
return {
|
|
137
|
+
"content": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "string",
|
|
142
|
+
"resolved": "string",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": "The content of the menu."
|
|
150
|
+
},
|
|
151
|
+
"attribute": "content",
|
|
152
|
+
"reflect": false
|
|
153
|
+
},
|
|
154
|
+
"disabled": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "boolean",
|
|
159
|
+
"resolved": "boolean",
|
|
160
|
+
"references": {}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": false,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": "If `true`, the user cannot interact with the menu."
|
|
167
|
+
},
|
|
168
|
+
"attribute": "disabled",
|
|
169
|
+
"reflect": false
|
|
170
|
+
},
|
|
171
|
+
"type": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "string",
|
|
176
|
+
"resolved": "string",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Specifies the menu type."
|
|
184
|
+
},
|
|
185
|
+
"attribute": "type",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "'overlay'"
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
static get states() {
|
|
192
|
+
return {
|
|
193
|
+
"isValidated": {},
|
|
194
|
+
"status": {}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
static get events() {
|
|
198
|
+
return [{
|
|
199
|
+
"method": "tctClick",
|
|
200
|
+
"name": "tctClick",
|
|
201
|
+
"bubbles": true,
|
|
202
|
+
"cancelable": true,
|
|
203
|
+
"composed": true,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [{
|
|
206
|
+
"name": "Event",
|
|
207
|
+
"text": "() decorator. Start each event name with \"tct\" so they do not\nconflict with native events. Document each using JSDoc comments and\nlist in alphabetical order."
|
|
208
|
+
}],
|
|
209
|
+
"text": "5. Events\n Custom events dispatched from the component that are defined via the"
|
|
210
|
+
},
|
|
211
|
+
"complexType": {
|
|
212
|
+
"original": "any",
|
|
213
|
+
"resolved": "any",
|
|
214
|
+
"references": {}
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
"method": "tctDrag",
|
|
218
|
+
"name": "tctDrag",
|
|
219
|
+
"bubbles": true,
|
|
220
|
+
"cancelable": true,
|
|
221
|
+
"composed": true,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": ""
|
|
225
|
+
},
|
|
226
|
+
"complexType": {
|
|
227
|
+
"original": "any",
|
|
228
|
+
"resolved": "any",
|
|
229
|
+
"references": {}
|
|
230
|
+
}
|
|
231
|
+
}, {
|
|
232
|
+
"method": "tctOpen",
|
|
233
|
+
"name": "tctOpen",
|
|
234
|
+
"bubbles": true,
|
|
235
|
+
"cancelable": true,
|
|
236
|
+
"composed": true,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": ""
|
|
240
|
+
},
|
|
241
|
+
"complexType": {
|
|
242
|
+
"original": "any",
|
|
243
|
+
"resolved": "any",
|
|
244
|
+
"references": {}
|
|
245
|
+
}
|
|
246
|
+
}];
|
|
247
|
+
}
|
|
248
|
+
static get methods() {
|
|
249
|
+
return {
|
|
250
|
+
"close": {
|
|
251
|
+
"complexType": {
|
|
252
|
+
"signature": "() => Promise<void>",
|
|
253
|
+
"parameters": [],
|
|
254
|
+
"references": {
|
|
255
|
+
"Promise": {
|
|
256
|
+
"location": "global",
|
|
257
|
+
"id": "global::Promise"
|
|
258
|
+
}
|
|
259
|
+
},
|
|
260
|
+
"return": "Promise<void>"
|
|
261
|
+
},
|
|
262
|
+
"docs": {
|
|
263
|
+
"text": "Closes the menu.",
|
|
264
|
+
"tags": []
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"openMenu": {
|
|
268
|
+
"complexType": {
|
|
269
|
+
"signature": "() => Promise<boolean>",
|
|
270
|
+
"parameters": [],
|
|
271
|
+
"references": {
|
|
272
|
+
"Promise": {
|
|
273
|
+
"location": "global",
|
|
274
|
+
"id": "global::Promise"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"return": "Promise<boolean>"
|
|
278
|
+
},
|
|
279
|
+
"docs": {
|
|
280
|
+
"text": "",
|
|
281
|
+
"tags": []
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
static get elementRef() { return "el"; }
|
|
287
|
+
static get watchers() {
|
|
288
|
+
return [{
|
|
289
|
+
"propName": "content",
|
|
290
|
+
"methodName": "contentChanged"
|
|
291
|
+
}, {
|
|
292
|
+
"propName": "status",
|
|
293
|
+
"methodName": "statusChanged"
|
|
294
|
+
}];
|
|
295
|
+
}
|
|
296
|
+
static get listeners() {
|
|
297
|
+
return [{
|
|
298
|
+
"name": "click",
|
|
299
|
+
"method": "onClick",
|
|
300
|
+
"target": undefined,
|
|
301
|
+
"capture": false,
|
|
302
|
+
"passive": false
|
|
303
|
+
}, {
|
|
304
|
+
"name": "drag",
|
|
305
|
+
"method": "onDrag",
|
|
306
|
+
"target": undefined,
|
|
307
|
+
"capture": false,
|
|
308
|
+
"passive": true
|
|
309
|
+
}];
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=q2-example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"q2-example.js","sourceRoot":"","sources":["../../../src/components/q2-example/q2-example.tsx"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EAET,OAAO,EAEP,QAAQ,EACR,MAAM,EACN,KAAK,EACL,CAAC,EACD,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,GACR,MAAM,eAAe,CAAC;AAOvB,MAAM,OAAO,SAAS;;QAiBlB,aAAQ,GAAG,SAAS,CAAC;;sBA6BZ,CAAC;;;oBA8BH,SAAS;;IAsBhB,aAAa;IACb,qCAAqC;IAErC;;;OAGG;IAEH,iBAAiB,KAAI,CAAC;IAEtB,oBAAoB,KAAI,CAAC;IAEzB,iBAAiB,KAAI,CAAC;IAEtB,gBAAgB,KAAI,CAAC;IAErB,qBAAqB,CAAC,MAAW,EAAE,MAAW,EAAE,QAAgB;QAC5D,IAAI,QAAQ,KAAK,SAAS,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;YAC9C,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,mBAAmB,KAAI,CAAC;IAExB,kBAAkB,KAAI,CAAC;IAEvB,mBAAmB,KAAI,CAAC;IAExB,kBAAkB,KAAI,CAAC;IAEvB,aAAa;IACb,oBAAoB;IAEpB;;;;;OAKG;IAGH,OAAO,CAAC,EAAW;QACf,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3B,CAAC;IAGD,MAAM,CAAC,EAAW;QACd,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC;IAED,aAAa;IACb,6BAA6B;IAE7B;;;;;OAKG;IAEH;;OAEG;IAEH,KAAK,CAAC,KAAK;Q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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGJ","sourcesContent":["import {\n Component,\n ComponentInterface,\n Element,\n EventEmitter,\n Fragment,\n Method,\n Event,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\n\n@Component({\n tag: 'q2-example',\n shadow: true,\n styleUrl: 'q2-example.scss',\n})\nexport class Q2Example implements ComponentInterface {\n // #region Own Properties\n\n /**\n * 1. Own properties\n * Variables that are not exposed publicly due to the lack of the @Prop()\n * decorator. They are for internal use only. List in alphabetical order\n * and always set the type if a default value has not been set. If a\n * default value has been set, then the type can be omitted because it is\n * already inferred. If one of these properties needs to be initialized\n * with the value of another one of these properties, then the\n * initialization should be done in the componentWillLoad() lifecycle\n * event so that these properties can be alphabetizes without referencing\n * a property before it is declared.\n */\n\n num: number;\n someText = 'default';\n\n // #endregion\n // #region Host HTML Element\n\n /**\n * 2. Host HTML element\n * Reference to host HTML element if needed.\n */\n\n @Element()\n el: HTMLElement;\n\n // #endregion\n // #region State Properties\n\n /**\n * 3. State properties\n * Variables that are used to track state internally via the @State()\n * decorator. They are for internal use only. List in alphabetical order\n * and always set the type if a default value has not been set. If a\n * default value has been set, then the type can be omitted because it is\n * already inferred.\n */\n\n @State()\n isValidated: boolean;\n\n @State()\n status = 0;\n\n // #endregion\n // #region Public Property API\n\n /**\n * 4. Public property API\n * Variables that are exposed publicly via @Prop() decorator as\n * properties and attributes on the host element. Document each using\n * JSDoc comments, list in alphabetical order, and always set the type if\n * a default value has not been set. If a default value has been set,\n * then the type can be omitted because it is already inferred.\n */\n\n /**\n * The content of the menu.\n */\n @Prop()\n content: string;\n\n /**\n * If `true`, the user cannot interact with the menu.\n */\n @Prop()\n disabled: boolean;\n\n /**\n * Specifies the menu type.\n */\n @Prop()\n type = 'overlay';\n\n // #endregion\n // #region Events\n\n /**\n * 5. Events\n * Custom events dispatched from the component that are defined via the\n * @Event() decorator. Start each event name with \"tct\" so they do not\n * conflict with native events. Document each using JSDoc comments and\n * list in alphabetical order.\n */\n\n @Event()\n tctClick: EventEmitter;\n\n @Event()\n tctDrag: EventEmitter;\n\n @Event()\n tctOpen: EventEmitter;\n\n // #endregion\n // #region Component Lifecycle Events\n\n /**\n * 6. Component lifecycle events\n * Order by their natural call order.\n */\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n componentWillLoad() {}\n\n componentDidLoad() {}\n\n componentShouldUpdate(newVal: any, oldVal: any, propName: string) {\n if (propName === 'content' && newVal !== oldVal) {\n return true;\n }\n return false;\n }\n\n componentWillUpdate() {}\n\n componentDidUpdate() {}\n\n componentWillRender() {}\n\n componentDidRender() {}\n\n // #endregion\n // #region Listeners\n\n /**\n * 7. Listeners\n * Event listeners defined via the @Listen() decorator. List in\n * alphabetical order of the event name. Recommend starting listener\n * methods with \"on\".\n */\n\n @Listen('click')\n onClick(ev: UIEvent) {\n this.tctClick.emit(ev);\n }\n\n @Listen('drag')\n onDrag(ev: UIEvent) {\n this.tctDrag.emit(ev);\n }\n\n // #endregion\n // #region Public Methods API\n\n /**\n * 8. Public methods API\n * Methods exposed on the host element via the @Method() decorator.\n * Document each using JSDoc comments and include the \"@testOnly\" tag for\n * test methods. Must be async, and listed in alphabetical order.\n */\n\n /**\n * Closes the menu.\n */\n @Method()\n async close(): Promise<void> {\n // ...\n }\n\n /*\n * Opens the menu. If the menu is already open or it can't be opened, it\n * returns `false`.\n *\n * @testOnly\n */\n @Method()\n async openMenu(): Promise<boolean> {\n // ...\n return true;\n }\n\n // #endregion\n // #region Watchers\n\n /**\n * 9. Watchers\n * Methods that are called when a property is updated as specified via\n * the @Watch() decorator. List in alphabetical order of the property.\n */\n\n @Watch('content')\n contentChanged(newContent: string, oldContent: string) {\n if (newContent !== oldContent) {\n this.updateState();\n }\n }\n\n @Watch('status')\n statusChanged(newStatus: string, oldStatus: string) {\n if (newStatus !== oldStatus) {\n this.updateState();\n }\n }\n\n // #endregion\n // #region Local Methods\n\n /**\n * 10. Local methods\n * Methods that contain internal business logic. These methods cannot be\n * called from the host element. This includes getters. List getters\n * first in alphabetical order, then list the rest of the methods in\n * alphabetical order.\n */\n\n get menuState(): string {\n //...\n return 'open';\n }\n\n async prepareAnimation(): Promise<void> {\n // ...\n }\n\n updateState() {\n // ...\n }\n\n // #endregion\n // #region Render Methods\n\n /**\n * 11. Render methods\n * The render() method and helper methods used by render() that return\n * JSX. Names should start with \"render\". List in alphabetical order,\n * except for the render() method which should always be last\n */\n\n renderMenuInner() {\n return (\n <Fragment>\n <div\n class={{\n menu: true,\n 'page-inner': true,\n disabled: this.disabled,\n }}\n onClick={() => this.tctClick.emit()}\n role=\"menu\"\n >\n <slot></slot>\n </div>\n </Fragment>\n );\n }\n\n render() {\n return <Host attribute=\"navigation\">{this.renderMenuInner()}</Host>;\n }\n\n // #endregion\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { evaluateA11y, setup } from "../../../utils/helpers";
|
|
2
|
+
describe('q2-example', () => {
|
|
3
|
+
let page;
|
|
4
|
+
describe('Accessibility', () => {
|
|
5
|
+
describe('aXe DevTools', () => {
|
|
6
|
+
it('does not have accessibility violations', async () => {
|
|
7
|
+
const page = await setup({ html: `<q2-example />` });
|
|
8
|
+
const hasViolations = await evaluateA11y(page);
|
|
9
|
+
expect(hasViolations).toBe(false);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
describe('Accessibility Tree', () => {
|
|
13
|
+
it("option-list should have a role of 'menu' and the options a role of 'menuoption'", async () => {
|
|
14
|
+
page = await setup({
|
|
15
|
+
html: `<q2-example></q2-example>`,
|
|
16
|
+
});
|
|
17
|
+
await page.waitForChanges();
|
|
18
|
+
const snapshot = await page.accessibility.snapshot();
|
|
19
|
+
const menu = snapshot.children[0];
|
|
20
|
+
expect(menu.role).toEqual('menu');
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
describe('Keyboard Controls', () => { });
|
|
24
|
+
describe('Other', () => { });
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=q2-example.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"q2-example.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-example/test/q2-example.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGtD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,IAAI,IAAa,CAAC;IAElB,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;QAC3B,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;YAC1B,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;gBACpD,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC;gBACrD,MAAM,aAAa,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;gBAE/C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAChC,EAAE,CAAC,iFAAiF,EAAE,KAAK,IAAI,EAAE;gBAC7F,IAAI,GAAG,MAAM,KAAK,CAAC;oBACf,IAAI,EAAE,2BAA2B;iBACpC,CAAC,CAAC;gBACH,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;gBAE5B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;gBACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;gBAElC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { evaluateA11y, setup } from '@/utils/helpers';\nimport { E2EPage } from '@stencil/core/testing';\n\ndescribe('q2-example', () => {\n let page: E2EPage;\n\n describe('Accessibility', () => {\n describe('aXe DevTools', () => {\n it('does not have accessibility violations', async () => {\n const page = await setup({ html: `<q2-example />` });\n const hasViolations = await evaluateA11y(page);\n\n expect(hasViolations).toBe(false);\n });\n });\n\n describe('Accessibility Tree', () => {\n it(\"option-list should have a role of 'menu' and the options a role of 'menuoption'\", async () => {\n page = await setup({\n html: `<q2-example></q2-example>`,\n });\n await page.waitForChanges();\n\n const snapshot = await page.accessibility.snapshot();\n const menu = snapshot.children[0];\n\n expect(menu.role).toEqual('menu');\n });\n });\n describe('Keyboard Controls', () => {});\n describe('Other', () => {});\n });\n});\n"]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { Q2Example } from "../q2-example";
|
|
3
|
+
describe.skip('q2-example', () => {
|
|
4
|
+
let specPage;
|
|
5
|
+
describe('Props', () => {
|
|
6
|
+
describe('disabled', () => {
|
|
7
|
+
it('does not add disabled class when not provided (default)', async () => {
|
|
8
|
+
var _a;
|
|
9
|
+
specPage = await newSpecPage({
|
|
10
|
+
components: [Q2Example],
|
|
11
|
+
html: `<q2-example></q2-example>`,
|
|
12
|
+
});
|
|
13
|
+
expect((_a = specPage === null || specPage === void 0 ? void 0 : specPage.root) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('.menu')).not.toHaveClass('disabled');
|
|
14
|
+
});
|
|
15
|
+
it('disables the component when provided', async () => {
|
|
16
|
+
var _a;
|
|
17
|
+
specPage = await newSpecPage({
|
|
18
|
+
components: [Q2Example],
|
|
19
|
+
html: `<q2-example disabled></q2-example>`,
|
|
20
|
+
});
|
|
21
|
+
expect((_a = specPage === null || specPage === void 0 ? void 0 : specPage.root) === null || _a === void 0 ? void 0 : _a.shadowRoot.querySelector('.menu')).toHaveClass('disabled');
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
describe('Events', () => {
|
|
26
|
+
describe('tctClick', () => {
|
|
27
|
+
it('emits an event when invoked', async () => {
|
|
28
|
+
var _a;
|
|
29
|
+
specPage = await newSpecPage({
|
|
30
|
+
components: [Q2Example],
|
|
31
|
+
html: `<q2-example></q2-example>`,
|
|
32
|
+
});
|
|
33
|
+
const closeSpy = jest.fn();
|
|
34
|
+
(_a = specPage.root) === null || _a === void 0 ? void 0 : _a.addEventListener('tctClick', closeSpy);
|
|
35
|
+
specPage.rootInstance.tctClick.emit();
|
|
36
|
+
await specPage.waitForChanges();
|
|
37
|
+
expect(closeSpy).toHaveBeenCalled();
|
|
38
|
+
});
|
|
39
|
+
it('emits an event when element is clicked', async () => {
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
specPage = await newSpecPage({
|
|
42
|
+
components: [Q2Example],
|
|
43
|
+
html: `<q2-example></q2-example>`,
|
|
44
|
+
});
|
|
45
|
+
const closeSpy = jest.fn();
|
|
46
|
+
(_a = specPage.root) === null || _a === void 0 ? void 0 : _a.addEventListener('tctClick', closeSpy);
|
|
47
|
+
(_d = (_c = (_b = specPage.root) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.menu')) === null || _d === void 0 ? void 0 : _d.click();
|
|
48
|
+
await specPage.waitForChanges();
|
|
49
|
+
expect(closeSpy).toHaveBeenCalled();
|
|
50
|
+
});
|
|
51
|
+
it('emits an event when a triggering event is dispatched', async () => {
|
|
52
|
+
var _a, _b, _c, _d;
|
|
53
|
+
specPage = await newSpecPage({
|
|
54
|
+
components: [Q2Example],
|
|
55
|
+
html: `<q2-example></q2-example>`,
|
|
56
|
+
});
|
|
57
|
+
const closeSpy = jest.fn();
|
|
58
|
+
(_a = specPage.root) === null || _a === void 0 ? void 0 : _a.addEventListener('tctClick', closeSpy);
|
|
59
|
+
(_d = (_c = (_b = specPage.root) === null || _b === void 0 ? void 0 : _b.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('.menu')) === null || _d === void 0 ? void 0 : _d.dispatchEvent(new Event('click'));
|
|
60
|
+
await specPage.waitForChanges();
|
|
61
|
+
expect(closeSpy).toHaveBeenCalled();
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe('Listeners', () => {
|
|
66
|
+
describe('click', () => {
|
|
67
|
+
it('triggers the callback when a click event is dispatched', async () => {
|
|
68
|
+
var _a;
|
|
69
|
+
specPage = await newSpecPage({
|
|
70
|
+
components: [Q2Example],
|
|
71
|
+
html: `<q2-example></q2-example>`,
|
|
72
|
+
});
|
|
73
|
+
specPage.rootInstance.onClick = jest.fn();
|
|
74
|
+
(_a = specPage.root) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new Event('click'));
|
|
75
|
+
await specPage.waitForChanges();
|
|
76
|
+
expect(specPage.rootInstance.onClick).toHaveBeenCalled();
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('Methods', () => {
|
|
81
|
+
describe('openMenu', () => {
|
|
82
|
+
it("returns 'true'", async () => {
|
|
83
|
+
specPage = await newSpecPage({
|
|
84
|
+
components: [Q2Example],
|
|
85
|
+
html: `<q2-example></q2-example>`,
|
|
86
|
+
});
|
|
87
|
+
expect(await specPage.rootInstance.openMenu()).toEqual(true);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
describe('Watchers', () => {
|
|
92
|
+
describe('content', () => {
|
|
93
|
+
it('executes updateState', async () => {
|
|
94
|
+
specPage = await newSpecPage({
|
|
95
|
+
components: [Q2Example],
|
|
96
|
+
html: `<q2-example></q2-example>`,
|
|
97
|
+
});
|
|
98
|
+
specPage.rootInstance.updateState = jest.fn();
|
|
99
|
+
specPage.rootInstance.content = 'new content';
|
|
100
|
+
await specPage.waitForChanges();
|
|
101
|
+
expect(await specPage.rootInstance.updateState).toHaveBeenCalled();
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
describe('Local methods', () => {
|
|
106
|
+
describe('menuState', () => {
|
|
107
|
+
it("returns 'open'", async () => {
|
|
108
|
+
specPage = await newSpecPage({
|
|
109
|
+
components: [Q2Example],
|
|
110
|
+
html: `<q2-example></q2-example>`,
|
|
111
|
+
});
|
|
112
|
+
expect(specPage.rootInstance.menuState).toEqual('open');
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
describe('prepareAnimation', () => {
|
|
116
|
+
it('returns undefined', async () => {
|
|
117
|
+
specPage = await newSpecPage({
|
|
118
|
+
components: [Q2Example],
|
|
119
|
+
html: `<q2-example></q2-example>`,
|
|
120
|
+
});
|
|
121
|
+
expect(await specPage.rootInstance.prepareAnimation()).toBeUndefined();
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=q2-example.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"q2-example.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-example/test/q2-example.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE;IAC7B,IAAI,QAAkB,CAAC;IAEvB,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;YACtB,EAAE,CAAC,yDAAyD,EAAE,KAAK,IAAI,EAAE;;gBACrE,QAAQ,GAAG,MAAM,WAAW,CAAC;oBACz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C,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from '@stencil/core/testing';\nimport { Q2Example } from '../q2-example';\n\ndescribe.skip('q2-example', () => {\n let specPage: SpecPage;\n\n describe('Props', () => {\n describe('disabled', () => {\n it('does not add disabled class when not provided (default)', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n expect(specPage?.root?.shadowRoot.querySelector('.menu')).not.toHaveClass('disabled');\n });\n\n it('disables the component when provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example disabled></q2-example>`,\n });\n\n expect(specPage?.root?.shadowRoot.querySelector('.menu')).toHaveClass('disabled');\n });\n });\n });\n\n describe('Events', () => {\n describe('tctClick', () => {\n it('emits an event when invoked', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n const closeSpy = jest.fn();\n specPage.root?.addEventListener('tctClick', closeSpy);\n specPage.rootInstance.tctClick.emit();\n await specPage.waitForChanges();\n\n expect(closeSpy).toHaveBeenCalled();\n });\n\n it('emits an event when element is clicked', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n const closeSpy = jest.fn();\n specPage.root?.addEventListener('tctClick', closeSpy);\n specPage.root?.shadowRoot?.querySelector<HTMLDivElement>('.menu')?.click();\n await specPage.waitForChanges();\n\n expect(closeSpy).toHaveBeenCalled();\n });\n\n it('emits an event when a triggering event is dispatched', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n const closeSpy = jest.fn();\n specPage.root?.addEventListener('tctClick', closeSpy);\n specPage.root?.shadowRoot?.querySelector('.menu')?.dispatchEvent(new Event('click'));\n await specPage.waitForChanges();\n\n expect(closeSpy).toHaveBeenCalled();\n });\n });\n });\n\n describe('Listeners', () => {\n describe('click', () => {\n it('triggers the callback when a click event is dispatched', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n specPage.rootInstance.onClick = jest.fn();\n specPage.root?.dispatchEvent(new Event('click'));\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.onClick).toHaveBeenCalled();\n });\n });\n });\n\n describe('Methods', () => {\n describe('openMenu', () => {\n it(\"returns 'true'\", async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n expect(await specPage.rootInstance.openMenu()).toEqual(true);\n });\n });\n });\n\n describe('Watchers', () => {\n describe('content', () => {\n it('executes updateState', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n specPage.rootInstance.updateState = jest.fn();\n specPage.rootInstance.content = 'new content';\n await specPage.waitForChanges();\n\n expect(await specPage.rootInstance.updateState).toHaveBeenCalled();\n });\n });\n });\n\n describe('Local methods', () => {\n describe('menuState', () => {\n it(\"returns 'open'\", async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n expect(specPage.rootInstance.menuState).toEqual('open');\n });\n });\n\n describe('prepareAnimation', () => {\n it('returns undefined', async () => {\n specPage = await newSpecPage({\n components: [Q2Example],\n html: `<q2-example></q2-example>`,\n });\n\n expect(await specPage.rootInstance.prepareAnimation()).toBeUndefined();\n });\n });\n });\n});\n"]}
|
|
@@ -46,7 +46,7 @@ export class Q2FormattedText {
|
|
|
46
46
|
// #region Render Methods
|
|
47
47
|
render() {
|
|
48
48
|
const { formattedTextClasses } = this;
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: '1957c3f976bc87c24859d94c27e1baf35da8fc03', class: formattedTextClasses, "aria-label": this.formattedValue }, h("span", { key: '8dac0d558d205fc183d16c4aef922ab470eec6ab' }, this.formattedValue)));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "q2-formatted-text"; }
|
|
52
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import formatAlpha from "./alpha";
|
|
2
|
+
describe('formatAlpha', () => {
|
|
3
|
+
it('should format alpha values correctly', () => {
|
|
4
|
+
expect(formatAlpha('a b c 1 2 3 - . ? #').fullyFormattedValue).toBe('abc');
|
|
5
|
+
});
|
|
6
|
+
it('should apply format modifiers correctly', () => {
|
|
7
|
+
expect(formatAlpha('a b c123', 'spaced').fullyFormattedValue).toBe('a b c');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=alpha.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/alpha.spec.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,SAAS,CAAC;AAElC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,WAAW,CAAC,qBAAqB,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import formatAlpha from './alpha';\n\ndescribe('formatAlpha', () => {\n it('should format alpha values correctly', () => {\n expect(formatAlpha('a b c 1 2 3 - . ? #').fullyFormattedValue).toBe('abc');\n });\n it('should apply format modifiers correctly', () => {\n expect(formatAlpha('a b c123', 'spaced').fullyFormattedValue).toBe('a b c');\n });\n});\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import formatAlphanumeric from "./alphanumeric";
|
|
2
|
+
describe('formatAlphanumeric', () => {
|
|
3
|
+
it('should format alphanumeric values correctly', () => {
|
|
4
|
+
expect(formatAlphanumeric('a b c 1 2 3 - . ? #').fullyFormattedValue).toBe('abc123');
|
|
5
|
+
});
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=alphanumeric.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alphanumeric.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/alphanumeric.spec.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,gBAAgB,CAAC;AAEhD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACnD,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import formatAlphanumeric from './alphanumeric';\n\ndescribe('formatAlphanumeric', () => {\n it('should format alphanumeric values correctly', () => {\n expect(formatAlphanumeric('a b c 1 2 3 - . ? #').fullyFormattedValue).toBe('abc123');\n });\n});\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import formatCurrency from "./currency";
|
|
2
|
+
describe('formatCurrency', () => {
|
|
3
|
+
it('should format currency values correctly', () => {
|
|
4
|
+
expect(formatCurrency('12345', 'USD').fullyFormattedValue).toBe('$123.45');
|
|
5
|
+
expect(formatCurrency('12345', 'MXN').fullyFormattedValue).toBe('$123.45');
|
|
6
|
+
expect(formatCurrency('12345', 'BRL').fullyFormattedValue).toBe('R$123.45');
|
|
7
|
+
expect(formatCurrency('12345', 'CNY').fullyFormattedValue).toBe('¥123.45');
|
|
8
|
+
expect(formatCurrency('12345', 'HKD').fullyFormattedValue).toBe('$123.45');
|
|
9
|
+
expect(formatCurrency('12345', 'TWD').fullyFormattedValue).toBe('$123.45');
|
|
10
|
+
});
|
|
11
|
+
it('should apply format modifiers correctly', () => {
|
|
12
|
+
expect(formatCurrency('12345', 'USD-integer').fullyFormattedValue).toBe('$12,345');
|
|
13
|
+
expect(formatCurrency('12345', 'MXN-integer').fullyFormattedValue).toBe('$12,345');
|
|
14
|
+
expect(formatCurrency('12345', 'BRL-integer').fullyFormattedValue).toBe('R$12,345');
|
|
15
|
+
expect(formatCurrency('12345', 'CNY-integer').fullyFormattedValue).toBe('¥12,345');
|
|
16
|
+
expect(formatCurrency('12345', 'HKD-integer').fullyFormattedValue).toBe('$12,345');
|
|
17
|
+
expect(formatCurrency('12345', 'TWD-integer').fullyFormattedValue).toBe('$12,345');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=currency.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/currency.spec.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,YAAY,CAAC;AAExC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;IAC5B,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC5E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC/C,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import formatCurrency from './currency';\n\ndescribe('formatCurrency', () => {\n it('should format currency values correctly', () => {\n expect(formatCurrency('12345', 'USD').fullyFormattedValue).toBe('$123.45');\n expect(formatCurrency('12345', 'MXN').fullyFormattedValue).toBe('$123.45');\n expect(formatCurrency('12345', 'BRL').fullyFormattedValue).toBe('R$123.45');\n expect(formatCurrency('12345', 'CNY').fullyFormattedValue).toBe('¥123.45');\n expect(formatCurrency('12345', 'HKD').fullyFormattedValue).toBe('$123.45');\n expect(formatCurrency('12345', 'TWD').fullyFormattedValue).toBe('$123.45');\n });\n\n it('should apply format modifiers correctly', () => {\n expect(formatCurrency('12345', 'USD-integer').fullyFormattedValue).toBe('$12,345');\n expect(formatCurrency('12345', 'MXN-integer').fullyFormattedValue).toBe('$12,345');\n expect(formatCurrency('12345', 'BRL-integer').fullyFormattedValue).toBe('R$12,345');\n expect(formatCurrency('12345', 'CNY-integer').fullyFormattedValue).toBe('¥12,345');\n expect(formatCurrency('12345', 'HKD-integer').fullyFormattedValue).toBe('$12,345');\n expect(formatCurrency('12345', 'TWD-integer').fullyFormattedValue).toBe('$12,345');\n });\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/date.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,WAAW,GAAG;
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/date.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,UAAU;IACpB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,UAAU;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAa,EAAE,SAAiB,YAAY;IAC3E,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,EAAE,CAAC,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC;IAE7E,MAAM,oBAAoB,GAAG,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAEtD,uCACO,oBAAoB,KACvB,KAAK,EAAE,oBAAoB,CAAC,cAAc,IAC5C;AACN,CAAC","sourcesContent":["import formatValue from './generic';\n\nexport const dateFormats = {\n 'MM/DD/YYYY': '##/##/####',\n 'M/D/YYYY': '#?/#?/####',\n 'MM/DD/YY': '##/##/##',\n 'M/D/YY': '#?/#?/##',\n 'MM/YY': '##/##',\n 'M/YY': '#?/##',\n 'DD/MM/YYYY': '##/##/####',\n 'D/M/YYYY': '#?/#?/####',\n 'DD/MM/YY': '##/##/##',\n 'D/M/YY': '#?/#?/##',\n 'MM-DD-YYYY': '##-##-####',\n 'M-D-YYYY': '#?-#?-####',\n 'MM-DD-YY': '##-##-##',\n 'M-D-YY': '#?-#?-##',\n 'MM-YY': '##-##',\n 'M-YY': '#?-##',\n 'DD-MM-YYYY': '##-##-####',\n 'D-M-YYYY': '#?-#?-####',\n 'DD-MM-YY': '##-##-##',\n 'D-M-YY': '#?-#?-##',\n};\n\nexport default function formatDate(value: string, format: string = 'MM/DD/YYYY') {\n const mask = dateFormats[format?.toUpperCase()] || dateFormats['MM/DD/YYYY'];\n\n const formattedValueObject = formatValue(value, mask);\n\n return {\n ...formattedValueObject,\n value: formattedValueObject.formattedValue,\n };\n}\n"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import formatDate, { dateFormats } from "./date";
|
|
2
|
+
describe('formatDate', () => {
|
|
3
|
+
// This is currently a broken pattern. The test only really validates that / or - are being placed in the correct spots.
|
|
4
|
+
// The ? symbols mean optional characters, but the formatter places digits there anyway.
|
|
5
|
+
// We may need to refactor formatValue() to handle optional characters differently for dates if we want them to match the formatModifier.
|
|
6
|
+
Object.entries(dateFormats).forEach(([format, mask]) => {
|
|
7
|
+
it(`should format value to provided format: ${format}`, () => {
|
|
8
|
+
const exampleValue = mask.replace(/[#?]/g, '1').replace(/[-/]/g, '');
|
|
9
|
+
const expectedResult = mask.replace(/[#?]/g, '1');
|
|
10
|
+
expect(formatDate(exampleValue, format).fullyFormattedValue).toBe(expectedResult);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
it('should fallback to default format if invalid format is provided', () => {
|
|
14
|
+
expect(formatDate('11111111', 'INVALID').fullyFormattedValue).toBe('11/11/1111');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=date.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-input/formatting/date.spec.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAEjD,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,wHAAwH;IACxH,wFAAwF;IACxF,yIAAyI;IACzI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE;QACnD,EAAE,CAAC,2CAA2C,MAAM,EAAE,EAAE,GAAG,EAAE;YACzD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACrE,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAClD,MAAM,CAAC,UAAU,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACtF,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACvE,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import formatDate, { dateFormats } from './date';\n\ndescribe('formatDate', () => {\n // This is currently a broken pattern. The test only really validates that / or - are being placed in the correct spots.\n // The ? symbols mean optional characters, but the formatter places digits there anyway.\n // We may need to refactor formatValue() to handle optional characters differently for dates if we want them to match the formatModifier.\n Object.entries(dateFormats).forEach(([format, mask]) => {\n it(`should format value to provided format: ${format}`, () => {\n const exampleValue = mask.replace(/[#?]/g, '1').replace(/[-/]/g, '');\n const expectedResult = mask.replace(/[#?]/g, '1');\n expect(formatDate(exampleValue, format).fullyFormattedValue).toBe(expectedResult);\n });\n });\n\n it('should fallback to default format if invalid format is provided', () => {\n expect(formatDate('11111111', 'INVALID').fullyFormattedValue).toBe('11/11/1111');\n });\n});\n"]}
|