q2-tecton-elements 1.48.1-alpha.0 → 1.48.2
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 +82 -74
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-a93362ed.js → index-3f1498f7.js} +33 -1
- package/dist/cjs/index-3f1498f7.js.map +1 -0
- 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 +2 -2
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +4 -4
- package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +3 -3
- package/dist/cjs/q2-carousel.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-area.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-bar.cjs.entry.js +2 -2
- package/dist/cjs/q2-chart-donut.cjs.entry.js +2 -2
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/q2-checkbox-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/q2-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-currency.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +2 -2
- package/dist/cjs/q2-detail.cjs.entry.js +2 -2
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +4 -2
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +2 -2
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-input.cjs.entry.js +3 -3
- package/dist/cjs/q2-input.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-item.cjs.entry.js +2 -2
- package/dist/cjs/q2-legend.cjs.entry.js +1 -1
- package/dist/cjs/q2-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-loc.cjs.entry.js +2 -2
- package/dist/cjs/q2-message.cjs.entry.js +2 -2
- package/dist/cjs/q2-month-picker.cjs.entry.js +3 -3
- package/dist/cjs/q2-optgroup.cjs.entry.js +2 -2
- package/dist/cjs/q2-option-list.cjs.entry.js +2 -2
- package/dist/cjs/q2-option.cjs.entry.js +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +3 -3
- package/dist/cjs/q2-pill.cjs.entry.js +2 -2
- package/dist/cjs/q2-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/q2-radio-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +2 -2
- package/dist/cjs/q2-relative-time.cjs.entry.js +3 -3
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +102 -10
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-container.cjs.entry.js +2 -2
- package/dist/cjs/q2-tab-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +2 -2
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q2-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +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 +3 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +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 +83 -74
- 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 +109 -10
- 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/collection/utils/index.js +31 -0
- package/dist/collection/utils/index.js.map +1 -1
- package/dist/components/index.js +0 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +32 -1
- package/dist/components/index2.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 +3 -1
- package/dist/components/q2-dropdown.js.map +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 +82 -74
- 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 +103 -11
- 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 +82 -74
- 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/{index-3c5cd75e.js → index-58266aeb.js} +33 -2
- package/dist/esm/index-58266aeb.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +2 -2
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +4 -4
- package/dist/esm/q2-calendar.entry.js.map +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +3 -3
- package/dist/esm/q2-carousel.entry.js +2 -2
- package/dist/esm/q2-chart-area.entry.js +2 -2
- package/dist/esm/q2-chart-bar.entry.js +2 -2
- package/dist/esm/q2-chart-donut.entry.js +2 -2
- package/dist/esm/q2-checkbox-group.entry.js +3 -3
- package/dist/esm/q2-checkbox-group.entry.js.map +1 -1
- package/dist/esm/q2-checkbox.entry.js +3 -3
- package/dist/esm/q2-checkbox.entry.js.map +1 -1
- package/dist/esm/q2-currency.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +2 -2
- package/dist/esm/q2-detail.entry.js +2 -2
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +4 -2
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +2 -2
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-input.entry.js +3 -3
- package/dist/esm/q2-input.entry.js.map +1 -1
- package/dist/esm/q2-item.entry.js +2 -2
- package/dist/esm/q2-legend.entry.js +1 -1
- package/dist/esm/q2-list.entry.js +2 -2
- package/dist/esm/q2-loc.entry.js +2 -2
- package/dist/esm/q2-message.entry.js +2 -2
- package/dist/esm/q2-month-picker.entry.js +3 -3
- package/dist/esm/q2-optgroup.entry.js +2 -2
- package/dist/esm/q2-option-list.entry.js +2 -2
- package/dist/esm/q2-option.entry.js +1 -1
- package/dist/esm/q2-pagination.entry.js +3 -3
- package/dist/esm/q2-pill.entry.js +2 -2
- package/dist/esm/q2-radio-group.entry.js +3 -3
- package/dist/esm/q2-radio-group.entry.js.map +1 -1
- package/dist/esm/q2-radio.entry.js +2 -2
- package/dist/esm/q2-relative-time.entry.js +3 -3
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +102 -10
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +2 -2
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tab-container.entry.js +2 -2
- package/dist/esm/q2-tab-pane.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +2 -2
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +3 -3
- package/dist/esm/q2-textarea.entry.js.map +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/jest.setup.js +33 -0
- package/dist/jest.setup.js.map +1 -0
- package/dist/q2-tecton-elements/{p-3fe532bc.entry.js → p-05f5d0ab.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-0f9d4d30.entry.js +2 -0
- package/dist/q2-tecton-elements/p-0f9d4d30.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-139926a3.entry.js +2 -0
- package/dist/q2-tecton-elements/p-139926a3.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-fcffc029.entry.js → p-149044cd.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-400f6071.entry.js → p-2cbb1756.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-400f6071.entry.js.map → p-2cbb1756.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-2d6a9a94.entry.js → p-3468d85d.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-3876d25b.entry.js +2 -0
- package/dist/q2-tecton-elements/p-3876d25b.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-f57c4448.entry.js → p-3d6e350e.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-414c5d4e.entry.js +2 -0
- package/dist/q2-tecton-elements/p-414c5d4e.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-35cc1039.entry.js → p-48ecbcc9.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-861e83de.entry.js → p-4ce69e38.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-4e58e187.entry.js +2 -0
- package/dist/q2-tecton-elements/p-4e58e187.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-258f8c9c.entry.js → p-502af427.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7cbb989e.entry.js → p-50476216.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-43236cac.entry.js → p-5234ced7.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-4008aceb.entry.js → p-5538d1df.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-5d339d72.entry.js +2 -0
- package/dist/q2-tecton-elements/p-5d339d72.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js → p-63f9a5e5.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-828850c1.entry.js → p-646214e2.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-30296b0e.entry.js → p-65e7dab0.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d75e4752.entry.js → p-7c5ee4aa.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-7ea95f38.js +2 -0
- package/dist/q2-tecton-elements/p-7ea95f38.js.map +1 -0
- package/dist/q2-tecton-elements/{p-9a5695db.entry.js → p-7fe8e174.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-3f665c56.entry.js → p-803a5897.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d32f8e53.entry.js → p-871bad24.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-dfa489ba.entry.js → p-8764a131.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-bc73f69c.entry.js → p-8a2b4f10.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-30d70f4a.entry.js → p-97774780.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-81bb9436.entry.js → p-9c129294.entry.js} +2 -2
- package/dist/q2-tecton-elements/p-a99e1dc6.entry.js +2 -0
- package/dist/q2-tecton-elements/p-a99e1dc6.entry.js.map +1 -0
- package/dist/q2-tecton-elements/p-abf27f97.entry.js +2 -0
- package/dist/q2-tecton-elements/{p-4b47816d.entry.js.map → p-abf27f97.entry.js.map} +1 -1
- package/dist/q2-tecton-elements/{p-9b65cc28.entry.js → p-af3a383f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-d35de465.entry.js → p-b85b6bc1.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-e793a82c.entry.js → p-b998e684.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-63038a54.entry.js → p-c30c53dc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-76be9cad.entry.js → p-c37fff1e.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-32130845.entry.js → p-c782a1d6.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-49ecdf18.entry.js → p-cd225920.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-7dafc5da.entry.js → p-cdfe6e9d.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-75bb43b2.entry.js → p-d238dc6b.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-6e313705.entry.js → p-e08c6b8f.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-56dd051a.entry.js → p-e41f47bc.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js → p-e4241b1a.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-aed969d4.entry.js → p-e654d2d6.entry.js} +2 -2
- package/dist/q2-tecton-elements/{p-b6bcef6a.js → p-f1e887f5.js} +1 -1
- 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-pagination-test.e2e.js +3 -2
- package/dist/test/elements/q2-pagination-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 +902 -511
- 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 +552 -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 +10 -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 -5
- package/dist/types/components/q2-select/q2-select.d.ts +243 -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/dist/types/utils/index.d.ts +1 -0
- package/package.json +5 -5
- package/dist/cjs/index-a93362ed.js.map +0 -1
- 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/index-3c5cd75e.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-4b47816d.entry.js +0 -2
- 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-84190698.js +0 -2
- package/dist/q2-tecton-elements/p-84190698.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-3fe532bc.entry.js.map → p-05f5d0ab.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-2d6a9a94.entry.js.map → p-3468d85d.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-f57c4448.entry.js.map → p-3d6e350e.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-35cc1039.entry.js.map → p-48ecbcc9.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-861e83de.entry.js.map → p-4ce69e38.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-7cbb989e.entry.js.map → p-50476216.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-43236cac.entry.js.map → p-5234ced7.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4008aceb.entry.js.map → p-5538d1df.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-4f7e6e79.entry.js.map → p-63f9a5e5.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-828850c1.entry.js.map → p-646214e2.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-30296b0e.entry.js.map → p-65e7dab0.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d75e4752.entry.js.map → p-7c5ee4aa.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9a5695db.entry.js.map → p-7fe8e174.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-3f665c56.entry.js.map → p-803a5897.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d32f8e53.entry.js.map → p-871bad24.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-dfa489ba.entry.js.map → p-8764a131.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-bc73f69c.entry.js.map → p-8a2b4f10.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-30d70f4a.entry.js.map → p-97774780.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-81bb9436.entry.js.map → p-9c129294.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-9b65cc28.entry.js.map → p-af3a383f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-d35de465.entry.js.map → p-b85b6bc1.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-e793a82c.entry.js.map → p-b998e684.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-63038a54.entry.js.map → p-c30c53dc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-76be9cad.entry.js.map → p-c37fff1e.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-32130845.entry.js.map → p-c782a1d6.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-49ecdf18.entry.js.map → p-cd225920.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-7dafc5da.entry.js.map → p-cdfe6e9d.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-75bb43b2.entry.js.map → p-d238dc6b.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-6e313705.entry.js.map → p-e08c6b8f.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-56dd051a.entry.js.map → p-e41f47bc.entry.js.map} +0 -0
- /package/dist/q2-tecton-elements/{p-1b89b9c3.entry.js.map → p-e4241b1a.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-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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index$1 = require('./index-14c3693c.js');
|
|
6
|
-
const index$2 = require('./index-
|
|
6
|
+
const index$2 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* SSR Window 4.0.2
|
|
@@ -5386,7 +5386,7 @@ const Q2Carousel = class {
|
|
|
5386
5386
|
let paginationWrapperClasses = ['q2-carousel-pagination-navigation-wrapper'];
|
|
5387
5387
|
if (this.showNavigationArrows)
|
|
5388
5388
|
paginationWrapperClasses = [...paginationWrapperClasses, 'evenly-space'];
|
|
5389
|
-
return (index$1.h(index$1.Host, { key: '
|
|
5389
|
+
return (index$1.h(index$1.Host, { key: '52cb6f3655ddac45868598d7440df4ce29e7f8c1', id: `q2-carousel-${this.guid}`, class: "q2-carousel-instance" }, this.insufficientPanes ? (this.insufficientPanesDisplay()) : (index$1.h(index$1.Fragment, null, this.paneCount > 1 && (index$1.h("div", { class: paginationWrapperClasses.join(' ') }, this.showNavigationArrows && this.prevNavBtn(), index$1.h("div", { class: "q2-carousel-control-center-tray" }, !this.hidePagination && this.paginationArea(), this.autoPlay && this.autoPlayBtn()), this.showNavigationArrows && this.nextNavBtn())), index$1.h("section", { class: carouselContainerClasses.join(' '), ref: el => (this.carouselWrapper = el), "aria-roledescription": "carousel", "aria-label": index$2.loc(this.label) }, index$1.h("div", { class: "q2-carousel-swiper-wrapper swiper-wrapper", ref: el => (this.carouselPaneWrapperElement = el), "aria-live": this.ariaLiveValue, onKeyDown: this.onWrapperKeyDown }, index$1.h("slot", null)))))));
|
|
5390
5390
|
}
|
|
5391
5391
|
get hostElement() { return index$1.getElement(this); }
|
|
5392
5392
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
const charting = require('./charting-a5d7e947.js');
|
|
8
8
|
const installCanvasRenderer = require('./installCanvasRenderer-c9432539.js');
|
|
9
9
|
|
|
@@ -4178,7 +4178,7 @@ const Q2ChartArea = class {
|
|
|
4178
4178
|
this.updateChart(this.chart);
|
|
4179
4179
|
}
|
|
4180
4180
|
render() {
|
|
4181
|
-
return (index.h("div", { key: '
|
|
4181
|
+
return (index.h("div", { key: '5ac722f85acf3a00828cfcd6bfb3d13cadc8d4ef', class: "container" }, index.h("div", { key: 'a39f5664712841ad70c1628c88b77500b694db63', ref: el => (this.chartContainer = el), class: "chart-container", "test-id": "areaChartContainer" })));
|
|
4182
4182
|
}
|
|
4183
4183
|
get hostElement() { return index.getElement(this); }
|
|
4184
4184
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
const charting = require('./charting-a5d7e947.js');
|
|
8
8
|
const installCanvasRenderer = require('./installCanvasRenderer-c9432539.js');
|
|
9
9
|
const sectorHelper = require('./sectorHelper-b8542e4b.js');
|
|
@@ -1397,7 +1397,7 @@ const Q2ChartBar = class {
|
|
|
1397
1397
|
this.updateChart(this.chart);
|
|
1398
1398
|
}
|
|
1399
1399
|
render() {
|
|
1400
|
-
return (index.h("div", { key: '
|
|
1400
|
+
return (index.h("div", { key: '1c7a900e24ad8c960c7e701e00d3218388e97f36', class: "container" }, index.h("div", { key: 'beb2ec288287a1ae437d9f355a8fd1fed577912d', ref: el => (this.chartContainer = el), class: "chart-container", "test-id": "barChartContainer" })));
|
|
1401
1401
|
}
|
|
1402
1402
|
get hostElement() { return index.getElement(this); }
|
|
1403
1403
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
const installCanvasRenderer = require('./installCanvasRenderer-c9432539.js');
|
|
8
8
|
const sectorHelper = require('./sectorHelper-b8542e4b.js');
|
|
9
9
|
|
|
@@ -4489,7 +4489,7 @@ const Q2ChartDonut = class {
|
|
|
4489
4489
|
} })), !!name && index.h("div", { class: "name" }, name), !!value && index.h("div", { class: "value" }, displayValue))));
|
|
4490
4490
|
}
|
|
4491
4491
|
render() {
|
|
4492
|
-
return (index.h("click-elsewhere", { key: '
|
|
4492
|
+
return (index.h("click-elsewhere", { key: '9e1a6cc98950bbe82cd87743c63e50ec555fdf2a', onChange: this.onClickElsewhere }, index.h("figure", { key: 'f06bb61b3730a5de80cceea9b422f500197dc5a2' }, index.h("div", { key: '6315a607888abfbbe7aa35d2deb8cc7b1d5d28ac', class: "container" }, index.h("div", { key: 'e8b47931947094eeee180777ef4bc457001101a0', ref: el => (this.chartContainer = el), "aria-describedby": !this.isClickable ? 'center-card-description' : undefined, class: "chart-container", role: "img", "test-id": "chartContainer", onClick: this.onContainerClick, tabIndex: !this.isClickable ? 0 : undefined, onKeyDown: !this.isClickable ? this.onButtonKeyDown : undefined }), this.renderCenterBlock()), this.showLegend && (index.h("figcaption", { key: 'c71999d6f95a69a86254e5aca87f518881035a9b' }, index.h("q2-legend", { key: '715bb8bfc7921b44c0989d56b846da6f58ef926c', class: "legend", data: this.legendData, format: this.format, hoveredItemId: this.legendHoveredId, onClick: this.onLegendClick, onMouseleave: this.onLegendMouseleave, onMouseenter: this.onLegendMouseenter, selectedItemId: this.selectedId }))))));
|
|
4493
4493
|
}
|
|
4494
4494
|
get hostElement() { return index.getElement(this); }
|
|
4495
4495
|
static get watchers() { return {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
|
-
const q2CheckboxGroupCss = "*{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}:host{
|
|
8
|
+
const q2CheckboxGroupCss = "*{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}:host{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:var(--tct-input-error-padding, 0);margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))), var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgb(255, 255, 255))))}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));color:var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));font-size:var(--tct-input-label-optional-font-size, 12px);font-weight:var(--tct-input-label-optional-font-weight, 400)}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}";
|
|
9
9
|
const Q2CheckboxGroupStyle0 = q2CheckboxGroupCss;
|
|
10
10
|
|
|
11
11
|
const Q2CheckboxGroup = class {
|
|
@@ -111,7 +111,7 @@ const Q2CheckboxGroup = class {
|
|
|
111
111
|
}
|
|
112
112
|
render() {
|
|
113
113
|
const showLabel = this.label || this.optional || this.readonly;
|
|
114
|
-
return (index.h("div", { key: '
|
|
114
|
+
return (index.h("div", { key: 'd0fa41150bdb303b163c5b8385108a9f175ce545' }, showLabel && !this.hideLabel && index.h("div", { key: 'f44bcb6210a8a4e54b163e31c955c03f7b10e6f6', class: "group-legend" }, index$1.labelDOM(this)), index.h("fieldset", { key: '356ef2a2f1501a1f6eecfe2419580c93a46ae7d9', class: `q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`, onChange: this.onInnerCheckboxChange, "aria-invalid": `${this.hasError}` }, this.label || this.optional ? index.h("legend", { class: "sr-only" }, index$1.labelDOM(this)) : '', this.hasError ? (index.h("div", { class: `error-icon-container ${this.label || this.optional ? '' : 'no-label'}` }, index.h("q2-icon", { class: "h(4) w(4) mrg-b(2)", type: "error" }))) : (''), this.inputDom())));
|
|
115
115
|
}
|
|
116
116
|
inputDom() {
|
|
117
117
|
return index.h("slot", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-checkbox-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,8/EAA8/E,CAAC;AAC1hF,8BAAe,kBAAkB;;MCcpB,eA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CAAC;gBAAE,KAAK,CAAC,KAAK,EAAE,CAAC;SACjD,CAAC,CAAC;KACN;IAOD,mBAAmB,CAAC,KAAkB;QAClC,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;YACjE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;SAC7B;KACJ;IAED,MAAM;QACF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC;QAC/D,QACIC,oEACK,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,IAAIA,kEAAK,KAAK,EAAC,cAAc,IAAEC,gBAAQ,CAAC,IAAI,CAAC,CAAO,EACjFD,uEACI,KAAK,EAAE,wBAAwB,IAAI,CAAC,QAAQ,GAAG,WAAW,GAAG,EAAE,EAAE,EACjE,QAAQ,EAAE,IAAI,CAAC,qBAAqB,kBACtB,GAAG,IAAI,CAAC,QAAQ,EAAE,IAE/B,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAGA,oBAAQ,KAAK,EAAC,SAAS,IAAEC,gBAAQ,CAAC,IAAI,CAAC,CAAU,GAAG,EAAE,EACpF,IAAI,CAAC,QAAQ,IACVD,iBAAK,KAAK,EAAE,wBAAwB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,UAAU,EAAE,IAC/EA,qBACI,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,OAAO,GACL,CACT,KAEN,EAAE,CACL,EACA,IAAI,CAAC,QAAQ,EAAE,CACT,CACT,EACR;KACL;IAED,QAAQ;QACJ,OAAOA,qBAAQ,CAAC;KACnB;;;;;;;;;;;;","names":["createGuid","h","labelDOM"],"sources":["src/components/q2-checkbox-group/q2-checkbox-group.scss?tag=q2-checkbox-group&encapsulation=shadow","src/components/q2-checkbox-group/q2-checkbox-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-default-checkbox-group-margin: #{var-list(var-prefixer(checkbox-group-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(checkbox-group-margin-bottom), --app-scale-5x, 25px)};\n margin: var-list(--tct-checkbox-group-margin, --comp-default-checkbox-group-margin);\n}\n\n::slotted(q2-checkbox) {\n --tct-checkbox-margin: #{var-list(--tct-checkbox-group-checkbox-margin, --app-scale-0x, 0)};\n --tct-checkbox-padding: #{var-list(--tct-checkbox-group-checkbox-padding, --app-scale-2x, 10px)};\n}\n\nfieldset {\n padding: var(--tct-input-error-padding, 0);\n margin: 0;\n border: 0;\n}\n\nfieldset.has-error {\n border-color: var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));\n border-width: 1px;\n border-style: solid;\n border-radius: var(--tct-border-radius-1, var(--app-border-radius-1, 2px));\n position: relative;\n}\n\nfieldset.has-error .error-icon-container {\n top: 8px;\n right: 8px;\n position: absolute;\n width: 40%;\n text-align: right;\n background: linear-gradient(\n to right,\n var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))),\n var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgba(255, 255, 255)))\n );\n}\n\nfieldset.has-error legend + div.error-icon-container.no-label {\n top: 28px;\n}\n\n.group-legend {\n font-weight: 600;\n}\n\nlegend.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n}\n\n.optional-tag {\n margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));\n color: var(\n --tct-input-label-optional-font-color,\n var(\n --tct-a11y-color,\n var(\n --t-a11y-gray-color,\n var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666))))\n )\n )\n );\n font-size: var(--tct-input-label-optional-font-size, 12px);\n font-weight: var(--tct-input-label-optional-font-weight, 400);\n}\n\n.flexed {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n.flexed.left {\n justify-content: left;\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Method,\n} from '@stencil/core';\nimport { createGuid, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean;\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 * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /**\n * Can be used to get and set the checked status of each `<q2-checkbox>` element contained within the group.\n *\n * **Example:**\n * @snippet\n * element.value = {\n * 'checkbox-value-1': true,\n * 'checkbox-value-2': false,\n * 'checkbox-value-3': true,\n * };\n *\n * // Also accepts partial values\n * element.value = {\n * 'checkbox-value-2': false,\n * }\n */\n @Prop({ mutable: true }) value: object;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\n };\n\n onInnerCheckboxChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n const groupValue = {};\n setTimeout(() => {\n this.checkboxElements.forEach(check => {\n groupValue[check.value] = !!check.checked;\n });\n this.change.emit(groupValue);\n }, 0);\n };\n\n updateValue() {\n if (this.readonly) return;\n this.checkboxElements.forEach(check => {\n if (this.protectedValue.hasOwnProperty(check.value)) {\n check.checked = this.value[check.value];\n }\n });\n }\n\n updateDisabled() {\n const groupDisabled = this.disabled;\n this.checkboxElements.forEach(checkbox => {\n checkbox.groupDisabled = groupDisabled;\n });\n }\n\n updateReadonly() {\n const slotReadonly = this.readonly;\n this.checkboxElements.forEach(checkbox => {\n checkbox.slotReadonly = slotReadonly;\n });\n }\n\n ///// LIFECYCLE HOOK ///////\n\n componentWillLoad() {\n this.updateReadonly();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, subtree: true });\n this.mutationObserver = observer;\n this.onMutationObserved();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-checkbox>` option(s) with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(values: string | string[]) {\n const valuesSet = new Set(Array.isArray(values) ? values : [values]);\n this.checkboxElements.forEach(check => {\n if (valuesSet.has(check.value)) check.click();\n });\n }\n\n ///// HOST ELEMENT EVENTS ///////\n\n @Event() change: EventEmitter;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail;\n }\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n return (\n <div>\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n <fieldset\n class={`q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`}\n onChange={this.onInnerCheckboxChange}\n aria-invalid={`${this.hasError}`}\n >\n {this.label || this.optional ? <legend class=\"sr-only\">{labelDOM(this)}</legend> : ''}\n {this.hasError ? (\n <div class={`error-icon-container ${this.label || this.optional ? '' : 'no-label'}`}>\n <q2-icon\n class=\"h(4) w(4) mrg-b(2)\"\n type=\"error\"\n ></q2-icon>\n </div>\n ) : (\n ''\n )}\n {this.inputDom()}\n </fieldset>\n </div>\n );\n }\n\n inputDom() {\n return <slot />;\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-checkbox-group.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,miEAAmiE,CAAC;AAC/jE,8BAAe,kBAAkB;;MCcpB,eAAe;;;;QA6CxB,QAAG,GAAW,kBAAkBA,kBAAU,EAAE,EAAE,CAAC;QAe/C,uBAAkB,GAAG;YACjB,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,cAAc,EAAE,CAAC;YACtB,IAAI,CAAC,cAAc,EAAE,CAAC;SACzB,CAAC;QAEF,0BAAqB,GAAG,CAAC,KAAkB;YACvC,KAAK,CAAC,wBAAwB,EAAE,CAAC;YACjC,MAAM,UAAU,GAAG,EAAE,CAAC;YACtB,UAAU,CAAC;gBACP,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK;oBAC/B,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;iBAC7C,CAAC,CAAC;gBACH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAChC,EAAE,CAAC,CAAC,CAAC;SACT,CAAC;;;;;;;;;IA3BF,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,GAAG,CAAC;KACnB;IAED,IAAI,gBAAgB;QAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAA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AC,SAAS,IAAEC,gBAAQ,CAAC,IAAI,CAAC,CAAU,GAAG,EAAE,EACpF,IAAI,CAAC,QAAQ,IACVD,iBAAK,KAAK,EAAE,wBAAwB,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,UAAU,EAAE,IAC/EA,qBACI,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,OAAO,GACL,CACT,KAEN,EAAE,CACL,EACA,IAAI,CAAC,QAAQ,EAAE,CACT,CACT,EACR;KACL;IAED,QAAQ;QACJ,OAAOA,qBAAQ,CAAC;KACnB;;;;;;;;;;;;","names":["createGuid","h","labelDOM"],"sources":["src/components/q2-checkbox-group/q2-checkbox-group.scss?tag=q2-checkbox-group&encapsulation=shadow","src/components/q2-checkbox-group/q2-checkbox-group.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n\n:host {\n margin-top: var(--tct-scale-2, var(--app-scale-2x, 10px));\n}\n\nfieldset {\n padding: var(--tct-input-error-padding, 0);\n margin: 0;\n border: 0;\n}\n\nfieldset.has-error {\n border-color: var(--tct-input-error-border-color, var(--const-stoplight-alert, #d20a0a));\n border-width: 1px;\n border-style: solid;\n border-radius: var(--tct-border-radius-1, var(--app-border-radius-1, 2px));\n position: relative;\n}\n\nfieldset.has-error .error-icon-container {\n top: 8px;\n right: 8px;\n position: absolute;\n width: 40%;\n text-align: right;\n background: linear-gradient(\n to right,\n var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))),\n var(--tct-checkbox-group-error-gradient-end, var(--t-base, rgba(255, 255, 255)))\n );\n}\n\nfieldset.has-error legend + div.error-icon-container.no-label {\n top: 28px;\n}\n\n.group-legend {\n font-weight: 600;\n}\n\nlegend.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n border: 0;\n}\n\n.optional-tag {\n margin-left: var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));\n color: var(\n --tct-input-label-optional-font-color,\n var(\n --tct-a11y-color,\n var(\n --t-a11y-gray-color,\n var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666))))\n )\n )\n );\n font-size: var(--tct-input-label-optional-font-size, 12px);\n font-weight: var(--tct-input-label-optional-font-weight, 400);\n}\n\n.flexed {\n margin: 0;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n}\n.flexed.left {\n justify-content: left;\n}\n","import {\n Component,\n Prop,\n Element,\n h,\n Listen,\n EventEmitter,\n Event,\n ComponentInterface,\n Watch,\n Method,\n} from '@stencil/core';\nimport { createGuid, labelDOM } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox-group', shadow: true, styleUrl: 'q2-checkbox-group.scss' })\nexport class Q2CheckboxGroup implements ComponentInterface {\n /** Determines if all checkboxes in the group are put into a `disabled` state. */\n @Prop({ reflect: true }) disabled: boolean;\n\n /** Determines if the component should display in an errant state. */\n @Prop({ reflect: true }) hasError: boolean;\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 * The label that displays above all the checkboxes.\n * @localizable\n */\n @Prop({ reflect: true }) label: string;\n\n /** Determines if the component is marked as `optional`. */\n @Prop({ reflect: true }) optional: boolean;\n\n /** Determines if all the checkboxes are marked as `readonly`. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /**\n * Can be used to get and set the checked status of each `<q2-checkbox>` element contained within the group.\n *\n * **Example:**\n * @snippet\n * element.value = {\n * 'checkbox-value-1': true,\n * 'checkbox-value-2': false,\n * 'checkbox-value-3': true,\n * };\n *\n * // Also accepts partial values\n * element.value = {\n * 'checkbox-value-2': false,\n * }\n */\n @Prop({ mutable: true }) value: object;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-group-${createGuid()}`;\n mutationObserver: MutationObserver;\n\n get inputId() {\n return this._id;\n }\n\n get checkboxElements() {\n return Array.from(this.hostElement.querySelectorAll('q2-checkbox')) as HTMLQ2CheckboxElement[];\n }\n\n get protectedValue(): object {\n return this.value || {};\n }\n\n onMutationObserved = () => {\n this.updateValue();\n this.updateDisabled();\n this.updateReadonly();\n };\n\n onInnerCheckboxChange = (event: CustomEvent) => {\n event.stopImmediatePropagation();\n const groupValue = {};\n setTimeout(() => {\n this.checkboxElements.forEach(check => {\n groupValue[check.value] = !!check.checked;\n });\n this.change.emit(groupValue);\n }, 0);\n };\n\n updateValue() {\n if (this.readonly) return;\n this.checkboxElements.forEach(check => {\n if (this.protectedValue.hasOwnProperty(check.value)) {\n check.checked = this.value[check.value];\n }\n });\n }\n\n updateDisabled() {\n const groupDisabled = this.disabled;\n this.checkboxElements.forEach(checkbox => {\n checkbox.groupDisabled = groupDisabled;\n });\n }\n\n updateReadonly() {\n const slotReadonly = this.readonly;\n this.checkboxElements.forEach(checkbox => {\n checkbox.slotReadonly = slotReadonly;\n });\n }\n\n ///// LIFECYCLE HOOK ///////\n\n componentWillLoad() {\n this.updateReadonly();\n }\n\n componentDidLoad() {\n const observer = new MutationObserver(this.onMutationObserved);\n observer.observe(this.hostElement, { childList: true, subtree: true });\n this.mutationObserver = observer;\n this.onMutationObserved();\n }\n\n disconnectedCallback() {\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n }\n\n @Watch('value')\n valueObserver() {\n this.updateValue();\n }\n\n @Watch('disabled')\n disabledObserver() {\n this.updateDisabled();\n }\n\n @Watch('readonly')\n readonlyObserver() {\n this.updateReadonly();\n }\n\n /// Methods ///\n /**\n * Emulates clicking the `<q2-checkbox>` option(s) with the provided value.\n *\n * @testOnly\n */\n @Method()\n setValue(values: string | string[]) {\n const valuesSet = new Set(Array.isArray(values) ? values : [values]);\n this.checkboxElements.forEach(check => {\n if (valuesSet.has(check.value)) check.click();\n });\n }\n\n ///// HOST ELEMENT EVENTS ///////\n\n @Event() change: EventEmitter;\n\n @Listen('change')\n onHostElementChange(event: CustomEvent) {\n if (event.target === this.hostElement && !this.hostElement.onchange) {\n this.value = event.detail;\n }\n }\n\n render() {\n const showLabel = this.label || this.optional || this.readonly;\n return (\n <div>\n {showLabel && !this.hideLabel && <div class=\"group-legend\">{labelDOM(this)}</div>}\n <fieldset\n class={`q2-checkbox-fieldset ${this.hasError ? 'has-error' : ''}`}\n onChange={this.onInnerCheckboxChange}\n aria-invalid={`${this.hasError}`}\n >\n {this.label || this.optional ? <legend class=\"sr-only\">{labelDOM(this)}</legend> : ''}\n {this.hasError ? (\n <div class={`error-icon-container ${this.label || this.optional ? '' : 'no-label'}`}>\n <q2-icon\n class=\"h(4) w(4) mrg-b(2)\"\n type=\"error\"\n ></q2-icon>\n </div>\n ) : (\n ''\n )}\n {this.inputDom()}\n </fieldset>\n </div>\n );\n }\n\n inputDom() {\n return <slot />;\n }\n}\n"],"version":3}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
|
-
const q2CheckboxCss = "*{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}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);display:block;position:relative;padding:var(--comp-checkbox-padding);--comp-default-checkbox-margin:var(--tct-checkbox-margin-top, var(--t-checkbox-margin-top, var(--app-scale-5x, 25px))) 0 var(--tct-checkbox-margin-bottom, var(--t-checkbox-margin-bottom, var(--app-scale-5x, 25px)));margin:var(--tct-checkbox-margin, var(--comp-default-checkbox-margin))}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 20px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--t-a11y-active-gray-color-AA, #404040))));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label;font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400))}:host([description]) .label-text{font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600))}:host([checked]:not([checked=false])) .label-text{font-weight:var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600))}:host(:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host(:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host([description]:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):hover) .label-text{font-weight:var(--tct-checkbox-checked-hover-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}:host([description]:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):focus-within) .label-text{font-weight:var(--tct-checkbox-checked-focused-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}:host([disabled]:not([disabled=false])),:host([group-disabled]){opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host([disabled]:not([disabled=false])) label,:host([group-disabled]) label{cursor:not-allowed}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host([has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-error-box-shadow)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-hover-box-shadow)}:host(:hover[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--comp-checkbox-focused-box-shadow)}:host(:focus-within[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error][type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error][type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{stroke:var(--tct-checkbox-checkmark-stroke-color, var(--comp-checkbox-checked-color))}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));transition:opacity var(--comp-checkbox-tween)}:host([type=toggle][checked]:not([checked=false])) .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))))}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-track,.toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}.toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));height:14px;width:46px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));opacity:0.5}:host([has-error]) .toggle-track{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)));opacity:0.5}.toggle-indicator{transition:left var(--comp-checkbox-tween);height:30px;width:30px;left:0;border-radius:50%}:host([checked]:not([checked=false])) .toggle-indicator{left:21px}.toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]:not([checked=false])) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host([has-error]) .toggle-circle,:host([has-error]:focus-within) .toggle-circle,:host([has-error]:hover) .toggle-circle{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}.toggle-hover-circle{stroke-width:0}:host(:focus-within) .toggle-hover-circle,:host(:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));stroke-width:10px;stroke-opacity:0.5}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-hover-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([has-error]) .toggle-hover-circle,:host([has-error]:focus-within) .toggle-hover-circle,:host([has-error]:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}:host([checked]:not([checked=false])) .off,:host(:is(:not([checked]),[checked=false])) .on{opacity:0}";
|
|
8
|
+
const q2CheckboxCss = "*{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}:host{--comp-checkbox-padding:var(--tct-checkbox-padding, var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0);display:block;position:relative;padding:var(--comp-checkbox-padding)}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 20px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--t-a11y-active-gray-color-AA, #404040))));--comp-control-width:var(--comp-checkbox-size);--comp-checkbox-error-color:var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a));display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([hide-label]:not([hide-label=false])) .container{grid-template-areas:\"svg\";grid-template-columns:var(--comp-control-width)}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label;font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400))}:host([description]) .label-text{font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600))}:host([checked]:not([checked=false])) .label-text{font-weight:var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600))}:host(:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host(:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 400)))}:host([description]:hover) .label-text{font-weight:var(--tct-checkbox-hover-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):hover) .label-text{font-weight:var(--tct-checkbox-checked-hover-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}:host([description]:focus-within) .label-text{font-weight:var(--tct-checkbox-focused-label-font-weight, var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600)))}:host([checked]:not([checked=false]):focus-within) .label-text{font-weight:var(--tct-checkbox-checked-focused-label-font-weight, var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600)))}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}:host(:hover) .description-text{font-weight:var(--tct-checkbox-hover-description-font-weight, var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400)))}label{color:var(--tct-checkbox-label-color);cursor:pointer;hyphens:var(--tct-checkbox-label-hyphens, auto);word-break:var(--tct-checkbox-label-word-break, break-word);word-wrap:var(--tct-checkbox-label-word-wrap, break-word)}:host([disabled]:not([disabled=false])),:host([group-disabled]){opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host([disabled]:not([disabled=false])) label,:host([group-disabled]) label{cursor:not-allowed}.checkbox-icon{width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));stroke:var(--comp-checkbox-outer-stroke-color);fill:var(--comp-checkbox-outer-fill-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));flex-shrink:0}:host([checked]:not([checked=false]):not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)));fill:var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)))}:host([has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color));fill:var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-error-box-shadow)}:host(:hover:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-hover-outer-stroke-color, var(--comp-checkbox-outer-stroke-color));fill:var(--tct-checkbox-hover-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--tct-checkbox-hover-box-shadow)}:host(:hover[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-hover-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-hover-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-hover-box-shadow, var(--tct-checkbox-error-box-shadow, var(--tct-checkbox-hover-box-shadow)))}:host(:focus-within:not([type=favorite])) .checkbox-icon{--comp-checkbox-focused-box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)));fill:var(--tct-checkbox-focused-outer-fill-color, var(--comp-checkbox-outer-fill-color));box-shadow:var(--comp-checkbox-focused-box-shadow)}:host(:focus-within[has-error]:not([type=favorite])) .checkbox-icon{stroke:var(--tct-checkbox-error-focused-outer-stroke-color, var(--tct-checkbox-error-outer-stroke-color, var(--comp-checkbox-error-color)));fill:var(--tct-checkbox-error-focused-outer-fill-color, var(--tct-checkbox-error-outer-fill-color, var(--comp-checkbox-outer-fill-color)));box-shadow:var(--tct-checkbox-error-focused-box-shadow, var(--tct-checkbox-error-box-shadow, var(--comp-checkbox-focused-box-shadow)))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host(:hover[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-stroke-color, var(--tct-checkbox-favorite-stroke-color, var(--comp-checkbox-favorite-fill-color)));fill:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked]:not([checked=false])[type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-hover-stroke-color, var(--tct-checkbox-favorite-hover-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-fill-primary:var(--tct-checkbox-favorite-checked-fill-color, var(--comp-checkbox-favorite-fill-color));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked]:not([checked=false])[type=favorite]:focus-within) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-checked-focused-stroke-color, var(--tct-checkbox-favorite-focused-stroke-color, var(--comp-checkbox-favorite-stroke-color)));--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([has-error][type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}:host([has-error][type=favorite][checked]:not([checked=false])) .checkbox-icon{--tct-icon-stroke-primary:var(--tct-checkbox-favorite-error-stroke-color, var(--comp-checkbox-error-color))}.checkbox-fill{stroke:var(--tct-checkbox-checkmark-stroke-color, var(--comp-checkbox-checked-color))}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));transition:opacity var(--comp-checkbox-tween)}:host([type=toggle][checked]:not([checked=false])) .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))))}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-track,.toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}.toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));height:14px;width:46px}:host([checked]:not([checked=false])) .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));opacity:0.5}:host([has-error]) .toggle-track{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)));opacity:0.5}.toggle-indicator{transition:left var(--comp-checkbox-tween);height:30px;width:30px;left:0;border-radius:50%}:host([checked]:not([checked=false])) .toggle-indicator{left:21px}.toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]:not([checked=false])) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host([has-error]) .toggle-circle,:host([has-error]:focus-within) .toggle-circle,:host([has-error]:hover) .toggle-circle{fill:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}.toggle-hover-circle{stroke-width:0}:host(:focus-within) .toggle-hover-circle,:host(:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));stroke-width:10px;stroke-opacity:0.5}:host(:is(:not([checked]),[checked=false]):focus-within) .toggle-hover-circle,:host(:is(:not([checked]),[checked=false]):hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([has-error]) .toggle-hover-circle,:host([has-error]:focus-within) .toggle-hover-circle,:host([has-error]:hover) .toggle-hover-circle{stroke:var(--tct-checkbox-toggle-error-color, var(--tct-stoplight-error, var(--const-stoplight-alert, #d20a0a)))}:host([checked]:not([checked=false])) .off,:host(:is(:not([checked]),[checked=false])) .on{opacity:0}";
|
|
9
9
|
const Q2CheckboxStyle0 = q2CheckboxCss;
|
|
10
10
|
|
|
11
11
|
const Q2Checkbox = class {
|
|
@@ -83,7 +83,7 @@ const Q2Checkbox = class {
|
|
|
83
83
|
const textLabelClasses = ['label-text'];
|
|
84
84
|
if (this.hideLabel)
|
|
85
85
|
textLabelClasses.push('sr');
|
|
86
|
-
return (index.h("div", { key: '
|
|
86
|
+
return (index.h("div", { key: '72089fee38e591729f863d7b4e4f8f7ea0d7ca45', class: "container" }, index.h("input", { key: '5932e63f5cd0482363f02663a55228cd1a46621c', ref: el => (this.inputElement = el), "aria-describedby": this.description ? 'description' : undefined, "aria-invalid": `${this.hasError}`, checked: this.indeterminate || this.checked || false, class: "sr", disabled: !!this.disabled || !!this.groupDisabled, id: this._id, name: this.name || this._id, onClick: this.onInputClick, "test-id": "q2CheckboxInnerCheckBox", type: "checkbox", value: this.value }), index.h("label", { key: '51f115702f745117273e4c47f34513907a53605a', htmlFor: this._id, class: "label-control", "test-id": "checkboxButton" }, this.generateCheckboxSVG()), index.h("div", { key: '5957c85cd35366d76a8fa68d565be6767386488e', class: textLabelClasses.join(' ') }, index.h("label", { key: '6b8a89037d7cb5e93182dd132cb7f027e66ea068', "test-id": "checkboxLabel", htmlFor: this._id }, index$1.loc(this.label), index.h("slot", { key: '49ad6f1037e60eacba5bade1e73845cf2f211719' }))), this.description && (index.h("div", { key: 'd3f7d30481f2007c127b5913f1dc659ddd6affe7', class: "description-text", "test-id": "checkboxDescription", id: "description" }, index$1.loc(this.description)))));
|
|
87
87
|
}
|
|
88
88
|
generateCheckboxSVG() {
|
|
89
89
|
if (this.type === 'favorite') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"q2-checkbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,2vcAA2vc,CAAC;AAClxc,yBAAe,aAAa;;MCGf,UAAU;;;;QAmEnB,QAAG,GAAW,YAAYA,kBAAU,EAAE,EAAE,CAAC;;QA0CzC,iBAAY,GAAG,CAAC,KAAY;YACxB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7E,IAAI,gBAAgB;gBAAE,OAAO;YAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,gBAAgB,CAAC;gBAAE,OAAO;YACxD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;YAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACb,KAAK;gBACL,OAAO;aACV,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SAC7B,CAAC;;uBAtHyD,KAAK;;;wBAYnB,KAAK;;;;;;;;;;;;;IAuDlD,iBAAiB;QACbC,uBAAe,CAAC,IAAI,CAAC,CAAC;KACzB;IAED,gBAAgB;QACZC,qBAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;KAC5D;;IAID,oBAAoB,CAAC,KAAkB;;QAEnC,UAAU,CAAC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I,KAAK,EAAC,iBAAiB,EACvB,MAAM,EAAC,yBAAyB,GAClC,CACA,CACJ,EACR;KACL;;;;;;;;;;","names":["createGuid","handleAriaLabel","overrideFocus","isEventFromElement","h","loc"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), --tct-scale-2, --app-scale-2x, 10px)} 0')\n )};\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n --comp-default-checkbox-margin: #{var-list(var-prefixer(checkbox-margin-top), --app-scale-5x, 25px) 0\n var-list(var-prefixer(checkbox-margin-bottom), --app-scale-5x, 25px)};\n margin: var-list(--tct-checkbox-margin, --comp-default-checkbox-margin);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 20px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 46px)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-color: #{var-list(\n var-prefixer(checkbox-check-stroke-color),\n --t-checkbox-fill,\n --t-a11y-active-gray-color-AA,\n #404040\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 400);\n\n :host([description]) & {\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false'])) & {\n font-weight: var-list(var-prefixer(checkbox-checked-label-font-weight), 600);\n }\n :host(:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host(:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host([description]:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):hover) & {\n font-weight: var-list(\n --tct-checkbox-checked-hover-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n :host([description]:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n font-weight: var-list(\n --tct-checkbox-checked-focused-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n:host([disabled]:not([disabled='false'])),\n:host([group-disabled]) {\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n\n label {\n cursor: not-allowed;\n }\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 3px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(var-prefixer(checkbox-checked-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(var-prefixer(checkbox-checked-outer-fill-color), --comp-checkbox-outer-fill-color);\n }\n\n :host([has-error]:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-error-box-shadow);\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-hover-box-shadow);\n }\n :host(:hover[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow\n );\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-checked-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--comp-checkbox-focused-box-shadow);\n }\n :host(:focus-within[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error][type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error][type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n stroke: var-list(--tct-checkbox-checkmark-stroke-color, --comp-checkbox-checked-color);\n}\n\n.checked-fill {\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([type='toggle']) & {\n stroke: var-list(var-prefixer(checkbox-toggle-icon-stroke), --tct-white, --app-white, #ffffff);\n transition: opacity var(--comp-checkbox-tween);\n }\n :host([type='toggle'][checked]:not([checked='false'])) & {\n stroke: var-list(\n var-prefixer(checkbox-toggle-checked-icon-stroke),\n --t-checkbox-text,\n --tct-white,\n --app-white,\n #ffffff\n );\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-track,\n.toggle-indicator {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.toggle-track {\n fill: var-list(\n var-prefixer(checkbox-toggle-track-color),\n var-prefixer(gray-11),\n --tct-gray-l1,\n --app-gray-l1,\n #cccccc\n );\n height: 14px;\n width: 46px;\n\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n opacity: 0.5;\n }\n :host([has-error]) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n opacity: 0.5;\n }\n}\n\n.toggle-indicator {\n transition: left var(--comp-checkbox-tween);\n height: 30px;\n width: 30px;\n left: 0;\n border-radius: 50%;\n\n :host([checked]:not([checked='false'])) & {\n left: 21px;\n }\n}\n\n.toggle-circle {\n fill: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n.toggle-hover-circle {\n stroke-width: 0;\n\n :host(:focus-within) &,\n :host(:hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n stroke-width: 10px;\n stroke-opacity: 0.5;\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n stroke: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n:host([checked]:not([checked='false'])) .off,\n:host(:is(:not([checked]), [checked='false'])) .on {\n opacity: 0;\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true }) alignment: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true }) description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true }) disabled: boolean;\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 field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true }) indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true }) name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true }) type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true }) groupDisabled: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n ////////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n //////// Host Element Events ////////\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n ////////// OBSERVERS //////////\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n ///// Event ////////\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string; checked: boolean }>;\n\n ///// Actions ////////\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n this.change.emit({\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n /////// View Methods ///////\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={`${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n >\n {this.generateCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n >\n {loc(this.label)}\n <slot />\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n generateCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.generateToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.generateCheckBoxSVGFill()}\n </svg>\n );\n }\n\n generateCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n />\n );\n }\n\n generateToggleSVG() {\n return (\n <div class=\"toggle-svg\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 46 14\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"36\"\n height=\"14\"\n rx=\"7\"\n x=\"5\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 30 30\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-hover-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <circle\n class=\"toggle-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"18\"\n x2=\"18\"\n y2=\"12\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"12\"\n x2=\"18\"\n y2=\"18\"\n />\n <polyline\n class=\"on checked-fill\"\n points=\"11,16 14,19 18,12 14,19\"\n />\n </svg>\n </div>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"q2-checkbox.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,aAAa,GAAG,69bAA69b,CAAC;AACp/b,yBAAe,aAAa;;MCGf,UAAU;;;;QAmEnB,QAAG,GAAW,YAAYA,kBAAU,EAAE,EAAE,CAAC;;QA0CzC,iBAAY,GAAG,CAAC,KAAY;YACxB,KAAK,CAAC,eAAe,EAAE,CAAC;YACxB,KAAK,CAAC,cAAc,EAAE,CAAC;YAEvB,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7E,IAAI,gBAAgB;gBAAE,OAAO;YAC7B,IAAI,EAAE,KAAK,CAAC,MAAM,YAAY,gBAAgB,CAAC;gBAAE,OAAO;YACxD,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;YAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACb,KAAK;gBACL,OAAO;aACV,CAAC,CAAC;YACH,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;SAC7B,CAAC;;uBAtHyD,KAAK;;;wBAYnB,KAAK;;;;;;;;;;;;;IAuDlD,iBAAiB;QACbC,uBAAe,CAAC,IAAI,CAAC,CAAC;KACzB;IAED,gBAAgB;QACZC,qBAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;KAC5D;;IAID,oBAAoB,CAAC,KAAkB;;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AI,GACT,EACFA,sBACI,KAAK,EAAC,iBAAiB,EACvB,MAAM,EAAC,yBAAyB,GAClC,CACA,CACJ,EACR;KACL;;;;;;;;;;","names":["createGuid","handleAriaLabel","overrideFocus","isEventFromElement","h","loc"],"sources":["src/components/q2-checkbox/q2-checkbox.scss?tag=q2-checkbox&encapsulation=shadow","src/components/q2-checkbox/q2-checkbox.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n --comp-checkbox-padding: #{var-list(\n --tct-checkbox-padding,\n unquote('#{var-list(var-prefixer(checkbox-vertical-padding), --tct-scale-2, --app-scale-2x, 10px)} 0')\n )};\n display: block;\n position: relative;\n padding: var(--comp-checkbox-padding);\n}\n\n.container {\n --comp-checkbox-size: #{var-list(var-prefixer(checkbox-size), 20px)};\n --comp-checkbox-default-column-gap: var(--app-scale-2x, 10px);\n --comp-checkbox-default-row-gap: 0;\n --comp-checkbox-default-gap: #{var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap)};\n --comp-checkbox-tween: #{var-list(--tct-tween-1, --app-tween-1, unquote('0.2s ease'))};\n --comp-checkbox-toggle-width: #{var-list(var-prefixer(checkbox-toggle-width), 46px)};\n --comp-checkbox-gap: #{var-list(var-prefixer(checkbox-gap), --comp-checkbox-default-gap)};\n --comp-checkbox-outer-stroke-color: #{var-list(\n var-prefixer(checkbox-outer-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-outer-fill-color: #{var-list(\n var-prefixer(checkbox-outer-fill-color),\n --tct-white,\n --app-white,\n #ffffff\n )};\n --comp-checkbox-checked-color: #{var-list(\n var-prefixer(checkbox-check-stroke-color),\n --t-checkbox-fill,\n --t-a11y-active-gray-color-AA,\n #404040\n )};\n --comp-control-width: var(--comp-checkbox-size);\n --comp-checkbox-error-color: #{var-list(--tct-stoplight-error, --const-stoplight-alert, #d20a0a)};\n\n :host([type='favorite']) & {\n --comp-checkbox-favorite-stroke-color: #{var-list(\n var-prefixer(checkbox-favorite-stroke-color),\n --t-a11y-gray-color-AA,\n #949494\n )};\n --comp-checkbox-favorite-fill-color: #{var-list(var-prefixer(checkbox-favorite-fill-color), #db7d24)};\n }\n\n display: grid;\n grid-template-areas:\n 'svg label'\n 'svg description';\n align-items: center;\n gap: var(--comp-checkbox-gap);\n grid-template-columns: var(--comp-control-width) calc(\n 100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)\n );\n\n :host([hide-label]:not([hide-label='false'])) & {\n grid-template-areas: 'svg';\n grid-template-columns: var(--comp-control-width);\n }\n\n :host([type='toggle']) & {\n --comp-control-width: var(--comp-checkbox-toggle-width);\n }\n\n :host([alignment='right']) &,\n :host([type='toggle']:not([alignment])) & {\n grid-template-areas:\n 'label svg'\n 'description svg';\n grid-template-columns: calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(\n --comp-control-width\n );\n }\n}\n\n.label-control {\n align-items: center;\n display: flex;\n}\n\n.label-text {\n grid-area: label;\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 400);\n\n :host([description]) & {\n font-weight: var-list(var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false'])) & {\n font-weight: var-list(var-prefixer(checkbox-checked-label-font-weight), 600);\n }\n :host(:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host(:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 400);\n }\n :host([description]:hover) & {\n font-weight: var-list(--tct-checkbox-hover-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):hover) & {\n font-weight: var-list(\n --tct-checkbox-checked-hover-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n :host([description]:focus-within) & {\n font-weight: var-list(--tct-checkbox-focused-label-font-weight, var-prefixer(checkbox-label-font-weight), 600);\n }\n :host([checked]:not([checked='false']):focus-within) & {\n font-weight: var-list(\n --tct-checkbox-checked-focused-label-font-weight,\n var-prefixer(checkbox-checked-label-font-weight),\n 600\n );\n }\n}\n\n.description-text {\n grid-area: description;\n font-weight: var-list(var-prefixer(checkbox-description-font-weight), 400);\n\n :host(:hover) & {\n font-weight: var-list(\n --tct-checkbox-hover-description-font-weight,\n var-prefixer(checkbox-description-font-weight),\n 400\n );\n }\n}\n\nlabel {\n color: var-list(--tct-checkbox-label-color);\n cursor: pointer;\n hyphens: var-list(--tct-checkbox-label-hyphens, auto);\n word-break: var-list(--tct-checkbox-label-word-break, break-word);\n word-wrap: var-list(--tct-checkbox-label-word-wrap, break-word);\n}\n\n:host([disabled]:not([disabled='false'])),\n:host([group-disabled]) {\n opacity: var-list(var-prefixer(checkbox-disabled-opacity), --tct-disabled-opacity, --app-disabled-opacity, 0.4);\n\n label {\n cursor: not-allowed;\n }\n}\n\n.checkbox-icon {\n width: var(--comp-checkbox-size);\n height: var(--comp-checkbox-size);\n border-radius: var-list(\n var-prefixer(checkbox-outer-border-radius),\n --tct-border-radius-1,\n --app-border-radius-1,\n 3px\n );\n stroke: var(--comp-checkbox-outer-stroke-color);\n fill: var(--comp-checkbox-outer-fill-color);\n stroke-width: var-list(var-prefixer(checkbox-outer-stroke-width), 2);\n flex-shrink: 0;\n\n :host([checked]:not([checked='false']):not([type='favorite'])) & {\n stroke: var-list(var-prefixer(checkbox-checked-outer-stroke-color), --comp-checkbox-outer-stroke-color);\n fill: var-list(var-prefixer(checkbox-checked-outer-fill-color), --comp-checkbox-outer-fill-color);\n }\n\n :host([has-error]:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-error-outer-stroke-color, --comp-checkbox-error-color);\n fill: var-list(--tct-checkbox-error-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-error-box-shadow);\n }\n\n :host(:hover:not([type='favorite'])) & {\n stroke: var-list(--tct-checkbox-hover-outer-stroke-color, --comp-checkbox-outer-stroke-color);\n fill: var-list(--tct-checkbox-hover-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--tct-checkbox-hover-box-shadow);\n }\n :host(:hover[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-hover-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-hover-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-hover-box-shadow,\n --tct-checkbox-error-box-shadow,\n --tct-checkbox-hover-box-shadow\n );\n }\n\n :host(:focus-within:not([type='favorite'])) & {\n --comp-checkbox-focused-box-shadow: #{var(--const-double-focus-ring),\n var-list(--tct-global-focus, unquote('0 0 0 2px #33b4ff'))};\n\n stroke: var-list(var-prefixer(checkbox-focused-outer-stroke-color), --comp-checkbox-checked-color);\n fill: var-list(--tct-checkbox-focused-outer-fill-color, --comp-checkbox-outer-fill-color);\n box-shadow: var(--comp-checkbox-focused-box-shadow);\n }\n :host(:focus-within[has-error]:not([type='favorite'])) & {\n stroke: var-list(\n --tct-checkbox-error-focused-outer-stroke-color,\n --tct-checkbox-error-outer-stroke-color,\n --comp-checkbox-error-color\n );\n fill: var-list(\n --tct-checkbox-error-focused-outer-fill-color,\n --tct-checkbox-error-outer-fill-color,\n --comp-checkbox-outer-fill-color\n );\n box-shadow: var-list(\n --tct-checkbox-error-focused-box-shadow,\n --tct-checkbox-error-box-shadow,\n --comp-checkbox-focused-box-shadow\n );\n }\n\n // Favorite\n :host([type='favorite']) & {\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-stroke-width), 1)};\n --tct-icon-stroke-primary: var(--comp-checkbox-favorite-stroke-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host(:hover[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n // Checked favorite\n :host([checked]:not([checked='false'])[type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-stroke-color,\n --tct-checkbox-favorite-stroke-color,\n --comp-checkbox-favorite-fill-color\n )};\n fill: var-list(--tct-checkbox-favorite-checked-fill-color, --comp-checkbox-favorite-fill-color);\n transition:\n fill var(--comp-checkbox-tween),\n color var(--comp-checkbox-tween),\n stroke var(--comp-checkbox-tween);\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:hover) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-hover-stroke-color,\n --tct-checkbox-favorite-hover-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-fill-primary: #{var-list(\n --tct-checkbox-favorite-checked-fill-color,\n --comp-checkbox-favorite-fill-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([checked]:not([checked='false'])[type='favorite']:focus-within) & {\n --tct-icon-stroke-primary: #{var-list(\n --tct-checkbox-favorite-checked-focused-stroke-color,\n --tct-checkbox-favorite-focused-stroke-color,\n --comp-checkbox-favorite-stroke-color\n )};\n --tct-icon-stroke-width: #{var-list(var-prefixer(checkbox-favorite-hover-stroke-width), 2)};\n }\n\n :host([has-error][type='favorite']) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n :host([has-error][type='favorite'][checked]:not([checked='false'])) & {\n --tct-icon-stroke-primary: #{var-list(--tct-checkbox-favorite-error-stroke-color, --comp-checkbox-error-color)};\n }\n}\n\n.checkbox-fill {\n stroke: var-list(--tct-checkbox-checkmark-stroke-color, --comp-checkbox-checked-color);\n}\n\n.checked-fill {\n stroke-width: var-list(var-prefixer(checkbox-check-stroke-width), 2.5);\n stroke-linecap: round;\n stroke-linejoin: round;\n\n :host([type='toggle']) & {\n stroke: var-list(var-prefixer(checkbox-toggle-icon-stroke), --tct-white, --app-white, #ffffff);\n transition: opacity var(--comp-checkbox-tween);\n }\n :host([type='toggle'][checked]:not([checked='false'])) & {\n stroke: var-list(\n var-prefixer(checkbox-toggle-checked-icon-stroke),\n --t-checkbox-text,\n --tct-white,\n --app-white,\n #ffffff\n );\n }\n}\n\n.indeterminate-fill {\n stroke-width: var-list(var-prefixer(checkbox-indeterminate-stroke-width), 3.5);\n}\n\n.toggle-svg {\n height: 30px;\n width: var(--comp-checkbox-toggle-width);\n position: relative;\n text-align: initial;\n}\n\n.toggle-track,\n.toggle-indicator {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.toggle-track {\n fill: var-list(\n var-prefixer(checkbox-toggle-track-color),\n var-prefixer(gray-11),\n --tct-gray-l1,\n --app-gray-l1,\n #cccccc\n );\n height: 14px;\n width: 46px;\n\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n opacity: 0.5;\n }\n :host([has-error]) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n opacity: 0.5;\n }\n}\n\n.toggle-indicator {\n transition: left var(--comp-checkbox-tween);\n height: 30px;\n width: 30px;\n left: 0;\n border-radius: 50%;\n\n :host([checked]:not([checked='false'])) & {\n left: 21px;\n }\n}\n\n.toggle-circle {\n fill: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n :host([checked]:not([checked='false'])) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n fill: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n fill: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n.toggle-hover-circle {\n stroke-width: 0;\n\n :host(:focus-within) &,\n :host(:hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-checked-color), --comp-checkbox-checked-color);\n stroke-width: 10px;\n stroke-opacity: 0.5;\n }\n\n :host(:is(:not([checked]), [checked='false']):focus-within) &,\n :host(:is(:not([checked]), [checked='false']):hover) & {\n stroke: var-list(var-prefixer(checkbox-toggle-circle-color), --t-a11y-gray-color-AA, #949494);\n }\n :host([has-error]) &,\n :host([has-error]:focus-within) &,\n :host([has-error]:hover) & {\n stroke: var-list(--tct-checkbox-toggle-error-color, --tct-stoplight-error, --const-stoplight-alert, #d20a0a);\n }\n}\n\n:host([checked]:not([checked='false'])) .off,\n:host(:is(:not([checked]), [checked='false'])) .on {\n opacity: 0;\n}\n","import { Component, ComponentInterface, Prop, Element, Listen, Watch, Event, EventEmitter, h } from '@stencil/core';\nimport { createGuid, handleAriaLabel, isEventFromElement, loc, overrideFocus } from 'src/utils';\n\n@Component({ tag: 'q2-checkbox', shadow: true, styleUrl: 'q2-checkbox.scss' })\nexport class Q2Checkbox implements ComponentInterface {\n /** Determine which side of the label the checkbox will render on. */\n @Prop({ reflect: true }) alignment: string;\n\n /** The state of the checkbox. This modifies the visual appearance of the element. */\n @Prop({ reflect: true, mutable: true }) checked: boolean = false;\n\n /**\n * Populates a description that is displayed beneath the label.\n * @localizable\n */\n @Prop({ reflect: true }) description: string;\n\n /** Disables the checkbox and prevents interaction. */\n @Prop({ reflect: true }) disabled: boolean;\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 field's `<label>` element from view.\n *\n * @warning\n * Only use when a visible label is impractical.\n */\n @Prop({ reflect: true, mutable: true }) hideLabel: boolean;\n\n /**\n * Used on a parent checkbox in a checkbox group (e.g. \"Select All\") to indicate that some, but not all, checkboxes in a group are checked.\n *\n * When `true`, the \"indeterminate\" selection style is applied.\n * To apply the standard \"checked\" selection style, `checked` must be true, and `indeterminate` must be `false`.\n */\n @Prop({ reflect: true }) indeterminate: boolean;\n\n /**\n * The visible label text for the checkbox. Appears to the right of the box for 'default' and 'favorite' checkboxes, and to the left for 'toggle' checkboxes.\n * Yielded content will be adjacent to this text.\n * @localizable\n */\n @Prop({ reflect: true, mutable: true }) label: string;\n\n /** A static string used to establish a symbolic relationship between checkboxes. */\n @Prop({ reflect: true }) name: string;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) readonly: boolean;\n\n /** The field is not interactive, but remains focusable. */\n @Prop({ reflect: true }) slotReadonly: boolean;\n\n /** The visual style of the checkbox. This does not need to be defined for a standard checkbox. */\n @Prop({ reflect: true }) type: 'favorite' | 'toggle';\n\n /** A static reference value for the checkbox. */\n @Prop({ reflect: true }) value: string;\n\n /**\n * Used by q2-checkbox-group to disable all checkboxes in the group\n * @private\n */\n @Prop({ reflect: true }) groupDisabled: boolean;\n\n /** @deprecated */\n @Prop({ reflect: true, mutable: true }) ariaLabel: string;\n\n @Element() hostElement: HTMLElement;\n _id: string = `checkbox-${createGuid()}`;\n inputElement: HTMLInputElement;\n\n ////////// LIFECYCLE HOOKS ////////\n\n componentWillLoad() {\n handleAriaLabel(this);\n }\n\n componentDidLoad(): void {\n overrideFocus(this.hostElement);\n this.hostElement.click = () => this.inputElement.click();\n }\n\n //////// Host Element Events ////////\n @Listen('change')\n defaultChangeHandler(event: CustomEvent) {\n // We use setTimeout to give an opportunity to call preventDefault\n setTimeout(() => this.handleChangeEvent(event), 0);\n }\n\n @Listen('focus')\n delegateFocus(event: FocusEvent) {\n if (!isEventFromElement(event, this.hostElement)) return;\n this.hostElement.shadowRoot.querySelector('input').focus();\n }\n\n ////////// OBSERVERS //////////\n\n @Watch('ariaLabel')\n ariaLabelObserver() {\n handleAriaLabel(this);\n }\n\n ///// Event ////////\n /**\n * Emitted when the checkbox is toggled.\n * @legacyEvent\n */\n @Event() change: EventEmitter<{ value: string; checked: boolean }>;\n\n ///// Actions ////////\n onInputClick = (event: Event) => {\n event.stopPropagation();\n event.preventDefault();\n\n const isNotInteractive = this.disabled || this.readonly || this.slotReadonly;\n if (isNotInteractive) return;\n if (!(event.target instanceof HTMLInputElement)) return;\n const { value, checked } = event.target;\n\n this.change.emit({\n value,\n checked,\n });\n this.inputElement.focus();\n };\n\n handleChangeEvent(event: CustomEvent<{ checked: boolean; value: string }>) {\n if (\n this.readonly ||\n this.disabled ||\n this.hostElement.onchange ||\n event.defaultPrevented ||\n event.target !== this.hostElement ||\n !event.detail\n ) {\n return;\n }\n this.checked = event.detail.checked;\n }\n\n /////// View Methods ///////\n render() {\n const textLabelClasses = ['label-text'];\n if (this.hideLabel) textLabelClasses.push('sr');\n return (\n <div class=\"container\">\n <input\n ref={el => (this.inputElement = el)}\n aria-describedby={this.description ? 'description' : undefined}\n aria-invalid={`${this.hasError}`}\n checked={this.indeterminate || this.checked || false}\n class=\"sr\"\n disabled={!!this.disabled || !!this.groupDisabled}\n id={this._id}\n name={this.name || this._id}\n onClick={this.onInputClick}\n test-id=\"q2CheckboxInnerCheckBox\"\n type=\"checkbox\"\n value={this.value}\n />\n <label\n htmlFor={this._id}\n class=\"label-control\"\n test-id=\"checkboxButton\"\n >\n {this.generateCheckboxSVG()}\n </label>\n <div class={textLabelClasses.join(' ')}>\n <label\n test-id=\"checkboxLabel\"\n htmlFor={this._id}\n >\n {loc(this.label)}\n <slot />\n </label>\n </div>\n {this.description && (\n <div\n class=\"description-text\"\n test-id=\"checkboxDescription\"\n id=\"description\"\n >\n {loc(this.description)}\n </div>\n )}\n </div>\n );\n }\n\n generateCheckboxSVG() {\n if (this.type === 'favorite') {\n return (\n <q2-icon\n type=\"star\"\n class=\"checkbox-icon\"\n />\n );\n }\n\n if (this.type === 'toggle') {\n return this.generateToggleSVG();\n }\n\n return (\n <svg\n aria-hidden=\"true\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n class=\"checkbox-icon\"\n focusable=\"false\"\n >\n <rect\n x=\"1\"\n y=\"1\"\n width=\"18\"\n height=\"18\"\n rx=\"3\"\n />\n {(this.checked || this.indeterminate) && this.generateCheckBoxSVGFill()}\n </svg>\n );\n }\n\n generateCheckBoxSVGFill() {\n if (this.indeterminate) {\n return (\n <line\n class=\"checkbox-fill indeterminate-fill\"\n x1=\"4\"\n y1=\"10\"\n x2=\"16\"\n y2=\"10\"\n />\n );\n }\n return (\n <polyline\n class=\"checkbox-fill checked-fill\"\n points=\"5 11 8.5 14.5 15 6\"\n />\n );\n }\n\n generateToggleSVG() {\n return (\n <div class=\"toggle-svg\">\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 46 14\"\n class=\"toggle-track\"\n test-id=\"toggleTrack\"\n >\n <rect\n width=\"36\"\n height=\"14\"\n rx=\"7\"\n x=\"5\"\n />\n </svg>\n <svg\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 30 30\"\n class=\"toggle-indicator\"\n test-id=\"toggleIndicator\"\n >\n <circle\n class=\"toggle-hover-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <circle\n class=\"toggle-circle\"\n width=\"20\"\n height=\"20\"\n cx=\"15\"\n cy=\"15\"\n r=\"10\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"18\"\n x2=\"18\"\n y2=\"12\"\n />\n <line\n class=\"off checked-fill\"\n x1=\"12\"\n y1=\"12\"\n x2=\"18\"\n y2=\"18\"\n />\n <polyline\n class=\"on checked-fill\"\n points=\"11,16 14,19 18,12 14,19\"\n />\n </svg>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -121,7 +121,7 @@ const Q2Currency = class {
|
|
|
121
121
|
/// DOM ///
|
|
122
122
|
render() {
|
|
123
123
|
const { hasPlusMinusSign, plusMinusSign, currencyIsFront, currencySymbol, shouldSuperscriptSymbol, amountCore, fraction, shouldSuperscriptFraction, readableCurrency, currencyClasses, } = this;
|
|
124
|
-
return (index.h("div", { key: '
|
|
124
|
+
return (index.h("div", { key: 'b105b288c8b8af76225ae28b11e243ebaa5bdacd', class: currencyClasses, "aria-label": readableCurrency }, hasPlusMinusSign && index.h("span", { key: '496f3edfb86c0d5ec1ec4a0fdee792dcbe9ee312' }, plusMinusSign), currencyIsFront && index.h("span", { key: '45f5f1c7fc349582872e1271a127f63443615b38', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol), index.h("span", { key: '49cad26e70ea2fc4b12bba9ddf32ae86b057521c' }, amountCore), index.h("span", { key: '3fd6d5c8070e9ac08efcb382421828025e8a10c4', class: shouldSuperscriptFraction ? 'superscript' : '' }, fraction), !currencyIsFront && index.h("span", { key: 'a8623526722fad8080c59ab488e9f1557031de38', class: shouldSuperscriptSymbol ? 'superscript' : '' }, currencySymbol)));
|
|
125
125
|
}
|
|
126
126
|
static get watchers() { return {
|
|
127
127
|
"amount": ["propsUpdated"],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
8
|
const q2DataTableCss = "*{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}:host{display:block}.container{--comp-cell-padding:var(--tct-data-table-cell-padding, var(--tct-table-cell-padding, var(--app-scale-3x, 15px)));--comp-select-column-width:var(--tct-data-table-select-column-width, var(--tct-table-select-column-width, var(--tct-checkbox-size, 20px)));--comp-dropdown-column-width:var(--tct-data-table-dropdown-column-width, var(--tct-table-dropdown-column-width, var(--tct-btn-icon-width, 44px)));--comp-expandable-row-control-column-width:var(--tct-data-table-expandable-row-control-column-width, var(--tct-table-expandable-row-control-column-width, var(--tct-btn-icon-width, 44px)));overflow:auto;--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}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([shadowed]:not([shadowed=false])) .container{box-shadow:var(--tct-data-table-shadow, var(--tct-table-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))))}:host([density=compact]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-compact, var(--tct-table-cell-padding-compact, var(--app-scale-1x, 5px)))}:host([density=comfortable]) .container{--comp-cell-padding:var(--tct-data-table-cell-padding-comfortable, var(--tct-table-cell-padding-comfortable, var(--app-scale-5x, 25px)))}table{table-layout:var(--tct-data-table-layout, var(--tct-table-layout, auto));border-collapse:collapse;border-spacing:0;width:var(--tct-data-table-width, var(--tct-table-width));min-width:100%;background:var(--tct-data-table-background, var(--tct-table-background, var(--t-base, #ffffff)));caption-side:var(--tct-data-table-caption-side, var(--tct-table-caption-side, bottom))}thead{border-width:var(--tct-data-table-header-border-width, var(--tct-table-header-border-width, 0 0 2px 0));border-style:var(--tct-data-table-header-border-style, var(--tct-table-header-border-style, solid));border-color:var(--tct-data-table-header-border-color, var(--tct-table-header-border-color, var(--t-gray-9, #999999)));background:var(--tct-data-table-header-background, var(--tct-table-header-background))}col.select-column{width:var(--comp-select-column-width)}col.expandable-row-control-column{width:var(--comp-expandable-row-control-column-width)}col.dropdown-column{width:var(--comp-dropdown-column-width)}:host(:is([bordered=vertical],[bordered=grid])) col{border-width:var(--tct-data-table-column-border-width, 0 1px 0 0);border-style:var(--tct-data-table-column-border-style, solid);border-color:var(--tct-data-table-column-border-color, var(--t-gray-9, #999999))}:host(:is([bordered=vertical],[bordered=grid])) col:last-child{border:none}td,th{padding:var(--comp-cell-padding);text-align:start;vertical-align:middle}td.align-end,th.align-end{text-align:end}td.align-center,th.align-center{text-align:center}td.vertical-align-top,th.vertical-align-top{vertical-align:top}td.vertical-align-bottom,th.vertical-align-bottom{vertical-align:bottom}th .header-content{font-weight:var(--tct-data-table-header-font-weight, var(--tct-table-header-font-weight, 600));font-size:var(--tct-data-table-header-font-size, var(--app-font-size, 14px))}th.sorted .header-content{font-weight:var(--tct-data-table-header-sorted-font-weight, var(--tct-table-header-sorted-font-weight, 600))}th .sorted-indicator{--comp-header-sortable-icon-size:var(--tct-data-table-header-sortable-icon-size, var(--tct-table-header-sortable-icon-size, var(--app-scale-3x, 15px)));--tct-icon-stroke-width:2;width:var(--comp-header-sortable-icon-size);height:var(--comp-header-sortable-icon-size)}th .sorted-indicator.direction-ASC{transform:rotate(180deg)}th q2-btn .header-content{display:flex;align-items:center;gap:var(--tct-data-table-header-content-gap, var(--tct-table-header-content-gap, var(--app-scale-2x, 10px)))}tr.expandable,tr.clickable{cursor:pointer}tr.expandable:focus,tr.clickable:focus{outline:none;box-shadow:none}tr.striped:nth-child(even){background:var(--tct-data-table-row-even-background, var(--t-gray-14, #f2f2f2))}tr.striped:nth-child(odd){background:var(--tct-data-table-row-odd-background, transparent)}tr.expandable:hover{background:var(--tct-data-table-expandable-row-hover-background, var(--tct-table-expandable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.clickable:hover{background:var(--tct-data-table-clickable-row-hover-background, var(--tct-table-clickable-row-hover-background, var(--t-gray-14, #f2f2f2)))}tr.selected{background:var(--tct-data-table-selected-row-background, var(--tct-table-selected-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}tr.expanded .toggle-expandable-row{transform:rotate(180deg)}:host(:is([bordered],[bordered=horizontal],[bordered=grid]):not([bordered=vertical],[bordered=false])) tbody tr{border-width:var(--tct-data-table-row-border-width, var(--tct-table-row-border-width, 0 0 1px 0));border-style:var(--tct-data-table-row-border-style, var(--tct-table-row-border-style, solid));border-color:var(--tct-data-table-row-border-color, var(--tct-table-row-border-color, var(--t-gray-9, #999999)))}tr.loading-row{background:var(--tct-data-table-loading-row-background, var(--tct-table-loading-row-background, var(--t-base, #ffffff)))}tr.loading-row td{text-align:center}tr.loading-row q2-loading{font-size:4em}tr.empty-state{background:var(--tct-data-table-loading-row-background, var(--t-base, #ffffff))}tr.empty-state td{text-align:center}tr.empty-state .empty-state-content{display:flex;flex-direction:column;align-items:center;padding-top:var(--app-scale-10x, 50px);padding-bottom:var(--app-scale-10x, 50px);gap:var(--app-scale-4x, 20px);--tct-icon-size:var(--app-scale-6x, 30px)}tr.expandable-row{background:var(--tct-data-table-expanded-row-background, var(--tct-table-expanded-row-background, var(--t-gray-14, #f2f2f2)))}td.clamped div{text-overflow:ellipsis;overflow:hidden;display:-webkit-box;-webkit-line-clamp:var(--comp-line-clamp-count, 1);-webkit-box-orient:vertical}td.expandable-row-control-column{--tct-btn-icon-hover-bg:transparent;padding:var(--tct-data-table-expandable-row-control-column-padding, var(--tct-table-expandable-row-control-column-padding, 0 5px));text-align:center}td.dropdown-column{padding:var(--tct-data-table-dropdown-column-padding, var(--tct-table-dropdown-column-padding, 0 5px));text-align:center}td.click-column:not(.sr){padding:var(--tct-data-table-clickable-column-padding, var(--tct-table-clickable-column-padding, 0 5px));text-align:center}caption{padding:var(--tct-data-table-caption-padding, var(--tct-table-caption-padding, var(--app-scale-2x, 10px)));font-size:var(--tct-data-table-caption-font-size, var(--tct-table-caption-font-size, inherit));font-weight:var(--tct-data-table-caption-font-weight, var(--tct-table-caption-font-weight, 600));text-align:var(--tct-data-table-caption-text-align, var(--tct-table-caption-text-align, center));color:var(--tct-data-table-caption-color, var(--tct-table-caption-color, inherit))}q2-checkbox{padding:0}";
|
|
9
9
|
const Q2DataTableStyle0 = q2DataTableCss;
|
|
@@ -268,7 +268,7 @@ const Q2DataTable = class {
|
|
|
268
268
|
/// DOM ///
|
|
269
269
|
render() {
|
|
270
270
|
const { caption } = this;
|
|
271
|
-
return (index.h("div", { key: '
|
|
271
|
+
return (index.h("div", { key: '6b24acf2ae2ace0665910483d8c3b7b28ec40a42', class: "container" }, index.h("table", { key: '2820c1edc6e52afa271f0c6984bcaa23b1411edf' }, caption && index.h("caption", { key: '359508447bdc339c30c272a2e60cc4096d5099fe', class: this.hideCaption ? 'sr' : undefined }, caption), this.renderTableColGroup(), this.renderTableHeader(), this.renderEmptyState(), this.renderTableRows())));
|
|
272
272
|
}
|
|
273
273
|
renderTableColGroup() {
|
|
274
274
|
const { serializedHeaders: headers, selectable, clickable, hasExpandableRows, hasDropdowns } = this;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
8
|
const q2DetailCss = "*{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}:host{display:block}::slotted([slot]){display:flex;align-items:center;--tct-icon-size:var(--tct-detail-label-icon-size, 16px)}.detail{column-gap:var(--tct-detail-gap-column, var(--app-scale-1x, 5px));row-gap:var(--tct-detail-gap-row, 0px)}.detail-block{display:flex;width:100%}.detail-inline{display:flex}.detail-horizontal{align-items:var(--tct-detail-vertical-alignment, baseline);flex-direction:row}.detail-stacked{flex-direction:column}.detail-stacked-alignment-left{align-items:flex-start}.detail-stacked-alignment-right{align-items:flex-end}.label{flex:1;text-align:left;line-height:1.5;color:var(--tct-detail-label-font-color, #141430)}.label-size-xsmall{color:var(--tct-detail-label-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-label-xsmall-font-size, 14px)}.label-size-small{color:var(--tct-detail-label-small-font-color);font-size:var(--tct-detail-label-small-font-size, 14px)}.label-size-medium{color:var(--tct-detail-label-medium-font-color);font-size:var(--tct-detail-label-medium-font-size, 14px)}.label-size-large{color:var(--tct-detail-label-large-font-color);font-size:var(--tct-detail-label-large-font-size, 16px)}.label-size-xlarge{color:var(--tct-detail-label-xlarge-font-color);font-size:var(--tct-detail-label-xlarge-font-size, 18px)}.label-size-inline{font-size:var(--tct-detail-label-inline-font-size, 1em);color:inherit}.description{flex:1;display:flex;align-items:center;line-height:1.5;color:var(--tct-detail-description-font-color, #141430);column-gap:var(--tct-detail-description-gap-column, var(--app-scale-1x, 5px))}.description-alignment-right{justify-content:flex-end}.description-size-xsmall{color:var(--tct-detail-description-xsmall-font-color, #6f6f82);font-size:var(--tct-detail-description-xsmall-font-size, 14px)}.description-size-small{color:var(--tct-detail-description-small-font-color);font-size:var(--tct-detail-description-small-font-size, 14px)}.description-size-medium{color:var(--tct-detail-description-medium-font-color);font-size:var(--tct-detail-description-medium-font-size, 24px)}.description-size-large{color:var(--tct-detail-description-large-font-color);font-size:var(--tct-detail-description-large-font-size, 28px)}.description-size-xlarge{color:var(--tct-detail-description-xlarge-font-color);font-size:var(--tct-detail-description-xlarge-font-size, 32px)}.description-size-inline{font-size:var(--tct-detail-description-inline-font-size, 1em);color:inherit}";
|
|
9
9
|
const Q2DetailStyle0 = q2DetailCss;
|
|
@@ -96,7 +96,7 @@ const Q2Detail = class {
|
|
|
96
96
|
// #endregion
|
|
97
97
|
// #region Render methods
|
|
98
98
|
render() {
|
|
99
|
-
return (index.h("div", { key: '
|
|
99
|
+
return (index.h("div", { key: '6caa3ba4dc7fafd725fbbb191fa57c46ff9f52bc', class: this.detailClasses }, this.hasLabel && (index.h("div", { key: 'e8a0149d3c9fc8d1e24249b04b0390b52502c93b', class: this.labelClasses, "aria-describedby": !!this.description ? 'label-description' : undefined }, !!this.label ? index$1.loc(this.label) : this.hasLabelSlotContent ? index.h("slot", { name: "label" }) : '')), this.hasDescripiton && (index.h("div", { key: '03d8271ffc92dd8a3b09600edf7e3fc97c539403', id: "label-description", class: this.descriptionClasses }, !!this.description ? index$1.loc(this.description) : this.hasDefaultSlotContent ? index.h("slot", null) : ''))));
|
|
100
100
|
}
|
|
101
101
|
get hostElement() { return index.getElement(this); }
|
|
102
102
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
8
|
const q2DropdownItemCss = "*{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}.dropdown-separator{--comp-default-separator-margin:0 var(--tct-scale-1, var(--app-scale-3x, 15px));margin:var(--tct-dropdown-separator-margin, var(--t-dropdown-separator-margin, var(--comp-default-separator-margin)));border-bottom:1px solid var(--tct-dropdown-item-separator-color, var(--t-dropdown-item-separator-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))))}.dropdown-item-wrapper{display:flex}.dropdown-item{min-height:44px;flex:1 1 100%;padding:var(--tct-dropdown-item-padding, var(--t-dropdown-item-padding, 2px))}.dropdown-item-content{--comp-default-content-padding:12px var(--app-scale-3x, 15px);padding:var(--tct-dropdown-item-content-padding, var(--t-dropdown-item-content-padding, var(--comp-default-content-padding)));text-align:left;background:var(--tct-dropdown-item-background, var(--tct-dropdown-item-bg, var(--t-dropdown-item-bg, var(--tct-white, var(--t-base, var(--app-white, #ffffff))))));color:var(--tct-dropdown-item-font-color, var(--t-dropdown-item-font-color, inherit));transition:background-color var(--tct-dropdown-item-content-tween, var(--t-dropdown-item-content-tween, var(--tct-tween-1, var(--app-tween-1, 0.2s ease))));overflow:hidden;text-overflow:ellipsis;flex:1}:host(:not([disabled])) .dropdown-item-content:hover,:host(:not([disabled])) .dropdown-item:focus-within .dropdown-item-content{background:var(--tct-dropdown-item-hover-background, var(--tct-dropdown-item-selected-bg, var(--t-dropdown-item-selected-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l3, var(--app-gray-l3, var(--t-base, #f2f2f2))))))));color:var(--tct-dropdown-item-hover-color, var(--tct-dropdown-item-selected-font-color, var(--t-dropdown-item-selected-font-color, inherit)))}.remove-dropdown-item{flex:0 0 44px;margin:2px}";
|
|
9
9
|
const Q2DropdownItemStyle0 = q2DropdownItemCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-14c3693c.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-3f1498f7.js');
|
|
7
7
|
|
|
8
8
|
const q2DropdownCss = "*{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}:host{display:inline-flex}:host([block]){display:block}click-elsewhere{position:relative;display:block}q2-popover{--tct-popover-min-width:var(--tct-dropdown-width, var(--t-dropdown-width))}";
|
|
9
9
|
const Q2DropdownStyle0 = q2DropdownCss;
|
|
@@ -37,6 +37,7 @@ const Q2Dropdown = class {
|
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
this.onToggleClick = () => {
|
|
40
|
+
this.popoverElement.controlElement = this.controlElement;
|
|
40
41
|
if (this.open) {
|
|
41
42
|
this.closeDropdown();
|
|
42
43
|
}
|
|
@@ -45,6 +46,7 @@ const Q2Dropdown = class {
|
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
this.onToggleKeydown = (event) => {
|
|
49
|
+
this.popoverElement.controlElement = this.controlElement;
|
|
48
50
|
if (['ArrowUp', 'Up'].includes(event.key)) {
|
|
49
51
|
event.preventDefault();
|
|
50
52
|
this.openDropdown();
|
|
@@ -290,7 +292,7 @@ const Q2Dropdown = class {
|
|
|
290
292
|
/// DOM ///
|
|
291
293
|
render() {
|
|
292
294
|
const btnProps = this.toggleButtonProps;
|
|
293
|
-
return (index.h("click-elsewhere", { key: '
|
|
295
|
+
return (index.h("click-elsewhere", { key: '38d3d5cb16d041ba83516f4522edd9fa66e2e88d', class: this.open ? 'dropdown-open' : '', onChange: this.onClickElsewhere, "test-id": "dropdownContainer" }, index.h("q2-btn", { key: 'b85e6f697ec2a8cba5b91a58b5ba91eb0bea9c7b', ref: el => (this.controlElement = el), class: btnProps.className, onClick: this.onToggleClick, onKeyDown: this.onToggleKeydown, fab: btnProps.fab, intent: btnProps.intent, active: btnProps.active, disabled: btnProps.disabled, ariaExpanded: `${!!btnProps.ariaExpanded}`, label: this.hideLabel && this.label ? index$1.loc(this.label) : undefined, hideLabel: this.hideLabel, ariaHasPopup: "menu", "test-id": "dropdownButton", block: this.block, description: index$1.loc('tecton.element.dropdown.itemCount', [this.determineDropdownItemCount]) }, this.hasCustomButton ? (index.h("div", { "test-id": "dropdownCustom", class: btnProps.custom ? '' : 'hidden' }, index.h("slot", { name: "custom-dropdown-button" }))) : (index.h(index.Fragment, null, this.icon ? index.h("q2-icon", { type: this.icon }) : ' ', this.label && !this.hideLabel && (index.h("span", { class: "dropdown-button-text" }, index$1.loc(this.label)))))), index.h("q2-popover", { key: '18934248da83aca500bc2f1481dfaa58372488e5', ref: el => (this.popoverElement = el), controlElement: this.controlElement, open: this.open, minHeight: this.popoverMinHeight, direction: this.popoverDirection, align: this.popoverAlignment, mode: this.popoverMode || undefined, block: this.block }, index.h("div", { key: 'fb2897344a36a631f7293606cdb94034c3429312', onClick: this.onDropdownMenuClick, onKeyDown: this.onDropdownMenuKeydown, role: "menu", "aria-label": index$1.loc(this.label) || undefined }, index.h("slot", { key: 'a2e944bf54326e8f437d54c0630f58406ec35a55' })), this.open && (index.h("q2-btn", { key: 'bf0051148f0068ad0044f8d1ad48bdfa7b4f1f9a', class: "sr close-dropdown", onFocus: this.closeDropdown })))));
|
|
294
296
|
}
|
|
295
297
|
get hostElement() { return index.getElement(this); }
|
|
296
298
|
static get watchers() { return {
|