@webquark/browser 1.1.0-dev.9 → 1.1.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{action.props-N0urQtdP.js → action.props-CNe2JXR5.js} +1 -1
- package/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
- package/dist/cjs/{field-CsrQGhG-.js → field-BRAR56Ex.js} +1 -1
- package/dist/cjs/{form-control-validity-D1ukC0_e.js → form-control-validity-BkilGb3E.js} +3 -3
- package/dist/cjs/{index-DWXhKHCB.js → index-BN-WdOQM.js} +17 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q-accordion.cjs.entry.js +2 -2
- package/dist/cjs/q-alert.cjs.entry.js +2 -2
- package/dist/cjs/q-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q-banner.cjs.entry.js +1 -1
- package/dist/cjs/q-button_3.cjs.entry.js +907 -0
- package/dist/cjs/q-card.cjs.entry.js +3 -3
- package/dist/cjs/q-carousel.cjs.entry.js +120 -18
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-control-group.cjs.entry.js +64 -0
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +4 -4
- package/dist/cjs/q-dialog.cjs.entry.js +4 -4
- package/dist/cjs/q-divider.cjs.entry.js +26 -0
- package/dist/cjs/q-dropdown.cjs.entry.js +320 -104
- package/dist/cjs/q-form.cjs.entry.js +17 -7
- package/dist/cjs/q-grid.cjs.entry.js +3 -3
- package/dist/cjs/q-icon.cjs.entry.js +1 -1
- package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
- package/dist/cjs/q-inline.cjs.entry.js +3 -3
- package/dist/cjs/q-input_2.cjs.entry.js +10 -8
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +2 -2
- package/dist/cjs/q-media.cjs.entry.js +2 -2
- package/dist/cjs/q-navbar.cjs.entry.js +3 -3
- package/dist/cjs/q-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q-panel.cjs.entry.js +7 -7
- package/dist/cjs/q-quantity-selector.cjs.entry.js +6 -6
- package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/q-reel.cjs.entry.js +24 -24
- package/dist/cjs/q-section.cjs.entry.js +2 -2
- package/dist/cjs/q-sidepanel.cjs.entry.js +5 -4
- package/dist/cjs/q-slider.cjs.entry.js +122 -0
- package/dist/cjs/q-stack.cjs.entry.js +3 -3
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram.cjs.entry.js +4 -4
- package/dist/cjs/q-syntax-box.cjs.entry.js +180 -719
- package/dist/cjs/q-syntax-view.cjs.entry.js +65 -0
- package/dist/cjs/q-tabs.cjs.entry.js +2 -2
- package/dist/cjs/q-textarea.cjs.entry.js +8 -6
- package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +7 -7
- package/dist/cjs/q-toolbar.cjs.entry.js +4 -4
- package/dist/cjs/syntax-content-BmSExDiW.js +910 -0
- package/dist/cjs/{tokens-RMRaIOqv.js → tokens-BMrfol_M.js} +4 -1
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +6 -1
- package/dist/collection/components/actions/button/button.css +49 -9
- package/dist/collection/components/actions/button/{button.utils.unit.test.js → test/button.utils.unit.test.js} +1 -1
- package/dist/collection/components/communication/alert/alert.css +4 -1
- package/dist/collection/components/content/carousel/carousel.css +7 -0
- package/dist/collection/components/content/carousel/carousel.js +256 -10
- package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
- package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
- package/dist/collection/components/data-display/accordion/accordion.js +1 -1
- package/dist/collection/components/data-display/data-table/data-table.js +3 -3
- package/dist/collection/components/data-display/map/map.js +1 -1
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +1 -1
- package/dist/collection/components/data-display/pagination/pagination.js +1 -1
- package/dist/collection/components/data-display/syntax-box/internals/formatters/css.js +4 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/formatter.js +20 -0
- package/dist/collection/{utils → components/data-display/syntax-box/internals/formatters}/formatter.unit.test.js +38 -11
- package/dist/collection/components/data-display/syntax-box/internals/formatters/html.js +4 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/javascript.js +4 -0
- package/dist/collection/{utils/formatter.js → components/data-display/syntax-box/internals/formatters/json.js} +2 -20
- package/dist/collection/components/data-display/syntax-box/internals/formatters/languages.js +15 -0
- package/dist/collection/components/data-display/syntax-box/internals/formatters/util/prettier.js +17 -0
- package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.unit.test.js +1 -1
- package/dist/collection/components/data-display/syntax-box/internals/views.js +29 -0
- package/dist/collection/components/data-display/syntax-box/internals/views.unit.test.js +19 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.css +107 -36
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +179 -637
- package/dist/collection/components/data-display/syntax-box/syntax-content.js +748 -0
- package/dist/collection/components/data-display/syntax-box/syntax-ui.js +8 -0
- package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +2 -2
- package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +1 -1
- package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +20 -20
- package/dist/collection/components/data-display/syntax-box/test/syntax-views.cmp.test.js +228 -0
- package/dist/collection/components/data-display/syntax-view/syntax-view.js +64 -0
- package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
- package/dist/collection/components/inputs/dropdown/dropdown.css +148 -0
- package/dist/collection/components/inputs/dropdown/dropdown.js +422 -104
- package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +28 -0
- package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
- package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
- package/dist/collection/components/inputs/dropdown/test/search-mode.cmp.test.js +186 -0
- package/dist/collection/components/inputs/form/form.js +2 -2
- package/dist/collection/components/inputs/form/internals/controls.js +2 -2
- package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
- package/dist/collection/components/inputs/form/internals/values.js +5 -0
- package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +14 -8
- package/dist/collection/components/inputs/input/input.css +42 -0
- package/dist/collection/components/inputs/input/input.js +31 -3
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
- package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
- package/dist/collection/components/inputs/slider/slider.css +44 -0
- package/dist/collection/components/inputs/slider/slider.js +383 -0
- package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
- package/dist/collection/components/inputs/textarea/textarea.css +20 -0
- package/dist/collection/components/inputs/textarea/textarea.js +30 -2
- package/dist/collection/components/inputs/toggle/test/toggle-layout.cmp.test.js +69 -0
- package/dist/collection/components/inputs/toggle/toggle.css +27 -0
- package/dist/collection/components/inputs/toggle/toggle.js +3 -3
- package/dist/collection/components/layout/control-group/control-group.css +108 -0
- package/dist/collection/components/layout/control-group/control-group.js +142 -0
- package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
- package/dist/collection/components/layout/divider/divider.css +40 -0
- package/dist/collection/components/layout/divider/divider.js +121 -0
- package/dist/collection/components/layout/divider/test/divider.cmp.test.js +105 -0
- package/dist/collection/components/layout/grid/grid.js +1 -1
- package/dist/collection/components/layout/inline/inline.js +1 -1
- package/dist/collection/components/layout/navbar/navbar.js +2 -2
- package/dist/collection/components/layout/panel/panel.js +4 -4
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.js +1 -1
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +2 -2
- package/dist/collection/components/layout/sidepanel/sidepanel.js +3 -0
- package/dist/collection/components/layout/stack/stack.js +1 -1
- package/dist/collection/components/layout/tabs/tabs.js +1 -1
- package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
- package/dist/collection/components/media/avatar/avatar.js +1 -1
- package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
- package/dist/collection/components/media/media/media.js +1 -1
- package/dist/collection/components/media/reel/reel.js +23 -23
- package/dist/collection/components/media/reel/test/focus.cmp.test.js +33 -0
- package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/overlays/dialog/dialog.js +2 -2
- package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
- package/dist/collection/theme/test/input-width.cmp.test.js +117 -0
- package/dist/collection/theme/test/presets.unit.test.js +58 -0
- package/dist/collection/theme/tokens.js +4 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/form-control-validity.js +3 -3
- package/dist/components/index.js +1 -1
- package/dist/components/p-B610wOGe.js +1 -0
- package/dist/components/p-BGlbV43y.js +13 -0
- package/dist/components/{p-Dfp_If-_.js → p-BKWL9zOn.js} +1 -1
- package/dist/components/p-BxxU73QQ.js +1 -0
- package/dist/components/{p-Cg0Mv7Vb.js → p-CVEQfA-v.js} +1 -1
- package/dist/components/p-CpbWWDiY.js +1 -0
- package/dist/{webquark/p-Dhsn99q4.js → components/p-D2fczi8m.js} +1 -1
- package/dist/components/{p-6PPZ2sIO.js → p-D5vpGqZ9.js} +1 -1
- package/dist/components/p-DQIYo8zC.js +1 -0
- package/dist/components/p-DX6PCIPS.js +1 -0
- package/dist/components/p-DY9D4z7Z.js +1 -0
- package/dist/components/p-DbzjRzhu.js +1 -0
- package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
- package/dist/components/{p-CKuPOxKN.js → p-RX4DjgmV.js} +1 -1
- package/dist/components/{p-DlIn_ZWk.js → p-Ts5oOvg8.js} +1 -1
- package/dist/components/p-u1Qz6OcP.js +1 -0
- package/dist/components/q-accordion.js +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-banner.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-control-group.d.ts +11 -0
- package/dist/components/q-control-group.js +1 -0
- package/dist/components/q-conversation-bubble.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-divider.d.ts +11 -0
- package/dist/components/q-divider.js +1 -0
- package/dist/components/q-dropdown.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-grid.js +1 -1
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-image-comparison.js +1 -1
- package/dist/components/q-inline.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.js +1 -1
- package/dist/components/q-map.js +1 -1
- package/dist/components/q-media.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-pagination.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-section.js +1 -1
- package/dist/components/q-sidepanel.js +2 -2
- package/dist/components/q-slider.d.ts +11 -0
- package/dist/components/q-slider.js +1 -0
- package/dist/components/q-stack.js +1 -1
- package/dist/components/q-step-diagram-item.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +1 -13
- package/dist/components/q-syntax-view.d.ts +11 -0
- package/dist/components/q-syntax-view.js +1 -0
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.js +1 -1
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{action.props-CpnGza8z.js → action.props-CbSH7c-q.js} +1 -1
- package/dist/esm/{dom-ByfrUWx1.js → dom-B610wOGe.js} +2 -2
- package/dist/esm/{field-zfD6OQ02.js → field-D5xUxo11.js} +1 -1
- package/dist/esm/{form-control-validity-Bj2RJb2E.js → form-control-validity-BxxU73QQ.js} +3 -3
- package/dist/esm/{form-submit-action-CoEIvDqE.js → form-submit-action-BjjfVWyu.js} +1 -1
- package/dist/esm/{index-B5ElFlHv.js → index-CIMzZPQO.js} +16 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-accordion.entry.js +2 -2
- package/dist/esm/q-alert.entry.js +2 -2
- package/dist/esm/q-avatar.entry.js +2 -2
- package/dist/esm/q-banner.entry.js +1 -1
- package/dist/esm/q-button_3.entry.js +903 -0
- package/dist/esm/q-card.entry.js +3 -3
- package/dist/esm/q-carousel.entry.js +120 -18
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-control-group.entry.js +62 -0
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +4 -4
- package/dist/esm/q-dialog.entry.js +4 -4
- package/dist/esm/q-divider.entry.js +24 -0
- package/dist/esm/q-dropdown.entry.js +320 -104
- package/dist/esm/q-form.entry.js +18 -8
- package/dist/esm/q-grid.entry.js +3 -3
- package/dist/esm/q-icon.entry.js +1 -1
- package/dist/esm/q-image-comparison.entry.js +2 -2
- package/dist/esm/q-inline.entry.js +3 -3
- package/dist/esm/q-input_2.entry.js +10 -8
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +2 -2
- package/dist/esm/q-media.entry.js +2 -2
- package/dist/esm/q-navbar.entry.js +3 -3
- package/dist/esm/q-pagination.entry.js +2 -2
- package/dist/esm/q-panel.entry.js +7 -7
- package/dist/esm/q-quantity-selector.entry.js +6 -6
- package/dist/esm/q-radio-group.entry.js +4 -4
- package/dist/esm/q-reel.entry.js +24 -24
- package/dist/esm/q-section.entry.js +2 -2
- package/dist/esm/q-sidepanel.entry.js +5 -4
- package/dist/esm/q-slider.entry.js +120 -0
- package/dist/esm/q-stack.entry.js +3 -3
- package/dist/esm/q-step-diagram-item.entry.js +2 -2
- package/dist/esm/q-step-diagram.entry.js +4 -4
- package/dist/esm/q-syntax-box.entry.js +180 -719
- package/dist/esm/q-syntax-view.entry.js +63 -0
- package/dist/esm/q-tabs.entry.js +2 -2
- package/dist/esm/q-textarea.entry.js +8 -6
- package/dist/esm/q-thumbnail.entry.js +3 -3
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +7 -7
- package/dist/esm/q-toolbar.entry.js +4 -4
- package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
- package/dist/esm/{tokens-B4Mg1xEw.js → tokens-DbzjRzhu.js} +4 -1
- package/dist/esm/webquark.js +3 -3
- package/dist/formatters/prettier/LICENSE +7 -0
- package/dist/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
- package/dist/formatters/prettier/html-fragment.mjs +1 -0
- package/dist/formatters/prettier/html-fragment.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/angular.mjs +1 -0
- package/dist/formatters/prettier/languages/angular.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/css.mjs +1 -0
- package/dist/formatters/prettier/languages/css.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/flow.mjs +1 -0
- package/dist/formatters/prettier/languages/flow.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/graphql.mjs +1 -0
- package/dist/formatters/prettier/languages/graphql.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/handlebars.mjs +1 -0
- package/dist/formatters/prettier/languages/handlebars.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/html.mjs +1 -0
- package/dist/formatters/prettier/languages/html.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/javascript.mjs +1 -0
- package/dist/formatters/prettier/languages/javascript.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json-stringify.mjs +1 -0
- package/dist/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json.mjs +1 -0
- package/dist/formatters/prettier/languages/json.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/json5.mjs +1 -0
- package/dist/formatters/prettier/languages/json5.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/jsonc.mjs +1 -0
- package/dist/formatters/prettier/languages/jsonc.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/jsx.mjs +1 -0
- package/dist/formatters/prettier/languages/jsx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/less.mjs +1 -0
- package/dist/formatters/prettier/languages/less.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/lwc.mjs +1 -0
- package/dist/formatters/prettier/languages/lwc.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/markdown.mjs +1 -0
- package/dist/formatters/prettier/languages/markdown.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/mdx.mjs +1 -0
- package/dist/formatters/prettier/languages/mdx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/mjml.mjs +1 -0
- package/dist/formatters/prettier/languages/mjml.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/postcss.mjs +1 -0
- package/dist/formatters/prettier/languages/postcss.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/scss.mjs +1 -0
- package/dist/formatters/prettier/languages/scss.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/tsx.mjs +1 -0
- package/dist/formatters/prettier/languages/tsx.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/typescript.mjs +1 -0
- package/dist/formatters/prettier/languages/typescript.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/vue.mjs +1 -0
- package/dist/formatters/prettier/languages/vue.mjs.gz +0 -0
- package/dist/formatters/prettier/languages/yaml.mjs +1 -0
- package/dist/formatters/prettier/languages/yaml.mjs.gz +0 -0
- package/dist/formatters/prettier/manifest.json +87 -0
- package/dist/formatters/prettier/plugins/acorn.mjs +17 -0
- package/dist/formatters/prettier/plugins/acorn.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/angular.mjs +7 -0
- package/dist/formatters/prettier/plugins/angular.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/babel.mjs +16 -0
- package/dist/formatters/prettier/plugins/babel.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/estree.mjs +44 -0
- package/dist/formatters/prettier/plugins/estree.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/flow.mjs +7 -0
- package/dist/formatters/prettier/plugins/flow.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/glimmer.mjs +37 -0
- package/dist/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/graphql.mjs +17 -0
- package/dist/formatters/prettier/plugins/graphql.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/html.mjs +25 -0
- package/dist/formatters/prettier/plugins/html.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/markdown.mjs +70 -0
- package/dist/formatters/prettier/plugins/markdown.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/meriyah.mjs +9 -0
- package/dist/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/postcss.mjs +62 -0
- package/dist/formatters/prettier/plugins/postcss.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/typescript.mjs +22 -0
- package/dist/formatters/prettier/plugins/typescript.mjs.gz +0 -0
- package/dist/formatters/prettier/plugins/yaml.mjs +150 -0
- package/dist/formatters/prettier/plugins/yaml.mjs.gz +0 -0
- package/dist/formatters/prettier/runtime.d.mts +2 -0
- package/dist/formatters/prettier/runtime.mjs +1 -0
- package/dist/formatters/prettier/runtime.mjs.gz +0 -0
- package/dist/formatters/prettier/standalone.mjs +29 -0
- package/dist/formatters/prettier/standalone.mjs.gz +0 -0
- package/dist/playground/components/theme-designer/dimension-tokens.js +9 -0
- package/dist/playground/components/theme-designer/token-row.js +60 -0
- package/dist/playground/dom-factory.js +76 -0
- package/dist/playground/utils/color.js +15 -0
- package/dist/playground/utils/dom.js +38 -0
- package/dist/playground/utils/index.js +2 -0
- package/dist/types/components/content/carousel/carousel.d.ts +23 -2
- package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
- package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/css.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.d.ts +10 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.types.d.ts +4 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/html.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/javascript.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/json.d.ts +6 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/languages.d.ts +27 -0
- package/dist/types/components/data-display/syntax-box/internals/formatters/util/prettier.d.ts +3 -0
- package/dist/types/{utils → components/data-display/syntax-box/internals}/syntax.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/internals/syntax.unit.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/internals/views.d.ts +11 -0
- package/dist/types/components/data-display/syntax-box/internals/views.unit.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -63
- package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/syntax-content.d.ts +41 -0
- package/dist/types/components/data-display/syntax-box/syntax-ui.d.ts +15 -0
- package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +1 -1
- package/dist/types/components/data-display/syntax-box/test/syntax-views.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-view/syntax-view.d.ts +48 -0
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +45 -1
- package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
- package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/dropdown/test/search-mode.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
- package/dist/types/components/inputs/input/input.d.ts +3 -0
- package/dist/types/components/inputs/slider/slider.d.ts +45 -0
- package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/textarea/textarea.d.ts +3 -1
- package/dist/types/components/inputs/toggle/test/toggle-layout.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
- package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
- package/dist/types/components/layout/divider/divider.d.ts +15 -0
- package/dist/types/components/layout/divider/test/divider.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
- package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +1 -0
- package/dist/types/components/media/reel/reel.d.ts +3 -3
- package/dist/types/components/media/reel/test/focus.cmp.test.d.ts +1 -0
- package/dist/types/components.d.ts +591 -13
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/dimension-tokens.d.ts +3 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +14 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +13 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/dom.d.ts +15 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/index.d.ts +2 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/theme/test/input-width.cmp.test.d.ts +3 -0
- package/dist/types/theme/test/presets.unit.test.d.ts +1 -0
- package/dist/types/theme/tokens.d.ts +9 -0
- package/dist/types/utils/form-control-validity.d.ts +2 -1
- package/dist/types/utils/form-field-adapter.d.ts +3 -3
- package/dist/webquark/p-014c2f4a.entry.js +1 -0
- package/dist/webquark/p-0389577c.entry.js +1 -0
- package/dist/webquark/p-041e17c1.entry.js +1 -0
- package/dist/webquark/p-0479c571.entry.js +1 -0
- package/dist/webquark/p-0ebca9be.entry.js +1 -0
- package/dist/webquark/{p-fe8c634a.entry.js → p-1bf375f7.entry.js} +2 -2
- package/dist/webquark/{p-6bfffa79.entry.js → p-20dc3ab5.entry.js} +1 -1
- package/dist/webquark/p-28d3348f.entry.js +1 -0
- package/dist/webquark/p-35c177d3.entry.js +1 -0
- package/dist/webquark/{p-99d785ca.entry.js → p-3a60086d.entry.js} +1 -1
- package/dist/webquark/{p-3bc4629c.entry.js → p-3ab798aa.entry.js} +1 -1
- package/dist/webquark/{p-9e78b796.entry.js → p-3b580baf.entry.js} +1 -1
- package/dist/webquark/{p-888e46a8.entry.js → p-3b65f787.entry.js} +1 -1
- package/dist/webquark/p-4bf610f8.entry.js +1 -0
- package/dist/webquark/{p-4d61b70d.entry.js → p-4d30227e.entry.js} +1 -1
- package/dist/webquark/{p-70d9ffde.entry.js → p-4de536ae.entry.js} +1 -1
- package/dist/webquark/{p-90b0858c.entry.js → p-4e4d70c9.entry.js} +1 -1
- package/dist/webquark/p-4efeb7c9.entry.js +1 -0
- package/dist/webquark/{p-dd115868.entry.js → p-51b3d71b.entry.js} +1 -1
- package/dist/webquark/p-778b6bbb.entry.js +1 -0
- package/dist/webquark/{p-f63b7214.entry.js → p-7da78b2f.entry.js} +1 -1
- package/dist/webquark/{p-9ff7e5a4.entry.js → p-7f8f986b.entry.js} +1 -1
- package/dist/webquark/p-8253c742.entry.js +1 -0
- package/dist/webquark/{p-059daa8a.entry.js → p-9a1ddeb7.entry.js} +1 -1
- package/dist/webquark/p-B610wOGe.js +1 -0
- package/dist/webquark/p-BxxU73QQ.js +1 -0
- package/dist/webquark/p-CIMzZPQO.js +3 -0
- package/dist/webquark/p-CfR85WgM.js +13 -0
- package/dist/{components/p-BofcK-7Z.js → webquark/p-D8p28N9s.js} +1 -1
- package/dist/webquark/p-DbzjRzhu.js +1 -0
- package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
- package/dist/webquark/{p-d0fbd2b1.entry.js → p-a2b1de23.entry.js} +1 -1
- package/dist/webquark/{p-48fb5228.entry.js → p-a55edc17.entry.js} +1 -1
- package/dist/webquark/p-a8808020.entry.js +1 -0
- package/dist/webquark/{p-f4f97e74.entry.js → p-b1084b3c.entry.js} +1 -1
- package/dist/webquark/{p-36118d90.entry.js → p-b6c4dff4.entry.js} +1 -1
- package/dist/webquark/p-b962e950.entry.js +1 -0
- package/dist/webquark/{p-023f8437.entry.js → p-bc369cd6.entry.js} +1 -1
- package/dist/webquark/p-c119a8ea.entry.js +1 -0
- package/dist/webquark/p-c6b77e9a.entry.js +1 -0
- package/dist/webquark/{p-030ecde3.entry.js → p-ca1c03b4.entry.js} +1 -1
- package/dist/webquark/{p-8ece2c62.entry.js → p-ce436162.entry.js} +1 -1
- package/dist/webquark/{p-0aa74ad6.entry.js → p-d0a47a7c.entry.js} +1 -1
- package/dist/webquark/{p-fec6fe0a.entry.js → p-e1fbc8fc.entry.js} +1 -1
- package/dist/webquark/{p-09cca7b9.entry.js → p-e32833ce.entry.js} +1 -1
- package/dist/webquark/p-e369a4aa.entry.js +1 -0
- package/dist/webquark/p-e4430c61.entry.js +1 -0
- package/dist/webquark/{p-f9ad63ff.entry.js → p-e9c0052b.entry.js} +1 -1
- package/dist/webquark/{p-f1bac94c.entry.js → p-f5c4ca18.entry.js} +1 -1
- package/dist/webquark/{p-64096386.entry.js → p-f6683126.entry.js} +1 -1
- package/dist/webquark/{p-DWO-pleQ.js → p-ojSDiptZ.js} +1 -1
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +6 -2
- package/dist/cjs/q-button_2.cjs.entry.js +0 -462
- package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
- package/dist/components/p-B4Mg1xEw.js +0 -1
- package/dist/components/p-BH4gQWub.js +0 -1
- package/dist/components/p-Bj2RJb2E.js +0 -1
- package/dist/components/p-ByfrUWx1.js +0 -1
- package/dist/components/p-CN1ut2Lb.js +0 -1
- package/dist/components/p-ye27qtRo.js +0 -1
- package/dist/esm/q-button_2.entry.js +0 -459
- package/dist/esm/q-scrollable.entry.js +0 -447
- package/dist/types/utils/formatter.d.ts +0 -15
- package/dist/webquark/p-04c8cb9e.entry.js +0 -1
- package/dist/webquark/p-0ae43d6c.entry.js +0 -1
- package/dist/webquark/p-0c3aac3f.entry.js +0 -1
- package/dist/webquark/p-144ef339.entry.js +0 -1
- package/dist/webquark/p-296fbdb1.entry.js +0 -1
- package/dist/webquark/p-5f232b44.entry.js +0 -13
- package/dist/webquark/p-6e28cfe2.entry.js +0 -1
- package/dist/webquark/p-91fff6b6.entry.js +0 -1
- package/dist/webquark/p-923dac41.entry.js +0 -1
- package/dist/webquark/p-97a89cae.entry.js +0 -1
- package/dist/webquark/p-B4Mg1xEw.js +0 -1
- package/dist/webquark/p-B5ElFlHv.js +0 -3
- package/dist/webquark/p-Bj2RJb2E.js +0 -1
- package/dist/webquark/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-c523ec6f.entry.js +0 -1
- package/dist/webquark/p-d0253d64.entry.js +0 -1
- package/dist/webquark/p-f98f9439.entry.js +0 -1
- package/dist/webquark/p-fe200f68.entry.js +0 -1
- /package/dist/{types/components/actions/button/button.utils.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
- /package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.js +0 -0
- /package/dist/types/{utils/formatter.unit.test.d.ts → components/actions/button/test/button.utils.unit.test.d.ts} +0 -0
- /package/dist/types/{utils/syntax.unit.test.d.ts → components/data-display/syntax-box/internals/formatters/formatter.unit.test.d.ts} +0 -0
|
@@ -22,6 +22,8 @@ export class QCarousel {
|
|
|
22
22
|
snapAlignment = 'start';
|
|
23
23
|
/** `auto` preserves each slotted item's natural width. */
|
|
24
24
|
itemWidth = 'auto';
|
|
25
|
+
/** Overlay keeps playback separate from the indicators/extra-controls panel. */
|
|
26
|
+
rotationPlacement = 'controls';
|
|
25
27
|
/** Omitted controls are enabled for navigable slideshows and disabled for strips. */
|
|
26
28
|
showArrows;
|
|
27
29
|
/** Shows clickable slide indicator dots when the carousel can scroll. */
|
|
@@ -32,12 +34,18 @@ export class QCarousel {
|
|
|
32
34
|
transition = 'slide';
|
|
33
35
|
/** Crossfade duration in milliseconds; native sliding keeps browser-controlled timing. */
|
|
34
36
|
transitionDuration = 500;
|
|
35
|
-
/** Enables rotation
|
|
37
|
+
/** Enables rotation with the configured interaction behavior. */
|
|
36
38
|
autoplay = false;
|
|
39
|
+
/** Continuous rotation ignores hover and interaction; explicit pause remains available. */
|
|
40
|
+
autoplayBehavior = 'pauseOnInteraction';
|
|
37
41
|
/** Finite positive interval in milliseconds; invalid values use 5000. */
|
|
38
42
|
autoplayInterval = 5000;
|
|
39
43
|
/** Temporarily suspends requested playback without changing the button action. */
|
|
40
44
|
autoplaySuspended = false;
|
|
45
|
+
/** Finish-videos delegates each active visit's timing to setSlidePlayback(). */
|
|
46
|
+
slideTiming = 'fixedInterval';
|
|
47
|
+
/** Holds advancement for loading without pausing the active media. */
|
|
48
|
+
autoplayAdvanceSuspended = false;
|
|
41
49
|
/** Accessible name forwarded to the slide viewport. */
|
|
42
50
|
ariaLabel = 'Carousel content';
|
|
43
51
|
hasExtraControls = false;
|
|
@@ -51,6 +59,8 @@ export class QCarousel {
|
|
|
51
59
|
qSlideChange;
|
|
52
60
|
/** Actual running state, including temporary suspension. */
|
|
53
61
|
qAutoplayChange;
|
|
62
|
+
/** Playback intent and eligibility, independent of an image-readiness advance hold. */
|
|
63
|
+
qPlaybackChange;
|
|
54
64
|
el;
|
|
55
65
|
slideState = new CarouselSlideState();
|
|
56
66
|
touchStart;
|
|
@@ -63,6 +73,10 @@ export class QCarousel {
|
|
|
63
73
|
get navigable() {
|
|
64
74
|
return this.isScrollable && this.maxIndex > 0;
|
|
65
75
|
}
|
|
76
|
+
get rotationVisible() {
|
|
77
|
+
return this.autoplay && (this.navigable ||
|
|
78
|
+
(this.slideTiming === 'finishVideos' && this.slidePlayback?.mode === 'completion'));
|
|
79
|
+
}
|
|
66
80
|
get arrowsVisible() {
|
|
67
81
|
return this.navigable && (this.showArrows ?? this.layout === 'slideshow');
|
|
68
82
|
}
|
|
@@ -91,12 +105,16 @@ export class QCarousel {
|
|
|
91
105
|
programmaticScrollToken = 0;
|
|
92
106
|
connected = false;
|
|
93
107
|
hovered = false;
|
|
108
|
+
selectedElement;
|
|
109
|
+
selectionGeneration = 0;
|
|
110
|
+
slidePlayback;
|
|
111
|
+
playbackState = '';
|
|
94
112
|
reducedMotion = false;
|
|
95
113
|
motionPreference;
|
|
96
114
|
rotationButton;
|
|
97
115
|
rotationPointerAction;
|
|
98
116
|
autoplayController = new CarouselAutoplay(() => {
|
|
99
|
-
if (!this.repeat && this.activeIndex >= this.maxIndex)
|
|
117
|
+
if (!this.navigable || (!this.repeat && this.activeIndex >= this.maxIndex))
|
|
100
118
|
return false;
|
|
101
119
|
this.scrollToIndex(this.activeIndex + 1);
|
|
102
120
|
return true;
|
|
@@ -106,6 +124,11 @@ export class QCarousel {
|
|
|
106
124
|
this.autoplayPlaying = playing;
|
|
107
125
|
if (changed)
|
|
108
126
|
this.qAutoplayChange.emit({ playing });
|
|
127
|
+
const state = `${playing}:${requested}`;
|
|
128
|
+
if (state !== this.playbackState) {
|
|
129
|
+
this.playbackState = state;
|
|
130
|
+
this.qPlaybackChange.emit({ playing, requested });
|
|
131
|
+
}
|
|
109
132
|
});
|
|
110
133
|
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
111
134
|
layoutChanged() {
|
|
@@ -180,12 +203,34 @@ export class QCarousel {
|
|
|
180
203
|
this.calculateLimits();
|
|
181
204
|
if (this.autoplay && this.navigable && !this.repeat && this.activeIndex >= this.maxIndex)
|
|
182
205
|
this.scrollToIndex(0);
|
|
206
|
+
if (this.slideTiming === 'finishVideos' && !this.navigable && this.slidePlayback?.ended) {
|
|
207
|
+
this.slidePlayback = undefined;
|
|
208
|
+
this.selectionGeneration += 1;
|
|
209
|
+
this.syncAutoplay();
|
|
210
|
+
this.qSlideChange.emit({ index: this.activeIndex, element: this.cachedChildren[this.activeIndex] });
|
|
211
|
+
}
|
|
183
212
|
this.autoplayController.play();
|
|
184
213
|
}
|
|
185
214
|
/** Stops rotation until play() or the playback control explicitly restarts it. */
|
|
186
215
|
async pause() {
|
|
187
216
|
this.autoplayController.pause();
|
|
188
217
|
}
|
|
218
|
+
/** Registers timing for the current slide and responsive-media visit only. */
|
|
219
|
+
async setSlidePlayback(element, key, mode) {
|
|
220
|
+
if (this.slideTiming !== 'finishVideos' || element !== this.cachedChildren[this.activeIndex])
|
|
221
|
+
return;
|
|
222
|
+
if (this.slidePlayback?.key === key && this.slidePlayback.mode === mode)
|
|
223
|
+
return;
|
|
224
|
+
this.slidePlayback = { element, key, mode, ended: false };
|
|
225
|
+
this.syncAutoplay();
|
|
226
|
+
}
|
|
227
|
+
/** Completes the registered visit; stale or duplicate media events are ignored. */
|
|
228
|
+
async completeSlide(key) {
|
|
229
|
+
if (this.slideTiming !== 'finishVideos' || this.slidePlayback?.key !== key || this.slidePlayback.ended)
|
|
230
|
+
return;
|
|
231
|
+
this.slidePlayback.ended = true;
|
|
232
|
+
this.autoplayController.complete(key);
|
|
233
|
+
}
|
|
189
234
|
/** Recalculates slide offsets, scroll bounds, and navigation states. */
|
|
190
235
|
async updateLimits() {
|
|
191
236
|
this.calculateLimits();
|
|
@@ -194,8 +239,16 @@ export class QCarousel {
|
|
|
194
239
|
syncAutoplay = () => {
|
|
195
240
|
this.autoplayController.configure({
|
|
196
241
|
enabled: this.autoplay,
|
|
197
|
-
navigable: this.navigable,
|
|
198
|
-
|
|
242
|
+
navigable: this.navigable || this.rotationVisible,
|
|
243
|
+
timing: this.slideTiming === 'finishVideos' ? (this.slidePlayback?.mode ?? 'pending') : 'interval',
|
|
244
|
+
visitKey: this.slideTiming === 'finishVideos'
|
|
245
|
+
? (this.slidePlayback?.key ?? `pending:${this.selectionGeneration}`)
|
|
246
|
+
: undefined,
|
|
247
|
+
advanceSuspended: this.autoplayAdvanceSuspended,
|
|
248
|
+
suspended: !this.connected ||
|
|
249
|
+
(this.autoplayBehavior !== 'continuous' && this.hovered) ||
|
|
250
|
+
document.hidden ||
|
|
251
|
+
this.autoplaySuspended,
|
|
199
252
|
reducedMotion: this.reducedMotion,
|
|
200
253
|
interval: this.autoplayInterval,
|
|
201
254
|
});
|
|
@@ -213,9 +266,13 @@ export class QCarousel {
|
|
|
213
266
|
}
|
|
214
267
|
handleInteraction = (event) => {
|
|
215
268
|
if (!this.isRotationEvent(event))
|
|
269
|
+
this.pauseOnInteraction();
|
|
270
|
+
};
|
|
271
|
+
pauseOnInteraction = () => {
|
|
272
|
+
if (this.autoplayBehavior !== 'continuous')
|
|
216
273
|
this.autoplayController.pause();
|
|
217
274
|
};
|
|
218
|
-
handleFocus = () => this.
|
|
275
|
+
handleFocus = () => this.pauseOnInteraction();
|
|
219
276
|
handleRotationClick = () => {
|
|
220
277
|
const play = this.rotationPointerAction ?? !this.autoplayRequested;
|
|
221
278
|
this.rotationPointerAction = undefined;
|
|
@@ -225,6 +282,13 @@ export class QCarousel {
|
|
|
225
282
|
this.autoplayController.pause();
|
|
226
283
|
};
|
|
227
284
|
updateSlideState() {
|
|
285
|
+
const selected = this.cachedChildren[this.activeIndex];
|
|
286
|
+
if (selected !== this.selectedElement) {
|
|
287
|
+
this.selectedElement = selected;
|
|
288
|
+
this.selectionGeneration += 1;
|
|
289
|
+
this.slidePlayback = undefined;
|
|
290
|
+
this.syncAutoplay();
|
|
291
|
+
}
|
|
228
292
|
if (this.managesSlides)
|
|
229
293
|
this.slideState.update(this.cachedChildren, this.activeIndex, () => this.recoverSlideFocus());
|
|
230
294
|
else
|
|
@@ -452,7 +516,7 @@ export class QCarousel {
|
|
|
452
516
|
handleIndicatorKeyDown = (e) => {
|
|
453
517
|
if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {
|
|
454
518
|
e.preventDefault();
|
|
455
|
-
this.
|
|
519
|
+
this.pauseOnInteraction();
|
|
456
520
|
const dots = Array.from(this.el.shadowRoot?.querySelectorAll('.indicator-dot') || []);
|
|
457
521
|
if (dots.length === 0)
|
|
458
522
|
return;
|
|
@@ -481,7 +545,7 @@ export class QCarousel {
|
|
|
481
545
|
return;
|
|
482
546
|
event.preventDefault();
|
|
483
547
|
event.stopPropagation();
|
|
484
|
-
this.
|
|
548
|
+
this.pauseOnInteraction();
|
|
485
549
|
this.scrollToIndex(this.activeIndex + (event.key === 'ArrowRight' ? 1 : -1));
|
|
486
550
|
if (!this.viewportFocusable)
|
|
487
551
|
this.recoverSlideFocus();
|
|
@@ -508,15 +572,18 @@ export class QCarousel {
|
|
|
508
572
|
this.hasExtraControls = slot.assignedElements().length > 0;
|
|
509
573
|
};
|
|
510
574
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
575
|
+
renderRotationButton() {
|
|
576
|
+
return (h("button", { class: { 'rotation-btn': true, 'is-overlay': this.rotationPlacement === 'overlay' }, "aria-label": this.autoplayRequested ? 'Pause slideshow' : 'Play slideshow', part: "rotation-button", type: "button", onPointerDown: () => { this.rotationPointerAction = !this.autoplayRequested; }, onPointerCancel: () => { this.rotationPointerAction = undefined; }, onClick: this.handleRotationClick, ref: element => { this.rotationButton = element ?? undefined; } }, this.rotationPlacement === 'overlay' ? (this.autoplayRequested ? 'Ⅱ' : '▶') : (this.autoplayRequested ? 'Pause slideshow' : 'Play slideshow')));
|
|
577
|
+
}
|
|
511
578
|
render() {
|
|
512
579
|
const isFirst = this.repeat ? (!this.isScrollable || this.maxIndex <= 0) : (this.isAtStart || !this.isScrollable);
|
|
513
580
|
const isLast = this.repeat ? (!this.isScrollable || this.maxIndex <= 0) : (this.isAtEnd || !this.isScrollable);
|
|
514
|
-
return (h("div", { key: '
|
|
581
|
+
return (h("div", { key: 'ec56b70c1cdd706724c7da0102c812241833d706', class: "carousel-wrapper", onMouseEnter: () => this.handleHover(true), onMouseLeave: () => this.handleHover(false), onFocusin: this.handleFocus, onPointerDown: this.handleInteraction, onClick: this.handleInteraction }, this.rotationVisible && this.rotationPlacement === 'overlay' && this.renderRotationButton(), h("div", { key: 'd65322602f24ac502efc2a041f69f73c96775dc7', class: "carousel-controls", part: "controls", hidden: !this.indicatorsVisible && !(this.rotationVisible && this.rotationPlacement === 'controls') && !this.hasExtraControls }, this.rotationVisible && this.rotationPlacement === 'controls' && this.renderRotationButton(), this.indicatorsVisible && (h("div", { key: '30d2a569f136e337b91f1b107c790e03d684d785', class: "carousel-indicators", role: "group", "aria-label": "Carousel slide controls", onKeyDown: this.handleIndicatorKeyDown }, Array.from({ length: this.maxIndex + 1 }).map((_, idx) => (h("button", { class: { 'indicator-dot': true, 'is-active': idx === this.activeIndex }, part: "indicator", "aria-current": idx === this.activeIndex ? 'true' : undefined, onClick: () => this.scrollToIndex(idx), "aria-label": `Go to slide ${idx + 1}`, type: "button", tabindex: idx === this.activeIndex ? 0 : -1 }))))), h("slot", { key: '4e6d51345f247c3b53feac5b5e039eb5f6cb3008', name: "controls-extra", onSlotchange: this.handleExtraControlsChange })), h("div", { key: '21ad5d75d1e40e890c29d0449ae4b0e88965ff74', class: "carousel-arrow" }, this.arrowsVisible && (h("button", { key: 'a78e06f67637520b1be6e6292403ec9f2056f1a6', class: { 'arrow-btn': true, 'arrow-left': true }, part: "previous-button", "aria-disabled": isFirst ? 'true' : 'false', onClick: isFirst ? undefined : this.slidePrev, "aria-label": "Previous slide", type: "button" }, h("svg", { key: '79e0cb376b578cfb8aa34b8682d447869f8a739e', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("polyline", { key: '52c0c5c6c66c548e9c2e0cfc580116ed37e86002', points: "15 18 9 12 15 6" }))))), h("div", { key: '6f90c4cea424455495bad337134e586c6229d622', class: {
|
|
515
582
|
'carousel-viewport': true,
|
|
516
583
|
'is-stacked': this.stacked,
|
|
517
584
|
'viewport-focusable': this.viewportFocusable,
|
|
518
585
|
[`snap-${this.snapAlignment}`]: this.snapAlignment !== 'none'
|
|
519
|
-
}, role: "group", "aria-roledescription": "carousel", part: "viewport", tabindex: this.viewportFocusable ? 0 : -1, "aria-label": this.ariaLabel, "aria-live": this.managesSlides ? (this.autoplayPlaying ? 'off' : 'polite') : undefined, "aria-atomic": this.managesSlides ? 'false' : undefined, style: { '--q-carousel-transition-duration': `${Number.isFinite(this.transitionDuration) ? Math.max(0, this.transitionDuration) : 500}ms` }, onKeyDown: this.handleKeyDown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel, onScroll: this.handleScroll, ref: this.setScrollContainerRef }, h("slot", { key: '
|
|
586
|
+
}, role: "group", "aria-roledescription": "carousel", part: "viewport", tabindex: this.viewportFocusable ? 0 : -1, "aria-label": this.ariaLabel, "aria-live": this.managesSlides ? (this.autoplayPlaying ? 'off' : 'polite') : undefined, "aria-atomic": this.managesSlides ? 'false' : undefined, style: { '--q-carousel-transition-duration': `${Number.isFinite(this.transitionDuration) ? Math.max(0, this.transitionDuration) : 500}ms` }, onKeyDown: this.handleKeyDown, onPointerDown: this.handlePointerDown, onPointerUp: this.handlePointerUp, onPointerCancel: this.handlePointerCancel, onScroll: this.handleScroll, ref: this.setScrollContainerRef }, h("slot", { key: '9c81f28218a752289de7f20f63e03d932ca24e33', onSlotchange: this.handleSlotChange })), h("div", { key: '9b760f5cf4d3c5e69f3704649458be1648394491', class: "carousel-arrow" }, this.arrowsVisible && (h("button", { key: '9233404c505c711a37f16dfb4032f4edd8949128', class: { 'arrow-btn': true, 'arrow-right': true }, part: "next-button", "aria-disabled": isLast ? 'true' : 'false', onClick: isLast ? undefined : this.slideNext, "aria-label": "Next slide", type: "button" }, h("svg", { key: 'bd5e9b26823d3596a2792d9cbe9a07e50fe08960', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("polyline", { key: 'cee4ae860783927a2c4e493dd3d26dce8e9f1bea', points: "9 18 15 12 9 6" })))))));
|
|
520
587
|
}
|
|
521
588
|
static get is() { return "q-carousel"; }
|
|
522
589
|
static get encapsulation() { return "shadow"; }
|
|
@@ -606,6 +673,26 @@ export class QCarousel {
|
|
|
606
673
|
"attribute": "item-width",
|
|
607
674
|
"defaultValue": "'auto'"
|
|
608
675
|
},
|
|
676
|
+
"rotationPlacement": {
|
|
677
|
+
"type": "string",
|
|
678
|
+
"mutable": false,
|
|
679
|
+
"complexType": {
|
|
680
|
+
"original": "'controls' | 'overlay'",
|
|
681
|
+
"resolved": "\"controls\" | \"overlay\"",
|
|
682
|
+
"references": {}
|
|
683
|
+
},
|
|
684
|
+
"required": false,
|
|
685
|
+
"optional": false,
|
|
686
|
+
"docs": {
|
|
687
|
+
"tags": [],
|
|
688
|
+
"text": "Overlay keeps playback separate from the indicators/extra-controls panel."
|
|
689
|
+
},
|
|
690
|
+
"getter": false,
|
|
691
|
+
"setter": false,
|
|
692
|
+
"reflect": true,
|
|
693
|
+
"attribute": "rotation-placement",
|
|
694
|
+
"defaultValue": "'controls'"
|
|
695
|
+
},
|
|
609
696
|
"showArrows": {
|
|
610
697
|
"type": "boolean",
|
|
611
698
|
"mutable": false,
|
|
@@ -723,7 +810,7 @@ export class QCarousel {
|
|
|
723
810
|
"optional": false,
|
|
724
811
|
"docs": {
|
|
725
812
|
"tags": [],
|
|
726
|
-
"text": "Enables rotation
|
|
813
|
+
"text": "Enables rotation with the configured interaction behavior."
|
|
727
814
|
},
|
|
728
815
|
"getter": false,
|
|
729
816
|
"setter": false,
|
|
@@ -731,6 +818,33 @@ export class QCarousel {
|
|
|
731
818
|
"attribute": "autoplay",
|
|
732
819
|
"defaultValue": "false"
|
|
733
820
|
},
|
|
821
|
+
"autoplayBehavior": {
|
|
822
|
+
"type": "string",
|
|
823
|
+
"mutable": false,
|
|
824
|
+
"complexType": {
|
|
825
|
+
"original": "QCarouselAutoplayBehavior",
|
|
826
|
+
"resolved": "\"continuous\" | \"pauseOnInteraction\"",
|
|
827
|
+
"references": {
|
|
828
|
+
"QCarouselAutoplayBehavior": {
|
|
829
|
+
"location": "import",
|
|
830
|
+
"path": "./carousel.types",
|
|
831
|
+
"id": "../../../src/browser/components/content/carousel/carousel.types.ts::QCarouselAutoplayBehavior",
|
|
832
|
+
"referenceLocation": "QCarouselAutoplayBehavior"
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
"required": false,
|
|
837
|
+
"optional": false,
|
|
838
|
+
"docs": {
|
|
839
|
+
"tags": [],
|
|
840
|
+
"text": "Continuous rotation ignores hover and interaction; explicit pause remains available."
|
|
841
|
+
},
|
|
842
|
+
"getter": false,
|
|
843
|
+
"setter": false,
|
|
844
|
+
"reflect": false,
|
|
845
|
+
"attribute": "autoplay-behavior",
|
|
846
|
+
"defaultValue": "'pauseOnInteraction'"
|
|
847
|
+
},
|
|
734
848
|
"autoplayInterval": {
|
|
735
849
|
"type": "number",
|
|
736
850
|
"mutable": false,
|
|
@@ -771,6 +885,53 @@ export class QCarousel {
|
|
|
771
885
|
"attribute": "autoplay-suspended",
|
|
772
886
|
"defaultValue": "false"
|
|
773
887
|
},
|
|
888
|
+
"slideTiming": {
|
|
889
|
+
"type": "string",
|
|
890
|
+
"mutable": false,
|
|
891
|
+
"complexType": {
|
|
892
|
+
"original": "QCarouselSlideTiming",
|
|
893
|
+
"resolved": "\"finishVideos\" | \"fixedInterval\"",
|
|
894
|
+
"references": {
|
|
895
|
+
"QCarouselSlideTiming": {
|
|
896
|
+
"location": "import",
|
|
897
|
+
"path": "./carousel.types",
|
|
898
|
+
"id": "../../../src/browser/components/content/carousel/carousel.types.ts::QCarouselSlideTiming",
|
|
899
|
+
"referenceLocation": "QCarouselSlideTiming"
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
"required": false,
|
|
904
|
+
"optional": false,
|
|
905
|
+
"docs": {
|
|
906
|
+
"tags": [],
|
|
907
|
+
"text": "Finish-videos delegates each active visit's timing to setSlidePlayback()."
|
|
908
|
+
},
|
|
909
|
+
"getter": false,
|
|
910
|
+
"setter": false,
|
|
911
|
+
"reflect": false,
|
|
912
|
+
"attribute": "slide-timing",
|
|
913
|
+
"defaultValue": "'fixedInterval'"
|
|
914
|
+
},
|
|
915
|
+
"autoplayAdvanceSuspended": {
|
|
916
|
+
"type": "boolean",
|
|
917
|
+
"mutable": false,
|
|
918
|
+
"complexType": {
|
|
919
|
+
"original": "boolean",
|
|
920
|
+
"resolved": "boolean",
|
|
921
|
+
"references": {}
|
|
922
|
+
},
|
|
923
|
+
"required": false,
|
|
924
|
+
"optional": false,
|
|
925
|
+
"docs": {
|
|
926
|
+
"tags": [],
|
|
927
|
+
"text": "Holds advancement for loading without pausing the active media."
|
|
928
|
+
},
|
|
929
|
+
"getter": false,
|
|
930
|
+
"setter": false,
|
|
931
|
+
"reflect": false,
|
|
932
|
+
"attribute": "autoplay-advance-suspended",
|
|
933
|
+
"defaultValue": "false"
|
|
934
|
+
},
|
|
774
935
|
"ariaLabel": {
|
|
775
936
|
"type": "string",
|
|
776
937
|
"mutable": false,
|
|
@@ -850,6 +1011,28 @@ export class QCarousel {
|
|
|
850
1011
|
}
|
|
851
1012
|
}
|
|
852
1013
|
}
|
|
1014
|
+
}, {
|
|
1015
|
+
"method": "qPlaybackChange",
|
|
1016
|
+
"name": "qPlaybackChange",
|
|
1017
|
+
"bubbles": true,
|
|
1018
|
+
"cancelable": true,
|
|
1019
|
+
"composed": true,
|
|
1020
|
+
"docs": {
|
|
1021
|
+
"tags": [],
|
|
1022
|
+
"text": "Playback intent and eligibility, independent of an image-readiness advance hold."
|
|
1023
|
+
},
|
|
1024
|
+
"complexType": {
|
|
1025
|
+
"original": "QCarouselPlaybackChangeDetail",
|
|
1026
|
+
"resolved": "QCarouselPlaybackChangeDetail",
|
|
1027
|
+
"references": {
|
|
1028
|
+
"QCarouselPlaybackChangeDetail": {
|
|
1029
|
+
"location": "import",
|
|
1030
|
+
"path": "./carousel.types",
|
|
1031
|
+
"id": "../../../src/browser/components/content/carousel/carousel.types.ts::QCarouselPlaybackChangeDetail",
|
|
1032
|
+
"referenceLocation": "QCarouselPlaybackChangeDetail"
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
853
1036
|
}];
|
|
854
1037
|
}
|
|
855
1038
|
static get methods() {
|
|
@@ -909,6 +1092,60 @@ export class QCarousel {
|
|
|
909
1092
|
"tags": []
|
|
910
1093
|
}
|
|
911
1094
|
},
|
|
1095
|
+
"setSlidePlayback": {
|
|
1096
|
+
"complexType": {
|
|
1097
|
+
"signature": "(element: HTMLElement, key: string, mode: \"interval\" | \"completion\") => Promise<void>",
|
|
1098
|
+
"parameters": [{
|
|
1099
|
+
"name": "element",
|
|
1100
|
+
"type": "HTMLElement",
|
|
1101
|
+
"docs": ""
|
|
1102
|
+
}, {
|
|
1103
|
+
"name": "key",
|
|
1104
|
+
"type": "string",
|
|
1105
|
+
"docs": ""
|
|
1106
|
+
}, {
|
|
1107
|
+
"name": "mode",
|
|
1108
|
+
"type": "\"interval\" | \"completion\"",
|
|
1109
|
+
"docs": ""
|
|
1110
|
+
}],
|
|
1111
|
+
"references": {
|
|
1112
|
+
"Promise": {
|
|
1113
|
+
"location": "global",
|
|
1114
|
+
"id": "global::Promise"
|
|
1115
|
+
},
|
|
1116
|
+
"HTMLElement": {
|
|
1117
|
+
"location": "global",
|
|
1118
|
+
"id": "global::HTMLElement"
|
|
1119
|
+
}
|
|
1120
|
+
},
|
|
1121
|
+
"return": "Promise<void>"
|
|
1122
|
+
},
|
|
1123
|
+
"docs": {
|
|
1124
|
+
"text": "Registers timing for the current slide and responsive-media visit only.",
|
|
1125
|
+
"tags": []
|
|
1126
|
+
}
|
|
1127
|
+
},
|
|
1128
|
+
"completeSlide": {
|
|
1129
|
+
"complexType": {
|
|
1130
|
+
"signature": "(key: string) => Promise<void>",
|
|
1131
|
+
"parameters": [{
|
|
1132
|
+
"name": "key",
|
|
1133
|
+
"type": "string",
|
|
1134
|
+
"docs": ""
|
|
1135
|
+
}],
|
|
1136
|
+
"references": {
|
|
1137
|
+
"Promise": {
|
|
1138
|
+
"location": "global",
|
|
1139
|
+
"id": "global::Promise"
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"return": "Promise<void>"
|
|
1143
|
+
},
|
|
1144
|
+
"docs": {
|
|
1145
|
+
"text": "Completes the registered visit; stale or duplicate media events are ignored.",
|
|
1146
|
+
"tags": []
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
912
1149
|
"updateLimits": {
|
|
913
1150
|
"complexType": {
|
|
914
1151
|
"signature": "() => Promise<void>",
|
|
@@ -942,12 +1179,21 @@ export class QCarousel {
|
|
|
942
1179
|
}, {
|
|
943
1180
|
"propName": "autoplay",
|
|
944
1181
|
"methodName": "autoplayChanged"
|
|
1182
|
+
}, {
|
|
1183
|
+
"propName": "autoplayBehavior",
|
|
1184
|
+
"methodName": "autoplayChanged"
|
|
945
1185
|
}, {
|
|
946
1186
|
"propName": "autoplayInterval",
|
|
947
1187
|
"methodName": "autoplayChanged"
|
|
948
1188
|
}, {
|
|
949
1189
|
"propName": "autoplaySuspended",
|
|
950
1190
|
"methodName": "autoplayChanged"
|
|
1191
|
+
}, {
|
|
1192
|
+
"propName": "autoplayAdvanceSuspended",
|
|
1193
|
+
"methodName": "autoplayChanged"
|
|
1194
|
+
}, {
|
|
1195
|
+
"propName": "slideTiming",
|
|
1196
|
+
"methodName": "autoplayChanged"
|
|
951
1197
|
}, {
|
|
952
1198
|
"propName": "transition",
|
|
953
1199
|
"methodName": "transitionChanged"
|
|
@@ -11,13 +11,17 @@ export class CarouselAutoplay {
|
|
|
11
11
|
};
|
|
12
12
|
requested = false;
|
|
13
13
|
timer;
|
|
14
|
+
completed = false;
|
|
14
15
|
constructor(advance, changed) {
|
|
15
16
|
this.advance = advance;
|
|
16
17
|
this.changed = changed;
|
|
17
18
|
}
|
|
18
19
|
configure(config) {
|
|
19
20
|
const interval = Number.isFinite(config.interval) && config.interval > 0 ? config.interval : 5000;
|
|
20
|
-
const
|
|
21
|
+
const visitChanged = config.visitKey !== this.config.visitKey;
|
|
22
|
+
const timingChanged = interval !== this.config.interval || config.timing !== this.config.timing || visitChanged;
|
|
23
|
+
if (visitChanged)
|
|
24
|
+
this.completed = false;
|
|
21
25
|
if (!config.enabled)
|
|
22
26
|
this.requested = false;
|
|
23
27
|
else if (!this.config.enabled)
|
|
@@ -43,22 +47,43 @@ export class CarouselAutoplay {
|
|
|
43
47
|
this.config = { ...this.config, suspended: true };
|
|
44
48
|
this.sync();
|
|
45
49
|
}
|
|
50
|
+
complete(visitKey) {
|
|
51
|
+
if (this.config.timing !== 'completion' || visitKey !== this.config.visitKey)
|
|
52
|
+
return;
|
|
53
|
+
this.completed = true;
|
|
54
|
+
this.sync();
|
|
55
|
+
}
|
|
46
56
|
sync() {
|
|
47
57
|
const playing = this.requested && this.config.enabled && this.config.navigable && !this.config.suspended;
|
|
48
|
-
|
|
58
|
+
const advancing = playing && !this.config.advanceSuspended;
|
|
59
|
+
this.changed(playing, this.requested);
|
|
60
|
+
if (!advancing || this.config.timing === 'pending') {
|
|
61
|
+
this.clearTimer();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (this.config.timing === 'completion') {
|
|
49
65
|
this.clearTimer();
|
|
50
|
-
|
|
51
|
-
|
|
66
|
+
if (this.completed) {
|
|
67
|
+
this.completed = false;
|
|
68
|
+
if (!this.advance())
|
|
69
|
+
this.pause();
|
|
70
|
+
}
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (this.timer === undefined) {
|
|
74
|
+
this.timer = setTimeout(() => {
|
|
75
|
+
this.timer = undefined;
|
|
52
76
|
if (!this.advance())
|
|
53
77
|
this.pause();
|
|
78
|
+
else
|
|
79
|
+
this.sync();
|
|
54
80
|
}, this.config.interval);
|
|
55
81
|
}
|
|
56
|
-
this.changed(playing, this.requested);
|
|
57
82
|
}
|
|
58
83
|
clearTimer() {
|
|
59
84
|
if (this.timer === undefined)
|
|
60
85
|
return;
|
|
61
|
-
|
|
86
|
+
clearTimeout(this.timer);
|
|
62
87
|
this.timer = undefined;
|
|
63
88
|
}
|
|
64
89
|
}
|
|
@@ -326,3 +326,125 @@ it('preserves original dot styling while controls fit the available container wi
|
|
|
326
326
|
expect(getComputedStyle(dots[1]).backgroundColor).toBe('rgb(156, 163, 175)');
|
|
327
327
|
await vi.waitFor(() => expect(getComputedStyle(dots[1]).opacity).toBe('0.5'));
|
|
328
328
|
});
|
|
329
|
+
it('keeps continuous rotation running through hover, focus, pointer and keyboard navigation', async () => {
|
|
330
|
+
const el = await create('instant', document.body, {
|
|
331
|
+
layout: 'slideshow', autoplay: true, autoplayBehavior: 'continuous',
|
|
332
|
+
autoplayInterval: 150, autoplayAdvanceSuspended: true, repeat: true,
|
|
333
|
+
});
|
|
334
|
+
const viewport = el.shadowRoot.querySelector('.carousel-viewport');
|
|
335
|
+
const rotation = el.shadowRoot.querySelector('.rotation-btn');
|
|
336
|
+
await userEvent.hover(el);
|
|
337
|
+
const action = el.children[0].querySelector('button');
|
|
338
|
+
action.focus();
|
|
339
|
+
action.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, composed: true }));
|
|
340
|
+
action.click();
|
|
341
|
+
expect(document.activeElement).toBe(action);
|
|
342
|
+
el.autoplayAdvanceSuspended = false;
|
|
343
|
+
await frame();
|
|
344
|
+
expect(rotation.textContent?.trim()).toBe('Pause slideshow');
|
|
345
|
+
expect(viewport.getAttribute('aria-live')).toBe('off');
|
|
346
|
+
await vi.waitFor(() => expect(el.children[0].getAttribute('data-q-carousel-active')).toBe('false'));
|
|
347
|
+
expect(el.children[0].inert).toBe(true);
|
|
348
|
+
expect(el.shadowRoot.activeElement).toBeTruthy();
|
|
349
|
+
const dot = el.shadowRoot.querySelector('.indicator-dot');
|
|
350
|
+
dot.focus();
|
|
351
|
+
dot.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true, composed: true }));
|
|
352
|
+
viewport.dispatchEvent(new KeyboardEvent('keydown', { key: 'ArrowRight', bubbles: true, composed: true }));
|
|
353
|
+
el.shadowRoot.querySelector('.arrow-right').click();
|
|
354
|
+
await frame();
|
|
355
|
+
expect(rotation.textContent?.trim()).toBe('Pause slideshow');
|
|
356
|
+
expect(viewport.getAttribute('aria-live')).toBe('off');
|
|
357
|
+
await el.pause();
|
|
358
|
+
});
|
|
359
|
+
it('preserves explicit pause and external suspension in continuous mode', async () => {
|
|
360
|
+
const el = await create('instant', document.body, {
|
|
361
|
+
layout: 'slideshow', autoplay: true, autoplayBehavior: 'continuous',
|
|
362
|
+
autoplayInterval: 150, repeat: true,
|
|
363
|
+
});
|
|
364
|
+
const rotation = el.shadowRoot.querySelector('.rotation-btn');
|
|
365
|
+
const viewport = el.shadowRoot.querySelector('.carousel-viewport');
|
|
366
|
+
await userEvent.hover(el);
|
|
367
|
+
el.autoplaySuspended = true;
|
|
368
|
+
await frame();
|
|
369
|
+
expect(viewport.getAttribute('aria-live')).toBe('polite');
|
|
370
|
+
expect(rotation.textContent?.trim()).toBe('Pause slideshow');
|
|
371
|
+
rotation.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true, composed: true }));
|
|
372
|
+
rotation.focus();
|
|
373
|
+
rotation.click();
|
|
374
|
+
el.autoplaySuspended = false;
|
|
375
|
+
el.autoplayBehavior = 'pauseOnInteraction';
|
|
376
|
+
await frame();
|
|
377
|
+
el.autoplayBehavior = 'continuous';
|
|
378
|
+
await userEvent.unhover(el);
|
|
379
|
+
await frame();
|
|
380
|
+
expect(rotation.textContent?.trim()).toBe('Play slideshow');
|
|
381
|
+
const active = el.querySelector('[data-q-carousel-active="true"]');
|
|
382
|
+
await new Promise(resolve => setTimeout(resolve, 350));
|
|
383
|
+
expect(el.querySelector('[data-q-carousel-active="true"]')).toBe(active);
|
|
384
|
+
await el.play();
|
|
385
|
+
await vi.waitFor(() => expect(viewport.getAttribute('aria-live')).toBe('off'));
|
|
386
|
+
await el.pause();
|
|
387
|
+
});
|
|
388
|
+
it('keeps autoplay disabled when only continuous behavior is selected', async () => {
|
|
389
|
+
const el = await create('instant', document.body, {
|
|
390
|
+
layout: 'slideshow', autoplayBehavior: 'continuous', autoplayInterval: 100, repeat: true,
|
|
391
|
+
});
|
|
392
|
+
await el.play();
|
|
393
|
+
await new Promise(resolve => setTimeout(resolve, 250));
|
|
394
|
+
expect(el.children[0].getAttribute('data-q-carousel-active')).toBe('true');
|
|
395
|
+
expect(el.shadowRoot.querySelector('.rotation-btn')).toBeNull();
|
|
396
|
+
});
|
|
397
|
+
it('separates overlay playback from an empty indicator panel', async () => {
|
|
398
|
+
const el = await create('instant', document.body, {
|
|
399
|
+
autoplay: true, autoplayBehavior: 'continuous', showIndicators: false,
|
|
400
|
+
rotationPlacement: 'overlay', repeat: true,
|
|
401
|
+
});
|
|
402
|
+
expect(el.shadowRoot.querySelector('[part="controls"]').hidden).toBe(true);
|
|
403
|
+
expect(el.shadowRoot.querySelector('[part="controls"] .rotation-btn')).toBeNull();
|
|
404
|
+
expect(el.shadowRoot.querySelector('.rotation-btn.is-overlay')).not.toBeNull();
|
|
405
|
+
await el.pause();
|
|
406
|
+
});
|
|
407
|
+
it('waits for active video completion and ignores stale completion after navigation', async () => {
|
|
408
|
+
const el = await create('instant', document.body, {
|
|
409
|
+
autoplay: true, autoplayBehavior: 'continuous', autoplayInterval: 80,
|
|
410
|
+
slideTiming: 'finishVideos', repeat: true,
|
|
411
|
+
});
|
|
412
|
+
await el.setSlidePlayback(el.children[0], 'first', 'completion');
|
|
413
|
+
await new Promise(resolve => setTimeout(resolve, 180));
|
|
414
|
+
expect(el.children[0].getAttribute('data-q-carousel-active')).toBe('true');
|
|
415
|
+
el.autoplayAdvanceSuspended = true;
|
|
416
|
+
await frame();
|
|
417
|
+
await el.completeSlide('first');
|
|
418
|
+
expect(el.children[0].getAttribute('data-q-carousel-active')).toBe('true');
|
|
419
|
+
el.autoplayAdvanceSuspended = false;
|
|
420
|
+
await frame();
|
|
421
|
+
expect(el.children[1].getAttribute('data-q-carousel-active')).toBe('true');
|
|
422
|
+
await el.setSlidePlayback(el.children[1], 'second', 'completion');
|
|
423
|
+
await el.completeSlide('first');
|
|
424
|
+
expect(el.children[1].getAttribute('data-q-carousel-active')).toBe('true');
|
|
425
|
+
await el.completeSlide('second');
|
|
426
|
+
await frame();
|
|
427
|
+
expect(el.children[2].getAttribute('data-q-carousel-active')).toBe('true');
|
|
428
|
+
await el.pause();
|
|
429
|
+
});
|
|
430
|
+
it('offers playback for a single video and starts a fresh visit only on explicit replay', async () => {
|
|
431
|
+
const el = await create('instant', document.body, {
|
|
432
|
+
autoplay: true, autoplayBehavior: 'continuous', slideTiming: 'finishVideos', rotationPlacement: 'overlay',
|
|
433
|
+
});
|
|
434
|
+
el.children[2].remove();
|
|
435
|
+
el.children[1].remove();
|
|
436
|
+
await frame();
|
|
437
|
+
await el.updateLimits();
|
|
438
|
+
await el.setSlidePlayback(el.children[0], 'only', 'completion');
|
|
439
|
+
await frame();
|
|
440
|
+
expect(el.shadowRoot.querySelector('[part="controls"]').hasAttribute('hidden')).toBe(true);
|
|
441
|
+
expect(el.shadowRoot.querySelector('.rotation-btn').getAttribute('aria-label')).toBe('Pause slideshow');
|
|
442
|
+
await el.completeSlide('only');
|
|
443
|
+
await frame();
|
|
444
|
+
expect(el.shadowRoot.querySelector('.rotation-btn').getAttribute('aria-label')).toBe('Play slideshow');
|
|
445
|
+
const changed = vi.fn();
|
|
446
|
+
el.addEventListener('qSlideChange', changed);
|
|
447
|
+
await el.play();
|
|
448
|
+
expect(changed).toHaveBeenCalledTimes(1);
|
|
449
|
+
await el.pause();
|
|
450
|
+
});
|
|
@@ -6,7 +6,7 @@ import { Host, h } from "@stencil/core";
|
|
|
6
6
|
export class QAccordion {
|
|
7
7
|
mode = 'single';
|
|
8
8
|
render() {
|
|
9
|
-
return h(Host, { key: '
|
|
9
|
+
return h(Host, { key: 'c1c8b2750964397fc52c897bff5acadda5831bf4' }, h("slot", { key: '3f52446f9fc8f9f9ccd7a0660e1a7e43e31abae4' }));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "q-accordion"; }
|
|
12
12
|
static get encapsulation() { return "shadow"; }
|