q2-tecton-elements 1.52.2 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle-report.json +43422 -0
- package/dist/cjs/{action-sheet-d32c41ae.js → action-sheet-8254c0fd.js} +6 -3
- package/dist/cjs/action-sheet-8254c0fd.js.map +1 -0
- package/dist/cjs/click-elsewhere.cjs.entry.js +96 -0
- package/dist/cjs/click-elsewhere.cjs.entry.js.map +1 -0
- package/dist/cjs/{index-07285783.js → index-76f63767.js} +1 -21
- package/dist/cjs/index-76f63767.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-group.cjs.entry.js +38 -17
- package/dist/cjs/q2-action-group.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-badge_7.cjs.entry.js +52 -18
- package/dist/cjs/q2-badge_7.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +1 -1
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q2-detail.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +17 -16
- package/dist/cjs/q2-dropdown-item.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +48 -99
- package/dist/cjs/q2-dropdown.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-file-picker.cjs.entry.js +236 -0
- package/dist/cjs/q2-file-picker.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-item_3.cjs.entry.js +251 -0
- package/dist/cjs/q2-item_3.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup.cjs.entry.js +1 -1
- package/dist/cjs/{q2-option-list.cjs.entry.js → q2-option-list_2.cjs.entry.js} +355 -21
- package/dist/cjs/q2-option-list_2.cjs.entry.js.map +1 -0
- package/dist/cjs/q2-option.cjs.entry.js +18 -4
- package/dist/cjs/q2-option.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-pagination.cjs.entry.js +4 -4
- package/dist/cjs/q2-pill.cjs.entry.js +14 -9
- package/dist/cjs/q2-pill.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-relative-time.cjs.entry.js +2 -2
- package/dist/cjs/q2-resize-observer.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +3 -3
- package/dist/cjs/q2-select.cjs.entry.js +8 -5
- package/dist/cjs/q2-select.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +2 -2
- package/dist/cjs/q2-stepper.cjs.entry.js +2 -2
- package/dist/cjs/q2-tag.cjs.entry.js +9 -4
- package/dist/cjs/q2-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tecton-tab-pane.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/q2-action-group/q2-action-group.css +25 -8
- package/dist/collection/components/q2-action-group/q2-action-group.js +55 -33
- package/dist/collection/components/q2-action-group/q2-action-group.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js +142 -6
- package/dist/collection/components/q2-action-group/test/q2-action-group.e2e.js.map +1 -1
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js +126 -62
- package/dist/collection/components/q2-action-group/test/q2-action-group.spec.js.map +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js +1 -1
- package/dist/collection/components/q2-action-sheet/test/q2-action-sheet-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-avatar/q2-avatar.css +5 -0
- package/dist/collection/components/q2-btn/q2-btn.css +74 -0
- package/dist/collection/components/q2-btn/q2-btn.js +50 -16
- package/dist/collection/components/q2-btn/q2-btn.js.map +1 -1
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js +29 -0
- package/dist/collection/components/q2-btn/test/q2-btn-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown/q2-dropdown.js +83 -103
- package/dist/collection/components/q2-dropdown/q2-dropdown.js.map +1 -1
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js +188 -24
- package/dist/collection/components/q2-dropdown/test/q2-dropdown-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.css +1 -1
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js +54 -16
- package/dist/collection/components/q2-dropdown-item/q2-dropdown-item.js.map +1 -1
- package/dist/collection/components/q2-file-picker/q2-file-picker.css +307 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.js +426 -0
- package/dist/collection/components/q2-file-picker/q2-file-picker.js.map +1 -0
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js +11 -0
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.e2e.js.map +1 -0
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js +435 -0
- package/dist/collection/components/q2-file-picker/test/q2-file-picker-test.spec.js.map +1 -0
- package/dist/collection/components/q2-item/q2-item.css +3 -0
- package/dist/collection/components/q2-link/q2-link.js +26 -7
- package/dist/collection/components/q2-link/q2-link.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js +20 -118
- package/dist/collection/components/q2-link/test/q2-link-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js +193 -0
- package/dist/collection/components/q2-link/test/q2-link-test.spec.js.map +1 -0
- package/dist/collection/components/q2-list/q2-list.css +6 -0
- package/dist/collection/components/q2-loading/q2-loading.js +1 -1
- package/dist/collection/components/q2-loading/q2-loading.js.map +1 -1
- package/dist/collection/components/q2-option/q2-option.css +9 -3
- package/dist/collection/components/q2-option/q2-option.js +37 -4
- package/dist/collection/components/q2-option/q2-option.js.map +1 -1
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js +22 -0
- package/dist/collection/components/q2-option/test/q2-option-test.spec.js.map +1 -1
- package/dist/collection/components/q2-option-list/q2-option-list.js +56 -29
- package/dist/collection/components/q2-option-list/q2-option-list.js.map +1 -1
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js +489 -0
- package/dist/collection/components/q2-option-list/test/q2-option-list.spec.js.map +1 -0
- package/dist/collection/components/q2-pagination/q2-pagination.js +3 -3
- package/dist/collection/components/q2-pill/q2-pill.js +12 -7
- package/dist/collection/components/q2-pill/q2-pill.js.map +1 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js +109 -1
- package/dist/collection/components/q2-pill/test/q2-pill-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js +1 -1
- package/dist/collection/components/q2-popover/q2-popover.js.map +1 -1
- package/dist/collection/components/q2-relative-time/q2-relative-time.js +1 -1
- package/dist/collection/components/q2-resize-observer/q2-resize-observer.js +1 -1
- package/dist/collection/components/q2-section/q2-section.js +2 -2
- package/dist/collection/components/q2-select/q2-select.js +7 -4
- package/dist/collection/components/q2-select/q2-select.js.map +1 -1
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js +1 -14
- package/dist/collection/components/q2-select/test/q2-select-test.e2e.js.map +1 -1
- package/dist/collection/components/q2-stepper/q2-stepper.js +1 -1
- package/dist/collection/components/q2-stepper-vertical/q2-stepper-vertical.js +1 -1
- package/dist/collection/components/q2-tab-container/q2-tab-container.js +1 -1
- package/dist/collection/components/q2-tab-pane/q2-tab-pane.js +1 -1
- package/dist/collection/components/q2-tag/q2-tag.js +7 -2
- package/dist/collection/components/q2-tag/q2-tag.js.map +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js +1 -1
- package/dist/collection/components/q2-tag/test/q2-tag-test.e2e.js.map +1 -1
- package/dist/collection/components/tecton-tab-pane/tecton-tab-pane.js +2 -2
- package/dist/collection/utils/action-sheet.js +5 -2
- package/dist/collection/utils/action-sheet.js.map +1 -1
- package/dist/collection/utils/helpers.js +29 -3
- package/dist/collection/utils/helpers.js.map +1 -1
- package/dist/collection/utils/test/action-sheet-test.e2e.js +34 -6
- package/dist/collection/utils/test/action-sheet-test.e2e.js.map +1 -1
- package/dist/components/action-sheet.js +6 -3
- package/dist/components/action-sheet.js.map +1 -1
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/index2.js +1 -20
- package/dist/components/index2.js.map +1 -1
- package/dist/components/q2-action-group.js +41 -19
- package/dist/components/q2-action-group.js.map +1 -1
- package/dist/components/q2-avatar2.js +1 -1
- package/dist/components/q2-avatar2.js.map +1 -1
- package/dist/components/q2-btn2.js +50 -16
- package/dist/components/q2-btn2.js.map +1 -1
- package/dist/components/q2-dropdown-item2.js +19 -17
- package/dist/components/q2-dropdown-item2.js.map +1 -1
- package/dist/components/q2-dropdown.js +67 -110
- package/dist/components/q2-dropdown.js.map +1 -1
- package/dist/components/q2-file-picker.d.ts +11 -0
- package/dist/components/q2-file-picker.js +301 -0
- package/dist/components/q2-file-picker.js.map +1 -0
- package/dist/components/q2-item.js +1 -130
- package/dist/components/q2-item.js.map +1 -1
- package/dist/{esm/q2-item.entry.js → components/q2-item2.js} +29 -11
- package/dist/components/q2-item2.js.map +1 -0
- package/dist/components/q2-link.js +1 -86
- package/dist/components/q2-link.js.map +1 -1
- package/dist/{esm/q2-link.entry.js → components/q2-link2.js} +42 -10
- package/dist/components/q2-link2.js.map +1 -0
- package/dist/components/q2-list.js +1 -94
- package/dist/components/q2-list.js.map +1 -1
- package/dist/{esm/q2-list.entry.js → components/q2-list2.js} +30 -11
- package/dist/components/q2-list2.js.map +1 -0
- package/dist/components/q2-loading2.js.map +1 -1
- package/dist/components/q2-option-list2.js +44 -19
- package/dist/components/q2-option-list2.js.map +1 -1
- package/dist/components/q2-option2.js +20 -4
- package/dist/components/q2-option2.js.map +1 -1
- package/dist/components/q2-pagination.js +3 -3
- package/dist/components/q2-pill.js +13 -8
- package/dist/components/q2-pill.js.map +1 -1
- package/dist/components/q2-popover2.js +1 -1
- package/dist/components/q2-popover2.js.map +1 -1
- package/dist/components/q2-relative-time.js +1 -1
- package/dist/components/q2-resize-observer2.js +1 -1
- package/dist/components/q2-section.js +2 -2
- package/dist/components/q2-select2.js +8 -5
- package/dist/components/q2-select2.js.map +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 +8 -3
- package/dist/components/q2-tag.js.map +1 -1
- package/dist/components/tecton-tab-pane.js +2 -2
- package/dist/esm/{action-sheet-e64cb6f7.js → action-sheet-1e24cb38.js} +7 -4
- package/dist/esm/action-sheet-1e24cb38.js.map +1 -0
- package/dist/esm/click-elsewhere.entry.js +92 -0
- package/dist/esm/click-elsewhere.entry.js.map +1 -0
- package/dist/esm/{index-d18e2a20.js → index-504f1a9e.js} +2 -21
- package/dist/esm/index-504f1a9e.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-group.entry.js +39 -18
- package/dist/esm/q2-action-group.entry.js.map +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js.map +1 -1
- package/dist/esm/q2-badge_7.entry.js +52 -18
- package/dist/esm/q2-badge_7.entry.js.map +1 -1
- package/dist/esm/q2-calendar.entry.js +1 -1
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-data-table.entry.js +1 -1
- package/dist/esm/q2-detail.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +18 -17
- package/dist/esm/q2-dropdown-item.entry.js.map +1 -1
- package/dist/esm/q2-dropdown.entry.js +48 -99
- package/dist/esm/q2-dropdown.entry.js.map +1 -1
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-file-picker.entry.js +232 -0
- package/dist/esm/q2-file-picker.entry.js.map +1 -0
- package/dist/esm/q2-item_3.entry.js +245 -0
- package/dist/esm/q2-item_3.entry.js.map +1 -0
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup.entry.js +1 -1
- package/dist/esm/{q2-option-list.entry.js → q2-option-list_2.entry.js} +355 -22
- package/dist/esm/q2-option-list_2.entry.js.map +1 -0
- package/dist/esm/q2-option.entry.js +18 -4
- package/dist/esm/q2-option.entry.js.map +1 -1
- package/dist/esm/q2-pagination.entry.js +4 -4
- package/dist/esm/q2-pill.entry.js +14 -9
- package/dist/esm/q2-pill.entry.js.map +1 -1
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-relative-time.entry.js +2 -2
- package/dist/esm/q2-resize-observer.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +3 -3
- package/dist/esm/q2-select.entry.js +8 -5
- package/dist/esm/q2-select.entry.js.map +1 -1
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +2 -2
- package/dist/esm/q2-stepper.entry.js +2 -2
- package/dist/esm/q2-tag.entry.js +9 -4
- package/dist/esm/q2-tag.entry.js.map +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/esm/tecton-tab-pane.entry.js +2 -2
- package/dist/q2-tecton-elements/action-sheet-1e24cb38.js +80 -0
- package/dist/q2-tecton-elements/action-sheet-1e24cb38.js.map +1 -0
- package/dist/q2-tecton-elements/click-elsewhere.entry.js +90 -0
- package/dist/q2-tecton-elements/click-elsewhere.entry.js.map +1 -0
- package/dist/q2-tecton-elements/{index-d18e2a20.js → index-504f1a9e.js} +51 -69
- package/dist/q2-tecton-elements/index-504f1a9e.js.map +1 -0
- package/dist/q2-tecton-elements/q2-action-group.entry.js +57 -33
- package/dist/q2-tecton-elements/q2-action-group.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-action-sheet.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-avatar.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-badge_7.entry.js +222 -181
- package/dist/q2-tecton-elements/q2-badge_7.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-calendar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-card.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-carousel.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-area.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-bar.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-chart-donut.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-checkbox.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-data-table.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-detail.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-dropdown-item.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-dropdown.entry.js +86 -137
- package/dist/q2-tecton-elements/q2-dropdown.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-editable-field.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-file-picker.entry.js +339 -0
- package/dist/q2-tecton-elements/q2-file-picker.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-item_3.entry.js +332 -0
- package/dist/q2-tecton-elements/q2-item_3.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-loc.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-message.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-month-picker.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-optgroup.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js +902 -0
- package/dist/q2-tecton-elements/q2-option-list_2.entry.js.map +1 -0
- package/dist/q2-tecton-elements/q2-option.entry.js +31 -21
- package/dist/q2-tecton-elements/q2-option.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-pagination.entry.js +34 -34
- package/dist/q2-tecton-elements/q2-pill.entry.js +24 -20
- package/dist/q2-tecton-elements/q2-pill.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-radio-group.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-radio.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-relative-time.entry.js +2 -2
- package/dist/q2-tecton-elements/q2-resize-observer.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-section.entry.js +19 -19
- package/dist/q2-tecton-elements/q2-select.entry.js +21 -18
- package/dist/q2-tecton-elements/q2-select.entry.js.map +1 -1
- package/dist/q2-tecton-elements/q2-stepper-pane.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-stepper-vertical.entry.js +37 -37
- package/dist/q2-tecton-elements/q2-stepper.entry.js +29 -29
- package/dist/q2-tecton-elements/q2-tag.entry.js +15 -11
- package/dist/q2-tecton-elements/q2-tag.entry.js.map +1 -1
- 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/q2-tecton-elements/q2-textarea.entry.js +1 -1
- package/dist/q2-tecton-elements/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/tecton-tab-pane.entry.js +6 -6
- package/dist/types/components/q2-action-group/q2-action-group.d.ts +19 -11
- package/dist/types/components/q2-btn/q2-btn.d.ts +8 -3
- package/dist/types/components/q2-dropdown/q2-dropdown.d.ts +18 -9
- package/dist/types/components/q2-dropdown-item/q2-dropdown-item.d.ts +14 -1
- package/dist/types/components/q2-file-picker/q2-file-picker.d.ts +98 -0
- package/dist/types/components/q2-link/q2-link.d.ts +8 -6
- package/dist/types/components/q2-loading/q2-loading.d.ts +2 -2
- package/dist/types/components/q2-option/q2-option.d.ts +10 -1
- package/dist/types/components/q2-option-list/q2-option-list.d.ts +9 -8
- package/dist/types/components/q2-pill/q2-pill.d.ts +2 -2
- package/dist/types/components.d.ts +192 -28
- package/dist/types/util.d.ts +1 -0
- package/dist/types/utils/helpers.d.ts +1 -1
- package/package.json +4 -3
- package/dist/cjs/action-sheet-d32c41ae.js.map +0 -1
- package/dist/cjs/click-elsewhere_2.cjs.entry.js +0 -406
- package/dist/cjs/click-elsewhere_2.cjs.entry.js.map +0 -1
- package/dist/cjs/index-07285783.js.map +0 -1
- package/dist/cjs/q2-item.cjs.entry.js +0 -120
- package/dist/cjs/q2-item.cjs.entry.js.map +0 -1
- package/dist/cjs/q2-link.cjs.entry.js +0 -64
- package/dist/cjs/q2-link.cjs.entry.js.map +0 -1
- package/dist/cjs/q2-list.cjs.entry.js +0 -83
- package/dist/cjs/q2-list.cjs.entry.js.map +0 -1
- package/dist/cjs/q2-option-list.cjs.entry.js.map +0 -1
- package/dist/esm/action-sheet-e64cb6f7.js.map +0 -1
- package/dist/esm/click-elsewhere_2.entry.js +0 -401
- package/dist/esm/click-elsewhere_2.entry.js.map +0 -1
- package/dist/esm/index-d18e2a20.js.map +0 -1
- package/dist/esm/q2-item.entry.js.map +0 -1
- package/dist/esm/q2-link.entry.js.map +0 -1
- package/dist/esm/q2-list.entry.js.map +0 -1
- package/dist/esm/q2-option-list.entry.js.map +0 -1
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js +0 -77
- package/dist/q2-tecton-elements/action-sheet-e64cb6f7.js.map +0 -1
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js +0 -398
- package/dist/q2-tecton-elements/click-elsewhere_2.entry.js.map +0 -1
- package/dist/q2-tecton-elements/index-d18e2a20.js.map +0 -1
- package/dist/q2-tecton-elements/q2-item.entry.js +0 -158
- package/dist/q2-tecton-elements/q2-item.entry.js.map +0 -1
- package/dist/q2-tecton-elements/q2-link.entry.js +0 -83
- package/dist/q2-tecton-elements/q2-link.entry.js.map +0 -1
- package/dist/q2-tecton-elements/q2-list.entry.js +0 -100
- package/dist/q2-tecton-elements/q2-list.entry.js.map +0 -1
- package/dist/q2-tecton-elements/q2-option-list.entry.js +0 -585
- package/dist/q2-tecton-elements/q2-option-list.entry.js.map +0 -1
|
@@ -2,6 +2,27 @@ import { setup } from "../../../utils/helpers";
|
|
|
2
2
|
describe('q2-action-group', () => {
|
|
3
3
|
let page;
|
|
4
4
|
let resizeEventSpy;
|
|
5
|
+
const pseudoElementExists = async () => {
|
|
6
|
+
return page.evaluate(() => {
|
|
7
|
+
const element = document.querySelector('q2-link:not(:last-child)');
|
|
8
|
+
if (!element)
|
|
9
|
+
return false;
|
|
10
|
+
const beforeStyle = window.getComputedStyle(element, ':before');
|
|
11
|
+
return beforeStyle.getPropertyValue('display') !== 'none' && beforeStyle.getPropertyValue('content') === '';
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const pseudoElementStyles = async () => {
|
|
15
|
+
return page.evaluate(() => {
|
|
16
|
+
const element = document.querySelector('q2-link:not(:last-child)');
|
|
17
|
+
if (!element)
|
|
18
|
+
return null;
|
|
19
|
+
const styles = window.getComputedStyle(element, ':before');
|
|
20
|
+
return Array.from(styles).reduce((acc, key) => {
|
|
21
|
+
acc[key] = styles.getPropertyValue(key);
|
|
22
|
+
return acc;
|
|
23
|
+
}, {});
|
|
24
|
+
});
|
|
25
|
+
};
|
|
5
26
|
describe('Resizing', () => {
|
|
6
27
|
it('updates the autoOrientation when resized', async () => {
|
|
7
28
|
page = await setup({
|
|
@@ -12,18 +33,133 @@ describe('q2-action-group', () => {
|
|
|
12
33
|
</q2-action-group>
|
|
13
34
|
`,
|
|
14
35
|
});
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
resizeEventSpy = await
|
|
18
|
-
expect(
|
|
36
|
+
const q2ActionGroup = await page.find('q2-action-group');
|
|
37
|
+
const container = await page.find('q2-action-group >>> .container');
|
|
38
|
+
resizeEventSpy = await q2ActionGroup.spyOnEvent('tctResize');
|
|
39
|
+
expect(container).toHaveClass('horizontal');
|
|
19
40
|
await page.setViewport({ width: 400, height: 800 });
|
|
20
41
|
await page.waitForChanges();
|
|
21
42
|
expect(resizeEventSpy).toHaveReceivedEvent();
|
|
22
|
-
expect(
|
|
43
|
+
expect(container).toHaveClass('vertical');
|
|
23
44
|
await page.setViewport({ width: 600, height: 800 });
|
|
24
45
|
await page.waitForChanges();
|
|
25
46
|
expect(resizeEventSpy).toHaveReceivedEvent();
|
|
26
|
-
expect(
|
|
47
|
+
expect(container).toHaveClass('horizontal');
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
describe('q2-link interactions', () => {
|
|
51
|
+
let hasPseudoElement;
|
|
52
|
+
describe(':before pseudo-element', () => {
|
|
53
|
+
it('does not exist if only 1 q2-link is provided', async () => {
|
|
54
|
+
page = await setup({
|
|
55
|
+
html: `
|
|
56
|
+
<q2-action-group>
|
|
57
|
+
<q2-link label="My Link"></q2-link>
|
|
58
|
+
</q2-action-group>
|
|
59
|
+
`,
|
|
60
|
+
});
|
|
61
|
+
hasPseudoElement = await pseudoElementExists();
|
|
62
|
+
expect(hasPseudoElement).toBe(false);
|
|
63
|
+
});
|
|
64
|
+
it('does not exist if orientation is "vertical"', async () => {
|
|
65
|
+
page = await setup({
|
|
66
|
+
html: `
|
|
67
|
+
<q2-action-group orientation="vertical">
|
|
68
|
+
<q2-link label="My Link"></q2-link>
|
|
69
|
+
<q2-link label="My Link"></q2-link>
|
|
70
|
+
</q2-action-group>
|
|
71
|
+
`,
|
|
72
|
+
});
|
|
73
|
+
hasPseudoElement = await pseudoElementExists();
|
|
74
|
+
expect(hasPseudoElement).toBe(false);
|
|
75
|
+
});
|
|
76
|
+
it('does not exist if orientation is "horizontal"', async () => {
|
|
77
|
+
page = await setup({
|
|
78
|
+
html: `
|
|
79
|
+
<q2-action-group orientation="horizontal">
|
|
80
|
+
<q2-link label="My Link"></q2-link>
|
|
81
|
+
<q2-link label="My Link"></q2-link>
|
|
82
|
+
</q2-action-group>
|
|
83
|
+
`,
|
|
84
|
+
});
|
|
85
|
+
hasPseudoElement = await pseudoElementExists();
|
|
86
|
+
expect(hasPseudoElement).toBe(false);
|
|
87
|
+
});
|
|
88
|
+
it('adds the "has-q2-link" class to the container', async () => {
|
|
89
|
+
page = await setup({
|
|
90
|
+
html: `
|
|
91
|
+
<q2-action-group>
|
|
92
|
+
<q2-link label="My Link"></q2-link>
|
|
93
|
+
</q2-action-group>
|
|
94
|
+
`,
|
|
95
|
+
});
|
|
96
|
+
const container = await page.find('q2-action-group >>> .container');
|
|
97
|
+
expect(container).toHaveClass('has-q2-link');
|
|
98
|
+
});
|
|
99
|
+
it('updates the container gap value to 20px', async () => {
|
|
100
|
+
page = await setup({
|
|
101
|
+
html: `
|
|
102
|
+
<q2-action-group>
|
|
103
|
+
<q2-link label="My Link"></q2-link>
|
|
104
|
+
<q2-link label="My Link"></q2-link>
|
|
105
|
+
</q2-action-group>
|
|
106
|
+
`,
|
|
107
|
+
});
|
|
108
|
+
const container = await page.find('q2-action-group >>> .container');
|
|
109
|
+
const computedStyle = await container.getComputedStyle();
|
|
110
|
+
expect(computedStyle.gap).toBe('20px');
|
|
111
|
+
});
|
|
112
|
+
it('sets the pseudo-element styles correctly', async () => {
|
|
113
|
+
page = await setup({
|
|
114
|
+
html: `
|
|
115
|
+
<q2-action-group>
|
|
116
|
+
<q2-link label="My Link"></q2-link>
|
|
117
|
+
<q2-link label="My Link"></q2-link>
|
|
118
|
+
</q2-action-group>
|
|
119
|
+
`,
|
|
120
|
+
});
|
|
121
|
+
const expectedPseudoStyles = {
|
|
122
|
+
content: '""',
|
|
123
|
+
width: '0px',
|
|
124
|
+
height: '28px',
|
|
125
|
+
'border-left-width': '1px',
|
|
126
|
+
'border-left-style': 'solid',
|
|
127
|
+
'border-left-color': 'rgb(217, 217, 217)',
|
|
128
|
+
position: 'absolute',
|
|
129
|
+
left: '-10px',
|
|
130
|
+
};
|
|
131
|
+
const pseudoStyles = await pseudoElementStyles();
|
|
132
|
+
Object.entries(expectedPseudoStyles).forEach(([cssProp, value]) => {
|
|
133
|
+
expect(pseudoStyles[cssProp]).toBe(value);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
describe('when q2-link elements are not present', () => {
|
|
138
|
+
it('does not add :before pseudo-elements', async () => {
|
|
139
|
+
page = await setup({
|
|
140
|
+
html: `
|
|
141
|
+
<q2-action-group>
|
|
142
|
+
<q2-btn label="My Button"></q2-btn>
|
|
143
|
+
<q2-btn label="My Button"></q2-btn>
|
|
144
|
+
</q2-action-group>
|
|
145
|
+
`,
|
|
146
|
+
});
|
|
147
|
+
hasPseudoElement = await pseudoElementExists();
|
|
148
|
+
expect(hasPseudoElement).toBe(false);
|
|
149
|
+
});
|
|
150
|
+
it('keeps the container gap value at 10px', async () => {
|
|
151
|
+
page = await setup({
|
|
152
|
+
html: `
|
|
153
|
+
<q2-action-group>
|
|
154
|
+
<q2-btn label="My Button"></q2-btn>
|
|
155
|
+
<q2-btn label="My Button"></q2-btn>
|
|
156
|
+
</q2-action-group>
|
|
157
|
+
`,
|
|
158
|
+
});
|
|
159
|
+
const container = await page.find('q2-action-group >>> .container');
|
|
160
|
+
const computedStyle = await container.getComputedStyle();
|
|
161
|
+
expect(computedStyle.gap).toBe('10px');
|
|
162
|
+
});
|
|
27
163
|
});
|
|
28
164
|
});
|
|
29
165
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-action-group.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-action-group/test/q2-action-group.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,IAAI,IAAa,CAAC;IAClB,IAAI,cAAwB,CAAC;IAE7B,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;YACtD,IAAI,GAAG,MAAM,KAAK,CAAC;gBACf,IAAI,EAAE;;;;;iBAKL;aACJ,CAAC,CAAC;YAEH,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YACtD,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;YAC5E,cAAc,GAAG,MAAM,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAE1D,MAAM,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAEpD,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACpD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAE5B,MAAM,CAAC,cAAc,CAAC,CAAC,mBAAmB,EAAE,CAAC;YAC7C,MAAM,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAElD,MAAM,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACpD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;YAE5B,MAAM,CAAC,cAAc,CAAC,CAAC,mBAAmB,EAAE,CAAC;YAC7C,MAAM,CAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EPage, EventSpy } from '@stencil/core/testing';\nimport { setup } from '@/utils/helpers';\n\ndescribe('q2-action-group', () => {\n let page: E2EPage;\n let resizeEventSpy: EventSpy;\n\n describe('Resizing', () => {\n it('updates the autoOrientation when resized', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-btn intent=\"workflow-primary\">Primary</q2-btn>\n <q2-btn intent=\"workflow-secondary\">Secondary</q2-btn>\n </q2-action-group>\n `,\n });\n\n const q2BtnGroup = await page.find('q2-action-group');\n const btnGroupContainer = await page.find('q2-action-group >>> .container');\n resizeEventSpy = await q2BtnGroup.spyOnEvent('tctResize');\n\n expect(btnGroupContainer).toHaveClass('horizontal');\n\n await page.setViewport({ width: 400, height: 800 });\n await page.waitForChanges();\n\n expect(resizeEventSpy).toHaveReceivedEvent();\n expect(btnGroupContainer).toHaveClass('vertical');\n\n await page.setViewport({ width: 600, height: 800 });\n await page.waitForChanges();\n\n expect(resizeEventSpy).toHaveReceivedEvent();\n expect(btnGroupContainer).toHaveClass('horizontal');\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"q2-action-group.e2e.js","sourceRoot":"","sources":["../../../../src/components/q2-action-group/test/q2-action-group.e2e.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,IAAI,IAAa,CAAC;IAClB,IAAI,cAAwB,CAAC;IAE7B,MAAM,mBAAmB,GAAG,KAAK,IAAsB,EAAE;QACrD,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACtB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;YACnE,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAC;YAC3B,MAAM,WAAW,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAChE,OAAO,WAAW,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,MAAM,IAAI,WAAW,CAAC,gBAAgB,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAChH,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,KAAK,IAA4C,EAAE;QAC3E,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;YACtB,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,0BAA0B,CAAC,CAAC;YACnE,IAAI,CAAC,OAAO;gBAAE,OAAO,IAAI,CAAC;YAC1B,MAAM,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;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AQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;YACnD,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;gBAClD,IAAI,GAAG,MAAM,KAAK,CAAC;oBACf,IAAI,EAAE;;;;;iBAKT;iBACA,CAAC,CAAC;gBACH,gBAAgB,GAAG,MAAM,mBAAmB,EAAE,CAAC;gBAC/C,MAAM,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzC,CAAC,CAAC,CAAC;YACH,EAAE,CAAC,uCAAuC,EAAE,KAAK,IAAI,EAAE;gBACnD,IAAI,GAAG,MAAM,KAAK,CAAC;oBACf,IAAI,EAAE;;;;;qBAKL;iBACJ,CAAC,CAAC;gBACH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;gBACpE,MAAM,aAAa,GAAG,MAAM,SAAS,CAAC,gBAAgB,EAAE,CAAC;gBACzD,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { E2EPage, EventSpy } from '@stencil/core/testing';\nimport { setup } from '@/utils/helpers';\n\ndescribe('q2-action-group', () => {\n let page: E2EPage;\n let resizeEventSpy: EventSpy;\n\n const pseudoElementExists = async (): Promise<boolean> => {\n return page.evaluate(() => {\n const element = document.querySelector('q2-link:not(:last-child)');\n if (!element) return false;\n const beforeStyle = window.getComputedStyle(element, ':before');\n return beforeStyle.getPropertyValue('display') !== 'none' && beforeStyle.getPropertyValue('content') === '';\n });\n };\n\n const pseudoElementStyles = async (): Promise<Record<string, string> | null> => {\n return page.evaluate(() => {\n const element = document.querySelector('q2-link:not(:last-child)');\n if (!element) return null;\n const styles = window.getComputedStyle(element, ':before');\n return Array.from(styles).reduce(\n (acc, key) => {\n acc[key] = styles.getPropertyValue(key);\n return acc;\n },\n {} as Record<string, string>\n );\n });\n };\n\n describe('Resizing', () => {\n it('updates the autoOrientation when resized', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-btn intent=\"workflow-primary\">Primary</q2-btn>\n <q2-btn intent=\"workflow-secondary\">Secondary</q2-btn>\n </q2-action-group>\n `,\n });\n\n const q2ActionGroup = await page.find('q2-action-group');\n const container = await page.find('q2-action-group >>> .container');\n resizeEventSpy = await q2ActionGroup.spyOnEvent('tctResize');\n\n expect(container).toHaveClass('horizontal');\n\n await page.setViewport({ width: 400, height: 800 });\n await page.waitForChanges();\n\n expect(resizeEventSpy).toHaveReceivedEvent();\n expect(container).toHaveClass('vertical');\n\n await page.setViewport({ width: 600, height: 800 });\n await page.waitForChanges();\n\n expect(resizeEventSpy).toHaveReceivedEvent();\n expect(container).toHaveClass('horizontal');\n });\n });\n\n describe('q2-link interactions', () => {\n let hasPseudoElement: boolean;\n describe(':before pseudo-element', () => {\n it('does not exist if only 1 q2-link is provided', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n hasPseudoElement = await pseudoElementExists();\n expect(hasPseudoElement).toBe(false);\n });\n\n it('does not exist if orientation is \"vertical\"', async () => {\n page = await setup({\n html: `\n <q2-action-group orientation=\"vertical\">\n <q2-link label=\"My Link\"></q2-link>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n hasPseudoElement = await pseudoElementExists();\n expect(hasPseudoElement).toBe(false);\n });\n\n it('does not exist if orientation is \"horizontal\"', async () => {\n page = await setup({\n html: `\n <q2-action-group orientation=\"horizontal\">\n <q2-link label=\"My Link\"></q2-link>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n hasPseudoElement = await pseudoElementExists();\n expect(hasPseudoElement).toBe(false);\n });\n\n it('adds the \"has-q2-link\" class to the container', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n const container = await page.find('q2-action-group >>> .container');\n expect(container).toHaveClass('has-q2-link');\n });\n\n it('updates the container gap value to 20px', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-link label=\"My Link\"></q2-link>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n const container = await page.find('q2-action-group >>> .container');\n const computedStyle = await container.getComputedStyle();\n expect(computedStyle.gap).toBe('20px');\n });\n\n it('sets the pseudo-element styles correctly', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-link label=\"My Link\"></q2-link>\n <q2-link label=\"My Link\"></q2-link>\n </q2-action-group>\n `,\n });\n const expectedPseudoStyles = {\n content: '\"\"',\n width: '0px',\n height: '28px',\n 'border-left-width': '1px',\n 'border-left-style': 'solid',\n 'border-left-color': 'rgb(217, 217, 217)',\n position: 'absolute',\n left: '-10px',\n };\n const pseudoStyles = await pseudoElementStyles();\n Object.entries(expectedPseudoStyles).forEach(([cssProp, value]) => {\n expect(pseudoStyles[cssProp]).toBe(value);\n });\n });\n });\n\n describe('when q2-link elements are not present', () => {\n it('does not add :before pseudo-elements', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-btn label=\"My Button\"></q2-btn>\n <q2-btn label=\"My Button\"></q2-btn>\n </q2-action-group>\n `,\n });\n hasPseudoElement = await pseudoElementExists();\n expect(hasPseudoElement).toBe(false);\n });\n it('keeps the container gap value at 10px', async () => {\n page = await setup({\n html: `\n <q2-action-group>\n <q2-btn label=\"My Button\"></q2-btn>\n <q2-btn label=\"My Button\"></q2-btn>\n </q2-action-group>\n `,\n });\n const container = await page.find('q2-action-group >>> .container');\n const computedStyle = await container.getComputedStyle();\n expect(computedStyle.gap).toBe('10px');\n });\n });\n });\n});\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import {
|
|
2
|
+
import { Q2ActionGroup } from "../q2-action-group";
|
|
3
3
|
describe('q2-action-group', () => {
|
|
4
4
|
let specPage;
|
|
5
|
+
let groupClass;
|
|
5
6
|
const generateResizeEvent = (width) => {
|
|
6
7
|
return new CustomEvent('tctResize', {
|
|
7
8
|
detail: {
|
|
@@ -13,7 +14,7 @@ describe('q2-action-group', () => {
|
|
|
13
14
|
describe('orientationThreshold', () => {
|
|
14
15
|
beforeEach(async () => {
|
|
15
16
|
specPage = await newSpecPage({
|
|
16
|
-
components: [
|
|
17
|
+
components: [Q2ActionGroup],
|
|
17
18
|
html: `<q2-action-group></q2-action-group>`,
|
|
18
19
|
});
|
|
19
20
|
await specPage.waitForChanges();
|
|
@@ -54,65 +55,56 @@ describe('q2-action-group', () => {
|
|
|
54
55
|
describe('orientation', () => {
|
|
55
56
|
it('is set to "vertical" when the prop is passed in', async () => {
|
|
56
57
|
specPage = await newSpecPage({
|
|
57
|
-
components: [
|
|
58
|
+
components: [Q2ActionGroup],
|
|
58
59
|
html: `<q2-action-group orientation="vertical"></q2-action-group>`,
|
|
59
60
|
});
|
|
60
|
-
await specPage.waitForChanges();
|
|
61
61
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');
|
|
62
62
|
});
|
|
63
63
|
it('is set to "horizontal" when the prop is passed in', async () => {
|
|
64
64
|
specPage = await newSpecPage({
|
|
65
|
-
components: [
|
|
65
|
+
components: [Q2ActionGroup],
|
|
66
66
|
html: `<q2-action-group orientation="horizontal"></q2-action-group>`,
|
|
67
67
|
});
|
|
68
|
-
await specPage.waitForChanges();
|
|
69
68
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');
|
|
70
69
|
});
|
|
71
70
|
it('takes priority over the autoOrientation', async () => {
|
|
72
71
|
specPage = await newSpecPage({
|
|
73
|
-
components: [
|
|
72
|
+
components: [Q2ActionGroup],
|
|
74
73
|
html: `<q2-action-group orientation="horizontal"></q2-action-group>`,
|
|
75
74
|
});
|
|
76
|
-
await specPage.waitForChanges();
|
|
77
75
|
expect(specPage.rootInstance.autoOrientation).toEqual('vertical');
|
|
78
76
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');
|
|
79
77
|
});
|
|
80
78
|
it("uses 'auto' when null", async () => {
|
|
81
79
|
specPage = await newSpecPage({
|
|
82
|
-
components: [
|
|
80
|
+
components: [Q2ActionGroup],
|
|
83
81
|
html: `<q2-action-group></q2-action-group>`,
|
|
84
82
|
});
|
|
85
|
-
await specPage.waitForChanges();
|
|
86
83
|
specPage.rootInstance.orientation = null;
|
|
87
|
-
await specPage.waitForChanges();
|
|
88
84
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');
|
|
89
85
|
});
|
|
90
86
|
it("uses 'auto' when undefined", async () => {
|
|
91
87
|
specPage = await newSpecPage({
|
|
92
|
-
components: [
|
|
88
|
+
components: [Q2ActionGroup],
|
|
93
89
|
html: `<q2-action-group></q2-action-group>`,
|
|
94
90
|
});
|
|
95
|
-
await specPage.waitForChanges();
|
|
96
91
|
specPage.rootInstance.orientation = undefined;
|
|
97
|
-
await specPage.waitForChanges();
|
|
98
92
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');
|
|
99
93
|
});
|
|
100
94
|
});
|
|
101
95
|
describe('fullWidth', () => {
|
|
102
96
|
it('does not add the full-width class to the container when false (Default)', async () => {
|
|
103
97
|
specPage = await newSpecPage({
|
|
104
|
-
components: [
|
|
98
|
+
components: [Q2ActionGroup],
|
|
105
99
|
html: `<q2-action-group></q2-action-group>`,
|
|
106
100
|
});
|
|
107
|
-
await specPage.waitForChanges();
|
|
108
101
|
expect(specPage.root.shadowRoot.querySelector('.container')).not.toHaveClass('full-width');
|
|
109
102
|
});
|
|
110
103
|
it('renders with full width styles when true', async () => {
|
|
111
104
|
specPage = await newSpecPage({
|
|
112
|
-
components: [
|
|
105
|
+
components: [Q2ActionGroup],
|
|
113
106
|
html: `<q2-action-group full-width orientation="horizontal"></q2-action-group>`,
|
|
114
107
|
});
|
|
115
|
-
await specPage.waitForChanges();
|
|
116
108
|
expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClasses([
|
|
117
109
|
'full-width',
|
|
118
110
|
'horizontal',
|
|
@@ -120,67 +112,139 @@ describe('q2-action-group', () => {
|
|
|
120
112
|
});
|
|
121
113
|
});
|
|
122
114
|
});
|
|
123
|
-
describe('
|
|
124
|
-
describe('
|
|
125
|
-
it(
|
|
115
|
+
describe('State', () => {
|
|
116
|
+
describe('autoOrientation', () => {
|
|
117
|
+
it('defaults to "vertical"', async () => {
|
|
126
118
|
specPage = await newSpecPage({
|
|
127
|
-
components: [
|
|
119
|
+
components: [Q2ActionGroup],
|
|
128
120
|
html: `<q2-action-group></q2-action-group>`,
|
|
129
121
|
});
|
|
130
|
-
|
|
131
|
-
specPage.rootInstance.autoOrientation = 'vertical';
|
|
132
|
-
expect(specPage.rootInstance.orientation).toEqual('auto');
|
|
133
|
-
expect(specPage.rootInstance.computedOrientation).toEqual('vertical');
|
|
122
|
+
expect(specPage.rootInstance.autoOrientation).toEqual('vertical');
|
|
134
123
|
});
|
|
135
|
-
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
describe('Watchers', () => {
|
|
127
|
+
describe('toggleHiddenForOneFrame', () => {
|
|
128
|
+
it('is triggered by changes to "orientation"', async () => {
|
|
136
129
|
specPage = await newSpecPage({
|
|
137
|
-
components: [
|
|
130
|
+
components: [Q2ActionGroup],
|
|
138
131
|
html: `<q2-action-group></q2-action-group>`,
|
|
139
132
|
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
expect(specPage.rootInstance.orientation).toEqual(null);
|
|
145
|
-
expect(specPage.rootInstance.computedOrientation).toEqual('vertical');
|
|
133
|
+
groupClass = specPage.rootInstance;
|
|
134
|
+
const toggleHiddenSpy = jest.spyOn(groupClass, 'toggleHiddenForOneFrame');
|
|
135
|
+
groupClass.orientation = 'horizontal';
|
|
136
|
+
expect(toggleHiddenSpy).toHaveBeenCalled();
|
|
146
137
|
});
|
|
147
|
-
it(
|
|
138
|
+
it('sets the container display to none', async () => {
|
|
148
139
|
specPage = await newSpecPage({
|
|
149
|
-
components: [
|
|
150
|
-
html: `<q2-action-group
|
|
140
|
+
components: [Q2ActionGroup],
|
|
141
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
151
142
|
});
|
|
152
|
-
|
|
153
|
-
|
|
143
|
+
groupClass = specPage.rootInstance;
|
|
144
|
+
groupClass.toggleHiddenForOneFrame();
|
|
145
|
+
expect(groupClass.container.style.display).toBe('none');
|
|
154
146
|
});
|
|
155
147
|
});
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
148
|
+
});
|
|
149
|
+
describe('Local Methods', () => {
|
|
150
|
+
describe('Getters', () => {
|
|
151
|
+
describe('computedOrientation', () => {
|
|
152
|
+
it("returns 'vertical' when orientation is 'auto' and autoOrientation is 'vertical'", async () => {
|
|
153
|
+
specPage = await newSpecPage({
|
|
154
|
+
components: [Q2ActionGroup],
|
|
155
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
156
|
+
});
|
|
157
|
+
await specPage.waitForChanges();
|
|
158
|
+
specPage.rootInstance.autoOrientation = 'vertical';
|
|
159
|
+
expect(specPage.rootInstance.orientation).toEqual('auto');
|
|
160
|
+
expect(specPage.rootInstance.computedOrientation).toEqual('vertical');
|
|
161
|
+
});
|
|
162
|
+
it("returns 'vertical' when orientation is 'null' and autoOrientation is 'vertical'", async () => {
|
|
163
|
+
specPage = await newSpecPage({
|
|
164
|
+
components: [Q2ActionGroup],
|
|
165
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
166
|
+
});
|
|
167
|
+
await specPage.waitForChanges();
|
|
168
|
+
specPage.rootInstance.orientation = null;
|
|
169
|
+
await specPage.waitForChanges();
|
|
170
|
+
specPage.rootInstance.autoOrientation = 'vertical';
|
|
171
|
+
expect(specPage.rootInstance.orientation).toEqual(null);
|
|
172
|
+
expect(specPage.rootInstance.computedOrientation).toEqual('vertical');
|
|
173
|
+
});
|
|
174
|
+
it("returns 'horizontal' when orientation is 'horizontal'", async () => {
|
|
175
|
+
specPage = await newSpecPage({
|
|
176
|
+
components: [Q2ActionGroup],
|
|
177
|
+
html: `<q2-action-group orientation="horizontal"></q2-action-group>`,
|
|
178
|
+
});
|
|
179
|
+
await specPage.waitForChanges();
|
|
180
|
+
expect(specPage.rootInstance.computedOrientation).toEqual('horizontal');
|
|
161
181
|
});
|
|
162
|
-
await specPage.waitForChanges();
|
|
163
|
-
expect(specPage.rootInstance.orientation).toEqual('auto');
|
|
164
|
-
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);
|
|
165
182
|
});
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
183
|
+
describe('shouldDisableResizeObserver', () => {
|
|
184
|
+
it('returns false when orientation is "auto"', async () => {
|
|
185
|
+
specPage = await newSpecPage({
|
|
186
|
+
components: [Q2ActionGroup],
|
|
187
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
188
|
+
});
|
|
189
|
+
await specPage.waitForChanges();
|
|
190
|
+
expect(specPage.rootInstance.orientation).toEqual('auto');
|
|
191
|
+
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);
|
|
192
|
+
});
|
|
193
|
+
it('returns false when orientation is "null"', async () => {
|
|
194
|
+
specPage = await newSpecPage({
|
|
195
|
+
components: [Q2ActionGroup],
|
|
196
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
197
|
+
});
|
|
198
|
+
await specPage.waitForChanges();
|
|
199
|
+
specPage.rootInstance.orientation = null;
|
|
200
|
+
await specPage.waitForChanges();
|
|
201
|
+
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);
|
|
202
|
+
});
|
|
203
|
+
it('returns false when orientation is "vertical"', async () => {
|
|
204
|
+
specPage = await newSpecPage({
|
|
205
|
+
components: [Q2ActionGroup],
|
|
206
|
+
html: `<q2-action-group orientation="vertical"></q2-action-group>`,
|
|
207
|
+
});
|
|
208
|
+
await specPage.waitForChanges();
|
|
209
|
+
expect(specPage.rootInstance.orientation).toEqual('vertical');
|
|
210
|
+
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(true);
|
|
170
211
|
});
|
|
171
|
-
await specPage.waitForChanges();
|
|
172
|
-
specPage.rootInstance.orientation = null;
|
|
173
|
-
await specPage.waitForChanges();
|
|
174
|
-
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);
|
|
175
212
|
});
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
213
|
+
});
|
|
214
|
+
describe('Methods', () => {
|
|
215
|
+
describe('checkForQ2Link()', () => {
|
|
216
|
+
it('sets hasLinkElement to true when q2-link elements are present', async () => {
|
|
217
|
+
specPage = await newSpecPage({
|
|
218
|
+
components: [Q2ActionGroup],
|
|
219
|
+
html: `<q2-action-group><q2-link></q2-link></q2-action-group>`,
|
|
220
|
+
});
|
|
221
|
+
expect(specPage.rootInstance.hasQ2Link).toBe(true);
|
|
222
|
+
});
|
|
223
|
+
it('sets hasQ2Link to false when no q2-link elements are present', async () => {
|
|
224
|
+
specPage = await newSpecPage({
|
|
225
|
+
components: [Q2ActionGroup],
|
|
226
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
227
|
+
});
|
|
228
|
+
expect(specPage.rootInstance.hasQ2Link).toBe(false);
|
|
229
|
+
});
|
|
230
|
+
it('is called in componentDidLoad()', async () => {
|
|
231
|
+
specPage = await newSpecPage({
|
|
232
|
+
components: [Q2ActionGroup],
|
|
233
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
234
|
+
});
|
|
235
|
+
const checkForQ2LinkSpy = jest.spyOn(specPage.rootInstance, 'checkForQ2Link');
|
|
236
|
+
specPage.rootInstance.componentDidLoad();
|
|
237
|
+
expect(checkForQ2LinkSpy).toHaveBeenCalled();
|
|
238
|
+
});
|
|
239
|
+
it('is called in onMutationObserved()', async () => {
|
|
240
|
+
specPage = await newSpecPage({
|
|
241
|
+
components: [Q2ActionGroup],
|
|
242
|
+
html: `<q2-action-group></q2-action-group>`,
|
|
243
|
+
});
|
|
244
|
+
const checkForQ2LinkSpy = jest.spyOn(specPage.rootInstance, 'checkForQ2Link');
|
|
245
|
+
specPage.rootInstance.onMutationObserved();
|
|
246
|
+
expect(checkForQ2LinkSpy).toHaveBeenCalled();
|
|
180
247
|
});
|
|
181
|
-
await specPage.waitForChanges();
|
|
182
|
-
expect(specPage.rootInstance.orientation).toEqual('vertical');
|
|
183
|
-
expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(true);
|
|
184
248
|
});
|
|
185
249
|
});
|
|
186
250
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"q2-action-group.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-action-group/test/q2-action-group.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC7B,IAAI,QAAkB,CAAC;IAEvB,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE;QAC1C,OAAO,IAAI,WAAW,CAAC,WAAW,EAAE;YAChC,MAAM,EAAE;gBACJ,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC;aACxC;SACJ,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;QACnB,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAClC,UAAU,CAAC,KAAK,IAAI,EAAE;gBAClB,QAAQ,GAAG,MAAM,WAAW,CAAC;oBACzB,UAAU,EAAE,CAAC,UAAU,CAAC;oBACxB,IAAI,EAAE,qCAAqC;iBAC9C,CAAC,CAAC;gBACH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CAAC,WAAW,GAAG,IAAI,CAAC;gBACzC,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAEhC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC7E,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,8CAA8C,EAAE,KAAK,IAAI,EAAE;gBAC1D,QAAQ,GAAG,MAAM,WAAW,CAAC;oBACzB,UAAU,EAAE,CAAC,UAAU,CAAC;oBACxB,IAAI,EAAE,4DAA4D;iBACrE,CAAC,CAAC;gBACH,MAAM,QAAQ,CAAC,cAAc,EAAE,CAAC;gBAEhC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBAC9D,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,2BAA2B,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5E,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from '@stencil/core/testing';\nimport { Q2BtnGroup } from '../q2-action-group';\n\ndescribe('q2-action-group', () => {\n let specPage: SpecPage;\n\n const generateResizeEvent = (width: number) => {\n return new CustomEvent('tctResize', {\n detail: {\n entries: [{ contentRect: { width } }],\n },\n });\n };\n\n describe('Props', () => {\n describe('orientationThreshold', () => {\n beforeEach(async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n });\n\n describe('when using the default value (440)', () => {\n it('sets autoOrientation to \"horizontal\" when a resize event reports a width of 441', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(441));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('horizontal');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('sets autoOrientation to \"vertical\" when a resize event reports a width of 439', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(439));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n\n describe('when using a custom value (400)', () => {\n beforeEach(async () => {\n specPage.rootInstance.orientationThreshold = 400;\n await specPage.waitForChanges();\n });\n\n it('sets autoOrientation to \"horizontal\" when a resize event reports a width of 401', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(401));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('horizontal');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('sets autoOrientation to \"vertical\" when a resize event reports a width of 399', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(399));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n });\n\n describe('orientation', () => {\n it('is set to \"vertical\" when the prop is passed in', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group orientation=\"vertical\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n\n it('is set to \"horizontal\" when the prop is passed in', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('takes priority over the autoOrientation', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it(\"uses 'auto' when null\", async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = null;\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n\n it(\"uses 'auto' when undefined\", async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = undefined;\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n\n describe('fullWidth', () => {\n it('does not add the full-width class to the container when false (Default)', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).not.toHaveClass('full-width');\n });\n\n it('renders with full width styles when true', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group full-width orientation=\"horizontal\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClasses([\n 'full-width',\n 'horizontal',\n ]);\n });\n });\n });\n\n describe('Local Methods', () => {\n describe('computedOrientation', () => {\n it(\"returns 'vertical' when orientation is 'auto' and autoOrientation is 'vertical'\", async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.autoOrientation = 'vertical';\n expect(specPage.rootInstance.orientation).toEqual('auto');\n expect(specPage.rootInstance.computedOrientation).toEqual('vertical');\n });\n\n it(\"returns 'vertical' when orientation is 'null' and autoOrientation is 'vertical'\", async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = null;\n await specPage.waitForChanges();\n\n specPage.rootInstance.autoOrientation = 'vertical';\n expect(specPage.rootInstance.orientation).toEqual(null);\n expect(specPage.rootInstance.computedOrientation).toEqual('vertical');\n });\n\n it(\"returns 'horizontal' when orientation is 'horizontal'\", async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.computedOrientation).toEqual('horizontal');\n });\n });\n\n describe('shouldDisableResizeObserver', () => {\n it('returns false when orientation is \"auto\"', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.orientation).toEqual('auto');\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);\n });\n\n it('returns false when orientation is \"null\"', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = null;\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);\n });\n\n it('returns false when orientation is \"vertical\"', async () => {\n specPage = await newSpecPage({\n components: [Q2BtnGroup],\n html: `<q2-action-group orientation=\"vertical\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.orientation).toEqual('vertical');\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(true);\n });\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"q2-action-group.spec.js","sourceRoot":"","sources":["../../../../src/components/q2-action-group/test/q2-action-group.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,QAAQ,CAAC,iBAAiB,EAAE,GAAG,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AAM,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,EAAE,CAAC;gBACjD,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from '@stencil/core/testing';\nimport { Q2ActionGroup } from '../q2-action-group';\n\ndescribe('q2-action-group', () => {\n let specPage: SpecPage;\n let groupClass;\n\n const generateResizeEvent = (width: number) => {\n return new CustomEvent('tctResize', {\n detail: {\n entries: [{ contentRect: { width } }],\n },\n });\n };\n\n describe('Props', () => {\n describe('orientationThreshold', () => {\n beforeEach(async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n });\n\n describe('when using the default value (440)', () => {\n it('sets autoOrientation to \"horizontal\" when a resize event reports a width of 441', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(441));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('horizontal');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('sets autoOrientation to \"vertical\" when a resize event reports a width of 439', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(439));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n\n describe('when using a custom value (400)', () => {\n beforeEach(async () => {\n specPage.rootInstance.orientationThreshold = 400;\n await specPage.waitForChanges();\n });\n\n it('sets autoOrientation to \"horizontal\" when a resize event reports a width of 401', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(401));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('horizontal');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('sets autoOrientation to \"vertical\" when a resize event reports a width of 399', async () => {\n specPage.rootInstance.handleResize(generateResizeEvent(399));\n await specPage.waitForChanges();\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n });\n\n describe('orientation', () => {\n it('is set to \"vertical\" when the prop is passed in', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group orientation=\"vertical\"></q2-action-group>`,\n });\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n\n it('is set to \"horizontal\" when the prop is passed in', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it('takes priority over the autoOrientation', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('horizontal');\n });\n\n it(\"uses 'auto' when null\", async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n specPage.rootInstance.orientation = null;\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n\n it(\"uses 'auto' when undefined\", async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n specPage.rootInstance.orientation = undefined;\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClass('vertical');\n });\n });\n\n describe('fullWidth', () => {\n it('does not add the full-width class to the container when false (Default)', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n expect(specPage.root.shadowRoot.querySelector('.container')).not.toHaveClass('full-width');\n });\n\n it('renders with full width styles when true', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group full-width orientation=\"horizontal\"></q2-action-group>`,\n });\n\n expect(specPage.root.shadowRoot.querySelector('.container')).toHaveClasses([\n 'full-width',\n 'horizontal',\n ]);\n });\n });\n });\n\n describe('State', () => {\n describe('autoOrientation', () => {\n it('defaults to \"vertical\"', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n expect(specPage.rootInstance.autoOrientation).toEqual('vertical');\n });\n });\n });\n\n describe('Watchers', () => {\n describe('toggleHiddenForOneFrame', () => {\n it('is triggered by changes to \"orientation\"', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n groupClass = specPage.rootInstance;\n const toggleHiddenSpy = jest.spyOn(groupClass, 'toggleHiddenForOneFrame');\n groupClass.orientation = 'horizontal';\n expect(toggleHiddenSpy).toHaveBeenCalled();\n });\n it('sets the container display to none', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n groupClass = specPage.rootInstance;\n groupClass.toggleHiddenForOneFrame();\n expect(groupClass.container.style.display).toBe('none');\n });\n });\n });\n\n describe('Local Methods', () => {\n describe('Getters', () => {\n describe('computedOrientation', () => {\n it(\"returns 'vertical' when orientation is 'auto' and autoOrientation is 'vertical'\", async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.autoOrientation = 'vertical';\n expect(specPage.rootInstance.orientation).toEqual('auto');\n expect(specPage.rootInstance.computedOrientation).toEqual('vertical');\n });\n\n it(\"returns 'vertical' when orientation is 'null' and autoOrientation is 'vertical'\", async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = null;\n await specPage.waitForChanges();\n\n specPage.rootInstance.autoOrientation = 'vertical';\n expect(specPage.rootInstance.orientation).toEqual(null);\n expect(specPage.rootInstance.computedOrientation).toEqual('vertical');\n });\n\n it(\"returns 'horizontal' when orientation is 'horizontal'\", async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group orientation=\"horizontal\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.computedOrientation).toEqual('horizontal');\n });\n });\n\n describe('shouldDisableResizeObserver', () => {\n it('returns false when orientation is \"auto\"', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.orientation).toEqual('auto');\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);\n });\n\n it('returns false when orientation is \"null\"', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n specPage.rootInstance.orientation = null;\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(false);\n });\n\n it('returns false when orientation is \"vertical\"', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group orientation=\"vertical\"></q2-action-group>`,\n });\n await specPage.waitForChanges();\n\n expect(specPage.rootInstance.orientation).toEqual('vertical');\n expect(specPage.rootInstance.shouldDisableResizeObserver).toEqual(true);\n });\n });\n });\n\n describe('Methods', () => {\n describe('checkForQ2Link()', () => {\n it('sets hasLinkElement to true when q2-link elements are present', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group><q2-link></q2-link></q2-action-group>`,\n });\n\n expect(specPage.rootInstance.hasQ2Link).toBe(true);\n });\n\n it('sets hasQ2Link to false when no q2-link elements are present', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n expect(specPage.rootInstance.hasQ2Link).toBe(false);\n });\n\n it('is called in componentDidLoad()', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n const checkForQ2LinkSpy = jest.spyOn(specPage.rootInstance, 'checkForQ2Link');\n specPage.rootInstance.componentDidLoad();\n expect(checkForQ2LinkSpy).toHaveBeenCalled();\n });\n it('is called in onMutationObserved()', async () => {\n specPage = await newSpecPage({\n components: [Q2ActionGroup],\n html: `<q2-action-group></q2-action-group>`,\n });\n\n const checkForQ2LinkSpy = jest.spyOn(specPage.rootInstance, 'checkForQ2Link');\n specPage.rootInstance.onMutationObserved();\n expect(checkForQ2LinkSpy).toHaveBeenCalled();\n });\n });\n });\n });\n});\n"]}
|
|
@@ -10,7 +10,7 @@ describe('q2-action-sheet', () => {
|
|
|
10
10
|
let message;
|
|
11
11
|
let title;
|
|
12
12
|
let btnClose;
|
|
13
|
-
const createOption = (option) => (Object.assign({ disabled: false, display: 'Red', hidden: false, multiline: false, value: 'red', innerHTML: 'Red' }, option));
|
|
13
|
+
const createOption = (option) => (Object.assign({ disabled: false, display: 'Red', hidden: false, multiline: false, separator: false, value: 'red', innerHTML: 'Red' }, option));
|
|
14
14
|
const demoOptions = ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Purple'].map(color => createOption({ value: color.toLowerCase(), display: color, innerHTML: color }));
|
|
15
15
|
const showDialog = async (page) => {
|
|
16
16
|
const dialog = await page.find('q2-action-sheet >>> dialog');
|