q2-tecton-elements 1.48.1-alpha.0 → 1.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +73 -28
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-c9a86a33.js → index-f69742cf.js} +1 -1
- package/dist/cjs/{index-c9a86a33.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 +3 -3
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- 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 +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/q2-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 +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-input.cjs.entry.js +2 -2
- package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-legend.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.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +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 +56 -8
- 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-vertical.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +2 -2
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +5 -6
- 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.css +0 -2
- 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.css +0 -2
- package/dist/collection/components/q2-checkbox/q2-checkbox.js +1 -1
- package/dist/collection/components/q2-checkbox-group/q2-checkbox-group.css +1 -7
- 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 +1 -1
- package/dist/collection/components/q2-input/q2-input.css +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-legend/q2-legend.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 +74 -28
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-radio/q2-radio.js +1 -1
- package/dist/collection/components/q2-radio-group/q2-radio-group.css +2 -4
- 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.css +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-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/q2-textarea/q2-textarea.css +2 -2
- package/dist/collection/components/q2-textarea/q2-textarea.js +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/components/index.js +0 -2
- package/dist/components/index.js.map +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 +2 -2
- package/dist/components/q2-calendar.js.map +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 +2 -2
- package/dist/components/q2-checkbox-group.js.map +1 -1
- package/dist/components/q2-checkbox2.js +2 -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.js +1 -1
- package/dist/components/q2-editable-field.js +1 -1
- package/dist/components/q2-input2.js +2 -2
- package/dist/components/q2-input2.js.map +1 -1
- package/dist/components/q2-item.js +1 -1
- package/dist/components/q2-legend2.js +1 -1
- package/dist/components/q2-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 +73 -28
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-radio-group.js +2 -2
- package/dist/components/q2-radio-group.js.map +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +58 -10
- 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/q2-textarea.js +2 -2
- package/dist/components/q2-textarea.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/click-elsewhere_2.entry.js +73 -28
- package/dist/esm/click-elsewhere_2.entry.js.map +1 -1
- package/dist/esm/{index-8582f46d.js → index-3184c760.js} +1 -1
- package/dist/esm/{index-8582f46d.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 +3 -3
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- 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 +2 -2
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +2 -2
- 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 +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-input.entry.js +2 -2
- package/dist/esm/q2-input.entry.js.map +1 -1
- package/dist/esm/q2-item.entry.js +1 -1
- package/dist/esm/q2-legend.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.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-radio-group.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js.map +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 +57 -9
- 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-vertical.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +2 -2
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/jest.setup.js +22 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{p-7dafc5da.entry.js → p-044b8914.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d35de465.entry.js → p-07f40176.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-0a211fb4.entry.js +2 -0
- package/dist/q2-tecton-elements/p-0a211fb4.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-e793a82c.entry.js → p-0d73466a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4008aceb.entry.js → p-11982614.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-35cc1039.entry.js → p-132005d2.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-fcffc029.entry.js → p-149044cd.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-1a628982.entry.js +2 -0
- package/dist/q2-tecton-elements/p-1a628982.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-828850c1.entry.js → p-1d824cdf.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-25a0f807.entry.js +2 -0
- package/dist/q2-tecton-elements/p-25a0f807.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-9b65cc28.entry.js → p-28b0de1c.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-ced89010.entry.js → p-3dff9fb0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d32f8e53.entry.js → p-432532fe.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js → p-46085a34.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js → p-4740e969.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-258f8c9c.entry.js → p-502af427.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-dfa489ba.entry.js → p-5214296a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-32130845.entry.js → p-572805fc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-6e313705.entry.js → p-644d5b2e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-30d70f4a.entry.js → p-68276771.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-43236cac.entry.js → p-6af21a10.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-f57c4448.entry.js → p-6be0e333.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-400f6071.entry.js → p-77e6704d.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-400f6071.entry.js.map → p-77e6704d.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-9a5695db.entry.js → p-7deda459.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3f665c56.entry.js → p-84fc61f5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d75e4752.entry.js → p-85a7b1ab.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js → p-8734e1cb.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7cbb989e.entry.js → p-a2caa101.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-49ecdf18.entry.js → p-ca17f7ca.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-30296b0e.entry.js → p-cfabf5d1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-0d6edd2a.entry.js → p-d5776227.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-56dd051a.entry.js → p-d5c182d8.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-bc73f69c.entry.js → p-d6c8d94d.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-861e83de.entry.js → p-de2f3111.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-def9be7b.entry.js +2 -0
- package/dist/q2-tecton-elements/p-def9be7b.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-e786ba03.entry.js +2 -0
- package/dist/q2-tecton-elements/p-e786ba03.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-eb45704f.entry.js +2 -0
- package/dist/q2-tecton-elements/p-eb45704f.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-b6bcef6a.js → p-f1e887f5.js} +1 -1
- package/dist/q2-tecton-elements/p-fe1f1ff4.entry.js +2 -0
- package/dist/q2-tecton-elements/p-fe1f1ff4.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-4b47816d.entry.js → p-fe2fd83b.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-366a92d9.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/q2-calendar-test.e2e.js +2 -2
- 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 +750 -435
- package/dist/test/elements/q2-popover-test.spec.js.map +1 -1
- package/dist/test/elements/q2-relative-time-test.e2e.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 +223 -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 +50 -0
- package/dist/types/components/q2-editable-field/q2-editable-field.d.ts +140 -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 +60 -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 +239 -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/components.d.ts +0 -21
- package/dist/types/utils/action-sheet.d.ts +12 -0
- package/package.json +5 -5
- package/dist/cjs/q2-form.cjs.entry.js +0 -23
- package/dist/cjs/q2-form.cjs.entry.js.map +0 -1
- package/dist/collection/components/q2-form/q2-form.css +0 -92
- package/dist/collection/components/q2-form/q2-form.js +0 -44
- package/dist/collection/components/q2-form/q2-form.js.map +0 -1
- package/dist/components/q2-form.d.ts +0 -11
- package/dist/components/q2-form.js +0 -39
- package/dist/components/q2-form.js.map +0 -1
- package/dist/esm/q2-form.entry.js +0 -19
- package/dist/esm/q2-form.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-19da46dc.entry.js +0 -2
- package/dist/q2-tecton-elements/p-19da46dc.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2878a662.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2878a662.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-2a8de00d.entry.js +0 -2
- package/dist/q2-tecton-elements/p-2a8de00d.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-79696bef.entry.js +0 -2
- package/dist/q2-tecton-elements/p-79696bef.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-8a8d51f1.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8a8d51f1.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-8e60bcaa.entry.js +0 -2
- package/dist/q2-tecton-elements/p-8e60bcaa.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-fde11d9c.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fde11d9c.entry.js.map +0 -1
- package/dist/q2-tecton-elements/p-fec9edc8.entry.js +0 -2
- package/dist/q2-tecton-elements/p-fec9edc8.entry.js.map +0 -1
- package/dist/test/elements/q2-form-test.e2e.js +0 -93
- package/dist/test/elements/q2-form-test.e2e.js.map +0 -1
- package/dist/types/components/q2-form/q2-form.d.ts +0 -6
- /package/dist/q2-tecton-elements/{p-7dafc5da.entry.js.map → p-044b8914.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d35de465.entry.js.map → p-07f40176.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e793a82c.entry.js.map → p-0d73466a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4008aceb.entry.js.map → p-11982614.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-35cc1039.entry.js.map → p-132005d2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-fcffc029.entry.js.map → p-149044cd.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-828850c1.entry.js.map → p-1d824cdf.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9b65cc28.entry.js.map → p-28b0de1c.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-ced89010.entry.js.map → p-3dff9fb0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d32f8e53.entry.js.map → p-432532fe.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js.map → p-46085a34.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js.map → p-4740e969.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-258f8c9c.entry.js.map → p-502af427.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-dfa489ba.entry.js.map → p-5214296a.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-32130845.entry.js.map → p-572805fc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-6e313705.entry.js.map → p-644d5b2e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-30d70f4a.entry.js.map → p-68276771.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-43236cac.entry.js.map → p-6af21a10.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-f57c4448.entry.js.map → p-6be0e333.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9a5695db.entry.js.map → p-7deda459.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-3f665c56.entry.js.map → p-84fc61f5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d75e4752.entry.js.map → p-85a7b1ab.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js.map → p-8734e1cb.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7cbb989e.entry.js.map → p-a2caa101.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-49ecdf18.entry.js.map → p-ca17f7ca.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-30296b0e.entry.js.map → p-cfabf5d1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-0d6edd2a.entry.js.map → p-d5776227.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-56dd051a.entry.js.map → p-d5c182d8.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-bc73f69c.entry.js.map → p-d6c8d94d.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-861e83de.entry.js.map → p-de2f3111.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-aed969d4.entry.js.map → p-e654d2d6.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-b6bcef6a.js.map → p-f1e887f5.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4b47816d.entry.js.map → p-fe2fd83b.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-366a92d9.entry.js.map → p-ff39ba49.entry.js.map} +0 -0
- /package/dist/types/{workspace/workspace/on-production_release_1.48.0-pre → 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/on-production_release_1.48.0-pre → builds/q2e/development/tecton/tecton}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-radio-group.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,8wFAA8wF,CAAC;AACvyF,2BAAe,eAAe;;MCejBA,cAAY;;;;;;QA0CrB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QAW5C,uBAAkB,GAAG;YACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC9B,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,IAAI,CAAC,eAAe,EAAE,CAAC;YACvB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC3C,CAAC;QAEF,uBAAkB,GAAG,CAAC,KAAkB;YACpC,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO;YAE1B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;SACnD,CAAC;QAEF,uBAAkB,GAAG;;YAEjB,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,IAAI,K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GAAG,IAAI,CAAC;YAC/B,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,aAAa,GAAG,QAAQ,CAAC;YACjG,QACI,WAAK,KAAK,EAAE,kBAAkB,SAAS,EAAE,IACrC,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,CACJ,EACR;SACL;aAAM;YACH,QACI,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,EACR;SACL;KACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2RadioGroup"],"sources":["src/components/q2-radio-group/q2-radio-group.scss?tag=q2-radio-group&encapsulation=shadow","src/components/q2-radio-group/q2-radio-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-default-radio-group-margin: #{var-list(var-prefixer(radio-group-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(radio-group-margin-bottom), --app-scale-5x, 25px)};\n display: block;\n margin: var-list(--tct-radio-group-margin, --comp-default-radio-group-margin);\n}\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n gap: var-list(--app-scale-1x, 5px);\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\n}\n\n.group-legend {\n font-weight: 600;\n}\n\n.optional-tag {\n margin-left: var-list(var-prefixer(input-label-optional-margin-left), --tct-scale-1, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(input-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(input-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(input-label-optional-font-weight), 400);\n}\n\n.tile-container {\n &,\n .options-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n flex-grow: 1;\n }\n}\n\n.options-container {\n --comp-default-margin: #{var-list(--app-scale-1x, 5px)} 0;\n --comp-options-margin: #{var-list(var-prefixer(radio-group-options-margin), --comp-default-margin, unquote('5px 0'))};\n margin: var(--comp-options-margin);\n padding: var-list(var-prefixer(radio-group-options-padding), --app-scale-0x, 0px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-border-radius-1, --app-border-radius-1, 2px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-input-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.tile-container {\n &.left {\n justify-content: start;\n }\n &.right {\n justify-content: end;\n }\n\n .options-container {\n gap: var-list(var-prefixer(radio-group-tile-gap), --app-scale-2x, 10px);\n justify-content: inherit;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true }) name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true }) tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true }) tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true }) value: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) tilelayout: boolean;\n\n @Element() hostElement: HTMLElement;\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n /////// LIFECYCLE HOOK ///////\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n /////// OBSERVERS ///////\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n /////// HOST ELEMENT EVENTS ///////\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string }>;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = showLabel || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={`${this.hasError}`}\n >\n {showLabel && <legend class=\"sr\">{labelDOM(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-radio-group.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,sgFAAsgF,CAAC;AAC/hF,2BAAe,eAAe;;MCejBA,cAAY;;;;;;QA0CrB,QAAG,GAAW,eAAe,UAAU,EAAE,EAAE,CAAC;QAW5C,uBAAkB,GAAG;YACjB,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,C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CAAC;QAC3C,QACI,EAAC,QAAQ,uDACJ,YAAY,KACT,4DAAK,KAAK,EAAC,WAAW,IACjB,SAAS,IAAI,4DAAK,KAAK,EAAC,cAAc,IAAE,QAAQ,CAAC,IAAI,CAAC,CAAO,EAC7D,QAAQ,KACL,gEACI,IAAI,EAAC,OAAO,aACJ,WAAW,GACZ,CACd,CACC,CACT,EACD,iEACI,QAAQ,EAAE,IAAI,CAAC,kBAAkB,kBACnB,GAAG,IAAI,CAAC,QAAQ,EAAE,IAE/B,SAAS,IAAI,+DAAQ,KAAK,EAAC,IAAI,IAAE,QAAQ,CAAC,IAAI,CAAC,CAAU,EACzD,IAAI,CAAC,QAAQ,EAAE,CACT,CACJ,EACb;KACL;IAED,QAAQ;QACJ,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;YAC/B,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,aAAa,GAAG,QAAQ,CAAC;YACjG,QACI,WAAK,KAAK,EAAE,kBAAkB,SAAS,EAAE,IACrC,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,CACJ,EACR;SACL;aAAM;YACH,QACI,WAAK,KAAK,EAAC,mBAAmB,IAC1B,eAAQ,CACN,EACR;SACL;KACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["Q2RadioGroup"],"sources":["src/components/q2-radio-group/q2-radio-group.scss?tag=q2-radio-group&encapsulation=shadow","src/components/q2-radio-group/q2-radio-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n margin-top: var-list(--tct-scale-2, --app-scale-2x, 10px);\n}\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n position: relative;\n}\n\n.label-row {\n display: grid;\n grid-template-columns: 1fr 24px;\n grid-template-areas: 'label icon';\n gap: var-list(--app-scale-1x, 5px);\n\n q2-icon {\n grid-area: icon;\n margin-top: -2px;\n margin-bottom: -2px;\n }\n}\n\n.group-legend {\n font-weight: 600;\n}\n\n.optional-tag {\n margin-left: var-list(var-prefixer(input-label-optional-margin-left), --tct-scale-1, --app-scale-1x, 5px);\n color: var-list(\n var-prefixer(input-label-optional-font-color),\n --t-textA,\n --t-a11y-gray-color,\n rgba(77, 77, 77, 0.77)\n );\n font-size: var-list(var-prefixer(input-label-optional-font-size), 12px);\n font-weight: var-list(var-prefixer(input-label-optional-font-weight), 400);\n}\n\n.tile-container {\n &,\n .options-container {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-wrap: wrap;\n flex-grow: 1;\n }\n}\n\n.options-container {\n --comp-default-margin: #{var-list(--app-scale-1x, 5px)} 0;\n --comp-options-margin: #{var-list(var-prefixer(radio-group-options-margin), --comp-default-margin, unquote('5px 0'))};\n margin: var(--comp-options-margin);\n padding: var-list(var-prefixer(radio-group-options-padding), --app-scale-1x, 5px);\n border-width: 1px;\n border-color: transparent;\n border-style: solid;\n border-radius: var-list(--tct-border-radius-1, --app-border-radius-1, 2px);\n\n :host([has-error]) & {\n border-color: var-list(--tct-input-error-border-color, --const-stoplight-alert, #d20a0a);\n }\n :host([has-error='false']) & {\n border-color: transparent;\n }\n}\n\n.tile-container {\n &.left {\n justify-content: start;\n }\n &.right {\n justify-content: end;\n }\n\n .options-container {\n gap: var-list(var-prefixer(radio-group-tile-gap), --app-scale-2x, 10px);\n justify-content: inherit;\n }\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Fragment,\n Method,\n} from '@stencil/core';\nimport { createGuid, isEventFromElement, overrideFocus, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-radio-group', shadow: true, styleUrl: 'q2-radio-group.scss' })\nexport class Q2RadioGroup implements ComponentInterface {\n /** Determines if all radios in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean = false;\n\n /**\n * Hide's the group's `<label>` element from view.\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Text for the fieldset legend describing the radio group.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Identifier which ties all radios together for accessibility and DOM selection. */\n @Prop({ reflect: true }) name: string;\n\n /** Appends \"(optional)\" to the group label, and sets `aria-required` on the nested input tag to `false`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all radios in the group can be focused, but not interacted with. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** Provides alignment direction for tile-style radio group. */\n @Prop({ reflect: true }) tileAlignment: 'left' | 'center' | 'right' = 'center';\n\n /** Show the radio group as a horizontal set of tiles. */\n @Prop({ reflect: true, mutable: true }) tileLayout: boolean;\n\n /** The `value` of the currently selected `q2-radio` within the `q2-radio-group`. */\n @Prop({ mutable: true }) value: string;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) tilelayout: boolean;\n\n @Element() hostElement: HTMLElement;\n _id: string = `radio-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get radioElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-radio')) as HTMLQ2RadioElement[];\n }\n\n onMutationObserved = () => {\n this.valueUpdated(this.value);\n this.nameUpdated();\n this.disabledUpdated();\n this.readonlyUpdated();\n this.tileLayoutUpdated(this.tileLayout);\n };\n\n onInnerRadioChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n if (this.readonly) return;\n\n this.change.emit({ value: event.detail.value });\n };\n\n checkedRadioExists = () => {\n // Returns first checked individual q2-radio or undefined if none are set to checked={true}\n const firstCheckedRadio = this.radioElements.find(radio => radio.checked === true) || undefined;\n\n // Changes radio-group[\"value\"] if inital value is not set and if a any individual q2-radio is checked\n if (!this.value && !!firstCheckedRadio) {\n this.value = firstCheckedRadio.value;\n } else if (!this.value && !firstCheckedRadio) {\n // if no radios are meant to be checked, then assign first radio tabIndex of 0\n if (this.radioElements.length) this.radioElements[0].tabIndex = 0;\n }\n };\n\n /////// LIFECYCLE HOOK ///////\n componentWillLoad() {\n this.checkedRadioExists();\n this.onMutationObserved();\n this.handleDeprecatedTilelayout(this.tilelayout);\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true });\n this.mutationObserver = observer;\n overrideFocus(this.hostElement);\n this.checkedRadioExists();\n }\n\n /////// OBSERVERS ///////\n\n @Watch('value')\n valueUpdated(newVal: string) {\n this.radioElements.forEach(radio => {\n radio.checked = newVal === radio.value;\n // Removes checked attribute from trailing radios, if multiple individual radio's are intially checked (checked={true}) at componentDidLoad\n if (!radio.checked) {\n radio.removeAttribute('checked');\n radio.tabIndex = -1;\n } else if (radio.checked) {\n radio.tabIndex = 0;\n }\n });\n }\n\n @Watch('name')\n nameUpdated() {\n this.radioElements.forEach(radio => {\n radio.name = this.name || this._id;\n });\n }\n\n @Watch('disabled')\n disabledUpdated() {\n this.radioElements.forEach(radio => {\n radio.groupDisabled = this.disabled;\n });\n }\n\n @Watch('readonly')\n readonlyUpdated() {\n const readonly = this.readonly;\n this.radioElements.forEach(radio => (radio.groupReadonly = readonly));\n }\n\n @Watch('tilelayout')\n handleDeprecatedTilelayout(tilelayout: boolean) {\n if (typeof tilelayout !== 'boolean') return;\n this.tileLayout = tilelayout;\n this.tilelayout = undefined;\n }\n\n @Watch('tileLayout')\n tileLayoutUpdated(tileLayout: boolean) {\n this.radioElements.forEach(radio => {\n radio.groupTileLayout = tileLayout;\n });\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-radio>` option with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(value: string) {\n this.radioElements.forEach(radio => {\n if (value !== radio.value) return;\n radio.click();\n });\n }\n\n /////// HOST ELEMENT EVENTS ///////\n\n /**\n * Emitted when the value of the radio group changes.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string }>;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement) {\n if (!this.hostElement.onchange) {\n this.value = event.detail.value;\n }\n }\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n const radio = this.hostElement.querySelector('q2-radio[checked]') || this.hostElement.querySelector('q2-radio');\n radio?.dispatchEvent(new FocusEvent('focus'));\n }\n\n @Listen('keydown')\n keydownHandler(event: KeyboardEvent) {\n const currentValue = (event.target as HTMLElement).getAttribute('value') || this.value;\n let index = this.radioElements.findIndex(\n el => el === event.target || (el as HTMLElement).getAttribute('value') === currentValue\n );\n let sign = 0;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n sign = -1;\n break;\n\n case 'ArrowRight':\n case 'ArrowDown':\n sign = 1;\n break;\n }\n\n if (index === -1 || sign === 0) {\n return;\n }\n index += sign;\n index = sign < 0 ? Math.max(0, index) : Math.min(this.radioElements.length - 1, index);\n event.preventDefault();\n if (!this.readonly) {\n this.value = this.radioElements[index].value;\n }\n this.radioElements[index].dispatchEvent(new FocusEvent('focus'));\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n const { hasError } = this;\n const showLabelRow = showLabel || hasError;\n return (\n <Fragment>\n {showLabelRow && (\n <div class=\"label-row\">\n {showLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n {hasError && (\n <q2-icon\n type=\"error\"\n test-id=\"iconError\"\n ></q2-icon>\n )}\n </div>\n )}\n <fieldset\n onChange={this.onInnerRadioChange}\n aria-invalid={`${this.hasError}`}\n >\n {showLabel && <legend class=\"sr\">{labelDOM(this)}</legend>}\n {this.inputDom()}\n </fieldset>\n </Fragment>\n );\n }\n\n inputDom() {\n if (this.tileLayout) {\n const { tileAlignment } = this;\n const alignment = ['left', 'center', 'right'].includes(tileAlignment) ? tileAlignment : 'center';\n return (\n <div class={`tile-container ${alignment}`}>\n <div class=\"options-container\">\n <slot />\n </div>\n </div>\n );\n } else {\n return (\n <div class=\"options-container\">\n <slot />\n </div>\n );\n }\n }\n}\n"],"version":3}
|
|
@@ -75,7 +75,7 @@ const Q2Radio$1 = /*@__PURE__*/ proxyCustomElement(class Q2Radio extends HTMLEle
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
return (h("div", { key: '
|
|
78
|
+
return (h("div", { key: '11d52f8240d6022946c837b15afb173c44eb8962', class: this.groupTileLayout ? 'radio-tile' : 'radio-container' }, h("input", { key: '640bea7973f39132323acab2877d7995110c17d7', ref: el => (this.inputField = el), class: "sr", id: this._id, type: "radio", name: this.name, value: this.value, disabled: this.disabled || this.groupDisabled, checked: this.checked, "aria-label": this.label && this.hideLabel ? loc(this.label) : undefined, onChange: this.inputChange, "test-id": "q2RadioInnerRadioBox" }), h("label", { key: 'e198013184a88d97d76997c5f6e4c6c2784639b5', htmlFor: this._id, class: this.hideLabel ? 'label-hidden' : undefined, "test-id": "radioButton" }, !this.groupTileLayout && (h("svg", { key: 'cf8114adaf788f34a482c577c0f236e37d49e1ec', viewBox: "0 0 18 18" }, h("circle", { key: 'ccbd318974b142dc6bb8d86500c015bbb181bf6e', stroke: "none", fill: "none", cx: "9", cy: "9", r: "8" }), h("circle", { key: '07514318a21df53b3a85714b4a6e586ca2c5ad05', stroke: "none", fill: "none", cx: "9", cy: "9", r: "4" }))), !this.hideLabel && (h("div", { key: 'a77b401809a6a1f7adeb5f118efeaa2a238ebbf9', class: "label-content" }, (this.label && loc(this.label)) || '', h("slot", { key: '884d312374997e55428215c5f302b55dded2ed0f' }))))));
|
|
79
79
|
}
|
|
80
80
|
get hostElement() { return this; }
|
|
81
81
|
static get watchers() { return {
|
|
@@ -138,7 +138,7 @@ const Q2RelativeTime$1 = /*@__PURE__*/ proxyCustomElement(class Q2RelativeTime e
|
|
|
138
138
|
/// DOM ///
|
|
139
139
|
render() {
|
|
140
140
|
const { shouldShow, displayedMessage } = this;
|
|
141
|
-
return h(Fragment, { key: '
|
|
141
|
+
return h(Fragment, { key: '395ab095d5167c217b92461697cd7283c5dc4fd3' }, shouldShow ? h("time", { dateTime: displayedMessage }, displayedMessage) : null);
|
|
142
142
|
}
|
|
143
143
|
get hostElement() { return this; }
|
|
144
144
|
static get watchers() { return {
|
|
@@ -164,9 +164,9 @@ const Q2Section$1 = /*@__PURE__*/ proxyCustomElement(class Q2Section extends HTM
|
|
|
164
164
|
wrapperClasses.push('is-transitioning');
|
|
165
165
|
}
|
|
166
166
|
const showDefaultHeader = !this.hasYieldedHeader && !!this.label;
|
|
167
|
-
return (h("section", { key: '
|
|
167
|
+
return (h("section", { key: '0695a7b89ad4ceef47ca676b788c2df60341a6a5', class: "wrapper" }, h("header", { key: '9e41fbda9d627bbabb1cefa365a32c4e5247edbe', class: hasHeader ? 'has-header' : '' }, h("div", { key: '38c6b5a831216380321e807042822b7141748007', class: "header-content", id: this.titleId, onClick: this.collapsible && this.onHeaderClick }, showDefaultHeader && h("h2", { key: 'de29539ff32219bfc2d1a4e20a50b664f3dd7205', class: "title" }, loc(this.label)), h("div", { key: '59be5e8e726f258496afbaa020bc71d3d0fff4a2', ref: el => (this.headerSlotWrapper = el), class: "header-slot-wrapper" }, h("slot", { key: '018055951b87d3ecf663d9b2af8a7d72f6d56f4d', ref: (el) => (this.headerSlot = el), name: "q2-section-header" }))), this.collapsible && !this.noCollapseIcon && (h("q2-btn", { key: '089581eafb2042e5739ed428bc527ee8a08f5f1d', label: loc(this.label || 'tecton.element.section.defaultToggleLabel'), ariaExpanded: `${!!this.expanded}`, ariaControls: this.contentId, "test-id": "toggleButton", "hide-label": true, onClick: this.onHeaderClick }, h("q2-icon", { key: '177ff80a371b2271f505c9a589dacd2c6422df66', type: "chevron-up" })))), h("div", { key: 'de3563448d7c3dcc6b577a0e5adc31a34945db59', class: wrapperClasses.join(' '), id: this.contentId, "aria-labelledby": this.titleId, role: "region", onTransitionEnd: this.onTransitionEnd, style: this.collapsible && {
|
|
168
168
|
height: this.contentHeight,
|
|
169
|
-
} }, h("div", { key: '
|
|
169
|
+
} }, h("div", { key: '39150c3c6cbc0fd3248c7ae63541b73ba41ba246', ref: el => (this.contentContainer = el), class: "content", tabindex: "-1" }, h("slot", { key: '71f8528ad70a3d2f41e8c78d34b34a05841faae6', ref: (el) => (this.contentSlot = el) })))));
|
|
170
170
|
}
|
|
171
171
|
get hostElement() { return this; }
|
|
172
172
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint, t as isRelatedTargetWithinHost, i as isEventFromElement, u as isHostLosingFocus } from './index2.js';
|
|
2
|
+
import { d as isMobile, l as loc, h as handleAriaLabel, o as overrideFocus, w as waitForNextPaint, t as isRelatedTargetWithinHost, i as isEventFromElement, u as isHostLosingFocus } from './index2.js';
|
|
3
3
|
import { s as shouldShowActionSheet, a as showActionSheetList } from './action-sheet.js';
|
|
4
4
|
import { d as defineCustomElement$8 } from './click-elsewhere2.js';
|
|
5
5
|
import { d as defineCustomElement$7 } from './q2-badge2.js';
|
|
@@ -10,7 +10,7 @@ import { d as defineCustomElement$3 } from './q2-loading2.js';
|
|
|
10
10
|
import { d as defineCustomElement$2 } from './q2-option-list2.js';
|
|
11
11
|
import { d as defineCustomElement$1 } from './q2-popover2.js';
|
|
12
12
|
|
|
13
|
-
const q2SelectCss = "*{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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{--comp-
|
|
13
|
+
const q2SelectCss = "*{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}.q2-element-dropdown{display:none;position:absolute;background-color:var(--app-white, #ffffff);color:var(--t-text, #4d4d4d);left:0;width:100%;z-index:100;margin-top:1px;box-shadow:var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3));height:0;overflow:hidden;opacity:0;visibility:hidden;transition:opacity var(--app-tween-1, 0.2s ease);border-radius:var(--tct-dropdown-border-radius, --t-dropdown-border-radius, 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}.q2-element-dropdown::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.q2-element-dropdown::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}.q2-element-dropdown.sizable{display:block;height:auto}.dropdown-open .q2-element-dropdown{display:block;height:auto;overflow:auto;opacity:1;visibility:visible}:host([alignment=right]) .q2-element-dropdown{left:auto;right:0}:host([block]) q2-btn,:host([block]){display:block}:host{--comp-select-margin:var(--tct-select-margin, var(--tct-select-margin-top, var(--t-select-margin-top, var(--app-scale-4, 30px))) 0 var(--tct-select-margin-bottom, var(--t-select-margin-bottom, var(--app-scale-4, 30px))));display:block;margin:var(--comp-select-margin)}.q2-select-container{position:relative;display:block}.q2-select-input{margin:0;--tct-input-min-height:var(--tct-select-input-min-height, var(--t-select-input-min-height));--tct-input-max-height:var(--tct-select-input-max-height, var(--t-select-input-max-height, none))}::slotted([slot=_selected-display]){width:100%;min-height:var(--comp-selected-display-height, 44px)}.custom-display-content{position:absolute;bottom:0;left:calc(var(--tct-scale-2, var(--app-scale-2x, 10px)) + 1px);height:44px;width:calc(100% - 34px - var(--tct-scale-3, var(--app-scale-3x, 15px)));overflow:hidden;cursor:pointer;transition:left var(--tct-tween-2, var(--app-tween-1, 0.2s ease))}.custom-display-content:not([hidden]){display:flex;align-items:center}.is-searchable.is-focused .custom-display-content,.is-searchable .custom-display-content:active{left:calc(var(--tct-scale-3, var(--app-scale-3x, 15px)) + 1px)}.has-error .custom-display-content{width:calc(100% - 68px - var(--tct-scale-3, var(--app-scale-3x, 15px)))}.popover-content{display:flex;flex-direction:column-reverse}.popover-bottom-container{position:sticky;bottom:0;z-index:5}.popover-top-container{position:sticky;top:0;z-index:5}.popover-top-container .multi-select-header{padding:var(--tct-scale-2, var(--app-scale-2x, 10px)) var(--tct-scale-2, var(--app-scale-2x, 10px));background:var(--app-white);display:flex;gap:var(--app-scale-2x, 10px);align-items:center}.popover-top-container .multi-select-header fieldset{margin:0;padding:0;border:0;display:flex;gap:var(--app-scale-2x, 10px)}.popover-top-container .multi-select-header legend{padding:0;float:left}.popover-top-container .multi-select-header label{cursor:pointer;padding:var(--tct-select-multi-select-option-padding, var(--t-select-multi-select-option-padding, var(--tct-btn-badge-padding, var(--t-btn-badge-padding, 2px 5px))));font-size:var(--tct-select-multi-select-option-font-size, var(--t-select-multi-select-option-font-size, var(--tct-btn-badge-font-size, var(--t-btn-badge-font-size, inherit))));border-radius:var(--tct-select-multi-select-option-radius, var(--t-select-multi-select-option-radius, var(--tct-btn-badge-border-radius, var(--t-btn-badge-border-radius, var(--app-border-radius-1, 3px)))));background:var(--tct-select-multi-select-option-background, var(--tct-select-multi-select-option-bg, var(--t-select-multi-select-option-bg, var(--tct-badge-background, var(--tct-btn-badge-bg, var(--t-btn-badge-bg, transparent))))));color:var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-font-color, var(--t-btn-badge-font-color, inherit))))}.popover-top-container .multi-select-header label:hover{background:var(--tct-select-multi-select-option-hover-background, var(--tct-select-multi-select-option-hover-background-color, var(--t-select-multi-select-option-hover-background-color, var(--tct-btn-badge-hover-bg, var(--t-btn-badge-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--app-gray-l3, #f2f2f2))))))));color:var(--tct-select-multi-select-option-hover-color, var(--tct-select-multi-select-option-color, var(--t-select-multi-select-option-color, var(--tct-btn-badge-hover-font-color, var(--t-btn-badge-hover-font-color, var(--tct-gray-5, var(--t-gray-5, var(--app-gray-d2, #404040))))))))}.popover-top-container .multi-select-header input:checked+label,.popover-top-container .multi-select-header input:checked+label:enabled:hover{background:var(--tct-select-multi-select-option-active-background, var(--tct-select-multi-select-option-active-background-color, var(--t-select-multi-select-option-active-background-color, var(--tct-btn-primary-bg, var(--t-btn-primary-bg, #2e2e2e)))));color:var(--tct-select-multi-select-option-active-color, var(--t-select-multi-select-option-active-color, var(--tct-btn-primary-font-color, var(--t-btn-primary-font-color, var(--app-white, #ffffff)))))}.popover-top-container .multi-select-header input:disabled+label{opacity:var(--tct-select-multi-select-option-disabled-opacity, var(--t-select-multi-select-option-disabled-opacity, var(--tct-btn-disabled-opacity, var(--t-btn-disabled-opacity, var(--app-disabled-opacity, 0.4)))));cursor:not-allowed}.popover-top-container .multi-select-header input:focus+label{box-shadow:var(--const-double-focus-ring)}";
|
|
14
14
|
const Q2SelectStyle0 = q2SelectCss;
|
|
15
15
|
|
|
16
16
|
const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLElement {
|
|
@@ -22,6 +22,20 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
22
22
|
this.input = createEvent(this, "input", 7);
|
|
23
23
|
var _a;
|
|
24
24
|
this.scheduledAfterRender = [];
|
|
25
|
+
this.initEventListeners = () => {
|
|
26
|
+
var _a;
|
|
27
|
+
if (!isMobile())
|
|
28
|
+
return;
|
|
29
|
+
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.handleOrientationChange);
|
|
30
|
+
window.addEventListener('resize', this.handleOrientationChange);
|
|
31
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.addEventListener('resize', this.handleOrientationChange);
|
|
32
|
+
};
|
|
33
|
+
this.initMutationObserver = () => {
|
|
34
|
+
const observer = new MutationObserver(this.onMutationObserved);
|
|
35
|
+
observer.observe(this.hostElement, { childList: true, subtree: true });
|
|
36
|
+
this.mutationObserver = observer;
|
|
37
|
+
this.onMutationObserved();
|
|
38
|
+
};
|
|
25
39
|
this.showSelectedOptions = () => {
|
|
26
40
|
this.showSelected = true;
|
|
27
41
|
};
|
|
@@ -57,6 +71,30 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
57
71
|
this.showAllOptions();
|
|
58
72
|
this.handleSelectionChanges(event.detail);
|
|
59
73
|
};
|
|
74
|
+
this.destroyEventListeners = () => {
|
|
75
|
+
var _a;
|
|
76
|
+
if (!isMobile())
|
|
77
|
+
return;
|
|
78
|
+
(_a = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.handleOrientationChange);
|
|
79
|
+
window.removeEventListener('resize', this.handleOrientationChange);
|
|
80
|
+
visualViewport === null || visualViewport === void 0 ? void 0 : visualViewport.removeEventListener('resize', this.handleOrientationChange);
|
|
81
|
+
};
|
|
82
|
+
this.handleOrientationChange = () => {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
if (!isMobile())
|
|
85
|
+
return;
|
|
86
|
+
let isLandscape;
|
|
87
|
+
if (this.isModule) {
|
|
88
|
+
isLandscape = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions.orientationType.includes('landscape');
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
isLandscape = (_c = (_b = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _b === void 0 ? void 0 : _b.type) === null || _c === void 0 ? void 0 : _c.includes('landscape');
|
|
92
|
+
}
|
|
93
|
+
if (isLandscape && this.searchable)
|
|
94
|
+
this.searchable = false;
|
|
95
|
+
if (!isLandscape)
|
|
96
|
+
this.searchable = this.originalSearchable;
|
|
97
|
+
};
|
|
60
98
|
/// Event handlers ///
|
|
61
99
|
this.onPopoverState = ({ detail: { open, action }, }) => {
|
|
62
100
|
if (!open || this.searchText) {
|
|
@@ -102,7 +140,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
102
140
|
// Prevent click event from firing when spacebar is pressed
|
|
103
141
|
if (key === ' ')
|
|
104
142
|
event.preventDefault();
|
|
105
|
-
this.
|
|
143
|
+
this.handleOptionListExternalKeydown(event);
|
|
106
144
|
};
|
|
107
145
|
this.visibilityToggleKeyDown = (event) => {
|
|
108
146
|
const key = event.key;
|
|
@@ -191,15 +229,15 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
191
229
|
}
|
|
192
230
|
/// Lifecycle Hooks ///
|
|
193
231
|
componentWillLoad() {
|
|
232
|
+
this.originalSearchable = this.searchable;
|
|
194
233
|
handleAriaLabel(this);
|
|
234
|
+
this.handleOrientationChange();
|
|
195
235
|
this.buildStructuredSelectedOptions();
|
|
196
236
|
this.handleMultilineOptionsUpdate(this.multilineOptions, false);
|
|
197
237
|
}
|
|
198
238
|
componentDidLoad() {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
this.mutationObserver = observer;
|
|
202
|
-
this.onMutationObserved();
|
|
239
|
+
this.initMutationObserver();
|
|
240
|
+
this.initEventListeners();
|
|
203
241
|
overrideFocus(this.hostElement);
|
|
204
242
|
setTimeout(() => this.checkSelectedDisplay(), 0);
|
|
205
243
|
}
|
|
@@ -213,8 +251,15 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
213
251
|
var _a;
|
|
214
252
|
(_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
215
253
|
this.mutationObserver = null;
|
|
254
|
+
this.destroyEventListeners();
|
|
216
255
|
}
|
|
217
256
|
/// Getters ///
|
|
257
|
+
get isModule() {
|
|
258
|
+
var _a, _b;
|
|
259
|
+
const isIframe = window !== window.top;
|
|
260
|
+
const hasPlatformDimensions = Object.keys((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) !== null && _b !== void 0 ? _b : {}).length > 0;
|
|
261
|
+
return isIframe && hasPlatformDimensions;
|
|
262
|
+
}
|
|
218
263
|
get innerInputField() {
|
|
219
264
|
var _a, _b;
|
|
220
265
|
return (_b = (_a = this.inputField) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-field');
|
|
@@ -528,6 +573,9 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
528
573
|
var _a;
|
|
529
574
|
(_a = this.inputField) === null || _a === void 0 ? void 0 : _a.dispatchEvent(new FocusEvent('focus'));
|
|
530
575
|
}
|
|
576
|
+
handleOptionListExternalKeydown(event) {
|
|
577
|
+
this.optionList.handleExternalKeydown(event);
|
|
578
|
+
}
|
|
531
579
|
setStatusMessage(message) {
|
|
532
580
|
clearTimeout(this.statusMessageTimer);
|
|
533
581
|
this.statusMessage = '';
|
|
@@ -595,11 +643,11 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
595
643
|
}
|
|
596
644
|
render() {
|
|
597
645
|
var _a;
|
|
598
|
-
return (h("click-elsewhere", { key: '
|
|
646
|
+
return (h("click-elsewhere", { key: '8ebc1321a912ccded52c4df30a2b7e2c31e29d1a', class: this.wrapperClasses, onChange: this.clickedElsewhere }, h("div", { key: '985db8cd1cdf9fded3d55359d66e9205736d8159', "aria-live": "polite", "aria-atomic": "true", role: "status", class: "sr" }, this.statusMessage), h("q2-input", { key: '0a7a08dd904fcbf1c6322fecba1a43c42dcc98c1', ref: el => (this.inputField = el), class: "q2-select-input", label: (this.label && loc(this.label)) || '', value: this.selectedDisplay, clearable: (this.clearable && (!!this.value || !!((_a = this.selectedOptions) === null || _a === void 0 ? void 0 : _a.length))) || undefined, errors: (Array.isArray(this.errors) &&
|
|
599
647
|
this.errors.length > 0 &&
|
|
600
648
|
this.errors.map(error => loc(error))) ||
|
|
601
649
|
(this.invalid && ['tecton.element.select.invalid']) ||
|
|
602
|
-
[], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '
|
|
650
|
+
[], disabled: this.disabled, optional: this.optional, readonly: !!this.readonly, placeholder: this.placeholder || undefined, hideLabel: this.hideLabel, ariaExpanded: `${this.open}`, ariaControls: "option-list", ariaHaspopup: "listbox", "test-id": "toggleDropdown", "hide-messages": true, iconRight: "chevron-down", onClick: this.inputClickHandler, onInput: this.inputInputHandler, onKeyDown: this.inputKeydownHandler, onFocus: this.inputFocusHandler, onBlur: this.inputBlurHandler, onChange: this.inputChangeHandler, badgeValue: this.badgeValue, badgeTheme: this.inputFocused ? 'primary' : undefined, _role: "combobox", _preventEntry: !this.searchable }, this.renderCustomDisplay()), h("div", { key: '760710c9728ab45b80ba33a12f3f9e21dcb9cf93', class: "custom-display-content", hidden: !this.hasCustomDisplay || !!this.searchText, onClick: this.onCustomDisplayClick }, h("slot", { key: 'b17fbba02901d715f283bcbc7ec602c83dfa3c2f', name: "q2-select-display" })), this.optionsDropdown()));
|
|
603
651
|
}
|
|
604
652
|
optionsDropdown() {
|
|
605
653
|
return (h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputContainer, open: this.open, minHeight: this.popoverMinHeight, direction: this.popDirection, mode: this.popoverMode || undefined, block: true }, h("div", { class: "popover-content" }, h("q2-option-list", { onPopoverState: this.onPopoverState, ref: el => (this.optionList = el), type: "listbox", id: "option-list", "show-selected": this.showSelected, label: this.listLabel, multiple: this.multiple, selectedOptions: this.structuredSelectedOptions, onChange: this.onOptionListChange }, h("slot", null)), h("div", { class: "popover-top-container", ref: el => (this.popoverTopContainer = el), hidden: !this.multiple && !this.hasPopoverTop, tabindex: "-1" }, h("slot", { name: "popover-top" }), this.multiple && this.visibilityToggle())), h("div", { class: "popover-bottom-container", hidden: !this.hasPopoverBottom, tabindex: "-1" }, h("slot", { name: "popover-bottom" }))));
|
|
@@ -638,7 +686,7 @@ const Q2Select = /*@__PURE__*/ proxyCustomElement(class Q2Select extends HTMLEle
|
|
|
638
686
|
"popDirection": [513, "pop-direction"],
|
|
639
687
|
"popoverMode": [1025, "popover-mode"],
|
|
640
688
|
"readonly": [516],
|
|
641
|
-
"searchable": [
|
|
689
|
+
"searchable": [1540],
|
|
642
690
|
"selectedOptions": [1040],
|
|
643
691
|
"value": [1025],
|
|
644
692
|
"ariaLabel": [1537, "aria-label"],
|