q2-tecton-elements 1.45.3 → 1.45.4
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 +69 -32
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-0430339e.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-0430339e.js.map → index-f69742cf.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-carousel.cjs.entry.js +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 +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +2 -2
- package/dist/cjs/q2-optgroup_2.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/q2-section.cjs.entry.js +2 -2
- package/dist/cjs/q2-select.cjs.entry.js +55 -7
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -5
- 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 +1 -1
- package/dist/collection/components/q2-calendar/q2-month-picker.js +2 -2
- package/dist/collection/components/q2-carousel/q2-carousel.js +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 +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 +1 -1
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.js +1 -1
- package/dist/collection/components/q2-currency/q2-currency.js +1 -1
- package/dist/collection/components/q2-data-table/q2-data-table.js +7 -7
- 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-editable-field/q2-editable-field.js +2 -2
- package/dist/collection/components/q2-icon/q2-icon.js.map +1 -1
- package/dist/collection/components/q2-input/q2-input.js +2 -2
- package/dist/collection/components/q2-item/q2-item.js +1 -1
- package/dist/collection/components/q2-list/q2-list.js +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-option-list/q2-option-list.js +4 -4
- 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.css +19 -11
- package/dist/collection/components/q2-popover/q2-popover.js +70 -32
- 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.js +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 +64 -9
- 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 +3 -3
- package/dist/collection/components/q2-textarea/q2-textarea.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 +1 -1
- package/dist/components/q2-carousel-pane.js +2 -2
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-chart-area.js +1 -1
- package/dist/components/q2-chart-bar.js +1 -1
- package/dist/components/q2-chart-donut.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox2.js +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.js +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-icon2.js.map +1 -1
- package/dist/components/q2-input2.js +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-list.js +1 -1
- package/dist/components/q2-loc.js +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 +1 -1
- package/dist/components/q2-option-list2.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 +69 -32
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select.js +57 -9
- package/dist/components/q2-select.js.map +1 -1
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/esm/click-elsewhere_2.entry.js +69 -32
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-e940b40e.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-e940b40e.js.map → index-3184c760.js.map} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +2 -2
- package/dist/esm/q2-carousel-pane.entry.js +2 -2
- package/dist/esm/q2-carousel.entry.js +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 +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js.map +1 -1
- package/dist/esm/q2-input.entry.js +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-list.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +2 -2
- package/dist/esm/q2-optgroup_2.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +2 -2
- package/dist/esm/q2-pill.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/q2-section.entry.js +2 -2
- package/dist/esm/q2-select.entry.js +56 -8
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/jest.setup.js +22 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{p-47868d6d.entry.js → p-115634cd.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4b81a121.entry.js → p-163e6dd2.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7c12ba02.entry.js → p-19d06f9f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-2436c843.entry.js → p-1dd2fd85.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3b1ea100.entry.js → p-204ae112.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-c016bd18.entry.js → p-25da2750.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d9e19f70.entry.js → p-2e146575.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-bffda54d.entry.js → p-30c0a241.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-5dc5c4e2.entry.js → p-5219c018.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-b376c111.entry.js → p-5af4926e.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-5e66bf17.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5e66bf17.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-aec64fcb.entry.js → p-62b7dbcc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-63192fac.entry.js → p-63063fe4.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-f1265647.entry.js → p-66835c7b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-05b015a8.entry.js → p-73e26b41.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-df297a77.entry.js → p-74e456ab.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-dc057a9c.entry.js → p-7b7128c2.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-82f21785.entry.js +2 -0
- package/dist/q2-tecton-elements/p-82f21785.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-50bd4437.entry.js → p-868a3856.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4bbe563f.entry.js → p-8690aadf.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1c17d118.entry.js → p-9659f63b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-445990a8.entry.js → p-9b373584.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-bfe9d688.entry.js → p-a7055670.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-71180fcd.entry.js → p-b0f91944.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-515d424b.entry.js → p-b79bd45f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-b7d5fd12.entry.js → p-bb3ae49a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d1a9ed3d.entry.js → p-c60679f5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-57bf9342.entry.js → p-dca6104e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e77d1a92.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7523305d.entry.js → p-e7c3d6db.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e762526f.entry.js → p-ed974a59.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-f0813fb4.entry.js.map +1 -1
- package/dist/q2-tecton-elements/{p-4570ff06.entry.js → p-f0e5a9ab.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7ce6e587.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/{p-b3d10d52.entry.js → p-f1fe0e73.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-22661533.entry.js → p-f44d51ef.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/q2-calendar-test.e2e.js +3 -3
- package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-dropdown-test.e2e.js +2 -14
- package/dist/test/elements/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-pill-test.e2e.js +1 -1
- package/dist/test/elements/q2-pill-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-popover-test.e2e.js +1 -34
- package/dist/test/elements/q2-popover-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-popover-test.spec.js +739 -296
- package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
- package/dist/test/elements/q2-select-test.e2e.js +1 -1
- package/dist/test/elements/q2-select-test.e2e.js.map +1 -1
- package/dist/test/elements/q2-select-test.spec.js +412 -0
- package/dist/test/elements/q2-select-test.spec.js.map +1 -0
- package/dist/test/elements/q2-tag-test.e2e.js +1 -1
- package/dist/test/elements/q2-tag-test.e2e.js.map +1 -1
- package/dist/types/builds/q2e/development/tecton/tecton/packages/q2-tecton-elements/.stencil/jest.setup.d.ts +1 -0
- package/dist/types/components/q2-action-sheet/q2-action-sheet.d.ts +60 -0
- package/dist/types/components/q2-calendar/q2-calendar.d.ts +324 -0
- package/dist/types/components/q2-carousel/q2-carousel.d.ts +2 -2
- package/dist/types/components/q2-data-table/q2-data-table.d.ts +221 -0
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +130 -0
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +45 -0
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +136 -0
- package/dist/types/components/q2-loading/skeleton/shapes.d.ts +1 -0
- package/dist/types/components/q2-optgroup/q2-optgroup.d.ts +1 -1
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +99 -0
- package/dist/types/components/q2-pagination/q2-pagination.d.ts +54 -0
- package/dist/types/components/q2-pill/q2-pill.d.ts +102 -0
- package/dist/types/components/q2-popover/q2-popover.d.ts +5 -3
- package/dist/types/components/q2-select/q2-select.d.ts +236 -0
- package/dist/types/components/q2-stepper/q2-stepper.d.ts +52 -0
- package/dist/types/components/q2-stepper-vertical/q2-stepper-vertical.d.ts +62 -0
- package/dist/types/components/q2-tab-container/q2-tab-container.d.ts +2 -2
- package/dist/types/components/q2-tag/q2-tag.d.ts +59 -0
- package/dist/types/utils/action-sheet.d.ts +12 -0
- package/package.json +3 -3
- package/dist/q2-tecton-elements/p-68556733.entry.js +0 -2
- package/dist/q2-tecton-elements/p-68556733.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-cadceb00.entry.js +0 -2
- package/dist/q2-tecton-elements/p-cadceb00.entry.js.map +0 -1
- /package/dist/q2-tecton-elements/{p-47868d6d.entry.js.map → p-115634cd.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4b81a121.entry.js.map → p-163e6dd2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7c12ba02.entry.js.map → p-19d06f9f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2436c843.entry.js.map → p-1dd2fd85.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-3b1ea100.entry.js.map → p-204ae112.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-c016bd18.entry.js.map → p-25da2750.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d9e19f70.entry.js.map → p-2e146575.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-bffda54d.entry.js.map → p-30c0a241.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-5dc5c4e2.entry.js.map → p-5219c018.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-b376c111.entry.js.map → p-5af4926e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-aec64fcb.entry.js.map → p-62b7dbcc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-63192fac.entry.js.map → p-63063fe4.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-f1265647.entry.js.map → p-66835c7b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-05b015a8.entry.js.map → p-73e26b41.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-df297a77.entry.js.map → p-74e456ab.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-dc057a9c.entry.js.map → p-7b7128c2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-50bd4437.entry.js.map → p-868a3856.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4bbe563f.entry.js.map → p-8690aadf.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1c17d118.entry.js.map → p-9659f63b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-445990a8.entry.js.map → p-9b373584.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-bfe9d688.entry.js.map → p-a7055670.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-71180fcd.entry.js.map → p-b0f91944.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-515d424b.entry.js.map → p-b79bd45f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-b7d5fd12.entry.js.map → p-bb3ae49a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d1a9ed3d.entry.js.map → p-c60679f5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-57bf9342.entry.js.map → p-dca6104e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e77d1a92.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7523305d.entry.js.map → p-e7c3d6db.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e762526f.entry.js.map → p-ed974a59.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4570ff06.entry.js.map → p-f0e5a9ab.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7ce6e587.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-b3d10d52.entry.js.map → p-f1fe0e73.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-22661533.entry.js.map → p-f44d51ef.entry.js.map} +0 -0
- /package/dist/types/{workspace/workspace/tecton-production_release_1.45.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
- /package/dist/types/{workspace/workspace/tecton-production_release_1.45.x → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-icon2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,CAAC;YACxC,KAAK,CAAC,EAAE,GAAG,OAAO,CAAC;YACnB,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC;YAC1B,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC5B,QAAQ,CAAC,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;SACrD;aAAM;YACH,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;SAChD;KACJ;IAED,MAAM;QACF,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAC7B,OAAO,IAAI,CAAC,QAAQ,IAChB,eAAQ,KAER,0BACiB,KAAK,GAAG,SAAS,GAAG,MAAM,EACvC,IAAI,EAAC,KAAK,qBACO,KAAK,GAAG,OAAO,GAAG,SAAS,EAC5C,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,KAAK,EAAC,4BAA4B,IAEjC,KAAK,IAAI,aAAO,EAAE,EAAC,OAAO,IAAE,KAAK,CAAS,EAC1C,CAAC,CAAC,IAAI,IAAI,WAAK,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAI,EACpD,SAAG,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,GAAM,CACzC,CACT,CAAC;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-icon/q2-icon.scss?tag=q2-icon&encapsulation=shadow","src/components/q2-icon/q2-icon.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-block;\n height: var(--tct-icon-size, 24px);\n width: var(--tct-icon-size, 24px);\n position: relative;\n fill: none;\n}\n\n:host([inline]) {\n height: 1em;\n width: 1em;\n}\n\nsvg {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n stroke-width: var-list(--tct-icon-stroke-width, --t-icon-stroke-width, 1.5);\n stroke-linecap: var-list(--tct-icon-cap, --t-icon-cap, round);\n stroke-linejoin: var-list(--tct-icon-cap, --t-icon-cap, round);\n transition: var(--tct-icon-transition, none);\n}\n\n.stroke-primary {\n stroke: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.stroke-secondary {\n stroke: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.fill-primary {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.fill-secondary {\n fill: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.filled {\n fill: var-list(--tct-icon-fill, --comp-icon-fill, --t-icon-fill, none);\n transition: var(--tct-icon-fill-transition, none);\n}\n\n.uniform {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n:host([type='info']),\n:host([type='info-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-info, --const-stoplight-info, #0079c1)};\n}\n\n:host([type='success']),\n:host([type='success-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-success, --const-stoplight-success, #0e8a00)};\n}\n\n:host([type='warning']),\n:host([type='warning-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-warning, --const-stoplight-warning, #c35500)};\n}\n\n:host([type='error']),\n:host([type='error-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-alert, --const-stoplight-alert, #d20a0a)};\n}\n","import { Component, ComponentInterface, Prop, h, Element, Watch, getAssetPath, State, Fragment } from '@stencil/core';\nimport { createGuid } from 'src/utils';\nimport iconMap from './assets/icon-map.json';\n\n@Component({ tag: 'q2-icon', shadow: true, styleUrl: 'q2-icon.scss', assetsDirs: ['assets'] })\nexport class Q2Icon implements ComponentInterface {\n /** Styles the component to have a `height` and `width` of `1em`, making it easy to place alongside text. */\n @Prop({ reflect: true }) inline: boolean;\n\n /** The text that is presented by screen-readers when they encounter the icon. */\n @Prop({ reflect: true }) label: string;\n\n /** The name of the icon to be displayed. */\n @Prop({ reflect: true }) type: string;\n\n @Element() hostElement: HTMLElement;\n\n @State() iconClone: SVGSymbolElement;\n\n spriteGroup: SVGElement;\n spriteUse: SVGElement;\n\n componentWillLoad() {\n this.handleIcon();\n }\n\n componentDidRender(): void {\n if (!this.iconClone) return;\n this.spriteGroup?.firstElementChild?.remove();\n const appendedClone = this.spriteGroup?.appendChild(this.iconClone);\n\n // We have to set the `href` attribute after the symbol is appended to the DOM to avoid a bug in Safari\n this.spriteUse?.setAttribute('href', `#${appendedClone.id}`);\n }\n\n @Watch('type')\n handleIcon() {\n if (this.isCustom) {\n this.setCustomSVGAttrs();\n } else if (this.type) {\n this.fetchSprite();\n } else {\n this.iconClone = null;\n this.spriteGroup?.firstElementChild?.remove();\n }\n }\n\n get isCustom() {\n return this.type === 'custom';\n }\n\n get spriteFileName() {\n if (this.isCustom) return;\n return iconMap[this.type];\n }\n\n get spriteId() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tecton-sprite-${spriteFileName}`;\n }\n\n get spriteElement() {\n const { spriteId } = this;\n if (!spriteId) return;\n return document.querySelector<HTMLElement>(`#${spriteId}`);\n }\n\n get spriteEventName() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tct-loaded-${spriteFileName}`;\n }\n\n get iconCloneViewBox() {\n return this.iconClone?.getAttribute('viewBox') ?? '0 0 24 24';\n }\n\n /**\n * Checks for the sprite container element in the global DOM\n * If it does not exist, it creates and appends it to the body\n */\n getOrCreateSpriteContainer() {\n const spriteContainerId = 'tecton-sprites';\n let spriteContainer: HTMLDivElement = document.querySelector(`#${spriteContainerId}`);\n\n if (spriteContainer) return spriteContainer;\n spriteContainer = document.createElement('div');\n spriteContainer.id = spriteContainerId;\n spriteContainer.style.display = 'none';\n document.body.appendChild(spriteContainer);\n return spriteContainer;\n }\n\n checkForSprite() {\n const { spriteId, spriteEventName } = this;\n const spriteContainer = this.getOrCreateSpriteContainer();\n let spriteElement: HTMLElement = document.querySelector(`#${spriteId}`);\n\n // If the sprite element exists and has the `data-loaded` attribute, we know we have everything we need\n if (spriteElement?.hasAttribute('data-loaded') ?? false) {\n this.cloneSpriteNode();\n return true;\n }\n\n // If the sprite element exists but does not have the `data-loaded` attribute, we know it's being loaded\n // We'll listen for the event that will be dispatched when the sprite is loaded\n spriteContainer.addEventListener(\n spriteEventName,\n () => {\n this.cloneSpriteNode();\n },\n { once: true }\n );\n\n // If the sprite element exists, we know it's being loaded and will be handled by the event listener\n if (spriteElement) return true;\n\n // If sprite element does not exist, create a placeholder\n // This will let other icons know the sprite is being loaded\n spriteElement = document.createElement('div');\n spriteElement.id = spriteId;\n spriteContainer.appendChild(spriteElement);\n return false;\n }\n\n async fetchSprite() {\n const { spriteFileName, spriteId, spriteEventName } = this;\n\n const spriteExists = this.checkForSprite();\n if (spriteExists) return;\n\n if (!spriteFileName) return;\n const spritePath = getAssetPath(`assets/${spriteFileName}.symbol.svg`);\n const response = await fetch(spritePath);\n const data = await response.text();\n const wrappingDiv = document.createElement('div');\n wrappingDiv.innerHTML = data;\n const svg = wrappingDiv.querySelector('svg');\n\n svg.id = spriteId;\n svg.setAttribute('data-loaded', '');\n\n let { spriteElement } = this;\n if (spriteElement?.tagName === 'SVG') return;\n\n if (typeof spriteElement.replaceWith === 'function') {\n spriteElement.replaceWith(svg);\n } else {\n spriteElement.parentNode.replaceChild(svg, spriteElement);\n }\n\n spriteElement = document.querySelector(`#${spriteId}`);\n spriteElement.dispatchEvent(new CustomEvent(spriteEventName, { bubbles: true }));\n }\n\n cloneSpriteNode() {\n const spriteContainer = this.getOrCreateSpriteContainer();\n const spriteNode = spriteContainer.querySelector<HTMLElement>(`#tct-${this.type}`);\n this.iconClone = spriteNode ? (spriteNode.cloneNode(true) as SVGSymbolElement) : undefined;\n }\n\n setCustomSVGAttrs() {\n const innerSVG = this.hostElement.querySelector('svg');\n\n if (!innerSVG) return;\n\n innerSVG.setAttribute('role', 'img');\n innerSVG.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n const { label } = this;\n if (label) {\n const title = document.createElement('title');\n const labelId = `label-${createGuid()}`;\n title.id = labelId;\n title.textContent = label;\n innerSVG.appendChild(title);\n innerSVG.setAttribute('aria-labelledby', labelId);\n } else {\n innerSVG.setAttribute('aria-hidden', 'true');\n }\n }\n\n render() {\n const { label, type } = this;\n return this.isCustom ? (\n <slot />\n ) : (\n <svg\n aria-hidden={label ? undefined : 'true'}\n role=\"img\"\n aria-labelledby={label ? 'label' : undefined}\n viewBox={this.iconCloneViewBox}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {label && <title id=\"label\">{label}</title>}\n {!!type && <use ref={el => (this.spriteUse = el)} />}\n <g ref={el => (this.spriteGroup = el)}></g>\n </svg>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-icon2.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,EAAE,GAAG,OAAO,CAAC;YACnB,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC;YAC1B,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC5B,QAAQ,CAAC,YAAY,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;SACrD;aAAM;YACH,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;SAChD;KACJ;IAED,MAAM;QACF,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAC7B,OAAO,IAAI,CAAC,QAAQ,IAChB,eAAQ,KAER,0BACiB,KAAK,GAAG,SAAS,GAAG,MAAM,EACvC,IAAI,EAAC,KAAK,qBACO,KAAK,GAAG,OAAO,GAAG,SAAS,EAC5C,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAC9B,KAAK,EAAC,4BAA4B,IAEjC,KAAK,IAAI,aAAO,EAAE,EAAC,OAAO,IAAE,KAAK,CAAS,EAC1C,CAAC,CAAC,IAAI,IAAI,WAAK,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,GAAI,EACpD,SAAG,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,GAAM,CACzC,CACT,CAAC;KACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/q2-icon/q2-icon.scss?tag=q2-icon&encapsulation=shadow","src/components/q2-icon/q2-icon.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-block;\n height: var(--tct-icon-size, 24px);\n width: var(--tct-icon-size, 24px);\n position: relative;\n fill: none;\n}\n\n:host([inline]) {\n height: 1em;\n width: 1em;\n}\n\nsvg {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n stroke-width: var-list(--tct-icon-stroke-width, --t-icon-stroke-width, 1.5);\n stroke-linecap: var-list(--tct-icon-cap, --t-icon-cap, round);\n stroke-linejoin: var-list(--tct-icon-cap, --t-icon-cap, round);\n transition: var(--tct-icon-transition, none);\n}\n\n.stroke-primary {\n stroke: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.stroke-secondary {\n stroke: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.fill-primary {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.fill-secondary {\n fill: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.filled {\n fill: var-list(--tct-icon-fill, --comp-icon-fill, --t-icon-fill, none);\n transition: var(--tct-icon-fill-transition, none);\n}\n\n.uniform {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n:host([type='info']),\n:host([type='info-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-info, --const-stoplight-info, #0079c1)};\n}\n\n:host([type='success']),\n:host([type='success-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-success, --const-stoplight-success, #0e8a00)};\n}\n\n:host([type='warning']),\n:host([type='warning-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-warning, --const-stoplight-warning, #c35500)};\n}\n\n:host([type='error']),\n:host([type='error-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-status-color: #{var-list(--tct-stoplight-alert, --const-stoplight-alert, #d20a0a)};\n}\n","import { Component, ComponentInterface, Prop, h, Element, Watch, getAssetPath, State } from '@stencil/core';\nimport { createGuid } from 'src/utils';\nimport iconMap from './assets/icon-map.json';\n\n@Component({ tag: 'q2-icon', shadow: true, styleUrl: 'q2-icon.scss', assetsDirs: ['assets'] })\nexport class Q2Icon implements ComponentInterface {\n /** Styles the component to have a `height` and `width` of `1em`, making it easy to place alongside text. */\n @Prop({ reflect: true }) inline: boolean;\n\n /** The text that is presented by screen-readers when they encounter the icon. */\n @Prop({ reflect: true }) label: string;\n\n /** The name of the icon to be displayed. */\n @Prop({ reflect: true }) type: string;\n\n @Element() hostElement: HTMLElement;\n\n @State() iconClone: SVGSymbolElement;\n\n spriteGroup: SVGElement;\n spriteUse: SVGElement;\n\n componentWillLoad() {\n this.handleIcon();\n }\n\n componentDidRender(): void {\n if (!this.iconClone) return;\n this.spriteGroup?.firstElementChild?.remove();\n const appendedClone = this.spriteGroup?.appendChild(this.iconClone);\n\n // We have to set the `href` attribute after the symbol is appended to the DOM to avoid a bug in Safari\n this.spriteUse?.setAttribute('href', `#${appendedClone.id}`);\n }\n\n @Watch('type')\n handleIcon() {\n if (this.isCustom) {\n this.setCustomSVGAttrs();\n } else if (this.type) {\n this.fetchSprite();\n } else {\n this.iconClone = null;\n this.spriteGroup?.firstElementChild?.remove();\n }\n }\n\n get isCustom() {\n return this.type === 'custom';\n }\n\n get spriteFileName() {\n if (this.isCustom) return;\n return iconMap[this.type];\n }\n\n get spriteId() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tecton-sprite-${spriteFileName}`;\n }\n\n get spriteElement() {\n const { spriteId } = this;\n if (!spriteId) return;\n return document.querySelector<HTMLElement>(`#${spriteId}`);\n }\n\n get spriteEventName() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tct-loaded-${spriteFileName}`;\n }\n\n get iconCloneViewBox() {\n return this.iconClone?.getAttribute('viewBox') ?? '0 0 24 24';\n }\n\n /**\n * Checks for the sprite container element in the global DOM\n * If it does not exist, it creates and appends it to the body\n */\n getOrCreateSpriteContainer() {\n const spriteContainerId = 'tecton-sprites';\n let spriteContainer: HTMLDivElement = document.querySelector(`#${spriteContainerId}`);\n\n if (spriteContainer) return spriteContainer;\n spriteContainer = document.createElement('div');\n spriteContainer.id = spriteContainerId;\n spriteContainer.style.display = 'none';\n document.body.appendChild(spriteContainer);\n return spriteContainer;\n }\n\n checkForSprite() {\n const { spriteId, spriteEventName } = this;\n const spriteContainer = this.getOrCreateSpriteContainer();\n let spriteElement: HTMLElement = document.querySelector(`#${spriteId}`);\n\n // If the sprite element exists and has the `data-loaded` attribute, we know we have everything we need\n if (spriteElement?.hasAttribute('data-loaded') ?? false) {\n this.cloneSpriteNode();\n return true;\n }\n\n // If the sprite element exists but does not have the `data-loaded` attribute, we know it's being loaded\n // We'll listen for the event that will be dispatched when the sprite is loaded\n spriteContainer.addEventListener(\n spriteEventName,\n () => {\n this.cloneSpriteNode();\n },\n { once: true }\n );\n\n // If the sprite element exists, we know it's being loaded and will be handled by the event listener\n if (spriteElement) return true;\n\n // If sprite element does not exist, create a placeholder\n // This will let other icons know the sprite is being loaded\n spriteElement = document.createElement('div');\n spriteElement.id = spriteId;\n spriteContainer.appendChild(spriteElement);\n return false;\n }\n\n async fetchSprite() {\n const { spriteFileName, spriteId, spriteEventName } = this;\n\n const spriteExists = this.checkForSprite();\n if (spriteExists) return;\n\n if (!spriteFileName) return;\n const spritePath = getAssetPath(`assets/${spriteFileName}.symbol.svg`);\n const response = await fetch(spritePath);\n const data = await response.text();\n const wrappingDiv = document.createElement('div');\n wrappingDiv.innerHTML = data;\n const svg = wrappingDiv.querySelector('svg');\n\n svg.id = spriteId;\n svg.setAttribute('data-loaded', '');\n\n let { spriteElement } = this;\n if (spriteElement?.tagName === 'SVG') return;\n\n if (typeof spriteElement.replaceWith === 'function') {\n spriteElement.replaceWith(svg);\n } else {\n spriteElement.parentNode.replaceChild(svg, spriteElement);\n }\n\n spriteElement = document.querySelector(`#${spriteId}`);\n spriteElement.dispatchEvent(new CustomEvent(spriteEventName, { bubbles: true }));\n }\n\n cloneSpriteNode() {\n const spriteContainer = this.getOrCreateSpriteContainer();\n const spriteNode = spriteContainer.querySelector<HTMLElement>(`#tct-${this.type}`);\n this.iconClone = spriteNode ? (spriteNode.cloneNode(true) as SVGSymbolElement) : undefined;\n }\n\n setCustomSVGAttrs() {\n const innerSVG = this.hostElement.querySelector('svg');\n\n if (!innerSVG) return;\n\n innerSVG.setAttribute('role', 'img');\n innerSVG.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n const { label } = this;\n if (label) {\n const title = document.createElement('title');\n const labelId = `label-${createGuid()}`;\n title.id = labelId;\n title.textContent = label;\n innerSVG.appendChild(title);\n innerSVG.setAttribute('aria-labelledby', labelId);\n } else {\n innerSVG.setAttribute('aria-hidden', 'true');\n }\n }\n\n render() {\n const { label, type } = this;\n return this.isCustom ? (\n <slot />\n ) : (\n <svg\n aria-hidden={label ? undefined : 'true'}\n role=\"img\"\n aria-labelledby={label ? 'label' : undefined}\n viewBox={this.iconCloneViewBox}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {label && <title id=\"label\">{label}</title>}\n {!!type && <use ref={el => (this.spriteUse = el)} />}\n <g ref={el => (this.spriteGroup = el)}></g>\n </svg>\n );\n }\n}\n"],"version":3}
|
|
@@ -3424,7 +3424,7 @@ const Q2Input = /*@__PURE__*/ proxyCustomElement(class Q2Input extends HTMLEleme
|
|
|
3424
3424
|
}
|
|
3425
3425
|
/////// VIEW METHODS ///////
|
|
3426
3426
|
render() {
|
|
3427
|
-
return (h("div", { key: '
|
|
3427
|
+
return (h("div", { key: 'c9df59c45fbcc09f728eb6e3d8641e054c894f09', class: this.wrapperClasses }, h("div", { key: '44012c671d9d2d80ad0c8f748767c65d5dfac2bb', class: "label-wrapper" }, labelDOM(this), this.countDOM()), this.inputContainerDOM(), messagesDOM(this)));
|
|
3428
3428
|
}
|
|
3429
3429
|
countDOM() {
|
|
3430
3430
|
if (!this.showCount)
|
|
@@ -107,7 +107,7 @@ const Q2Item$1 = /*@__PURE__*/ proxyCustomElement(class Q2Item extends HTMLEleme
|
|
|
107
107
|
// #region Render methods
|
|
108
108
|
render() {
|
|
109
109
|
this.setClickable();
|
|
110
|
-
return (h(Fragment, { key: '
|
|
110
|
+
return (h(Fragment, { key: 'f28dc0f9497401dcb4ce1555bdab9223ff8ff3c7' }, h("div", { key: 'e498f45dca4844c91513997588a622bdb42a7fdf', class: this.itemClasses, ref: el => (this.itemElement = el) }, this.hasBulletSlotContent && (h("div", { key: '8ef1521965ac07d9e177d53e07ede1203c806ffd', class: this.bulletClasses }, h("slot", { key: 'caaccc58516682cda4f9bb26ea48678064b06c65', name: "bullet" }))), h("div", { key: '498610fb3d75898770db8bb3b791f459f7a40a69', class: this.mainClasses }, this.hasHeaderSlotContent && (h("div", { key: 'f30bf8cdc5730ec4ba0c2d7cea8e8207738011a6', class: "header" }, h("slot", { key: '440d538606c5ff5140b3b561d63a2fd673d47138', name: "header" }))), this.hasBodySlotContent && (h("div", { key: '4cd651689d95d10ddc56eb3e92dddc678ffefdb5', class: "body" }, h("slot", { key: 'f84f0ba303f82f44a1c57250ee31e07a62dd8e93', name: "body" })))), this.hasActionSlotContent && (h("div", { key: 'c7fbf9263d98030d8a6f9df86e930084e1b7e2e0', class: this.actionClasses }, h("slot", { key: '276fcb727912add5340348acf041a8e44fd7a922', name: "action" }))), this.hasFooterSlotContent && (h("div", { key: '36183283d76c09c6568451ce899698ffdb2f7821', class: this.footerClasses }, h("slot", { key: 'b3033c9de3a3aa4f7d92f287668ae45ce2d5cab3', name: "footer" }))))));
|
|
111
111
|
}
|
|
112
112
|
get hostElement() { return this; }
|
|
113
113
|
static get style() { return Q2ItemStyle0; }
|
|
@@ -71,7 +71,7 @@ const Q2List$1 = /*@__PURE__*/ proxyCustomElement(class Q2List extends HTMLEleme
|
|
|
71
71
|
// #endregion
|
|
72
72
|
// #region Render methods
|
|
73
73
|
render() {
|
|
74
|
-
return (h("div", { key: '
|
|
74
|
+
return (h("div", { key: 'ef12e85cdf00655dd1e4de9842cfe1119e1b2f07', class: this.listClasses, ref: el => (this.listElement = el) }, (this.hasFilterSlot || this.hasLabelContent) && (h("div", { key: 'e59c5a8f2b902da65aeb04068729272ea7ea5dfa', class: this.headerClasses }, h("div", { key: '0b47ebe4bda1c7659860391999040fb03c347bec', class: "label" }, this.label), this.hasFilterSlot && h("slot", { key: '5425288c72956ce7f6aef8dfaaed6e6082438b37', name: "filter" }))), h("div", { key: '5c9127ab0857bf561221e7e9c93122f02c6225ff', role: "list" }, h("slot", { key: '1fbbf5b970907686f0c6098d48aa0d5802ecdb06' }))));
|
|
75
75
|
}
|
|
76
76
|
get hostElement() { return this; }
|
|
77
77
|
static get style() { return Q2ListStyle0; }
|
|
@@ -13,7 +13,7 @@ const Q2Loc$1 = /*@__PURE__*/ proxyCustomElement(class Q2Loc extends HTMLElement
|
|
|
13
13
|
this.value = undefined;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return h("span", { key: '
|
|
16
|
+
return h("span", { key: '9329056c18d32c584e00169de61e49e63b6c1c64' }, loc(this.value, this.substitutions));
|
|
17
17
|
}
|
|
18
18
|
static get style() { return Q2LocStyle0; }
|
|
19
19
|
}, [1, "q2-loc", {
|
|
@@ -44,7 +44,7 @@ const Q2Message = /*@__PURE__*/ proxyCustomElement(class Q2Message extends HTMLE
|
|
|
44
44
|
const addDivForAriaLive = !isFirefox && this.presentToggle;
|
|
45
45
|
const { description } = this;
|
|
46
46
|
const messageLabel = loc(`tecton.element.message.type.${this.type ? this.type : 'info'}`);
|
|
47
|
-
return (h("div", { key: '
|
|
47
|
+
return (h("div", { key: 'd3ac196456bf95aef66663216c8d3732467d02af', tabindex: "-1", class: "message", role: description ? undefined : 'alert', "aria-live": description ? undefined : 'assertive', "aria-atomic": description ? undefined : 'true', "aria-relevant": description && addAriaHiddenForAriaLive ? undefined : 'all', "test-id": "messageContainer" }, this.appearance === 'standard' ? this.messageIcon(this.type) : '', addDivForAriaLive && h("div", { key: '86be85177e1d14f38466083a2726c8a8a16b8e0f', class: "sr" }), h("div", { key: '8b387b4815f0e01790d5fc82e23b8217b59571a4', class: "sr message-label" }, messageLabel), h("div", { key: 'b2486149d3c03d2af4c494ce3b9004890270e4b6', class: "message-content", "aria-hidden": addAriaHiddenForAriaLive ? 'true' : undefined }, h("slot", { key: '444300376f7085926dada56b71b44631dd0e1af2' }))));
|
|
48
48
|
}
|
|
49
49
|
messageIcon(type) {
|
|
50
50
|
const iconMap = {
|
|
@@ -139,10 +139,10 @@ const Q2MonthPicker$1 = /*@__PURE__*/ proxyCustomElement(class Q2MonthPicker ext
|
|
|
139
139
|
overrideFocus(this.hostElement);
|
|
140
140
|
}
|
|
141
141
|
render() {
|
|
142
|
-
return (h("div", { key: '
|
|
142
|
+
return (h("div", { key: '40462c486de4c00ec98af8e8a021d878b5d18617', class: "month-container", onKeyDown: this.onMonthKeydown }, h("div", { key: '44694fbe172115218b0ddf0085d7778a030b8e7f', class: "navigation" }, h("q2-btn", { key: 'dedfdcc6e6cf89f5467d30a124e5bcea507f87ae', class: "year-btn", onClick: () => this.viewChange.emit({
|
|
143
143
|
view: 'year',
|
|
144
144
|
selectedYear: this.year,
|
|
145
|
-
}) }, h("span", { key: '
|
|
145
|
+
}) }, h("span", { key: '0a15bed1946b1751d817b0ff447a70637a98e79f', class: "year" }, this.year), h("q2-icon", { key: '6e2086593a5c4494cee2fe3e97a74cb2764159c5', class: "year-icon off", type: "chevron-down" })), h("div", { key: 'ca2967da7d891974e39f0bad6ad65eecf508aa8a', class: "month-controller" }, h("div", { key: '4bc0cc50ec1eb084bad404a8b4173ed16644d99c', class: "cal-year-prev-next" }, h("q2-btn", { key: 'dcb43f067ee807ce10cd013cd1a658ce39982b0b', label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", "test-id": "previousYearButton", onClick: () => this.selectYear(this.year - 1) }, h("q2-icon", { key: '7a293700c3c5e9579abed00a017e13531bd9d25c', type: "arrow-left" })), h("q2-btn", { key: '2b4964e124d514a05697f44aa0c88071be3c8b29', label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", "test-id": "nextYearButton", onClick: () => this.selectYear(this.year + 1) }, h("q2-icon", { key: 'fab7dd9246253a50df0eb6a5713749f20da51a75', type: "arrow-right" }))))), h("div", { key: 'ea3eb812f453f6c482283876354723883f8ca72b', class: "month-list", onClick: this.onMonthSelection }, this.months.map((month, index) => (h("div", { class: "month" }, h("span", { role: "button", class: "month-button", "data-index": index, "aria-label": month.label, tabindex: index === this.focusedIndex ? 0 : -1 }, month.abbr))))), this.today && (h("div", { key: '212f3484b4479d4dee521216525738f3f3c4e806', class: "today-label" }, loc('tecton.element.calendar.today'), ": ", this.today))));
|
|
146
146
|
}
|
|
147
147
|
get hostElement() { return this; }
|
|
148
148
|
static get style() { return Q2MonthPickerStyle0; }
|
|
@@ -43,7 +43,7 @@ const Q2Optgroup = /*@__PURE__*/ proxyCustomElement(class Q2Optgroup extends HTM
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h("div", { key: '
|
|
46
|
+
return (h("div", { key: '3aaf75a370b64b14656b77ff6327bfa33f12527b', class: "q2-optgroup-container", hidden: this.hidden, "aria-labelledby": this.headerId, role: "group" }, h("div", { key: 'c480fcf81bab561cdf28caeef8873b6ecab4e561', class: "q2-optgroup-header", id: this.headerId }, (this.label && loc(this.label)) || ''), h("div", { key: '30690c2cc216d5d5a75c7a4a2bbdab34582bcb63', class: "q2-optgroup-options" }, h("slot", { key: '24f7a4146ef0f779724916e9b6461cb113228a14' }))));
|
|
47
47
|
}
|
|
48
48
|
get hostElement() { return this; }
|
|
49
49
|
static get watchers() { return {
|
|
@@ -538,7 +538,7 @@ const Q2OptionList = /*@__PURE__*/ proxyCustomElement(class Q2OptionList extends
|
|
|
538
538
|
}
|
|
539
539
|
/// DOM ///
|
|
540
540
|
render() {
|
|
541
|
-
return (h(Host, { key: '
|
|
541
|
+
return (h(Host, { key: 'd506ec65b607d11ce3131fb4084c2a9a1ae93aab' }, h("div", { key: 'a2fa4b5d44ce4c2682831a9f08ff5e2bca0bde9d', class: "content", ref: el => (this.contentElement = el), onFocusout: this.focusoutHandler }, h("div", { key: '75f5729faf1ad67eb678903e7f77d6b26523292a', class: "options", "aria-label": loc('tecton.element.optionList.label', [this.label]), "aria-multiselectable": `${!!this.multiple}`, role: this.type || 'listbox', onKeyDown: this.internalKeydownHandler, onClick: this.clickHandler }, h("slot", { key: '64fb06204cfc686108fdcbc1d395fe9d89dafd1a' })))));
|
|
542
542
|
}
|
|
543
543
|
get hostElement() { return this; }
|
|
544
544
|
static get watchers() { return {
|
|
@@ -59,7 +59,7 @@ const Q2Option = /*@__PURE__*/ proxyCustomElement(class Q2Option extends HTMLEle
|
|
|
59
59
|
render() {
|
|
60
60
|
const { disabled, disabledGroup, selected, _multiSelectHidden } = this;
|
|
61
61
|
const isDisabled = disabled || disabledGroup;
|
|
62
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '58f6fc4577543593b533107e116a679fd7a849f4', tabindex: "-1", "aria-disabled": isDisabled ? 'true' : undefined, "aria-selected": `${!!selected}`, "aria-hidden": _multiSelectHidden ? 'true' : undefined, display: this.display }, this.selected && h("q2-icon", { key: '8b754bbdc9d4048e1eca3cb80f31d759532ae465', type: "checkmark" }), h("div", { key: '5423d2646598552abb242551d02084f2bf037130', class: "content" }, h("slot", { key: 'cf874a77a90191d16bb4d824573e290c9492218c' }))));
|
|
63
63
|
}
|
|
64
64
|
get hostElement() { return this; }
|
|
65
65
|
static get style() { return Q2OptionStyle0; }
|
|
@@ -163,7 +163,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
163
163
|
total,
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
return (h("nav", { key: '
|
|
166
|
+
return (h("nav", { key: 'e1ec87b7e948c6cc5a24d3928c2b1998fcb6a37b', class: "container", ref: el => (this.containerElement = el), "aria-label": loc('tecton.element.pagination.title') }, h("div", { key: '785482436c658141a8aa6624cbfc6eca11775f8b', class: "description", "test-id": "description" }, pagesOnly
|
|
167
167
|
? loc('tecton.element.pagination.pages', {
|
|
168
168
|
current: page,
|
|
169
169
|
total: totalPages,
|
|
@@ -172,7 +172,7 @@ const Q2Pagination$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pagination exten
|
|
|
172
172
|
range: currentRange,
|
|
173
173
|
recordType: recordType.toLowerCase(),
|
|
174
174
|
total: total.toLocaleString(),
|
|
175
|
-
})), h("div", { key: '
|
|
175
|
+
})), h("div", { key: '0d0fb36e3b5082f0b2c4babc35016daa7a0bed54', class: "btn-group" }, h("q2-btn", { key: 'cacf48e70afc16726e46dc9e65d253552df63ed3', label: loc('tecton.element.pagination.goToFirstPage'), disabled: onFirstPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(1), "test-id": "firstPageBtn", "hide-label": true }, h("q2-icon", { key: '3f68f9da819aff69266171a341a90416a2548f0b', type: "chevron-double-left" })), h("q2-btn", { key: '14ed8f3c64f9ea326fc3d3e2127612e797623f89', label: prevButtonLabel, disabled: onFirstPage, onClick: () => this.handlePageChange(page - 1), "test-id": "prevPageBtn", "hide-label": true }, h("q2-icon", { key: '5dd7a5508bac7fd75998e53ebd7e60bf6609d16f', type: "chevron-left" }))), h("div", { key: 'bb69ef01ab83a147db8a4fa816009a3f9193afbd', class: "controls", hidden: isFullViewHidden, "test-id": "controls" }, h("span", { key: '85539bd9b93c3ebdaaf019093d94146497f68650', "aria-hidden": "true" }, loc('tecton.element.pagination.page')), h("div", { key: '555009e905094269eb19f97c6f0667e427257c27', class: "input-wrapper", onClick: () => this.inputField.dispatchEvent(new FocusEvent('focus')) }, h("q2-input", { key: 'e5e0035da111f8c4a4415dc88d9b1ec79431012d', type: "number", value: `${page}`, min: 1, max: this.totalPages, hideLabel: true, optional: true, label: `${loc('tecton.element.pagination.page')} (${loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()])})`, onChange: event => this.handlePageChange(event.detail.value), "test-id": "pageInput", current: "page", ref: el => (this.inputField = el) })), h("span", { key: 'f6601292c021519efcc37056e62dd7f613064ae1', "aria-hidden": "true" }, loc('tecton.element.pagination.ofPages', [totalPages.toLocaleString()]))), h("div", { key: '3d39cdaaabce849a11e1eb26ecd54372243fc794', class: "btn-group" }, h("q2-btn", { key: '57b30b51688f893d099e44c4cd92fa9470098903', label: nextButtonLabel, disabled: onLastPage, onClick: () => this.handlePageChange(page + 1), "test-id": "nextPageBtn", "hide-label": true }, h("q2-icon", { key: 'f26e80134b0689b0ea5220499ee05df32a41a9c5', type: "chevron-right" })), h("q2-btn", { key: '599e370274f82d9d352723468468dbb3ee281017', label: "tecton.element.pagination.goToLastPage", disabled: onLastPage, hidden: isFullViewHidden, onClick: () => this.handlePageChange(totalPages), "test-id": "lastPageBtn", "hide-label": true }, h("q2-icon", { key: '3bccd266db36da8dc0ce1911f1cb13299c4eab78', type: "chevron-double-right" })))));
|
|
176
176
|
}
|
|
177
177
|
get hostElement() { return this; }
|
|
178
178
|
static get watchers() { return {
|
|
@@ -266,7 +266,7 @@ const Q2Pill$1 = /*@__PURE__*/ proxyCustomElement(class Q2Pill extends HTMLEleme
|
|
|
266
266
|
wrapperClassNames.push('has-icon');
|
|
267
267
|
if (optionCount)
|
|
268
268
|
wrapperClassNames.push('has-options');
|
|
269
|
-
return (h("click-elsewhere", { key: '
|
|
269
|
+
return (h("click-elsewhere", { key: 'd10640befcd58192331ec2794e6c3edc1f8b6d00', onChange: this.onClickElsewhere }, h("div", { key: '60a4b94f080ce67c0e29bb62b0bcc0da9c4a3d21', class: wrapperClassNames.join(' ') }, h("div", { key: '06b6205a155cf8c5b9ede8368c0fa50de1a476a8', class: "btn-height-wrapper", ref: el => (this.primaryBtnWrapper = el), onClick: this.handleWrapperClick, tabIndex: -1 }, h("button", { key: '3eeb0fcb5a51723feba81be1ef033c5fd149b73c', class: "btn-primary", "test-id": "btn-control", type: "button", role: "combobox", ref: el => (this.primaryBtn = el), onClick: this.handleClick, onKeyDown: this.handleKeydown, onFocusout: this.handleButtonFocusout, disabled: this.disabled, "aria-roledescription": !optionCount && 'filter', "aria-controls": optionCount && 'option-list', "aria-expanded": (optionCount && `${!!open}`) || undefined, "aria-label": this.maxLength && this.buttonContent, "aria-describedby": (optionCount && 'option-description') || undefined }, this.truncatedButtonContent, !optionCount && active && h("span", { key: '15a0040c251a1e0e25946618dfdcbee0775d61b7', class: "sr" }, "(", loc('tecton.element.pill.active'), ")"))), this.generateIcon(), this.generateHiddenElement()), this.optionCount > 0 && (h("q2-popover", { key: 'ffa8513b720fd3aa501283a3e7a3c9a175665e6f', ref: el => (this.popoverElement = el), controlElement: this.primaryBtn, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment }, h("q2-option-list", { key: 'ecfcc0859cdb2e3b689ebca0f063f77074af7512', type: "listbox", ref: el => (this.optionList = el), id: "option-list", onChange: this.handleChange, multiple: this.multiple, selectedOptions: this.selectedOptions, onReady: () => this.updateSelectedOptionElements(), label: loc('tecton.element.optionList.label', [this.optionListLabel]) }, h("slot", { key: 'ce61a8e233cfbb0957f9c7b3934d4284dff36ddd' }))))));
|
|
270
270
|
}
|
|
271
271
|
get hostElement() { return this; }
|
|
272
272
|
static get watchers() { return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { k as handleDeprecationWarning, w as waitForNextPaint } from './index2.js';
|
|
3
3
|
|
|
4
|
-
const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.container{display:none}.show{display:block;
|
|
4
|
+
const q2PopoverCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #0066cc)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}.legacy.container{display:none}.legacy.show{display:block;z-index:var(--tct-popover-z-index, 50)}:popover-open,.show{position:absolute;margin:0;padding:0;overflow:auto;background:var(--tct-popover-background, var(--app-white, #ffffff));color:var(--tct-popover-font-color, var(--t-text, #4d4d4d));min-width:var(--tct-popover-min-width, 135px);margin-block:var(--tct-popover-margin-block, 0);box-shadow:var(--tct-popover-box-shadow, var(--app-shadow-1, 0px 0px 2px rgba(0, 0, 0, 0.12), 0px 2px 4px rgba(0, 0, 0, 0.14)));border-width:var(--tct-popover-border-width, 0);border-style:solid;border-color:var(--tct-popover-border-color, transparent);border-radius:var(--tct-popover-border-radius, 0);max-height:var(--comp-pop-max-height);left:var(--comp-pop-left);opacity:var(--comp-pop-opacity, 0);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}:popover-open.block,.show.block{right:unset;width:var(--comp-pop-width);min-width:var(--tct-popover-min-width, unset)}:popover-open.left,.show.left{left:var(--comp-pop-left);right:unset}:popover-open.right,.show.right{right:var(--comp-pop-right);left:unset}:popover-open.down,.show.down{top:var(--tct-popover-top, var(--comp-pop-top));bottom:unset}:popover-open.up,.show.up{top:unset;bottom:var(--comp-pop-bottom)}:popover-open::-webkit-scrollbar,.show::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}:popover-open::-webkit-scrollbar-thumb,.show::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}:popover-open::-webkit-scrollbar-track,.show::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}click-elsewhere{position:relative;display:block}";
|
|
5
5
|
const Q2PopoverStyle0 = q2PopoverCss;
|
|
6
6
|
|
|
7
7
|
const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLElement {
|
|
@@ -14,7 +14,6 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
14
14
|
* The number of pixels to leave between the popover and the edge of the viewport
|
|
15
15
|
*/
|
|
16
16
|
this.displayBuffer = 10;
|
|
17
|
-
/** remove when Popover API is supported in iOS */
|
|
18
17
|
this.orientationChanged = false;
|
|
19
18
|
/// Helpers ///
|
|
20
19
|
this.handleMinHeight = () => {
|
|
@@ -22,6 +21,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
22
21
|
handleDeprecationWarning(this, 'minHeight', 'prop');
|
|
23
22
|
}
|
|
24
23
|
};
|
|
24
|
+
this.handlePopoverToggleEvent = (event) => {
|
|
25
|
+
this.popoverStateChanged.emit({ open: event.newState === 'open' });
|
|
26
|
+
};
|
|
25
27
|
this.viewPortChanged = () => {
|
|
26
28
|
if (!this.open)
|
|
27
29
|
return;
|
|
@@ -31,9 +33,9 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
31
33
|
this.orientationChanged = true;
|
|
32
34
|
this.viewPortChanged();
|
|
33
35
|
};
|
|
34
|
-
this.
|
|
35
|
-
var _a, _b;
|
|
36
|
-
const { controlElement, containerElement, currentDirection } = this;
|
|
36
|
+
this.setPopoverAPICSSProperties = async () => {
|
|
37
|
+
var _a, _b, _c, _d, _e, _f;
|
|
38
|
+
const { controlElement, containerElement, currentDirection, isModule, align } = this;
|
|
37
39
|
const { top: controlTop, bottom: controlBottom, left: controlLeft, right: controlRight, } = (_b = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(controlElement)) !== null && _b !== void 0 ? _b : {
|
|
38
40
|
top: 0,
|
|
39
41
|
bottom: 0,
|
|
@@ -41,16 +43,32 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
41
43
|
right: 0,
|
|
42
44
|
};
|
|
43
45
|
const popoverLeft = controlLeft;
|
|
44
|
-
const popoverRight = window.visualViewport.width - controlRight;
|
|
46
|
+
const popoverRight = ((_c = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _c === void 0 ? void 0 : _c.width) - controlRight;
|
|
47
|
+
if (align === 'right') {
|
|
48
|
+
containerElement.style.setProperty('--comp-pop-right', `${popoverRight - window.scrollX}px`);
|
|
49
|
+
containerElement.style.setProperty('--comp-pop-left', 'unset');
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
containerElement.style.setProperty('--comp-pop-left', `${popoverLeft + window.scrollX}px`);
|
|
53
|
+
containerElement.style.setProperty('--comp-pop-right', 'unset');
|
|
54
|
+
}
|
|
45
55
|
if (this.block)
|
|
46
|
-
containerElement.style.setProperty('--comp-pop-width', `${controlElement.offsetWidth || 0}px`);
|
|
47
|
-
containerElement.style.setProperty('--comp-pop-left', `${popoverLeft}px`);
|
|
48
|
-
containerElement.style.setProperty('--comp-pop-right', `${popoverRight}px`);
|
|
56
|
+
containerElement.style.setProperty('--comp-pop-width', `${(controlElement === null || controlElement === void 0 ? void 0 : controlElement.offsetWidth) || 0}px`);
|
|
49
57
|
if (currentDirection === 'up') {
|
|
50
|
-
|
|
58
|
+
if (isModule) {
|
|
59
|
+
containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop}px`);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
containerElement.style.setProperty('--comp-pop-bottom', `${window.innerHeight - controlTop - ((_d = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) - window.scrollY}px`);
|
|
63
|
+
}
|
|
51
64
|
}
|
|
52
65
|
if (currentDirection === 'down') {
|
|
53
|
-
|
|
66
|
+
if (isModule) {
|
|
67
|
+
containerElement.style.setProperty('--comp-pop-top', `${controlBottom}px`);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
containerElement.style.setProperty('--comp-pop-top', `${controlBottom + ((_f = (_e = window === null || window === void 0 ? void 0 : window.visualViewport) === null || _e === void 0 ? void 0 : _e.offsetTop) !== null && _f !== void 0 ? _f : 0) + window.scrollY}px`);
|
|
71
|
+
}
|
|
54
72
|
}
|
|
55
73
|
// Wait for one paint to prevent layout thrashing
|
|
56
74
|
await waitForNextPaint();
|
|
@@ -81,7 +99,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
81
99
|
containerElement.style.setProperty('--comp-pop-opacity', '1');
|
|
82
100
|
};
|
|
83
101
|
this.direction = undefined;
|
|
84
|
-
this.align =
|
|
102
|
+
this.align = 'left';
|
|
85
103
|
this.open = undefined;
|
|
86
104
|
this.block = undefined;
|
|
87
105
|
this.controlElement = undefined;
|
|
@@ -91,13 +109,25 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
91
109
|
this.show = false;
|
|
92
110
|
}
|
|
93
111
|
/// Lifecycle hooks ///
|
|
112
|
+
componentWillLoad() {
|
|
113
|
+
if (!this.supportsPopoverAPI) {
|
|
114
|
+
console.warn('The Popover API is not supported in this browser. Please update your browser to the latest version. The component will use legacy mode.');
|
|
115
|
+
this.mode = 'legacy';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
94
118
|
componentDidLoad() {
|
|
95
119
|
this.handleMinHeight();
|
|
120
|
+
if (this.supportsPopoverAPI)
|
|
121
|
+
this.containerElement.addEventListener('toggle', this.handlePopoverToggleEvent);
|
|
96
122
|
if (this.open)
|
|
97
123
|
this.determinePopDirection();
|
|
98
124
|
}
|
|
99
125
|
disconnectedCallback() {
|
|
100
126
|
this.removeViewportListeners();
|
|
127
|
+
this.containerElement.removeEventListener('toggle', this.handlePopoverToggleEvent);
|
|
128
|
+
this.containerElement = null;
|
|
129
|
+
this.contentElement = null;
|
|
130
|
+
this.controlElement = null;
|
|
101
131
|
}
|
|
102
132
|
/// Methods ///
|
|
103
133
|
async toggle() {
|
|
@@ -116,7 +146,12 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
116
146
|
else {
|
|
117
147
|
this.removeViewportListeners();
|
|
118
148
|
this.currentDirection = undefined;
|
|
119
|
-
this.
|
|
149
|
+
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
150
|
+
this.show = false;
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
this.containerElement.hidePopover();
|
|
154
|
+
}
|
|
120
155
|
await waitForNextPaint();
|
|
121
156
|
this.clearCSSProperties();
|
|
122
157
|
}
|
|
@@ -133,7 +168,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
133
168
|
event.stopPropagation();
|
|
134
169
|
}
|
|
135
170
|
/// Getters ///
|
|
136
|
-
get
|
|
171
|
+
get providedDirection() {
|
|
137
172
|
const { direction } = this;
|
|
138
173
|
switch (direction) {
|
|
139
174
|
case 'up':
|
|
@@ -149,23 +184,24 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
149
184
|
const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
|
|
150
185
|
return isIframe && hasPlatformDimensions;
|
|
151
186
|
}
|
|
187
|
+
get supportsPopoverAPI() {
|
|
188
|
+
return Object.hasOwn(HTMLElement.prototype, 'popover');
|
|
189
|
+
}
|
|
152
190
|
addViewportListeners() {
|
|
153
191
|
var _a;
|
|
154
192
|
window.addEventListener('resize', this.viewPortOrientationChanged);
|
|
155
|
-
|
|
193
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.viewPortChanged);
|
|
156
194
|
window.addEventListener('scroll', this.viewPortChanged, { passive: true, capture: true });
|
|
157
|
-
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('
|
|
195
|
+
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
158
196
|
window.addEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
159
|
-
// #endregion
|
|
160
197
|
}
|
|
161
198
|
removeViewportListeners() {
|
|
162
199
|
var _a;
|
|
163
200
|
window.removeEventListener('resize', this.viewPortOrientationChanged);
|
|
164
|
-
|
|
201
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.viewPortChanged);
|
|
165
202
|
window.removeEventListener('scroll', this.viewPortChanged);
|
|
166
203
|
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
167
204
|
window.removeEventListener('orientationchange', this.viewPortOrientationChanged);
|
|
168
|
-
// #endregion
|
|
169
205
|
}
|
|
170
206
|
clearCSSProperties() {
|
|
171
207
|
this.containerElement.style.removeProperty('--comp-pop-max-height');
|
|
@@ -183,17 +219,18 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
183
219
|
if (!isOpen)
|
|
184
220
|
return;
|
|
185
221
|
this.currentDirection = direction;
|
|
186
|
-
this.
|
|
187
|
-
|
|
222
|
+
if (this.mode === 'legacy' || !this.supportsPopoverAPI) {
|
|
223
|
+
this.show = true;
|
|
188
224
|
this.setAbsoluteCSSProperties();
|
|
189
225
|
}
|
|
190
226
|
else {
|
|
191
|
-
this.
|
|
227
|
+
this.setPopoverAPICSSProperties();
|
|
228
|
+
this.containerElement.showPopover();
|
|
192
229
|
}
|
|
193
230
|
}
|
|
194
231
|
async determinePopDirection() {
|
|
195
232
|
var _a, _b, _c;
|
|
196
|
-
const { containerElement, controlElement,
|
|
233
|
+
const { containerElement, controlElement, providedDirection, displayBuffer } = this;
|
|
197
234
|
if (containerElement)
|
|
198
235
|
containerElement.style.maxHeight = null;
|
|
199
236
|
await waitForNextPaint();
|
|
@@ -206,16 +243,14 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
206
243
|
let maxSpaceAbove;
|
|
207
244
|
let maxSpaceBelow;
|
|
208
245
|
if (isModule) {
|
|
209
|
-
const
|
|
246
|
+
const { outletOffset = 0, innerHeight = window.innerHeight } = ((_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) || {};
|
|
210
247
|
const distanceToIframeBottom = window.visualViewport.height - controlBottom;
|
|
211
|
-
const viewableSpaceBelow =
|
|
248
|
+
const viewableSpaceBelow = innerHeight - (outletOffset + controlBottom);
|
|
212
249
|
const isIframeShorterThanWindow = distanceToIframeBottom < viewableSpaceBelow;
|
|
213
|
-
windowHeight =
|
|
250
|
+
windowHeight = innerHeight;
|
|
214
251
|
// If the top of the module is below the top of the window we just use the controlTop
|
|
215
252
|
// Otherwise we need to add the outletOffset to the controlTop
|
|
216
|
-
maxSpaceAbove =
|
|
217
|
-
(platformDimensions.outletOffset > 0 ? controlTop : controlTop + platformDimensions.outletOffset) -
|
|
218
|
-
displayBuffer;
|
|
253
|
+
maxSpaceAbove = (outletOffset > 0 ? controlTop : controlTop + outletOffset) - displayBuffer;
|
|
219
254
|
maxSpaceBelow = isIframeShorterThanWindow
|
|
220
255
|
? distanceToIframeBottom - displayBuffer
|
|
221
256
|
: viewableSpaceBelow - displayBuffer;
|
|
@@ -230,7 +265,7 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
230
265
|
const shouldUpdateMaxHeight = !containerElement.style.getPropertyValue('--comp-pop-max-height') || this.orientationChanged;
|
|
231
266
|
// we do not want to constantly update the max-height after an orientation change, so we switch this back to false
|
|
232
267
|
this.orientationChanged = false;
|
|
233
|
-
const currentOrDetermineDirection = this.currentDirection ||
|
|
268
|
+
const currentOrDetermineDirection = this.currentDirection || providedDirection || directionWithMostSpace;
|
|
234
269
|
switch (currentOrDetermineDirection) {
|
|
235
270
|
case 'up':
|
|
236
271
|
if (shouldUpdateMaxHeight) {
|
|
@@ -248,12 +283,14 @@ const Q2Popover = /*@__PURE__*/ proxyCustomElement(class Q2Popover extends HTMLE
|
|
|
248
283
|
}
|
|
249
284
|
/// DOM ///
|
|
250
285
|
render() {
|
|
251
|
-
const containerClasses = ['container', this.currentDirection];
|
|
286
|
+
const containerClasses = ['container', this.currentDirection, this.align];
|
|
252
287
|
if (this.show)
|
|
253
288
|
containerClasses.push('show');
|
|
289
|
+
if (this.block)
|
|
290
|
+
containerClasses.push('block');
|
|
254
291
|
if (this.mode === 'legacy')
|
|
255
292
|
containerClasses.push('legacy');
|
|
256
|
-
return (h("div", { key: '
|
|
293
|
+
return (h("div", { key: '614ba5a1899298de8704a4496d6f35b033ee273c', ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer", tabIndex: -1, popover: "auto" }, h("div", { key: '0f56f5850fad033e7ce7d93f8562d7e1355354a9', ref: el => (this.contentElement = el), class: "content" }, h("slot", { key: '68aceadd8c4be1f9eff1384ad21f611b51bcdfdb' }))));
|
|
257
294
|
}
|
|
258
295
|
get hostElement() { return this; }
|
|
259
296
|
static get watchers() { return {
|