@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
--_q-divider-inset: var(--q-divider-inset, var(--q-space-sm, .5rem));
|
|
3
|
+
--_q-divider-usable: max(0px, calc(100% - var(--_q-divider-inset) - var(--_q-divider-inset)));
|
|
4
|
+
--_q-divider-thickness: var(--q-divider-thickness, 1px);
|
|
5
|
+
position: relative;
|
|
6
|
+
display: block;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
min-height: 0;
|
|
10
|
+
height: var(--_q-divider-thickness);
|
|
11
|
+
align-self: stretch;
|
|
12
|
+
flex: 0 0 auto;
|
|
13
|
+
margin-block: var(--_q-divider-spacing, 0px);
|
|
14
|
+
}
|
|
15
|
+
[part='line'] {
|
|
16
|
+
position: absolute;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
top: 50%;
|
|
19
|
+
left: 50%;
|
|
20
|
+
transform: translate(-50%, -50%);
|
|
21
|
+
width: clamp(0px, var(--_q-divider-length, 100%), var(--_q-divider-usable));
|
|
22
|
+
height: 0;
|
|
23
|
+
border: 0 solid var(--q-divider-color, var(--q-border-color, #374151));
|
|
24
|
+
border-top-width: var(--_q-divider-thickness);
|
|
25
|
+
}
|
|
26
|
+
:host([orientation='vertical']) {
|
|
27
|
+
width: var(--_q-divider-thickness);
|
|
28
|
+
height: auto;
|
|
29
|
+
margin-block: 0;
|
|
30
|
+
margin-inline: var(--_q-divider-spacing, 0px);
|
|
31
|
+
}
|
|
32
|
+
:host([orientation='vertical']) [part='line'] {
|
|
33
|
+
width: 0;
|
|
34
|
+
height: clamp(0px, var(--_q-divider-length, 100%), var(--_q-divider-usable));
|
|
35
|
+
border-top-width: 0;
|
|
36
|
+
border-left-width: var(--_q-divider-thickness);
|
|
37
|
+
}
|
|
38
|
+
@media (forced-colors: active) {
|
|
39
|
+
[part='line'] { border-color: CanvasText; }
|
|
40
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { spaceValue } from "../../../theme/tokens";
|
|
3
|
+
/** Static, container-relative separator.
|
|
4
|
+
* @part line - The visible separator line.
|
|
5
|
+
*/
|
|
6
|
+
export class QDivider {
|
|
7
|
+
/** Physical direction of the separator. */
|
|
8
|
+
orientation = 'horizontal';
|
|
9
|
+
/** CSS length or percentage, capped to the allocated extent minus endpoint insets. */
|
|
10
|
+
length = 'auto';
|
|
11
|
+
/** Symmetric external spacing perpendicular to the line. */
|
|
12
|
+
spacing = 'lg';
|
|
13
|
+
/** Hide a purely visual separator from assistive technology. */
|
|
14
|
+
decorative = false;
|
|
15
|
+
render() {
|
|
16
|
+
return h(Host, { key: '10601dff81297193eca4465eb2b8ffc46497b75c', role: this.decorative ? undefined : 'separator', "aria-orientation": this.decorative ? undefined : this.orientation, "aria-hidden": this.decorative ? 'true' : undefined, style: { '--_q-divider-length': this.length === 'auto' ? '100%' : this.length, '--_q-divider-spacing': spaceValue(this.spacing) } }, h("span", { key: '1d2649811fb7ffd7a084b7b846fe99e5919a192f', part: "line", "aria-hidden": "true" }));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "q-divider"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["divider.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get styleUrls() {
|
|
26
|
+
return {
|
|
27
|
+
"$": ["divider.css"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static get properties() {
|
|
31
|
+
return {
|
|
32
|
+
"orientation": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"mutable": false,
|
|
35
|
+
"complexType": {
|
|
36
|
+
"original": "'horizontal' | 'vertical'",
|
|
37
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
38
|
+
"references": {}
|
|
39
|
+
},
|
|
40
|
+
"required": false,
|
|
41
|
+
"optional": false,
|
|
42
|
+
"docs": {
|
|
43
|
+
"tags": [],
|
|
44
|
+
"text": "Physical direction of the separator."
|
|
45
|
+
},
|
|
46
|
+
"getter": false,
|
|
47
|
+
"setter": false,
|
|
48
|
+
"reflect": true,
|
|
49
|
+
"attribute": "orientation",
|
|
50
|
+
"defaultValue": "'horizontal'"
|
|
51
|
+
},
|
|
52
|
+
"length": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "CSS length or percentage, capped to the allocated extent minus endpoint insets."
|
|
65
|
+
},
|
|
66
|
+
"getter": false,
|
|
67
|
+
"setter": false,
|
|
68
|
+
"reflect": false,
|
|
69
|
+
"attribute": "length",
|
|
70
|
+
"defaultValue": "'auto'"
|
|
71
|
+
},
|
|
72
|
+
"spacing": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "QSpace",
|
|
77
|
+
"resolved": "\"2xl\" | \"3xl\" | \"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\"",
|
|
78
|
+
"references": {
|
|
79
|
+
"QSpace": {
|
|
80
|
+
"location": "import",
|
|
81
|
+
"path": "../../../theme/tokens",
|
|
82
|
+
"id": "../../../src/browser/theme/tokens.ts::QSpace",
|
|
83
|
+
"referenceLocation": "QSpace"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": "Symmetric external spacing perpendicular to the line."
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"attribute": "spacing",
|
|
97
|
+
"defaultValue": "'lg'"
|
|
98
|
+
},
|
|
99
|
+
"decorative": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "boolean",
|
|
104
|
+
"resolved": "boolean",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Hide a purely visual separator from assistive technology."
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"attribute": "decorative",
|
|
117
|
+
"defaultValue": "false"
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import "../divider";
|
|
3
|
+
import css from "../divider.css?inline";
|
|
4
|
+
const frame = async () => { await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(() => resolve()))); };
|
|
5
|
+
async function setup(vertical = false, layout = 'flex') {
|
|
6
|
+
const wrapper = document.createElement('div');
|
|
7
|
+
wrapper.style.cssText = `display:${layout};${layout === 'grid' ? 'grid-template-columns:auto 1px auto;' : ''}align-items:center;width:200px;gap:8px;--q-space-sm:8px;--q-border-color:rgb(12, 34, 56)`;
|
|
8
|
+
wrapper.innerHTML = vertical ? '<div style="height:40px">A</div><q-divider orientation="vertical"></q-divider><div>B</div>' : '<q-divider></q-divider>';
|
|
9
|
+
if (!vertical)
|
|
10
|
+
wrapper.style.display = 'block';
|
|
11
|
+
document.body.append(wrapper);
|
|
12
|
+
await customElements.whenDefined('q-divider');
|
|
13
|
+
await frame();
|
|
14
|
+
const el = wrapper.querySelector('q-divider');
|
|
15
|
+
const style = document.createElement('style');
|
|
16
|
+
style.textContent = css;
|
|
17
|
+
el.shadowRoot.append(style);
|
|
18
|
+
await frame();
|
|
19
|
+
return { wrapper, el, line: el.shadowRoot.querySelector('[part="line"]') };
|
|
20
|
+
}
|
|
21
|
+
describe('q-divider allocated geometry', () => {
|
|
22
|
+
afterEach(() => document.body.replaceChildren());
|
|
23
|
+
it('follows its nested wrapper and wrapped flex line, with inherited light/dark colors', async () => {
|
|
24
|
+
const { wrapper, el, line } = await setup(true);
|
|
25
|
+
const outer = document.createElement('div');
|
|
26
|
+
outer.style.cssText = 'display:flex;flex-wrap:wrap;width:160px;gap:12px';
|
|
27
|
+
wrapper.style.width = '140px';
|
|
28
|
+
document.body.append(outer);
|
|
29
|
+
outer.append(wrapper);
|
|
30
|
+
const anotherGroup = document.createElement('div');
|
|
31
|
+
anotherGroup.style.cssText = 'width:140px;height:90px';
|
|
32
|
+
outer.append(anotherGroup);
|
|
33
|
+
await frame();
|
|
34
|
+
expect(el.getBoundingClientRect().height).toBeCloseTo(40);
|
|
35
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(24);
|
|
36
|
+
outer.style.width = '400px';
|
|
37
|
+
await frame();
|
|
38
|
+
// The wrapper now stretches to its own allocated flex line height.
|
|
39
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(el.getBoundingClientRect().height - 16);
|
|
40
|
+
wrapper.style.setProperty('--q-border-color', 'rgb(200, 210, 220)');
|
|
41
|
+
await frame();
|
|
42
|
+
expect(getComputedStyle(line).borderLeftColor).toBe('rgb(200, 210, 220)');
|
|
43
|
+
wrapper.style.setProperty('--q-divider-color', 'rgb(1, 2, 3)');
|
|
44
|
+
await frame();
|
|
45
|
+
expect(getComputedStyle(line).borderLeftColor).toBe('rgb(1, 2, 3)');
|
|
46
|
+
});
|
|
47
|
+
it('stretches horizontally in a sibling-sized column flex layout', async () => {
|
|
48
|
+
const { wrapper, el, line } = await setup();
|
|
49
|
+
wrapper.style.cssText = 'display:inline-flex;flex-direction:column;align-items:center;--q-divider-inset:6px';
|
|
50
|
+
const sibling = document.createElement('div');
|
|
51
|
+
sibling.style.width = '120px';
|
|
52
|
+
wrapper.append(sibling);
|
|
53
|
+
await frame();
|
|
54
|
+
expect(el.getBoundingClientRect().width).toBeCloseTo(120);
|
|
55
|
+
expect(line.getBoundingClientRect().width).toBeCloseTo(108);
|
|
56
|
+
el.spacing = 'sm';
|
|
57
|
+
await frame();
|
|
58
|
+
expect(getComputedStyle(el).marginBlockStart).toBe('8px');
|
|
59
|
+
expect(getComputedStyle(el).marginBlockEnd).toBe('8px');
|
|
60
|
+
});
|
|
61
|
+
it('fills horizontal width with theme insets and caps explicit percentages and oversized lengths', async () => {
|
|
62
|
+
const { wrapper, el, line } = await setup();
|
|
63
|
+
expect(getComputedStyle(el).marginBlockStart).toBe('16px');
|
|
64
|
+
expect(getComputedStyle(el).marginBlockEnd).toBe('16px');
|
|
65
|
+
expect(line.getBoundingClientRect().width).toBeCloseTo(184);
|
|
66
|
+
el.length = '50%';
|
|
67
|
+
await frame();
|
|
68
|
+
expect(line.getBoundingClientRect().width).toBeCloseTo(100);
|
|
69
|
+
el.length = '999px';
|
|
70
|
+
await frame();
|
|
71
|
+
expect(line.getBoundingClientRect().width).toBeCloseTo(184);
|
|
72
|
+
wrapper.style.width = '100px';
|
|
73
|
+
await frame();
|
|
74
|
+
expect(line.getBoundingClientRect().width).toBeCloseTo(84);
|
|
75
|
+
wrapper.style.width = '10px';
|
|
76
|
+
await frame();
|
|
77
|
+
expect(line.getBoundingClientRect().width).toBe(0);
|
|
78
|
+
});
|
|
79
|
+
for (const layout of ['flex', 'grid'])
|
|
80
|
+
it(`stretches to sibling-driven ${layout} height without influencing it`, async () => {
|
|
81
|
+
const { wrapper, el, line } = await setup(true, layout);
|
|
82
|
+
expect(el.getBoundingClientRect().height).toBeCloseTo(40);
|
|
83
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(24);
|
|
84
|
+
expect(line.getBoundingClientRect().top - el.getBoundingClientRect().top).toBeCloseTo(8);
|
|
85
|
+
wrapper.firstElementChild.style.height = '64px';
|
|
86
|
+
await frame();
|
|
87
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(48);
|
|
88
|
+
el.length = '50%';
|
|
89
|
+
await frame();
|
|
90
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(32);
|
|
91
|
+
el.length = '1000px';
|
|
92
|
+
await frame();
|
|
93
|
+
expect(line.getBoundingClientRect().height).toBeCloseTo(48);
|
|
94
|
+
wrapper.dir = 'rtl';
|
|
95
|
+
el.spacing = 'sm';
|
|
96
|
+
await frame();
|
|
97
|
+
expect(getComputedStyle(el).marginInlineStart).toBe('8px');
|
|
98
|
+
expect(getComputedStyle(el).marginInlineEnd).toBe('8px');
|
|
99
|
+
expect(getComputedStyle(line).borderLeftColor).toBe('rgb(12, 34, 56)');
|
|
100
|
+
wrapper.firstElementChild.style.height = '10px';
|
|
101
|
+
wrapper.lastElementChild.style.height = '10px';
|
|
102
|
+
await frame();
|
|
103
|
+
expect(line.getBoundingClientRect().height).toBe(0);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
@@ -12,7 +12,7 @@ export class QGrid {
|
|
|
12
12
|
columnGap;
|
|
13
13
|
render() {
|
|
14
14
|
const columns = Math.min(4, Math.max(1, Number(this.columns) || 2));
|
|
15
|
-
return h("div", { key: '
|
|
15
|
+
return h("div", { key: '02759a6a8e89db1caaf9e4bde8c8d06b54195ae7', part: "layout", style: { '--_q-columns': String(columns), '--_q-min-item': this.minItemWidth, '--_q-column-gap': spaceValue(this.columnGap ?? this.gap), rowGap: spaceValue(this.rowGap ?? this.gap) } }, h("slot", { key: '0af6ddbb0437976cee93ef13166577ab6d6d8ce0' }));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "q-grid"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QInline {
|
|
|
10
10
|
justify = 'start';
|
|
11
11
|
wrap = true;
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '653652578ec7a0fef106648ba0c1beaba88b7c63', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align, justifyContent: this.justify === 'between' ? 'space-between' : this.justify, flexWrap: this.wrap ? 'wrap' : 'nowrap' } }, h("slot", { key: 'feef94f54211d3d708c8677e4b0ddc5794001485' }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-inline"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -386,7 +386,7 @@ export class QNavbar {
|
|
|
386
386
|
const items = identifyItems(this.parsedItems, item => item.value, { warningContext: 'q-navbar.items' });
|
|
387
387
|
const hasItems = items.length > 0;
|
|
388
388
|
const ariaLabel = this.ariaLabel?.trim() || undefined;
|
|
389
|
-
return (h("div", { key: '
|
|
389
|
+
return (h("div", { key: '59659bb209646cafd818599957ae4493cb30c0ef', class: {
|
|
390
390
|
'navbar': true,
|
|
391
391
|
'is-open': this.menuOpen,
|
|
392
392
|
'is-sticky': this.sticky,
|
|
@@ -396,7 +396,7 @@ export class QNavbar {
|
|
|
396
396
|
'is-collapsed': this.collision,
|
|
397
397
|
'has-mobile-nav': this.hasMobileNav,
|
|
398
398
|
'has-mobile-actions': this.hasMobileActions,
|
|
399
|
-
}, part: "navbar" }, h("div", { key: '
|
|
399
|
+
}, part: "navbar" }, h("div", { key: '69ed63bcd1728cc4f2628be40a5b6228f1447f0c', class: "navbar-row" }, this.renderBrand(), h("nav", { key: '58633b4fdd8229cb7bb03b7508fdb1283ba978f3', id: this.primaryNavId, class: "desktop-nav", "aria-label": ariaLabel || 'Primary navigation', part: "nav" }, hasItems && this.renderNavItems(items), h("slot", { key: '799898ef50eb2c636881469e42543e9f0525f354', name: "nav" })), h("div", { key: '13cfdb500de97c26ffc6ec4907fc502dadd48f82', class: "desktop-actions", part: "actions" }, h("slot", { key: 'dd946e806e0a66491243829ceabe222ba3a3e4b5', name: "actions" })), h("button", { key: '51c787627dbc63aaed6f51c5d646cd80823eeb9e', class: "menu-button", type: "button", "aria-label": this.mobileLabel, "aria-expanded": this.menuOpen ? 'true' : 'false', "aria-controls": `${this.primaryNavId} ${this.mobilePanelId}`, "aria-haspopup": "true", onClick: this.handleMenuToggle, part: "menu-button" }, h("span", { key: '2ca8b1221ab0afbb19bb6f3fd40ce2934b5605bb' }), h("span", { key: 'f0dd6987e9a50722efc962a6fd15a4417feffd43' }), h("span", { key: '5e88246aab7d23088b844dac120f5b35a45315b3' }))), h("div", { key: 'f3622686d2c8a0f2b9382231dced85e89348be41', id: this.mobilePanelId, class: { 'mobile-panel': true, 'has-content': this.hasMobileContent }, part: "mobile-panel" }, h("nav", { key: '20ed76cd66577bfe048a9eccc6dd10aaa227fa86', class: "mobile-nav", "aria-label": ariaLabel || 'Mobile navigation' }, h("slot", { key: 'e91782d485151678011df21b88455d9f3af1808c', name: "mobile-nav", onSlotchange: this.handleMobileSlotChange })), h("div", { key: 'c256f1322d733812952533a6b8a000d2c69f15ea', class: "mobile-actions" }, h("slot", { key: '8c9e6d6b1862a48f4baa45d74c6fc0516e3ae387', name: "mobile-actions", onSlotchange: this.handleMobileSlotChange })))));
|
|
400
400
|
}
|
|
401
401
|
static get is() { return "q-navbar"; }
|
|
402
402
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +55,7 @@ export class QPanel {
|
|
|
55
55
|
}
|
|
56
56
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
57
57
|
render() {
|
|
58
|
-
return (h("section", { key: '
|
|
58
|
+
return (h("section", { key: '365312494af4110e703fa92f34160789c8cead62', style: { '--_q-surface': surfaceValue(this.surface ?? (this.variant === 'plain' ? 'transparent' : 'panel')), '--_q-body-padding': spaceValue(this.padding), '--_q-header-padding': spaceValue(this.headerPadding ?? this.padding), '--_q-footer-padding': spaceValue(this.footerPadding ?? this.padding) }, class: {
|
|
59
59
|
'panel': true,
|
|
60
60
|
'has-dividers': this.dividers,
|
|
61
61
|
[`variant-${this.variant}`]: true,
|
|
@@ -66,13 +66,13 @@ export class QPanel {
|
|
|
66
66
|
'has-sticky-header': this.stickyHeader,
|
|
67
67
|
'has-sticky-footer': this.stickyFooter,
|
|
68
68
|
'uses-sticky-scroll': this.scrollable && (this.stickyHeader || this.stickyFooter),
|
|
69
|
-
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '
|
|
69
|
+
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '4495225ab9e5a43a4c4747fd824c19d2e3fbffc4', class: {
|
|
70
70
|
'panel-header': true,
|
|
71
71
|
'is-hidden': !this.hasHeader,
|
|
72
|
-
}, part: "header" }, h("slot", { key: '
|
|
72
|
+
}, part: "header" }, h("slot", { key: '6741a40e8c6e1bb06d993ee5f01b1e3be58bad05', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: 'ab4f43f31b50ded8ce8951bc3f87b39463640c23', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: '6fca5686fdf7ed46b89090a150bb8fc5473cf1ab' })), h("div", { key: '62478d85da82ce313b978264f732947d01d03939', class: {
|
|
73
73
|
'panel-footer': true,
|
|
74
74
|
'is-hidden': !this.hasFooter,
|
|
75
|
-
}, part: "footer" }, h("slot", { key: '
|
|
75
|
+
}, part: "footer" }, h("slot", { key: 'cb061be64d404bc14f6df89816520b609da2bb5d', name: "footer", onSlotchange: this.handleSlotChange }))));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "q-panel"; }
|
|
78
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -326,13 +326,13 @@ export class QScrollable {
|
|
|
326
326
|
height: this.height,
|
|
327
327
|
maxHeight: this.maxHeight || undefined,
|
|
328
328
|
};
|
|
329
|
-
return (h(Host, { key: '
|
|
329
|
+
return (h(Host, { key: '046bbaa5aeab2799e72aa0113cfbe389ce059a42', class: {
|
|
330
330
|
'is-scrolling': this.isScrolling,
|
|
331
331
|
'is-dragging': this.isDragging,
|
|
332
|
-
}, style: hostStyle }, h("div", { key: '
|
|
332
|
+
}, style: hostStyle }, h("div", { key: '3939986efab2d571d320275f463924e95ecf74e6', class: "q-scrollable-host" }, h("div", { key: '0d7a74e535ec7193bfebad641321063b73956f3c', id: this.viewportId, class: "q-scrollable-viewport", ref: this.setViewportRef, onScroll: this.handleScroll, tabindex: 0, part: "viewport" }, h("div", { key: '3eb233aa73627d81ca2508a03875b76f0e6757e3', class: "q-scrollable-content", ref: this.setContentRef, part: "content" }, h("slot", { key: 'c8a09ee7523416dbd3722b68e512ed5adf15bd2e' }))), this.mode === 'custom' && (h("div", { key: '861bd997e2791e7cc822158765a176ffe170eac8', class: {
|
|
333
333
|
'q-scrollbar-track': true,
|
|
334
334
|
'is-dragging': this.isDragging,
|
|
335
|
-
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '
|
|
335
|
+
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '11bbea0624721feedf692ca04532d1cc57a967ae', class: "q-scrollbar-thumb", ref: (el) => (this.thumbEl = el), onPointerDown: this.handlePointerDown, onKeyDown: this.handleThumbKeyDown, role: "scrollbar", "aria-controls": this.viewportId, "aria-orientation": "vertical", "aria-valuemin": "0", "aria-valuemax": this.scrollValueMax, "aria-valuenow": this.scrollValueNow, "aria-label": "Scroll content", tabindex: 0, part: "thumb" }))))));
|
|
336
336
|
}
|
|
337
337
|
static get is() { return "q-scrollable"; }
|
|
338
338
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QSection {
|
|
|
10
10
|
reverse = false;
|
|
11
11
|
columns = 1;
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: 'ee72cf532c33504dabf5a2f649d7246977fb5bd5' }, h("slot", { key: 'cf32a11855ff31365756afcae43ae94cad30c0be', name: "media" }), h("slot", { key: '5a4068e0629aeffa2629fbb0938ef0f99af339b7' }), h("slot", { key: '01d3e828e3a44fd7633bd65cd319f16ea0eaaf5a', name: "actions" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-section"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,13 +18,13 @@ export function renderNavItems(options) {
|
|
|
18
18
|
'nav-item--active': isActive,
|
|
19
19
|
'nav-item--parent': hasChildren,
|
|
20
20
|
'nav-item--always-expanded': isAlwaysExpanded,
|
|
21
|
-
}, "data-depth": depth, "data-depth-tone": depthTone, style: { paddingLeft: `${16 + depth * 16}px` }, role: isAlwaysExpanded ? 'heading' : 'button', tabindex: isAlwaysExpanded ? undefined : 0, title: accessibleLabel, "aria-label": accessibleLabel, "aria-level": isAlwaysExpanded ? String(Math.min(depth + 2, 6)) : undefined, "aria-expanded": hasChildren && !isAlwaysExpanded ? String(isExpanded) : undefined, "aria-current": isActive ? 'page' : undefined, onClick: isAlwaysExpanded ? undefined : () => onItemClick(item), onKeyDown: isAlwaysExpanded
|
|
21
|
+
}, "data-depth": depth, "data-depth-tone": depthTone, style: { paddingLeft: `${16 + depth * 16}px` }, role: isAlwaysExpanded ? 'heading' : 'button', tabindex: isAlwaysExpanded ? undefined : 0, title: options.collapsedRail || hasBadge ? accessibleLabel : undefined, "aria-label": accessibleLabel, "aria-level": isAlwaysExpanded ? String(Math.min(depth + 2, 6)) : undefined, "aria-expanded": hasChildren && !isAlwaysExpanded ? String(isExpanded) : undefined, "aria-current": isActive ? 'page' : undefined, onClick: isAlwaysExpanded ? undefined : () => onItemClick(item), onKeyDown: isAlwaysExpanded
|
|
22
22
|
? undefined
|
|
23
23
|
: (e) => {
|
|
24
24
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
25
25
|
e.preventDefault();
|
|
26
26
|
onItemClick(item);
|
|
27
27
|
}
|
|
28
|
-
} }, item.icon && (h("q-icon", { class: "nav-item__icon", name: item.icon, library: "lucide", size: "sm" })), h("span", { class: "nav-item__label" }, item.label), hasBadge && (h("span", { class: "nav-item__badge", part: "item-badge", "aria-hidden": "true" }, count > 99 ? '99+' : count)), hasChildren && !isAlwaysExpanded && (h("q-icon", { class: { 'nav-item__chevron': true, 'nav-item__chevron--open': isExpanded }, definition: ChevronRight, name: "chevron-right", size: "sm" }))), hasChildren && isExpanded && (h("div", { class: "nav-children", role: "group", "aria-label": item.label }, renderNavItems({ items: item.children,
|
|
28
|
+
} }, item.icon && (h("q-icon", { class: "nav-item__icon", name: item.icon, library: "lucide", size: "sm" })), h("span", { class: "nav-item__label", part: hasChildren ? 'group-label' : 'item-label' }, item.label), hasBadge && (h("span", { class: "nav-item__badge", part: "item-badge", "aria-hidden": "true" }, count > 99 ? '99+' : count)), hasChildren && !isAlwaysExpanded && (h("q-icon", { class: { 'nav-item__chevron': true, 'nav-item__chevron--open': isExpanded }, definition: ChevronRight, name: "chevron-right", size: "sm" }))), hasChildren && isExpanded && (h("div", { class: "nav-children", role: "group", "aria-label": item.label }, renderNavItems({ ...options, items: item.children, depth: depth + 1 })))));
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -34,6 +34,8 @@ const COLLAPSE_ICON_DEFINITIONS = {
|
|
|
34
34
|
* @part surface - Stable inner content surface for persistent panels.
|
|
35
35
|
* @part header - Header region.
|
|
36
36
|
* @part body - Body or navigation region.
|
|
37
|
+
* @part group-label - Text of a navigation item with children.
|
|
38
|
+
* @part item-label - Text of a navigation item without children.
|
|
37
39
|
* @part item-badge - Navigation item's optional count badge.
|
|
38
40
|
* @part footer - Footer region.
|
|
39
41
|
* @part collapse-control - Built-in collapse button.
|
|
@@ -377,6 +379,7 @@ export class QSidepanel {
|
|
|
377
379
|
'is-hidden': !showHeader,
|
|
378
380
|
}, part: "header" }, h("span", { "aria-hidden": isHiddenCollapsed ? 'true' : undefined, inert: isHiddenCollapsed ? true : undefined }, h("slot", { name: "header", onSlotchange: this.handleHeaderSlotChange }))), h("div", { ref: el => { this.persistentContent = el; }, class: "nav-body", part: "body", "aria-hidden": isHiddenCollapsed ? 'true' : undefined, inert: isHiddenCollapsed ? true : undefined }, h("div", { class: "nav-surface" }, renderNavItems({
|
|
379
381
|
items: this.normalizedItems,
|
|
382
|
+
collapsedRail: isCollapsed && this.collapseMode === 'rail',
|
|
380
383
|
expandedGroups: this.expandedGroups,
|
|
381
384
|
activeValue: this.value,
|
|
382
385
|
onItemClick: this.handleNavItemClick,
|
|
@@ -8,7 +8,7 @@ export class QStack {
|
|
|
8
8
|
gap = 'lg';
|
|
9
9
|
align = 'stretch';
|
|
10
10
|
render() {
|
|
11
|
-
return h("div", { key: '
|
|
11
|
+
return h("div", { key: '32865ca88ad111b8a917a09e778ae9f79171194d', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align } }, h("slot", { key: '2658bbb4e3ac5c83377964075a2bdec6a80fc5ee' }));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "q-stack"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -70,7 +70,7 @@ export class QTabs {
|
|
|
70
70
|
warningContext: 'q-tabs items',
|
|
71
71
|
});
|
|
72
72
|
const activeIndex = this.getActiveIndex(items);
|
|
73
|
-
return (h("div", { key: '
|
|
73
|
+
return (h("div", { key: '81aa5e7fac6e345376700bc084ec744086d27821', class: {
|
|
74
74
|
'tab-list': true,
|
|
75
75
|
[`size-${this.size}`]: true,
|
|
76
76
|
[`variant-${this.variant}`]: true,
|
|
@@ -24,12 +24,12 @@ export class QToolbar {
|
|
|
24
24
|
/** Accessible label for the toolbar content group. */
|
|
25
25
|
ariaLabel = null;
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'e2b40231a6c02020e04c60cb7b41f2b928ae2a2d', style: { ...controlScope(this.size), '--_q-toolbar-gap': spaceValue(this.gap) } }, h("div", { key: 'b6e1e8e5df74635dd5635f66065db7aa57482a34', class: {
|
|
28
28
|
toolbar: true,
|
|
29
29
|
'is-compact': this.compact,
|
|
30
30
|
'is-transparent': this.transparent,
|
|
31
31
|
'is-bordered': this.bordered,
|
|
32
|
-
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: '
|
|
32
|
+
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: '6eeb814ac0f5e1143d30a5a94e1561683c6331ef', class: "toolbar-row", part: "row" }, h("div", { key: 'ab3335dd66328a46a3b34fab55f15c5071d52eff', class: "toolbar-start", part: "start" }, h("slot", { key: 'b6294c96eb0e9d7c861a2c6b3d534ebba4243bc3', name: "start" })), h("div", { key: '6261f48792b510d1b0897127377061d94b721b83', class: "toolbar-content", part: "content" }, h("slot", { key: '5a2a1fbccbe1cc4ae6da65c6ff96a4b27700d8d0' })), h("div", { key: '91f7396785ea4d78051a67bb06fcea7e36380b4f', class: "toolbar-end", part: "end" }, h("slot", { key: 'b94cd25a8ef576ce5d9186955c5c2a21649c7f0b', name: "end" }))))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "q-toolbar"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,7 +81,7 @@ export class QAvatar {
|
|
|
81
81
|
const preset = typeof this.size === 'string' && ['sm', 'md', 'lg'].includes(this.size)
|
|
82
82
|
? this.size
|
|
83
83
|
: 'custom';
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: 'd79746af518a28982843be37e02fc6e94894ceb4', class: {
|
|
85
85
|
avatar: true,
|
|
86
86
|
[`size-${preset}`]: true,
|
|
87
87
|
[`shape-${this.shape}`]: true,
|
|
@@ -173,7 +173,7 @@ export class QImageComparison {
|
|
|
173
173
|
const afterSrc = this.afterSrc;
|
|
174
174
|
const ratio = this.frameRatio;
|
|
175
175
|
const failed = !beforeSrc || !afterSrc || this.beforeStatus === 'error' || this.afterStatus === 'error' || this.cropUnavailable;
|
|
176
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: '2d05bd7c03b0108f16150102280b705d29276400', part: "frame", class: { frame: true, ready: this.ready }, style: { aspectRatio: String(ratio) }, ref: el => this.frame = el, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerEnd, onPointerCancel: this.handlePointerEnd, onLostPointerCapture: this.handlePointerEnd }, this.renderImage('after', afterSrc, generation, ratio), this.renderImage('before', beforeSrc, generation, ratio), !this.ready && (h("div", { key: 'd72e679ceaea95ba4a28fd66ad072c96e9e27be5', part: "status", class: "status", role: "status" }, failed ? 'Comparison unavailable' : 'Loading images…')), this.ready && (h("div", { key: 'ce7fd545ea71ac6d69963fc9ba7d1bb760bcff5d', class: "decorations", "aria-hidden": "true" }, h("span", { key: '34d1c59ff46aa2285375c28adea9abadb35704ba', part: "before-label", class: "label before-label" }, this.beforeLabel), h("span", { key: '236d7d9aa9165cc44e43ebef87c4a88ae3fb1b57', part: "after-label", class: "label after-label" }, this.afterLabel), h("div", { key: 'ee7d7164a99d7609418f70183f80b28c9d858ee9', part: "divider", class: "divider", style: { left: `${this.position}%` } }, h("span", { key: '625466a5da45dd47eb96e89200271af7ec068481', part: "handle", class: "handle" }, "\u2194")))), h("input", { key: 'a33ba246c25ebcc9b1f0f187d861e71f80a94de2', part: "control", class: "control", ref: el => this.range = el, type: "range", min: "0", max: "100", step: "1", value: this.position, disabled: !this.ready, "aria-label": this.ariaLabel || 'Image comparison', "aria-valuetext": `${Math.round(this.position)}% ${this.beforeLabel || 'Before'} revealed`, onInput: event => this.updatePosition(Number(event.target.value)) })));
|
|
177
177
|
}
|
|
178
178
|
static get is() { return "q-image-comparison"; }
|
|
179
179
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QMedia {
|
|
|
10
10
|
loading = 'lazy';
|
|
11
11
|
alt = '';
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: 'a3c53eeed8a4b7f93564b14b79a6e860fdbe483c' }, h("slot", { key: '9ce44140bf386ff7105e4e7689c080e11ecac3a4' }), h("slot", { key: '25ba28dcd573c9594118f11ff92aef555e948c20', name: "fallback" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-media"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
import { getSlottedElements, handleTabTrap
|
|
3
|
-
const LIGHTBOX_FOCUS_DELAY_MS = 50;
|
|
2
|
+
import { focusFirstElement, getSlottedElements, handleTabTrap } from "../../../utils/dom";
|
|
4
3
|
/**
|
|
5
4
|
* Gallery layout for q-thumbnail children with an optional modal lightbox.
|
|
6
5
|
* @slot - One or more q-thumbnail elements.
|
|
@@ -16,10 +15,22 @@ export class QReel {
|
|
|
16
15
|
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
17
16
|
activeMedia = null;
|
|
18
17
|
closeButtonRef;
|
|
19
|
-
|
|
18
|
+
openingThumbnail;
|
|
19
|
+
focusAfterRender;
|
|
20
20
|
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
21
|
+
componentDidRender() {
|
|
22
|
+
const target = this.focusAfterRender;
|
|
23
|
+
this.focusAfterRender = undefined;
|
|
24
|
+
if (target === 'viewer') {
|
|
25
|
+
this.closeButtonRef?.focus();
|
|
26
|
+
}
|
|
27
|
+
else if (target?.isConnected) {
|
|
28
|
+
focusFirstElement(target);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
21
31
|
disconnectedCallback() {
|
|
22
|
-
this.
|
|
32
|
+
this.focusAfterRender = undefined;
|
|
33
|
+
this.openingThumbnail = undefined;
|
|
23
34
|
}
|
|
24
35
|
handleLightboxChange(lightbox) {
|
|
25
36
|
if (!lightbox) {
|
|
@@ -36,9 +47,11 @@ export class QReel {
|
|
|
36
47
|
handleThumbnailMaximize(event) {
|
|
37
48
|
if (!this.lightbox)
|
|
38
49
|
return;
|
|
50
|
+
if (!this.activeMedia)
|
|
51
|
+
this.openingThumbnail = event.detail.triggerEl;
|
|
52
|
+
this.focusAfterRender = 'viewer';
|
|
39
53
|
this.activeMedia = event.detail;
|
|
40
54
|
this.qLightboxOpen.emit();
|
|
41
|
-
this.scheduleFocus(this.closeButtonRef);
|
|
42
55
|
}
|
|
43
56
|
handleGlobalKeyDown(event) {
|
|
44
57
|
if (!this.activeMedia)
|
|
@@ -48,10 +61,10 @@ export class QReel {
|
|
|
48
61
|
closeLightbox = () => {
|
|
49
62
|
if (!this.activeMedia)
|
|
50
63
|
return;
|
|
51
|
-
|
|
64
|
+
this.focusAfterRender = this.openingThumbnail;
|
|
65
|
+
this.openingThumbnail = undefined;
|
|
52
66
|
this.activeMedia = null;
|
|
53
67
|
this.qLightboxClose.emit();
|
|
54
|
-
this.scheduleFocus(originalTrigger);
|
|
55
68
|
};
|
|
56
69
|
handleKeyDown = (e) => {
|
|
57
70
|
this.handleLightboxKeyDown(e);
|
|
@@ -119,6 +132,7 @@ export class QReel {
|
|
|
119
132
|
const thumbnails = this.getThumbnails();
|
|
120
133
|
if (index >= 0 && index < thumbnails.length) {
|
|
121
134
|
const thumb = thumbnails[index];
|
|
135
|
+
this.focusAfterRender = 'viewer';
|
|
122
136
|
this.activeMedia = {
|
|
123
137
|
src: thumb.src,
|
|
124
138
|
label: thumb.label,
|
|
@@ -126,32 +140,18 @@ export class QReel {
|
|
|
126
140
|
alt: thumb.alt,
|
|
127
141
|
triggerEl: thumb,
|
|
128
142
|
};
|
|
129
|
-
this.scheduleFocus(this.closeButtonRef);
|
|
130
143
|
}
|
|
131
144
|
}
|
|
132
|
-
clearFocusTimer() {
|
|
133
|
-
if (this.focusTimer) {
|
|
134
|
-
clearTimeout(this.focusTimer);
|
|
135
|
-
this.focusTimer = undefined;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
scheduleFocus(element) {
|
|
139
|
-
this.clearFocusTimer();
|
|
140
|
-
this.focusTimer = setTimeout(() => {
|
|
141
|
-
this.focusTimer = undefined;
|
|
142
|
-
safeFocus(element);
|
|
143
|
-
}, LIGHTBOX_FOCUS_DELAY_MS);
|
|
144
|
-
}
|
|
145
145
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
146
146
|
render() {
|
|
147
147
|
const thumbnails = this.getThumbnails();
|
|
148
148
|
const currentIdx = this.getActiveIndex(thumbnails);
|
|
149
149
|
const hasPrev = currentIdx > 0;
|
|
150
150
|
const hasNext = currentIdx !== -1 && currentIdx < thumbnails.length - 1;
|
|
151
|
-
return (h("div", { key: '
|
|
151
|
+
return (h("div", { key: 'a342240afb249070ce94a5c9a0af8dca77c55e26', class: {
|
|
152
152
|
'reel-container': true,
|
|
153
153
|
[`layout-${this.layout}`]: true,
|
|
154
|
-
} }, h("slot", { key: '
|
|
154
|
+
} }, h("slot", { key: '5da17a261506c3fe36eb3bdb066103663e4a161c' }), this.activeMedia && (h("div", { key: 'a6d7a15e912ae6b4fe1ac5507e6641817a8931f2', class: "lightbox-overlay", onClick: this.closeLightbox, onKeyDown: this.handleKeyDown, role: "dialog", "aria-modal": "true", "aria-label": this.activeMedia.label || 'Media Viewer', tabindex: "-1" }, h("button", { key: '71db71b1812b9950bd663b26764a263b4cc6bac6', class: "lightbox-close", onClick: this.handleCloseButtonClick, "aria-label": "Close viewer", ref: (el) => (this.closeButtonRef = el) }, h("svg", { key: '7eb138f235f950cb984463f5f2b2eda5689da7e3', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { key: '069c46fed3cfada67d7c5655c4344563af838f06', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '2ffcf854b77a902f19963faca1551a0328fde191', x1: "6", y1: "6", x2: "18", y2: "18" }))), hasPrev && (h("button", { key: '17ae53c37d4040ec5f61e9bd5c7b14be70120bdf', class: "lightbox-prev", onClick: this.handlePreviousClick, "aria-label": "Previous media" }, h("svg", { key: '034ed57b13a29fc1d9de340d7098e82e2c76f4e3', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { key: '522ac09b24c3cda83125d7d5c5ada7e0ad652818', points: "15 18 9 12 15 6" })))), hasNext && (h("button", { key: '639dcdb54a103614324e6b9face85274bae725ca', class: "lightbox-next", onClick: this.handleNextClick, "aria-label": "Next media" }, h("svg", { key: '442e27f5a77d637c7a7818326a86c8dd365226b1', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { key: 'c79d346f12dfba409d35be30966ecf38403b94dd', points: "9 18 15 12 9 6" })))), h("div", { key: 'c498b03e5a25a9d995732d29da366c9570bf1b05', class: "lightbox-content", onClick: (e) => e.stopPropagation() }, this.activeMedia.video ? (h("video", { class: "lightbox-media", src: this.activeMedia.src, controls: true, autoplay: true, loop: true })) : (h("img", { class: "lightbox-media", src: this.activeMedia.src, alt: this.activeMedia.alt })), this.activeMedia.label && (h("div", { key: '2b6a816343a019bb6c89eb1e2f395d066fb9dbca', class: "lightbox-caption" }, this.activeMedia.label)))))));
|
|
155
155
|
}
|
|
156
156
|
static get is() { return "q-reel"; }
|
|
157
157
|
static get encapsulation() { return "shadow"; }
|