q2-tecton-elements 1.46.0 → 1.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +8 -16
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-0e15dc8d.js → index-a93362ed.js} +3 -3
- package/dist/cjs/index-a93362ed.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +17 -3
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +37 -7
- package/dist/cjs/q2-carousel-pane.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +71 -6
- package/dist/cjs/q2-chart-donut.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +4 -3
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +4 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +2 -2
- package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +24 -5
- package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +13 -15
- package/dist/cjs/q2-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-legend.cjs.entry.js +118 -0
- package/dist/cjs/q2-legend.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-list.cjs.entry.js +8 -8
- package/dist/cjs/q2-list.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +6 -4
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- 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-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/click-elsewhere/click-elsewhere.js +2 -8
- package/dist/collection/components/click-elsewhere/click-elsewhere.js.map +1 -1
- package/dist/collection/components/q2-calendar/q2-calendar.js +16 -2
- package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
- package/dist/collection/components/q2-carousel/q2-carousel.js +2 -2
- package/dist/collection/components/q2-carousel/q2-carousel.js.map +1 -1
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js +36 -6
- package/dist/collection/components/q2-carousel-pane/q2-carousel-pane.js.map +1 -1
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.css +9 -0
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js +92 -5
- package/dist/collection/components/q2-chart-donut/q2-chart-donut.js.map +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +20 -2
- package/dist/collection/components/q2-checkbox/q2-checkbox.js.map +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +3 -2
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js.map +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +1 -1
- package/dist/collection/components/q2-detail/q2-detail.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-icon/assets/icon-file-list.json +1 -0
- package/dist/collection/components/q2-icon/assets/standard.symbol.svg +1 -1
- package/dist/collection/components/q2-icon/q2-icon.js +1 -1
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.js +121 -6
- package/dist/collection/components/q2-input/q2-input.js.map +1 -1
- package/dist/collection/components/q2-item/q2-item.js +23 -16
- package/dist/collection/components/q2-item/q2-item.js.map +1 -1
- package/dist/collection/components/q2-legend/q2-legend.css +126 -0
- package/dist/collection/components/q2-legend/q2-legend.js +271 -0
- package/dist/collection/components/q2-legend/q2-legend.js.map +1 -0
- package/dist/collection/components/q2-list/q2-list.js +7 -7
- package/dist/collection/components/q2-list/q2-list.js.map +1 -1
- package/dist/collection/components/q2-loc/q2-loc.js +1 -1
- package/dist/collection/components/q2-message/q2-message.js +1 -1
- package/dist/collection/components/q2-optgroup/q2-optgroup.js +1 -1
- package/dist/collection/components/q2-option/q2-option.js +1 -1
- package/dist/collection/components/q2-pagination/q2-pagination.js +2 -2
- package/dist/collection/components/q2-pill/q2-pill.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +5 -7
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +11 -3
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- 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-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 +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/index.js +2 -2
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/click-elsewhere2.js +2 -8
- package/dist/components/click-elsewhere2.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-calendar.js +16 -2
- package/dist/components/q2-calendar.js.map +1 -1
- package/dist/components/q2-carousel-pane.js +36 -6
- package/dist/components/q2-carousel-pane.js.map +1 -1
- package/dist/components/q2-carousel.js +2 -2
- package/dist/components/q2-carousel.js.map +1 -1
- package/dist/components/q2-chart-donut.js +82 -9
- package/dist/components/q2-chart-donut.js.map +1 -1
- package/dist/components/q2-checkbox-group.js +3 -2
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-checkbox2.js +4 -2
- package/dist/components/q2-checkbox2.js.map +1 -1
- package/dist/components/q2-currency.js +1 -1
- package/dist/components/q2-data-table.js +1 -1
- package/dist/components/q2-detail.js +1 -1
- package/dist/components/q2-dropdown-item2.js +1 -1
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +1 -1
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-icon2.js +1 -1
- package/dist/components/q2-icon2.js.map +1 -1
- package/dist/components/q2-input2.js +28 -5
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +15 -17
- package/dist/components/q2-item.js.map +1 -1
- package/dist/components/q2-legend.d.ts +11 -0
- package/dist/components/q2-legend.js +8 -0
- package/dist/components/q2-legend.js.map +1 -0
- package/dist/components/q2-legend2.js +145 -0
- package/dist/components/q2-legend2.js.map +1 -0
- package/dist/components/q2-list.js +7 -7
- package/dist/components/q2-list.js.map +1 -1
- package/dist/components/q2-loc.js +1 -1
- package/dist/components/q2-message2.js +1 -1
- package/dist/components/q2-optgroup2.js +1 -1
- package/dist/components/q2-option2.js +1 -1
- package/dist/components/q2-pagination.js +2 -2
- package/dist/components/q2-pill.js +1 -1
- package/dist/components/q2-popover2.js +5 -7
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +6 -4
- package/dist/components/q2-select2.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-tab-pane.js +1 -1
- package/dist/components/q2-tag.js +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +8 -16
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-0a702dd6.js → index-3c5cd75e.js} +3 -3
- package/dist/esm/index-3c5cd75e.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +17 -3
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +37 -7
- package/dist/esm/q2-carousel-pane.entry.js.map +1 -1
- package/dist/esm/q2-carousel.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js.map +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +71 -6
- package/dist/esm/q2-chart-donut.entry.js.map +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +4 -3
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +4 -3
- package/dist/esm/q2-checkbox.entry.js.map +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +2 -2
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +2 -2
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +2 -2
- package/dist/esm/q2-icon.entry.js.map +1 -1
- package/dist/esm/q2-input.entry.js +24 -5
- package/dist/esm/q2-input.entry.js.map +1 -1
- package/dist/esm/q2-item.entry.js +14 -16
- package/dist/esm/q2-item.entry.js.map +1 -1
- package/dist/esm/q2-legend.entry.js +114 -0
- package/dist/esm/q2-legend.entry.js.map +1 -0
- package/dist/esm/q2-list.entry.js +8 -8
- package/dist/esm/q2-list.entry.js.map +1 -1
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +1 -1
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +3 -3
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +6 -4
- package/dist/esm/q2-select.entry.js.map +1 -1
- 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-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/assets/icon-file-list.json +1 -0
- package/dist/q2-tecton-elements/assets/standard.symbol.svg +1 -1
- package/dist/q2-tecton-elements/{p-aec64fcb.entry.js → p-0e27ea75.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7e1dc7e8.entry.js → p-0e482a7c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-57bf9342.entry.js → p-1b89b9c3.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d1522382.entry.js → p-1d824cdf.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-176ad382.entry.js → p-23183c61.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-24d96969.entry.js +2 -0
- package/dist/q2-tecton-elements/p-24d96969.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-f1265647.entry.js → p-2d6a9a94.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4570ff06.entry.js → p-30d70f4a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-79df783e.entry.js → p-33af97b0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-47868d6d.entry.js → p-35cc1039.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-dc057a9c.entry.js → p-3f665c56.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-12326313.entry.js → p-3fe532bc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e47dbfbe.entry.js → p-45d70da2.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1c4aa7e3.entry.js → p-4b47816d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4b47816d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-d9e19f70.entry.js → p-52e277b8.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d635e39f.entry.js → p-63038a54.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-87bbeb9c.entry.js → p-66ae329f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-36398b59.entry.js → p-6eac40be.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-6eac40be.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-4bbe563f.entry.js → p-6f2de185.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-6f2de185.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-f0813fb4.entry.js → p-76be9cad.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-76be9cad.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-da7fc914.entry.js → p-774975fa.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d013e05d.entry.js → p-7cbb989e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d013e05d.entry.js.map → p-7cbb989e.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/p-7dafc5da.entry.js +2 -0
- package/dist/q2-tecton-elements/p-7dafc5da.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-2132da06.entry.js → p-81bb9436.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-84190698.js +2 -0
- package/dist/q2-tecton-elements/p-84190698.js.map +1 -0
- package/dist/q2-tecton-elements/{p-515d424b.entry.js → p-8a00552f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1b37b8c6.entry.js → p-8fc099f5.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-8fc099f5.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-22661533.entry.js → p-9eafabd5.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-9eafabd5.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-71180fcd.entry.js → p-a03c29f3.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-a03c29f3.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-e762526f.entry.js → p-a3d58a50.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e3230823.entry.js → p-a891571c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6ebe37ea.entry.js → p-abe30d0c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1e927478.entry.js → p-b849365e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-cb4f9b33.entry.js → p-c9ee763d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-c9ee763d.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-e4a2469f.entry.js → p-ca17f7ca.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7523305d.entry.js → p-ca43e917.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fc9f43f8.entry.js → p-ced89010.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-195a133c.entry.js → p-d5776227.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-df297a77.entry.js → p-d75e4752.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-dd18416f.entry.js +2 -0
- package/dist/q2-tecton-elements/p-dd18416f.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-e25194ce.entry.js +2 -0
- package/dist/q2-tecton-elements/p-e25194ce.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-c016bd18.entry.js → p-f18caa3f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-391acc00.entry.js → p-f450db0b.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-f450db0b.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-66af375f.entry.js → p-fb7dd7ab.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-fb7dd7ab.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-ad274c67.entry.js → p-fce6bc58.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0eff37c6.entry.js → p-ff39ba49.entry.js} +2 -2
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js.map +1 -1
- package/dist/test/elements/click-elsewhere-test.e2e.js +0 -18
- package/dist/test/elements/click-elsewhere-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-btn-test.e2e.js +16 -0
- package/dist/test/elements/q2-btn-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-calendar-test.e2e.js +33 -35
- package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-carousel-pane-test.e2e.js +49 -1
- package/dist/test/elements/q2-carousel-pane-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-carousel-pane-test.spec.js +4 -1
- package/dist/test/elements/q2-carousel-pane-test.spec.js.map +1 -1
- package/dist/test/elements/q2-chart-donut-test.e2e.js +56 -0
- package/dist/test/elements/q2-chart-donut-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-checkbox-group-test.e2e.js +13 -10
- package/dist/test/elements/q2-checkbox-group-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-dropdown-item-test.e2e.js +16 -3
- package/dist/test/elements/q2-dropdown-item-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-icon-test.e2e.js +3 -3
- package/dist/test/elements/q2-icon-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-input-test.e2e.js +121 -54
- package/dist/test/elements/q2-input-test.e2e.js.map +1 -1
- package/dist/test/elements/{q2-detail/q2-item-test.e2e.js → q2-item-test.e2e.js} +29 -1
- package/dist/test/elements/q2-item-test.e2e.js.map +1 -0
- package/dist/test/elements/q2-item-test.spec.js +32 -0
- package/dist/test/elements/q2-item-test.spec.js.map +1 -0
- package/dist/test/elements/q2-legend-test.e2e.js +19 -0
- package/dist/test/elements/q2-legend-test.e2e.js.map +1 -0
- package/dist/test/elements/q2-legend-test.spec.js +271 -0
- package/dist/test/elements/q2-legend-test.spec.js.map +1 -0
- package/dist/test/elements/q2-select-test.e2e.js +41 -7
- package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
- package/dist/types/components/q2-carousel-pane/q2-carousel-pane.d.ts +7 -0
- package/dist/types/components/q2-chart-donut/q2-chart-donut.d.ts +14 -0
- package/dist/types/components/q2-checkbox/q2-checkbox.d.ts +2 -0
- package/dist/types/components/q2-input/q2-input.d.ts +24 -1
- package/dist/types/components/q2-item/q2-item.d.ts +1 -1
- package/dist/types/components/q2-legend/q2-legend.d.ts +41 -0
- package/dist/types/components.d.ts +111 -2
- package/package.json +3 -3
- package/dist/cjs/index-0e15dc8d.js.map +0 -1
- package/dist/esm/index-0a702dd6.js.map +0 -1
- package/dist/q2-tecton-elements/p-1b37b8c6.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-1c4aa7e3.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-22661533.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-36398b59.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-391acc00.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-42302f6f.js +0 -2
- package/dist/q2-tecton-elements/p-42302f6f.js.map +0 -1
- package/dist/q2-tecton-elements/p-4bbe563f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-66af375f.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-71180fcd.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-89305707.entry.js +0 -2
- package/dist/q2-tecton-elements/p-89305707.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-b7d5fd12.entry.js +0 -2
- package/dist/q2-tecton-elements/p-b7d5fd12.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-c56b58e9.entry.js +0 -2
- package/dist/q2-tecton-elements/p-c56b58e9.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cb4f9b33.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-f0813fb4.entry.js.map +0 -1
- package/dist/test/elements/q2-detail/q2-item-test.e2e.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-aec64fcb.entry.js.map → p-0e27ea75.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7e1dc7e8.entry.js.map → p-0e482a7c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-57bf9342.entry.js.map → p-1b89b9c3.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d1522382.entry.js.map → p-1d824cdf.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-176ad382.entry.js.map → p-23183c61.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-f1265647.entry.js.map → p-2d6a9a94.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4570ff06.entry.js.map → p-30d70f4a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-79df783e.entry.js.map → p-33af97b0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-47868d6d.entry.js.map → p-35cc1039.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-dc057a9c.entry.js.map → p-3f665c56.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-12326313.entry.js.map → p-3fe532bc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e47dbfbe.entry.js.map → p-45d70da2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d9e19f70.entry.js.map → p-52e277b8.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d635e39f.entry.js.map → p-63038a54.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-87bbeb9c.entry.js.map → p-66ae329f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-da7fc914.entry.js.map → p-774975fa.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2132da06.entry.js.map → p-81bb9436.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-515d424b.entry.js.map → p-8a00552f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e762526f.entry.js.map → p-a3d58a50.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e3230823.entry.js.map → p-a891571c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6ebe37ea.entry.js.map → p-abe30d0c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1e927478.entry.js.map → p-b849365e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e4a2469f.entry.js.map → p-ca17f7ca.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7523305d.entry.js.map → p-ca43e917.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fc9f43f8.entry.js.map → p-ced89010.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-195a133c.entry.js.map → p-d5776227.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-df297a77.entry.js.map → p-d75e4752.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c016bd18.entry.js.map → p-f18caa3f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-ad274c67.entry.js.map → p-fce6bc58.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-0eff37c6.entry.js.map → p-ff39ba49.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"click-elsewhere2.js","mappings":";;MAMa,cAAc;IAJ3B;;;;;;;QAQI,mBAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QACpE,uBAAkB,GAAY,KAAK,CAAC;QA0EpC,iBAAY,GAAG,CAAC,KAAY;YACxB,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACzE,MAAM,gBAAgB,GAClB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAiB,CAAC,CAAC;YAE1G,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,EAAE;gBACtE,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;gBAChC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnB,OAAO;aACV;YACD,IAAI,CAAC,kBAAkB,GAAG,gBAAgB,IAAI,kBAAkB,CAAC;SACpE,CAAC;QAEF,sBAAiB,GAAG;YAChB,
|
|
1
|
+
{"file":"click-elsewhere2.js","mappings":";;MAMa,cAAc;IAJ3B;;;;;;;QAQI,mBAAc,GAAa,CAAC,WAAW,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QACpE,uBAAkB,GAAY,KAAK,CAAC;QA0EpC,iBAAY,GAAG,CAAC,KAAY;YACxB,MAAM,kB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EAAE;YACT,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE;gBAC/C,OAAO,cAAc,CAAC;aACzB;YACD,cAAc,GAAG,cAAc,CAAC,UAAU,CAAC,aAAa,CAAC;SAC5D;KACJ;IAED,iBAAiB,CAAC,KAAU;QACxB,OAAO,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC;KAClD;IAED,cAAc,CAAC,KAAU;;;;QAKrB,OAAO,IAAI,EAAE;YACT,IAAI,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE;gBAC5B,OAAO,IAAI,CAAC;aACf;YACD,IAAI,CAAC,KAAK,EAAE;gBACR,OAAO,KAAK,CAAC;aAChB;YACD,KAAK,GAAG,KAAK,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC;SAC1C;KACJ;IAED,iBAAiB,CAAC,MAAe;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QACxD,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YACzC,MAAM,UAAU,GACZ,CAAC,WAAW,IAAI,WAAW,CAAC,aAAa,IAAI,WAAW,CAAC,aAAa,EAAE;gBACxE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC;YAEhC,KAAK,MAAM,WAAW,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAC9C,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;oBAC9B,OAAO,IAAI,CAAC;iBACf;aACJ;SACJ;QACD,OAAO,KAAK,CAAC;KAChB;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/click-elsewhere/click-elsewhere.tsx"],"sourcesContent":["import { Component, ComponentInterface, Element, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'click-elsewhere',\n shadow: false,\n})\nexport class ClickElsewhere implements ComponentInterface {\n /**\n * Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them\n */\n mouseEventList: string[] = ['mousedown', 'dragstart', 'touchstart'];\n isCurrentlyFocused: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n /**\n * Emitted when the user clicks outside the element\n */\n @Event() change: EventEmitter;\n\n /* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */\n /* tslint:disable:no-empty */\n componentWillLoad() {}\n /* tslint:enable:no-empty */\n\n connectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.addEventListener(eventName, this.mouseHandler);\n });\n window.addEventListener('blur', this.windowBlurHandler);\n }\n\n disconnectedCallback() {\n this.mouseEventList.forEach((eventName: string) => {\n document.removeEventListener(eventName, this.mouseHandler);\n });\n window.removeEventListener('blur', this.windowBlurHandler);\n }\n\n findActiveElement(): Element | null {\n let workingElement = document.activeElement!;\n while (true) {\n if (!workingElement || !workingElement.shadowRoot) {\n return workingElement;\n }\n workingElement = workingElement.shadowRoot.activeElement;\n }\n }\n\n shadowEventTarget(event: any): Element {\n return event.composedPath()[0] || event.target;\n }\n\n shadowContains(child: any): boolean {\n /**\n * shadow-dom enabled version of Node.contains()\n */\n\n while (true) {\n if (child === this.hostElement) {\n return true;\n }\n if (!child) {\n return false;\n }\n child = child.parentNode || child.host;\n }\n }\n\n originatesInSlots(target: Element): boolean {\n const slots = this.hostElement.querySelectorAll('slot');\n for (const currentSlot of Array.from(slots)) {\n const lightNodes =\n (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||\n this.hostElement.childNodes;\n\n for (const currentNode of Array.from(lightNodes)) {\n if (currentNode.contains(target)) {\n return true;\n }\n }\n }\n return false;\n }\n\n mouseHandler = (event: Event): void => {\n const isCurrentlyFocused = this.shadowContains(this.findActiveElement());\n const aboutToBeFocused =\n this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target as Element);\n\n if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {\n this.isCurrentlyFocused = false;\n this.change.emit();\n return;\n }\n this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;\n };\n\n windowBlurHandler = (): void => {\n this.isCurrentlyFocused = false;\n this.change.emit();\n };\n}\n"],"version":3}
|
package/dist/components/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import { Q2EditableField } from './q2-editable-field.js';
|
|
|
21
21
|
import { Q2Icon } from './q2-icon.js';
|
|
22
22
|
import { Q2Input } from './q2-input.js';
|
|
23
23
|
import { Q2Item } from './q2-item.js';
|
|
24
|
+
import { Q2Legend } from './q2-legend.js';
|
|
24
25
|
import { Q2List } from './q2-list.js';
|
|
25
26
|
import { Q2Loading } from './q2-loading.js';
|
|
26
27
|
import { Q2LoadingElement } from './q2-loading-element.js';
|
|
@@ -76,6 +77,7 @@ const defineCustomElements = (opts) => {
|
|
|
76
77
|
Q2Icon,
|
|
77
78
|
Q2Input,
|
|
78
79
|
Q2Item,
|
|
80
|
+
Q2Legend,
|
|
79
81
|
Q2List,
|
|
80
82
|
Q2Loading,
|
|
81
83
|
Q2LoadingElement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":"
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -81,8 +81,8 @@ function labelDOM(target) {
|
|
|
81
81
|
let helpText = '';
|
|
82
82
|
let shouldHideLabel = hideLabel;
|
|
83
83
|
if (!shouldHideLabel) {
|
|
84
|
-
const
|
|
85
|
-
const hasSlotContent =
|
|
84
|
+
const labelSlotElements = target.hostElement.querySelectorAll('[slot="label"]');
|
|
85
|
+
const hasSlotContent = labelSlotElements.length > 0;
|
|
86
86
|
const hasLabel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AAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACnE,MAAM,CAAC,MAAM,GAAG,YAAY,MAAM,CAAC,KAAK,EAAgC,CAAC;QACzE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;KAC5B;AACL;;;;","names":[],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function labelDOM(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlot = target.hostElement.shadowRoot.querySelector<HTMLSlotElement>('slot[name=\"label\"]');\n const hasSlotContent = labelSlot?.assignedNodes().length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function messagesDOM(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n"],"version":3}
|
|
1
|
+
{"file":"index2.js","mappings":";;SAgBgB,QAAQ;IACpB,OAAO,qFAAqF,CAAC,IAAI,CAC7F,SAAS,CAAC,SAAS,CACtB,CAAC;AACN,CAAC;SAEe,iBAAiB,CAAC,KAAiB,EAAE,WAAwB;IACzE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IACxB,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;;;IAI9C,MAAM,mBAAmB,GAAG,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IAE3E,MAAM,4BAA4B,GAAG,CAAC,OAAoB;QACtD,IAAI,OAAO,KAAK,WAAW;YAAE,OAAO,IAAI,CAAC;QACzC,IAAI,OAAO,CAAC,aAAa,EAAE;YAC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S,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACrC,gBAAgB,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;SACnD;aAAM;YACH,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACxC,gBAAgB,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,CAAC;SAC/D;KACJ,CAAC,CAAC;AACP,CAAC;MAEY,YAAY,GAAG;;IACxB,OAAO,MAAA,MAAA,MAAM,CAAC,cAAc,0CAAE,YAAY,kDAAI,CAAC;AACnD,EAAE;AAEF;MACa,WAAW,GAAG,CAAC,MAAa;IACrC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;QACnE,MAAM,CAAC,MAAM,GAAG,YAAY,MAAM,CAAC,KAAK,EAAgC,CAAC;QACzE,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;KAC5B;AACL;;;;","names":[],"sources":["src/utils/index.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport { Q2Btn } from 'src/components/q2-btn/q2-btn';\nimport { Q2Calendar } from 'src/components/q2-calendar/q2-calendar';\nimport { Q2Carousel } from 'src/components/q2-carousel/q2-carousel';\nimport { Q2Checkbox } from 'src/components/q2-checkbox/q2-checkbox';\nimport { Q2CheckboxGroup } from 'src/components/q2-checkbox-group/q2-checkbox-group';\nimport { Q2RadioGroup } from 'src/components/q2-radio-group/q2-radio-group';\nimport { Q2Dropdown } from 'src/components/q2-dropdown/q2-dropdown';\nimport { Q2DropdownItem } from 'src/components/q2-dropdown-item/q2-dropdown-item';\nimport { Q2EditableField } from 'src/components/q2-editable-field/q2-editable-field';\nimport { Q2Input } from 'src/components/q2-input/q2-input';\nimport { Q2Loading } from 'src/components/q2-loading/q2-loading';\nimport { Q2Radio } from 'src/components/q2-radio/q2-radio';\nimport { Q2Select } from 'src/components/q2-select/q2-select';\nimport { FormFieldTypes, IDict } from 'src/util';\n\nexport function isMobile(): boolean {\n return /Android|webOS|iPhone|iPad|iPod|BlackBerry|Mobile|IEMobile|Windows Phone|Opera Mini/i.test(\n navigator.userAgent\n );\n}\n\nexport function isHostLosingFocus(event: FocusEvent, hostElement: HTMLElement) {\n const type = event.type;\n const focusInTypes = ['focusin', 'focus'];\n const isFocusIn = focusInTypes.includes(type);\n\n // on focusin: `target` is element losing focus, `relatedTarget` is element gaining focus\n // on focusout: `target` is element gaining focus, `relatedTarget` is element losing focus\n const elementGainingFocus = isFocusIn ? event.target : event.relatedTarget;\n\n const isElementNestedInHostElement = (element: HTMLElement) => {\n if (element === hostElement) return true;\n if (element.parentElement) {\n return isElementNestedInHostElement(element.parentElement);\n }\n return false;\n };\n\n if (!(elementGainingFocus instanceof HTMLElement)) return true;\n return !isElementNestedInHostElement(elementGainingFocus);\n}\n\nexport function isRelatedTargetWithinHost(event: FocusEvent, element: HTMLElement) {\n return event.relatedTarget !== element && !element.contains(event.relatedTarget as Node);\n}\n\nexport function isEventFromElement(event: Event, element: HTMLElement): boolean {\n return event.composedPath?.()[0] === element;\n}\n\nexport function overrideFocus(hostElement: HTMLElement) {\n hostElement.focus = () => hostElement?.dispatchEvent(new FocusEvent('focus', { bubbles: false }));\n}\n\nexport function isFirefox() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('firefox');\n}\n\nexport function isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints > 0;\n}\n\nexport function isSafari() {\n const userAgent = navigator.userAgent.toLowerCase();\n return userAgent.includes('safari') && !userAgent.includes('chrome');\n}\n\n/**\n * Returns the value of a prop if it is defined and included in the `validValues`\n * array. This is used primarily to prevent Vue wrappers from setting aria props\n * to \"Symbol()\" when the prop is not set.\n */\nexport function getAriaValueFromProp(prop: string, validValues?: string[]) {\n if (prop === undefined) return prop;\n if (!validValues) return prop !== 'Symbol()' ? prop : undefined;\n return validValues.includes(prop) || prop === '' ? prop : undefined;\n}\n\nlet guid: number = 1000;\nexport function createGuid(): number {\n return guid++;\n}\n\nexport function nextPaint(fn: (value?: unknown) => void) {\n requestAnimationFrame(() => {\n requestAnimationFrame(fn);\n });\n}\n\nexport function isVisible(element: HTMLElement) {\n return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;\n}\n\nexport function waitForNextPaint() {\n return new Promise(resolve => nextPaint(resolve));\n}\n\nexport function capitalize(value: string) {\n return `${value.charAt(0).toUpperCase()}${value.slice(1)}`;\n}\n\nexport function pick(props: string[]): (obj: object) => object {\n return obj => {\n return props.reduce((memo, prop) => {\n return {\n ...memo,\n [prop]: obj[prop],\n };\n }, {});\n };\n}\n\nexport function loc(key: string, subs?: IDict<any> | string[]) {\n if (!key) return '';\n if (window.Tecton?.noStrings === true) {\n return key;\n }\n return window?.TectonElements?.loc(key, subs) ?? key;\n}\n\nexport function labelDOM(target: FormFieldTypes | Q2RadioGroup | Q2CheckboxGroup) {\n const { label, hideLabel, optional, readonly } = target;\n const labelClasses: string[] = ['input-label'];\n let helpText = '';\n\n let shouldHideLabel = hideLabel;\n if (!shouldHideLabel) {\n const labelSlotElements = target.hostElement.querySelectorAll<HTMLSlotElement>('[slot=\"label\"]');\n const hasSlotContent = labelSlotElements.length > 0;\n const hasLabel = !!label;\n\n shouldHideLabel = hasLabel || hasSlotContent ? false : true;\n }\n\n if (shouldHideLabel) labelClasses.push('sr');\n if (optional) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.optional')}</span>;\n }\n if (readonly) {\n helpText = <span class=\"optional-tag\">{loc('tecton.element.input.readonly')}</span>;\n labelClasses.push('readonly-field');\n }\n return (\n <label\n htmlFor={target.inputId}\n class={labelClasses.join(' ')}\n >\n <slot name=\"label\">\n {label ? loc(label) : undefined}\n {helpText}\n </slot>\n </label>\n );\n}\n\nexport function hasSlotContent(target: HTMLElement, slotName: string) {\n return target.querySelector(`[slot=\"${slotName}\"]`) !== null;\n}\n\nexport function handleAriaLabel(\n target:\n | Q2Input\n | Q2Select\n | Q2Radio\n | Q2Checkbox\n | Q2EditableField\n | Q2Dropdown\n | Q2DropdownItem\n | Q2Loading\n | Q2Carousel\n | Q2Calendar\n | Q2Btn\n) {\n const { ariaLabel } = target;\n if (!ariaLabel) return;\n\n // If empty ariaLabel prop is set to primitive symbol by framework wrapper, set ariaLabel to undefined and return\n const FW_WRAPPERS_EMPTY_PROP = Symbol().toString();\n if (ariaLabel === FW_WRAPPERS_EMPTY_PROP) {\n target.ariaLabel = undefined;\n return;\n }\n\n // If ariaLabel is set, set hideLabel to true and set label to ariaLabel\n if ('hideLabel' in target) target.hideLabel = true;\n target.label = loc(ariaLabel);\n target.ariaLabel = undefined;\n}\n\n/**\n * Handles when a prop has been renamed on a component without introducing a breaking change.\n */\nexport function handleRenamedProp(target: object, oldProp: string, newProp: string, removeOldProp?: boolean) {\n if (typeof target[oldProp] === 'undefined') return;\n\n // If old prop has value, aka set in component, call handleDeprecationWarning()\n if (target[oldProp]) {\n handleDeprecationWarning(target, oldProp, 'prop');\n }\n\n target[newProp] = target[oldProp];\n\n if (removeOldProp) {\n delete target[oldProp];\n }\n}\n\nexport function handleDeprecationWarning(\n target: object,\n deprecatedItemName: string,\n deprecatedItemType: 'function' | 'prop' | 'method' | 'event'\n) {\n if (window.location.hostname === 'localhost' || window.location.host === 'stack.q2developer.com') {\n if (target[deprecatedItemName] === 'undefined') return;\n\n const componentName = target.constructor.name.toLowerCase().slice(2);\n\n switch (deprecatedItemType) {\n case 'prop':\n if (deprecatedItemName === 'size' && componentName === 'btn') {\n console.warn(\n `The property of size in q2-btn should not be typeof number, or typeof string containing a number. This functionality will be deprecated in an upcoming release. Instead, please use the value 'undefined', or typeof string with any of the following values: \"small\" / \"medium\" / \"large\" `\n );\n } else {\n console.warn(\n `The property ${deprecatedItemName} in q2-${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n }\n break;\n\n case 'function':\n console.warn(\n `The function ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'method':\n console.warn(\n `The method ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n case 'event':\n console.warn(\n `The event ${deprecatedItemName} in ${componentName} has been marked for deprecation and will be removed in an upcoming major release.`\n );\n break;\n\n default:\n console.error(\n `handleDeprecationWarning --> No type found for desired deprecation: ${deprecatedItemName} in q2-${componentName}: deprecatedItemType = ${deprecatedItemName}`\n );\n }\n }\n}\n\nexport function messagesDOM(target: FormFieldTypes) {\n const type = target.hasError ? 'danger' : 'info';\n\n return (\n <div class=\"messages-container\">\n <q2-message\n appearance=\"minimal\"\n description\n type={type}\n test-id=\"message\"\n >\n <ul id={target.inputDescribedBy}>\n {target.messages.map(message => (\n <li test-id=\"messageListItem\">{loc(message)}</li>\n ))}\n </ul>\n </q2-message>\n </div>\n );\n}\n\nexport function setMessageHeight(target: FormFieldTypes) {\n const messageContainer = (target.hostElement.shadowRoot as ShadowRoot).querySelector<HTMLDivElement>(\n '.messages-container'\n );\n const q2Message = messageContainer.querySelector('q2-message');\n nextPaint(() => {\n const height = target.showMessages && target.hasFocus ? q2Message.getBoundingClientRect().height : 0;\n\n if (messageContainer.style.getPropertyValue('height') === `${height}px`) return;\n\n if (height === 0) {\n q2Message.classList.add('invisible');\n messageContainer.style.removeProperty('height');\n } else {\n q2Message.classList.remove('invisible');\n messageContainer.style.setProperty('height', `${height}px`);\n }\n });\n}\n\nexport const resizeIframe = () => {\n return window.TectonElements?.resizeIframe?.();\n};\n\n// Handling color attribute (deprecated)\nexport const handleColor = (target: Q2Btn) => {\n if (!target.intent && ['primary', 'secondary'].includes(target.color)) {\n target.intent = `workflow-${target.color}` as HTMLQ2BtnElement['intent'];\n target.color = undefined;\n }\n};\n"],"version":3}
|
|
@@ -482,6 +482,19 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class Q2Calendar extends H
|
|
|
482
482
|
this.openCalendar();
|
|
483
483
|
this.activateDay(dateValue || new Date());
|
|
484
484
|
break;
|
|
485
|
+
case 'Enter':
|
|
486
|
+
case ' ':
|
|
487
|
+
if (this.typeable)
|
|
488
|
+
break;
|
|
489
|
+
event.preventDefault();
|
|
490
|
+
if (this.open) {
|
|
491
|
+
this.closeCalendar();
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
this.openCalendar();
|
|
495
|
+
this.activateDay(dateValue || new Date());
|
|
496
|
+
}
|
|
497
|
+
break;
|
|
485
498
|
}
|
|
486
499
|
};
|
|
487
500
|
this.onInputKeyup = (event) => {
|
|
@@ -689,6 +702,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class Q2Calendar extends H
|
|
|
689
702
|
if (!this.dateList.find(({ date }) => dateFns.isSameDay(date, currentDate)).isValid)
|
|
690
703
|
return;
|
|
691
704
|
this.selectDate(currentDate);
|
|
705
|
+
this.closeCalendar();
|
|
692
706
|
this.focusInput();
|
|
693
707
|
break;
|
|
694
708
|
}
|
|
@@ -1134,7 +1148,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class Q2Calendar extends H
|
|
|
1134
1148
|
(_a = this.calendarBody.querySelector(`td[data-day="${date.getDate()}"]`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
1135
1149
|
}
|
|
1136
1150
|
render() {
|
|
1137
|
-
return (h("click-elsewhere", { key: '
|
|
1151
|
+
return (h("click-elsewhere", { key: 'cbd000d038a867afb1f969592c616d917a54854a', class: this.open ? 'dropdown-open' : undefined, onChange: this.onClickElsewhere }, this.inputField(), h("q2-popover", { key: 'ad590a2a5e41167ad631d805be1748402fd64c74', ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, direction: this.popoverDirection, minHeight: this.popoverMinHeight, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: true }, this.hintField(), this.calendarPopover())));
|
|
1138
1152
|
}
|
|
1139
1153
|
hintField() {
|
|
1140
1154
|
if (!this.hintMessage)
|
|
@@ -1173,7 +1187,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class Q2Calendar extends H
|
|
|
1173
1187
|
}
|
|
1174
1188
|
inputField() {
|
|
1175
1189
|
const { isTypeable } = this;
|
|
1176
|
-
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.open}`, hints: this.hintList, errors: this.errorList, onClick: isTypeable ? undefined : this.onInputClick, onChange: this.onInputChange, onInput: this.onInputInput, onKeyDown: this.onInputKeydown, onKeyUp: this.onInputKeyup, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "icon-right": isTypeable ? undefined : 'calendar', "format-modifier": isTypeable ? this.formatModifier : this.displayFormat || this.formatModifier,
|
|
1190
|
+
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.open}`, hints: this.hintList, errors: this.errorList, onClick: isTypeable ? undefined : this.onInputClick, onChange: this.onInputChange, onInput: this.onInputInput, onKeyDown: this.onInputKeydown, onKeyUp: this.onInputKeyup, onBlur: this.onInputBlur, onFocus: this.onInputFocus, "icon-right": isTypeable ? undefined : 'calendar', "format-modifier": isTypeable ? this.formatModifier : this.displayFormat || this.formatModifier, type: "date", "hide-messages": !isTypeable, "test-id": "inputAndCalendarToggle", _role: "combobox", _preventEntry: !isTypeable }, isTypeable && (h("q2-btn", { ref: el => (this.btnCalendarToggle = el), slot: "input-right", onClick: this.onInputClick, "test-id": "calendarToggle", label: "tecton.element.calendar.toggleAriaLabel", "hide-label": true }, h("q2-icon", { type: "calendar" })))));
|
|
1177
1191
|
}
|
|
1178
1192
|
calendarPopover() {
|
|
1179
1193
|
const { monthIndex, selectedYear } = this.selectedMonthYear;
|