@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
package/dist/esm/q-card.entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, h } from './index-
|
|
2
|
-
import { s as spaceValue, a as surfaceValue } from './tokens-
|
|
3
|
-
import { g as getSlottedElements } from './dom-
|
|
1
|
+
import { r as registerInstance, a as getElement, h } from './index-CIMzZPQO.js';
|
|
2
|
+
import { s as spaceValue, a as surfaceValue } from './tokens-DbzjRzhu.js';
|
|
3
|
+
import { g as getSlottedElements } from './dom-B610wOGe.js';
|
|
4
4
|
|
|
5
5
|
function normalizeCardElevation(elevation) {
|
|
6
6
|
if (elevation === 1)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-
|
|
2
|
-
import { g as getSlottedElements } from './dom-
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-CIMzZPQO.js';
|
|
2
|
+
import { g as getSlottedElements } from './dom-B610wOGe.js';
|
|
3
3
|
|
|
4
4
|
/** Own only temporary accessibility attributes; restore authored values on release. */
|
|
5
5
|
class CarouselSlideState {
|
|
@@ -65,13 +65,17 @@ class CarouselAutoplay {
|
|
|
65
65
|
};
|
|
66
66
|
requested = false;
|
|
67
67
|
timer;
|
|
68
|
+
completed = false;
|
|
68
69
|
constructor(advance, changed) {
|
|
69
70
|
this.advance = advance;
|
|
70
71
|
this.changed = changed;
|
|
71
72
|
}
|
|
72
73
|
configure(config) {
|
|
73
74
|
const interval = Number.isFinite(config.interval) && config.interval > 0 ? config.interval : 5000;
|
|
74
|
-
const
|
|
75
|
+
const visitChanged = config.visitKey !== this.config.visitKey;
|
|
76
|
+
const timingChanged = interval !== this.config.interval || config.timing !== this.config.timing || visitChanged;
|
|
77
|
+
if (visitChanged)
|
|
78
|
+
this.completed = false;
|
|
75
79
|
if (!config.enabled)
|
|
76
80
|
this.requested = false;
|
|
77
81
|
else if (!this.config.enabled)
|
|
@@ -97,22 +101,43 @@ class CarouselAutoplay {
|
|
|
97
101
|
this.config = { ...this.config, suspended: true };
|
|
98
102
|
this.sync();
|
|
99
103
|
}
|
|
104
|
+
complete(visitKey) {
|
|
105
|
+
if (this.config.timing !== 'completion' || visitKey !== this.config.visitKey)
|
|
106
|
+
return;
|
|
107
|
+
this.completed = true;
|
|
108
|
+
this.sync();
|
|
109
|
+
}
|
|
100
110
|
sync() {
|
|
101
111
|
const playing = this.requested && this.config.enabled && this.config.navigable && !this.config.suspended;
|
|
102
|
-
|
|
112
|
+
const advancing = playing && !this.config.advanceSuspended;
|
|
113
|
+
this.changed(playing, this.requested);
|
|
114
|
+
if (!advancing || this.config.timing === 'pending') {
|
|
103
115
|
this.clearTimer();
|
|
104
|
-
|
|
105
|
-
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (this.config.timing === 'completion') {
|
|
119
|
+
this.clearTimer();
|
|
120
|
+
if (this.completed) {
|
|
121
|
+
this.completed = false;
|
|
122
|
+
if (!this.advance())
|
|
123
|
+
this.pause();
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (this.timer === undefined) {
|
|
128
|
+
this.timer = setTimeout(() => {
|
|
129
|
+
this.timer = undefined;
|
|
106
130
|
if (!this.advance())
|
|
107
131
|
this.pause();
|
|
132
|
+
else
|
|
133
|
+
this.sync();
|
|
108
134
|
}, this.config.interval);
|
|
109
135
|
}
|
|
110
|
-
this.changed(playing, this.requested);
|
|
111
136
|
}
|
|
112
137
|
clearTimer() {
|
|
113
138
|
if (this.timer === undefined)
|
|
114
139
|
return;
|
|
115
|
-
|
|
140
|
+
clearTimeout(this.timer);
|
|
116
141
|
this.timer = undefined;
|
|
117
142
|
}
|
|
118
143
|
}
|
|
@@ -177,13 +202,14 @@ function getClosestCarouselIndex(options) {
|
|
|
177
202
|
return closestIndex;
|
|
178
203
|
}
|
|
179
204
|
|
|
180
|
-
const carouselCss = () => `:host{display:block;width:100%;box-sizing:border-box;position:relative}::slotted(:not([slot='controls-extra'])){box-sizing:border-box;flex:var(--q-carousel-item-flex, 0 0 auto);width:var(--q-carousel-item-width, auto);scroll-snap-align:var(--q-carousel-snap-align, none)}.carousel-wrapper{position:relative;width:100%;box-sizing:border-box;display:flex;flex-direction:column}:host([layout='slideshow']){--q-carousel-padding:0;--q-carousel-gap:0}.carousel-viewport{display:flex;order:1;flex-direction:row;overflow-x:auto;width:100%;gap:var(--q-carousel-gap, 16px);padding:var(--q-carousel-padding, 48px 40px);box-sizing:border-box;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;outline:none}.carousel-viewport.viewport-focusable:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:-2px}.carousel-viewport::-webkit-scrollbar{display:none}.carousel-viewport{-ms-overflow-style:none;scrollbar-width:none}.snap-start{scroll-snap-type:x mandatory}.snap-center{scroll-snap-type:x mandatory}.snap-end{scroll-snap-type:x mandatory}.carousel-arrow{display:contents}.arrow-btn{position:absolute;top:50%;transform:translateY(-50%);width:var(--q-carousel-arrow-size, 40px);height:var(--q-carousel-arrow-size, 40px);border-radius:50%;background:var(--q-carousel-arrow-bg, var(--q-bg-surface-3, #4b5563));border:var(--q-carousel-arrow-border, var(--q-border, 1px solid var(--q-border-color, #374151)));color:var(--q-carousel-arrow-color, var(--q-fg-base, #f9fafb));display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10;outline:none;box-shadow:0 8px 16px rgba(0, 0, 0, 0.3);box-shadow:var(--q-shadow-medium, 0 8px 16px rgba(0,0,0,0.3));opacity:0;user-select:none;-webkit-user-select:none;transition:opacity var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1)), transform var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.arrow-left{left:8px}.arrow-right{right:8px}.carousel-wrapper:hover .arrow-btn,.carousel-wrapper:focus-within .arrow-btn{opacity:1}.arrow-btn:focus-visible{outline:none;box-shadow:0 0 0 2px var(--q-bg-base, #111827), 0 0 0 4px var(--q-color-primary, #60a5fa);opacity:1;z-index:12}.arrow-btn:hover{background:var(--q-color-primary, #60a5fa);border-color:var(--q-color-primary, #60a5fa);color:var(--q-bg-base, #111827);transform:translateY(-50%) scale(1.08)}.arrow-btn:active{transform:translateY(-50%) scale(0.95)}.arrow-btn[aria-disabled="true"]{opacity:0.25 !important;pointer-events:none;cursor:not-allowed;transform:translateY(-50%) scale(0.9)}.arrow-btn svg{width:20px;height:20px}.carousel-controls{display:flex;order:2;max-width:100%;flex-direction:column;align-items:center;gap:var(--q-carousel-controls-gap, 0px)}.carousel-controls[hidden]{display:none}.carousel-indicators{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--q-carousel-indicator-gap, 8px);margin-top:var(--q-carousel-indicator-margin-top, 16px);width:100%}.indicator-dot{flex-shrink:0;padding:0;width:var(--q-carousel-indicator-size, 6px);height:var(--q-carousel-indicator-size, 6px);border-radius:var(--q-carousel-indicator-size, 6px);background:var(--q-fg-muted, #9ca3af);border:none;cursor:pointer;outline:none;opacity:0.5;user-select:none;-webkit-user-select:none;transition:width var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1)), opacity var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.indicator-dot:hover{opacity:0.8}.indicator-dot:focus-visible{outline:none;box-shadow:0 0 0 2px var(--q-bg-base, #111827), 0 0 0 4px var(--q-color-primary, #60a5fa);opacity:1}.indicator-dot.is-active{background:var(--q-color-primary, #60a5fa);opacity:1;width:calc(var(--q-carousel-indicator-size, 6px) * 2.5)}.carousel-viewport.is-stacked{display:grid;overflow:hidden;gap:0;scroll-snap-type:none;touch-action:pan-y pinch-zoom;isolation:isolate}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])),:host([transition='instant']) ::slotted(:not([slot='controls-extra'])){grid-area:1 / 1;width:100%;min-width:0;opacity:0;pointer-events:none;z-index:0}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])){transition:opacity var(--q-carousel-transition-duration, 500ms) ease-in-out}:host([transition='crossfade']) ::slotted([data-q-carousel-active='true']),:host([transition='instant']) ::slotted([data-q-carousel-active='true']){opacity:1;pointer-events:auto;z-index:1}@media (prefers-reduced-motion: reduce){.carousel-viewport{scroll-behavior:auto}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])){transition:none}}.rotation-btn{min-width:44px;min-height:44px;max-width:100%;box-sizing:border-box;padding:var(--q-padding-sm, 8px) var(--q-padding-md, 12px);border:var(--q-border, 1px solid var(--q-border-color, #374151));border-radius:var(--q-radius-md, 8px);background:var(--q-bg-base, #111827);color:var(--q-fg-base, #f9fafb);font:inherit;cursor:pointer}.rotation-btn:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}@media (hover: none), (pointer: coarse){.arrow-btn{opacity:1}}`;
|
|
205
|
+
const carouselCss = () => `:host{display:block;width:100%;box-sizing:border-box;position:relative}::slotted(:not([slot='controls-extra'])){box-sizing:border-box;flex:var(--q-carousel-item-flex, 0 0 auto);width:var(--q-carousel-item-width, auto);scroll-snap-align:var(--q-carousel-snap-align, none)}.carousel-wrapper{position:relative;width:100%;box-sizing:border-box;display:flex;flex-direction:column}:host([layout='slideshow']){--q-carousel-padding:0;--q-carousel-gap:0}.carousel-viewport{display:flex;order:1;flex-direction:row;overflow-x:auto;width:100%;gap:var(--q-carousel-gap, 16px);padding:var(--q-carousel-padding, 48px 40px);box-sizing:border-box;scroll-behavior:smooth;-webkit-overflow-scrolling:touch;outline:none}.carousel-viewport.viewport-focusable:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:-2px}.carousel-viewport::-webkit-scrollbar{display:none}.carousel-viewport{-ms-overflow-style:none;scrollbar-width:none}.snap-start{scroll-snap-type:x mandatory}.snap-center{scroll-snap-type:x mandatory}.snap-end{scroll-snap-type:x mandatory}.carousel-arrow{display:contents}.arrow-btn{position:absolute;top:50%;transform:translateY(-50%);width:var(--q-carousel-arrow-size, 40px);height:var(--q-carousel-arrow-size, 40px);border-radius:50%;background:var(--q-carousel-arrow-bg, var(--q-bg-surface-3, #4b5563));border:var(--q-carousel-arrow-border, var(--q-border, 1px solid var(--q-border-color, #374151)));color:var(--q-carousel-arrow-color, var(--q-fg-base, #f9fafb));display:flex;align-items:center;justify-content:center;cursor:pointer;z-index:10;outline:none;box-shadow:0 8px 16px rgba(0, 0, 0, 0.3);box-shadow:var(--q-shadow-medium, 0 8px 16px rgba(0,0,0,0.3));opacity:0;user-select:none;-webkit-user-select:none;transition:opacity var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1)), transform var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.arrow-left{left:8px}.arrow-right{right:8px}.carousel-wrapper:hover .arrow-btn,.carousel-wrapper:focus-within .arrow-btn{opacity:1}.arrow-btn:focus-visible{outline:none;box-shadow:0 0 0 2px var(--q-bg-base, #111827), 0 0 0 4px var(--q-color-primary, #60a5fa);opacity:1;z-index:12}.arrow-btn:hover{background:var(--q-color-primary, #60a5fa);border-color:var(--q-color-primary, #60a5fa);color:var(--q-bg-base, #111827);transform:translateY(-50%) scale(1.08)}.arrow-btn:active{transform:translateY(-50%) scale(0.95)}.arrow-btn[aria-disabled="true"]{opacity:0.25 !important;pointer-events:none;cursor:not-allowed;transform:translateY(-50%) scale(0.9)}.arrow-btn svg{width:20px;height:20px}.carousel-controls{display:flex;order:2;max-width:100%;flex-direction:column;align-items:center;gap:var(--q-carousel-controls-gap, 0px)}.carousel-controls[hidden]{display:none}.carousel-indicators{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:var(--q-carousel-indicator-gap, 8px);margin-top:var(--q-carousel-indicator-margin-top, 16px);width:100%}.indicator-dot{flex-shrink:0;padding:0;width:var(--q-carousel-indicator-size, 6px);height:var(--q-carousel-indicator-size, 6px);border-radius:var(--q-carousel-indicator-size, 6px);background:var(--q-fg-muted, #9ca3af);border:none;cursor:pointer;outline:none;opacity:0.5;user-select:none;-webkit-user-select:none;transition:width var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1)), opacity var(--q-transition-normal, 250ms cubic-bezier(0.4, 0, 0.2, 1))}.indicator-dot:hover{opacity:0.8}.indicator-dot:focus-visible{outline:none;box-shadow:0 0 0 2px var(--q-bg-base, #111827), 0 0 0 4px var(--q-color-primary, #60a5fa);opacity:1}.indicator-dot.is-active{background:var(--q-color-primary, #60a5fa);opacity:1;width:calc(var(--q-carousel-indicator-size, 6px) * 2.5)}.carousel-viewport.is-stacked{display:grid;overflow:hidden;gap:0;scroll-snap-type:none;touch-action:pan-y pinch-zoom;isolation:isolate}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])),:host([transition='instant']) ::slotted(:not([slot='controls-extra'])){grid-area:1 / 1;width:100%;min-width:0;opacity:0;pointer-events:none;z-index:0}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])){transition:opacity var(--q-carousel-transition-duration, 500ms) ease-in-out}:host([transition='crossfade']) ::slotted([data-q-carousel-active='true']),:host([transition='instant']) ::slotted([data-q-carousel-active='true']){opacity:1;pointer-events:auto;z-index:1}@media (prefers-reduced-motion: reduce){.carousel-viewport{scroll-behavior:auto}:host([transition='crossfade']) ::slotted(:not([slot='controls-extra'])){transition:none}}.rotation-btn{min-width:44px;min-height:44px;max-width:100%;box-sizing:border-box;padding:var(--q-padding-sm, 8px) var(--q-padding-md, 12px);border:var(--q-border, 1px solid var(--q-border-color, #374151));border-radius:var(--q-radius-md, 8px);background:var(--q-bg-base, #111827);color:var(--q-fg-base, #f9fafb);font:inherit;cursor:pointer}.rotation-btn:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}@media (hover: none), (pointer: coarse){.arrow-btn{opacity:1}}.rotation-btn.is-overlay{position:absolute;inset-block-end:var(--q-padding-md, 1rem);inset-inline-end:var(--q-padding-md, 1rem);z-index:3}`;
|
|
181
206
|
|
|
182
207
|
const QCarousel = class {
|
|
183
208
|
constructor(hostRef) {
|
|
184
209
|
registerInstance(this, hostRef);
|
|
185
210
|
this.qSlideChange = createEvent(this, "qSlideChange");
|
|
186
211
|
this.qAutoplayChange = createEvent(this, "qAutoplayChange");
|
|
212
|
+
this.qPlaybackChange = createEvent(this, "qPlaybackChange");
|
|
187
213
|
}
|
|
188
214
|
// ======== [1] STENCIL API (Props, Events, AttachInternals, Elements) =========
|
|
189
215
|
/** Slideshow provides full-width slides with no default viewport inset or gap. */
|
|
@@ -191,6 +217,8 @@ const QCarousel = class {
|
|
|
191
217
|
snapAlignment = 'start';
|
|
192
218
|
/** `auto` preserves each slotted item's natural width. */
|
|
193
219
|
itemWidth = 'auto';
|
|
220
|
+
/** Overlay keeps playback separate from the indicators/extra-controls panel. */
|
|
221
|
+
rotationPlacement = 'controls';
|
|
194
222
|
/** Omitted controls are enabled for navigable slideshows and disabled for strips. */
|
|
195
223
|
showArrows;
|
|
196
224
|
/** Shows clickable slide indicator dots when the carousel can scroll. */
|
|
@@ -201,12 +229,18 @@ const QCarousel = class {
|
|
|
201
229
|
transition = 'slide';
|
|
202
230
|
/** Crossfade duration in milliseconds; native sliding keeps browser-controlled timing. */
|
|
203
231
|
transitionDuration = 500;
|
|
204
|
-
/** Enables rotation
|
|
232
|
+
/** Enables rotation with the configured interaction behavior. */
|
|
205
233
|
autoplay = false;
|
|
234
|
+
/** Continuous rotation ignores hover and interaction; explicit pause remains available. */
|
|
235
|
+
autoplayBehavior = 'pauseOnInteraction';
|
|
206
236
|
/** Finite positive interval in milliseconds; invalid values use 5000. */
|
|
207
237
|
autoplayInterval = 5000;
|
|
208
238
|
/** Temporarily suspends requested playback without changing the button action. */
|
|
209
239
|
autoplaySuspended = false;
|
|
240
|
+
/** Finish-videos delegates each active visit's timing to setSlidePlayback(). */
|
|
241
|
+
slideTiming = 'fixedInterval';
|
|
242
|
+
/** Holds advancement for loading without pausing the active media. */
|
|
243
|
+
autoplayAdvanceSuspended = false;
|
|
210
244
|
/** Accessible name forwarded to the slide viewport. */
|
|
211
245
|
ariaLabel = 'Carousel content';
|
|
212
246
|
hasExtraControls = false;
|
|
@@ -220,6 +254,8 @@ const QCarousel = class {
|
|
|
220
254
|
qSlideChange;
|
|
221
255
|
/** Actual running state, including temporary suspension. */
|
|
222
256
|
qAutoplayChange;
|
|
257
|
+
/** Playback intent and eligibility, independent of an image-readiness advance hold. */
|
|
258
|
+
qPlaybackChange;
|
|
223
259
|
get el() { return getElement(this); }
|
|
224
260
|
slideState = new CarouselSlideState();
|
|
225
261
|
touchStart;
|
|
@@ -232,6 +268,10 @@ const QCarousel = class {
|
|
|
232
268
|
get navigable() {
|
|
233
269
|
return this.isScrollable && this.maxIndex > 0;
|
|
234
270
|
}
|
|
271
|
+
get rotationVisible() {
|
|
272
|
+
return this.autoplay && (this.navigable ||
|
|
273
|
+
(this.slideTiming === 'finishVideos' && this.slidePlayback?.mode === 'completion'));
|
|
274
|
+
}
|
|
235
275
|
get arrowsVisible() {
|
|
236
276
|
return this.navigable && (this.showArrows ?? this.layout === 'slideshow');
|
|
237
277
|
}
|
|
@@ -260,12 +300,16 @@ const QCarousel = class {
|
|
|
260
300
|
programmaticScrollToken = 0;
|
|
261
301
|
connected = false;
|
|
262
302
|
hovered = false;
|
|
303
|
+
selectedElement;
|
|
304
|
+
selectionGeneration = 0;
|
|
305
|
+
slidePlayback;
|
|
306
|
+
playbackState = '';
|
|
263
307
|
reducedMotion = false;
|
|
264
308
|
motionPreference;
|
|
265
309
|
rotationButton;
|
|
266
310
|
rotationPointerAction;
|
|
267
311
|
autoplayController = new CarouselAutoplay(() => {
|
|
268
|
-
if (!this.repeat && this.activeIndex >= this.maxIndex)
|
|
312
|
+
if (!this.navigable || (!this.repeat && this.activeIndex >= this.maxIndex))
|
|
269
313
|
return false;
|
|
270
314
|
this.scrollToIndex(this.activeIndex + 1);
|
|
271
315
|
return true;
|
|
@@ -275,6 +319,11 @@ const QCarousel = class {
|
|
|
275
319
|
this.autoplayPlaying = playing;
|
|
276
320
|
if (changed)
|
|
277
321
|
this.qAutoplayChange.emit({ playing });
|
|
322
|
+
const state = `${playing}:${requested}`;
|
|
323
|
+
if (state !== this.playbackState) {
|
|
324
|
+
this.playbackState = state;
|
|
325
|
+
this.qPlaybackChange.emit({ playing, requested });
|
|
326
|
+
}
|
|
278
327
|
});
|
|
279
328
|
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
280
329
|
layoutChanged() {
|
|
@@ -349,12 +398,34 @@ const QCarousel = class {
|
|
|
349
398
|
this.calculateLimits();
|
|
350
399
|
if (this.autoplay && this.navigable && !this.repeat && this.activeIndex >= this.maxIndex)
|
|
351
400
|
this.scrollToIndex(0);
|
|
401
|
+
if (this.slideTiming === 'finishVideos' && !this.navigable && this.slidePlayback?.ended) {
|
|
402
|
+
this.slidePlayback = undefined;
|
|
403
|
+
this.selectionGeneration += 1;
|
|
404
|
+
this.syncAutoplay();
|
|
405
|
+
this.qSlideChange.emit({ index: this.activeIndex, element: this.cachedChildren[this.activeIndex] });
|
|
406
|
+
}
|
|
352
407
|
this.autoplayController.play();
|
|
353
408
|
}
|
|
354
409
|
/** Stops rotation until play() or the playback control explicitly restarts it. */
|
|
355
410
|
async pause() {
|
|
356
411
|
this.autoplayController.pause();
|
|
357
412
|
}
|
|
413
|
+
/** Registers timing for the current slide and responsive-media visit only. */
|
|
414
|
+
async setSlidePlayback(element, key, mode) {
|
|
415
|
+
if (this.slideTiming !== 'finishVideos' || element !== this.cachedChildren[this.activeIndex])
|
|
416
|
+
return;
|
|
417
|
+
if (this.slidePlayback?.key === key && this.slidePlayback.mode === mode)
|
|
418
|
+
return;
|
|
419
|
+
this.slidePlayback = { element, key, mode, ended: false };
|
|
420
|
+
this.syncAutoplay();
|
|
421
|
+
}
|
|
422
|
+
/** Completes the registered visit; stale or duplicate media events are ignored. */
|
|
423
|
+
async completeSlide(key) {
|
|
424
|
+
if (this.slideTiming !== 'finishVideos' || this.slidePlayback?.key !== key || this.slidePlayback.ended)
|
|
425
|
+
return;
|
|
426
|
+
this.slidePlayback.ended = true;
|
|
427
|
+
this.autoplayController.complete(key);
|
|
428
|
+
}
|
|
358
429
|
/** Recalculates slide offsets, scroll bounds, and navigation states. */
|
|
359
430
|
async updateLimits() {
|
|
360
431
|
this.calculateLimits();
|
|
@@ -363,8 +434,16 @@ const QCarousel = class {
|
|
|
363
434
|
syncAutoplay = () => {
|
|
364
435
|
this.autoplayController.configure({
|
|
365
436
|
enabled: this.autoplay,
|
|
366
|
-
navigable: this.navigable,
|
|
367
|
-
|
|
437
|
+
navigable: this.navigable || this.rotationVisible,
|
|
438
|
+
timing: this.slideTiming === 'finishVideos' ? (this.slidePlayback?.mode ?? 'pending') : 'interval',
|
|
439
|
+
visitKey: this.slideTiming === 'finishVideos'
|
|
440
|
+
? (this.slidePlayback?.key ?? `pending:${this.selectionGeneration}`)
|
|
441
|
+
: undefined,
|
|
442
|
+
advanceSuspended: this.autoplayAdvanceSuspended,
|
|
443
|
+
suspended: !this.connected ||
|
|
444
|
+
(this.autoplayBehavior !== 'continuous' && this.hovered) ||
|
|
445
|
+
document.hidden ||
|
|
446
|
+
this.autoplaySuspended,
|
|
368
447
|
reducedMotion: this.reducedMotion,
|
|
369
448
|
interval: this.autoplayInterval,
|
|
370
449
|
});
|
|
@@ -382,9 +461,13 @@ const QCarousel = class {
|
|
|
382
461
|
}
|
|
383
462
|
handleInteraction = (event) => {
|
|
384
463
|
if (!this.isRotationEvent(event))
|
|
464
|
+
this.pauseOnInteraction();
|
|
465
|
+
};
|
|
466
|
+
pauseOnInteraction = () => {
|
|
467
|
+
if (this.autoplayBehavior !== 'continuous')
|
|
385
468
|
this.autoplayController.pause();
|
|
386
469
|
};
|
|
387
|
-
handleFocus = () => this.
|
|
470
|
+
handleFocus = () => this.pauseOnInteraction();
|
|
388
471
|
handleRotationClick = () => {
|
|
389
472
|
const play = this.rotationPointerAction ?? !this.autoplayRequested;
|
|
390
473
|
this.rotationPointerAction = undefined;
|
|
@@ -394,6 +477,13 @@ const QCarousel = class {
|
|
|
394
477
|
this.autoplayController.pause();
|
|
395
478
|
};
|
|
396
479
|
updateSlideState() {
|
|
480
|
+
const selected = this.cachedChildren[this.activeIndex];
|
|
481
|
+
if (selected !== this.selectedElement) {
|
|
482
|
+
this.selectedElement = selected;
|
|
483
|
+
this.selectionGeneration += 1;
|
|
484
|
+
this.slidePlayback = undefined;
|
|
485
|
+
this.syncAutoplay();
|
|
486
|
+
}
|
|
397
487
|
if (this.managesSlides)
|
|
398
488
|
this.slideState.update(this.cachedChildren, this.activeIndex, () => this.recoverSlideFocus());
|
|
399
489
|
else
|
|
@@ -621,7 +711,7 @@ const QCarousel = class {
|
|
|
621
711
|
handleIndicatorKeyDown = (e) => {
|
|
622
712
|
if (e.key === 'ArrowRight' || e.key === 'ArrowLeft') {
|
|
623
713
|
e.preventDefault();
|
|
624
|
-
this.
|
|
714
|
+
this.pauseOnInteraction();
|
|
625
715
|
const dots = Array.from(this.el.shadowRoot?.querySelectorAll('.indicator-dot') || []);
|
|
626
716
|
if (dots.length === 0)
|
|
627
717
|
return;
|
|
@@ -650,7 +740,7 @@ const QCarousel = class {
|
|
|
650
740
|
return;
|
|
651
741
|
event.preventDefault();
|
|
652
742
|
event.stopPropagation();
|
|
653
|
-
this.
|
|
743
|
+
this.pauseOnInteraction();
|
|
654
744
|
this.scrollToIndex(this.activeIndex + (event.key === 'ArrowRight' ? 1 : -1));
|
|
655
745
|
if (!this.viewportFocusable)
|
|
656
746
|
this.recoverSlideFocus();
|
|
@@ -677,15 +767,18 @@ const QCarousel = class {
|
|
|
677
767
|
this.hasExtraControls = slot.assignedElements().length > 0;
|
|
678
768
|
};
|
|
679
769
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
770
|
+
renderRotationButton() {
|
|
771
|
+
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')));
|
|
772
|
+
}
|
|
680
773
|
render() {
|
|
681
774
|
const isFirst = this.repeat ? (!this.isScrollable || this.maxIndex <= 0) : (this.isAtStart || !this.isScrollable);
|
|
682
775
|
const isLast = this.repeat ? (!this.isScrollable || this.maxIndex <= 0) : (this.isAtEnd || !this.isScrollable);
|
|
683
|
-
return (h("div", { key: '
|
|
776
|
+
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: {
|
|
684
777
|
'carousel-viewport': true,
|
|
685
778
|
'is-stacked': this.stacked,
|
|
686
779
|
'viewport-focusable': this.viewportFocusable,
|
|
687
780
|
[`snap-${this.snapAlignment}`]: this.snapAlignment !== 'none'
|
|
688
|
-
}, 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: '
|
|
781
|
+
}, 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" })))))));
|
|
689
782
|
}
|
|
690
783
|
static get watchers() { return {
|
|
691
784
|
"layout": [{
|
|
@@ -700,12 +793,21 @@ const QCarousel = class {
|
|
|
700
793
|
"autoplay": [{
|
|
701
794
|
"autoplayChanged": 0
|
|
702
795
|
}],
|
|
796
|
+
"autoplayBehavior": [{
|
|
797
|
+
"autoplayChanged": 0
|
|
798
|
+
}],
|
|
703
799
|
"autoplayInterval": [{
|
|
704
800
|
"autoplayChanged": 0
|
|
705
801
|
}],
|
|
706
802
|
"autoplaySuspended": [{
|
|
707
803
|
"autoplayChanged": 0
|
|
708
804
|
}],
|
|
805
|
+
"autoplayAdvanceSuspended": [{
|
|
806
|
+
"autoplayChanged": 0
|
|
807
|
+
}],
|
|
808
|
+
"slideTiming": [{
|
|
809
|
+
"autoplayChanged": 0
|
|
810
|
+
}],
|
|
709
811
|
"transition": [{
|
|
710
812
|
"transitionChanged": 0
|
|
711
813
|
}]
|
package/dist/esm/q-chip.entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Mixin, r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import { w as withActionLabel, a as withActionProps } from './action.props-
|
|
1
|
+
import { M as Mixin, r as registerInstance, c as createEvent, h } from './index-CIMzZPQO.js';
|
|
2
|
+
import { w as withActionLabel, a as withActionProps } from './action.props-CbSH7c-q.js';
|
|
3
3
|
|
|
4
4
|
const chipCss = () => `:host{display:inline-flex;max-width:100%;box-sizing:border-box}:host([hidden]){display:none}.chip{display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:0;border:var(--q-chip-border, var(--q-border, 1px solid var(--q-border-color, #374151)));border-radius:var(--q-chip-radius, 999px);box-sizing:border-box;color:var(--q-chip-fg, var(--q-fg-muted, #9ca3af));background:var(--q-chip-bg, var(--q-bg-surface-2, #374151));font-family:var(--q-font-family, inherit);font-weight:var(--q-chip-font-weight, var(--q-font-weight-bold, 600));line-height:1.2;text-decoration:none;white-space:nowrap;outline:none;user-select:none;-webkit-user-select:none;transition:background var(--q-transition-fast, 150ms ease), border-color var(--q-transition-fast, 150ms ease), color var(--q-transition-fast, 150ms ease), opacity var(--q-transition-fast, 150ms ease), transform var(--q-transition-fast, 150ms ease)}.chip.is-interactive{cursor:pointer}.chip.is-disabled{cursor:not-allowed;opacity:var(--q-chip-disabled-opacity, 0.55);pointer-events:none}.chip.is-removable{padding-inline-end:var(--q-chip-removable-padding-end, 4px)}.chip:focus-visible,.remove-button:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:var(--q-chip-focus-offset, 2px)}.chip.is-interactive:hover:not(.is-disabled){border-color:var(--q-chip-hover-border-color, var(--q-color-primary, #60a5fa));color:var(--q-chip-hover-fg, var(--q-fg-base, #f9fafb));background:rgba(249, 250, 251, 0.08);background:var(--q-chip-hover-bg, color-mix(in srgb, var(--q-fg-base, #f9fafb) 8%, var(--q-chip-bg, transparent)))}.chip.is-interactive:active:not(.is-disabled){transform:var(--q-chip-active-transform, scale(0.97))}.size-sm{min-height:var(--q-chip-height-sm, 24px);gap:var(--q-chip-gap-sm, 5px);padding:var(--q-chip-padding-sm, 4px 9px);font-size:var(--q-chip-font-size-sm, var(--q-font-size-sm, 0.7rem))}.size-md{min-height:var(--q-chip-height-md, 30px);gap:var(--q-chip-gap-md, 7px);padding:var(--q-chip-padding-md, 6px 11px);font-size:var(--q-chip-font-size-md, var(--q-font-size-base, 0.9rem))}.size-lg{min-height:var(--q-chip-height-lg, 36px);gap:var(--q-chip-gap-lg, 9px);padding:var(--q-chip-padding-lg, 8px 14px);font-size:var(--q-chip-font-size-lg, var(--q-font-size-lg, 1rem))}.chip-label{min-width:0;overflow:hidden;text-overflow:ellipsis}::slotted([slot='icon-left']),::slotted([slot='icon-right']),::slotted(q-icon){flex:none}.variant-neutral{--q-chip-bg:var(--q-bg-surface-2, #374151);--q-chip-fg:var(--q-fg-base, #f9fafb)}.variant-filter{--q-chip-bg:var(--q-bg-surface-1, #1f2937);--q-chip-fg:var(--q-fg-muted, #9ca3af)}.variant-primary{--q-chip-bg:rgba(96, 165, 250, 0.16);--q-chip-bg:color-mix(in srgb, var(--q-color-primary, #60a5fa) 16%, transparent);--q-chip-fg:var(--q-color-primary, #60a5fa);border-color:color-mix(in srgb, var(--q-color-primary, #60a5fa) 34%, transparent)}.variant-success{--q-chip-bg:rgba(52, 211, 153, 0.14);--q-chip-bg:color-mix(in srgb, var(--q-color-success, #34d399) 14%, transparent);--q-chip-fg:var(--q-color-success, #34d399);border-color:color-mix(in srgb, var(--q-color-success, #34d399) 32%, transparent)}.variant-warning{--q-chip-bg:rgba(251, 191, 36, 0.16);--q-chip-bg:color-mix(in srgb, var(--q-color-warning, #fbbf24) 16%, transparent);--q-chip-fg:var(--q-color-warning, #fbbf24);border-color:color-mix(in srgb, var(--q-color-warning, #fbbf24) 34%, transparent)}.variant-danger{--q-chip-bg:rgba(248, 113, 113, 0.14);--q-chip-bg:color-mix(in srgb, var(--q-color-danger, #f87171) 14%, transparent);--q-chip-fg:var(--q-color-danger, #f87171);border-color:color-mix(in srgb, var(--q-color-danger, #f87171) 32%, transparent)}.chip.is-selected{border-color:var(--q-chip-selected-border-color, var(--q-color-primary, #60a5fa));color:var(--q-chip-selected-fg, var(--q-color-primary, #60a5fa));background:rgba(96, 165, 250, 0.16);background:var(--q-chip-selected-bg, color-mix(in srgb, var(--q-color-primary, #60a5fa) 16%, transparent))}.variant-primary.is-selected{color:var(--q-chip-primary-selected-fg, var(--q-bg-base, #111827));background:var(--q-color-primary, #60a5fa);border-color:var(--q-color-primary, #60a5fa)}.variant-success.is-selected{border-color:var(--q-chip-success-selected-border-color, var(--q-color-success, #34d399));color:var(--q-chip-success-selected-fg, var(--q-color-success, #34d399));background:rgba(52, 211, 153, 0.16);background:var(--q-chip-success-selected-bg, color-mix(in srgb, var(--q-color-success, #34d399) 16%, transparent))}.variant-warning.is-selected{border-color:var(--q-chip-warning-selected-border-color, var(--q-color-warning, #fbbf24));color:var(--q-chip-warning-selected-fg, var(--q-color-warning, #fbbf24));background:rgba(251, 191, 36, 0.18);background:var(--q-chip-warning-selected-bg, color-mix(in srgb, var(--q-color-warning, #fbbf24) 18%, transparent))}.variant-danger.is-selected{border-color:var(--q-chip-danger-selected-border-color, var(--q-color-danger, #f87171));color:var(--q-chip-danger-selected-fg, var(--q-color-danger, #f87171));background:rgba(248, 113, 113, 0.16);background:var(--q-chip-danger-selected-bg, color-mix(in srgb, var(--q-color-danger, #f87171) 16%, transparent))}.remove-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:var(--q-chip-remove-size, 18px);height:var(--q-chip-remove-size, 18px);margin-inline-end:var(--q-chip-remove-offset, -2px);padding:0;border:0;border-radius:999px;color:currentColor;background:transparent;cursor:pointer;opacity:var(--q-chip-remove-opacity, 0.75);transition:background var(--q-transition-fast, 150ms ease), opacity var(--q-transition-fast, 150ms ease)}.remove-button:hover{opacity:1;background:rgba(249, 250, 251, 0.1);background:var(--q-chip-remove-hover-bg, color-mix(in srgb, currentColor 12%, transparent))}.remove-button:active{transform:scale(0.94)}.remove-icon{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round}.size-sm .remove-button{--q-chip-remove-size:16px}.size-lg .remove-button{--q-chip-remove-size:20px}`;
|
|
5
5
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { r as registerInstance, a as getElement, h, H as Host } from './index-CIMzZPQO.js';
|
|
2
|
+
import { c as controlScope } from './tokens-DbzjRzhu.js';
|
|
3
|
+
|
|
4
|
+
const controlGroupCss = () => `:host{min-width:0;--_q-control-height:var(--q-context-control-height, calc(var(--_q-context-size-sm, 0) * var(--q-control-height-sm, 1.75rem) + var(--_q-context-size-md, 1) * var(--q-control-height-md, 2.25rem) + var(--_q-context-size-lg, 0) * var(--q-control-height-lg, 2.75rem)));--_q-control-font:var(--q-context-control-font, calc(var(--_q-context-size-sm, 0) * var(--q-control-font-sm, 0.75rem) + var(--_q-context-size-md, 1) * var(--q-control-font-md, 0.875rem) + var(--_q-context-size-lg, 0) * var(--q-control-font-lg, 1rem)));--_q-control-line:var(--q-context-control-line, calc(var(--_q-context-size-sm, 0) * var(--q-control-line-sm, 1rem) + var(--_q-context-size-md, 1) * var(--q-control-line-md, 1.25rem) + var(--_q-context-size-lg, 0) * var(--q-control-line-lg, 1.5rem)));--_q-control-padding:var(--q-context-control-padding, calc(var(--_q-context-size-sm, 0) * var(--q-control-padding-sm, 0.5rem) + var(--_q-context-size-md, 1) * var(--q-control-padding-md, 0.75rem) + var(--_q-context-size-lg, 0) * var(--q-control-padding-lg, 1rem)));--_q-control-icon:var(--q-context-control-icon, calc(var(--_q-context-size-sm, 0) * var(--q-control-icon-sm, 0.875rem) + var(--_q-context-size-md, 1) * var(--q-control-icon-md, 1rem) + var(--_q-context-size-lg, 0) * var(--q-control-icon-lg, 1.25rem)));--_q-control-radius:var(--q-context-control-radius, calc(var(--_q-context-size-sm, 0) * var(--q-control-radius-sm, 0.34375rem) + var(--_q-context-size-md, 1) * var(--q-control-radius-md, 0.4375rem) + var(--_q-context-size-lg, 0) * var(--q-control-radius-lg, 0.53125rem)))}.size-sm{--_q-control-height:var(--q-control-height-sm, 1.75rem);--_q-control-font:var(--q-control-font-sm, 0.75rem);--_q-control-line:var(--q-control-line-sm, 1rem);--_q-control-padding:var(--q-control-padding-sm, 0.5rem);--_q-control-icon:var(--q-control-icon-sm, 0.875rem);--_q-control-radius:var(--q-control-radius-sm, 0.34375rem)}.size-md{--_q-control-height:var(--q-control-height-md, 2.25rem);--_q-control-font:var(--q-control-font-md, 0.875rem);--_q-control-line:var(--q-control-line-md, 1.25rem);--_q-control-padding:var(--q-control-padding-md, 0.75rem);--_q-control-icon:var(--q-control-icon-md, 1rem);--_q-control-radius:var(--q-control-radius-md, 0.4375rem)}.size-lg{--_q-control-height:var(--q-control-height-lg, 2.75rem);--_q-control-font:var(--q-control-font-lg, 1rem);--_q-control-line:var(--q-control-line-lg, 1.5rem);--_q-control-padding:var(--q-control-padding-lg, 1rem);--_q-control-icon:var(--q-control-icon-lg, 1.25rem);--_q-control-radius:var(--q-control-radius-lg, 0.53125rem)}:host{display:block;min-width:0}[part='group']{display:flex;align-items:start;isolation:isolate}::slotted([hidden]){display:none !important}::slotted([data-q-control-group]){min-width:0;--_q-group-start-start:0px;--_q-group-start-end:0px;--_q-group-end-start:0px;--_q-group-end-end:0px}::slotted([data-q-control-group='first']),::slotted([data-q-control-group='only']){--_q-group-start-start:var(--q-control-group-radius, var(--_q-control-radius));--_q-group-end-start:var(--q-control-group-radius, var(--_q-control-radius))}::slotted([data-q-control-group='last']),::slotted([data-q-control-group='only']){--_q-group-start-end:var(--q-control-group-radius, var(--_q-control-radius));--_q-group-end-end:var(--q-control-group-radius, var(--_q-control-radius))}::slotted([data-q-control-group='middle']),::slotted([data-q-control-group='last']){margin-inline-start:-1px}::slotted(q-input:not([width])),::slotted(q-dropdown:not([width])),::slotted(q-dropdown[width="fit-options"]){flex:0 1 auto}::slotted(q-input[width]:not([width="full"])),::slotted(q-dropdown[width]:not([width="full"]):not([width="fit-options"])),::slotted(q-toggle),::slotted(q-button),::slotted(q-quantity-selector){flex:0 0 auto}::slotted(:focus-within){position:relative;z-index:1}:host([orientation='vertical']) [part='group']{flex-direction:column;align-items:stretch}:host([orientation='vertical']) ::slotted([data-q-control-group]){--_q-group-start-start:0px;--_q-group-start-end:0px;--_q-group-end-start:0px;--_q-group-end-end:0px;margin-inline-start:0}:host([orientation='vertical']) ::slotted([data-q-control-group='first']),:host([orientation='vertical']) ::slotted([data-q-control-group='only']){--_q-group-start-start:var(--q-control-group-radius, var(--_q-control-radius));--_q-group-start-end:var(--q-control-group-radius, var(--_q-control-radius))}:host([orientation='vertical']) ::slotted([data-q-control-group='last']),:host([orientation='vertical']) ::slotted([data-q-control-group='only']){--_q-group-end-start:var(--q-control-group-radius, var(--_q-control-radius));--_q-group-end-end:var(--q-control-group-radius, var(--_q-control-radius))}:host([orientation='vertical']) ::slotted([data-q-control-group='middle']),:host([orientation='vertical']) ::slotted([data-q-control-group='last']){margin-block-start:-1px}`;
|
|
5
|
+
|
|
6
|
+
const supportedControls = new Set(['Q-INPUT', 'Q-DROPDOWN', 'Q-TOGGLE', 'Q-QUANTITY-SELECTOR', 'Q-BUTTON']);
|
|
7
|
+
const marker = 'data-q-control-group';
|
|
8
|
+
const ownership = new WeakMap();
|
|
9
|
+
const QControlGroup = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
get el() { return getElement(this); }
|
|
14
|
+
size = 'inherit';
|
|
15
|
+
orientation = 'horizontal';
|
|
16
|
+
/** Name of the group; each child still needs its own accessible name. */
|
|
17
|
+
ariaLabel = null;
|
|
18
|
+
observer;
|
|
19
|
+
managedChildren = new Set();
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
this.observer = new MutationObserver(() => this.updateChildren());
|
|
22
|
+
this.observer.observe(this.el, { childList: true, subtree: true, attributes: true, attributeFilter: ['hidden', 'slot'] });
|
|
23
|
+
this.updateChildren();
|
|
24
|
+
}
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
this.observer?.disconnect();
|
|
27
|
+
for (const child of this.managedChildren)
|
|
28
|
+
this.restoreChild(child);
|
|
29
|
+
}
|
|
30
|
+
restoreChild(child) {
|
|
31
|
+
const previous = ownership.get(child);
|
|
32
|
+
if (previous?.owner === this.el) {
|
|
33
|
+
if (previous.original === null)
|
|
34
|
+
child.removeAttribute(marker);
|
|
35
|
+
else
|
|
36
|
+
child.setAttribute(marker, previous.original);
|
|
37
|
+
ownership.delete(child);
|
|
38
|
+
}
|
|
39
|
+
this.managedChildren.delete(child);
|
|
40
|
+
}
|
|
41
|
+
updateChildren = () => {
|
|
42
|
+
const controls = Array.from(this.el.children).filter((child) => child instanceof HTMLElement && supportedControls.has(child.tagName) && !child.hidden && !child.slot);
|
|
43
|
+
for (const child of this.managedChildren) {
|
|
44
|
+
if (!controls.includes(child))
|
|
45
|
+
this.restoreChild(child);
|
|
46
|
+
}
|
|
47
|
+
controls.forEach((child, index) => {
|
|
48
|
+
if (!this.managedChildren.has(child)) {
|
|
49
|
+
const previous = ownership.get(child);
|
|
50
|
+
ownership.set(child, { owner: this.el, original: previous ? previous.original : child.getAttribute(marker) });
|
|
51
|
+
this.managedChildren.add(child);
|
|
52
|
+
}
|
|
53
|
+
child.setAttribute(marker, controls.length === 1 ? 'only' : index === 0 ? 'first' : index === controls.length - 1 ? 'last' : 'middle');
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
render() {
|
|
57
|
+
return (h(Host, { key: '9e724cedca3d8b30f842a8cf0818d1386ec073b8', style: controlScope(this.size) }, h("div", { key: 'a76241b0076ed5d373df7560f8980eef2a3a9efb', part: "group", role: "group", "aria-label": this.ariaLabel || undefined }, h("slot", { key: 'db65f42834a6841c2c33a081a88a4b0c417d9e85', onSlotchange: this.updateChildren }))));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
QControlGroup.style = controlGroupCss();
|
|
61
|
+
|
|
62
|
+
export { QControlGroup as q_control_group };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, a as getElement, h } from './index-
|
|
1
|
+
import { r as registerInstance, a as getElement, h } from './index-CIMzZPQO.js';
|
|
2
2
|
|
|
3
3
|
const conversationBubbleCss = () => `:host{display:block;min-width:0;box-sizing:border-box;color:var(--q-conversation-fg, var(--q-fg-base, #f9fafb));font-family:var(--q-font-family, inherit)}.conversation{display:flex;align-items:flex-end;gap:var(--q-conversation-gap, 10px);width:100%;min-width:0;box-sizing:border-box}.avatar{display:none;flex:0 0 auto}.has-avatar .avatar{display:block}.content{display:flex;flex:0 1 auto;flex-direction:column;align-items:flex-start;min-width:0;max-width:var(--q-conversation-max-width, min(76ch, 82%))}.header{margin:0 0 var(--q-conversation-header-gap, 4px);padding-inline:var(--q-conversation-header-inset, 4px)}.sender{color:var(--q-conversation-sender-fg, var(--q-fg-muted, #9ca3af));font-size:var(--q-conversation-meta-size, var(--q-font-size-sm, 0.7rem));font-weight:var(--q-font-weight-bold, 600);line-height:1.3}.bubble{min-width:0;padding:var(--q-conversation-padding, 11px 13px);border:var(--q-conversation-border, var(--q-border, 1px solid var(--q-border-color, #374151)));border-radius:var(--q-conversation-radius, var(--q-radius-lg, 11px));background:var(--q-conversation-incoming-bg, var(--q-bg-surface-2, #19243b));box-shadow:var(--q-conversation-shadow, var(--q-shadow-low, 0 2px 4px rgba(0, 0, 0, 0.2)))}.body{min-width:0;overflow-wrap:anywhere;font-size:var(--q-conversation-font-size, var(--q-font-size-base, 0.9rem));line-height:var(--q-conversation-line-height, 1.55);white-space:pre-wrap}.footer{display:none;align-items:center;justify-content:space-between;gap:var(--q-conversation-footer-gap, 10px);margin-top:var(--q-conversation-footer-margin, 6px);color:var(--q-conversation-meta-fg, var(--q-fg-muted, #9ca3af));font-size:var(--q-conversation-meta-size, var(--q-font-size-sm, 0.7rem));line-height:1.3}.footer.has-content{display:flex}.message-meta,.actions.has-content{display:inline-flex;align-items:center;gap:var(--q-conversation-meta-gap, 6px)}.meta,.actions{display:none}.meta.has-content,.actions.has-content{display:inline-flex}.variant-outgoing{flex-direction:row-reverse}.variant-outgoing .content{align-items:flex-end;margin-inline-start:auto}.variant-outgoing .bubble{color:var(--q-conversation-outgoing-fg, #ffffff);border-color:var(--q-conversation-outgoing-border, transparent);background:var(--q-conversation-outgoing-bg, var(--q-color-primary, #60a5fa))}.variant-outgoing .footer{color:var(--q-conversation-outgoing-meta-fg, rgba(255, 255, 255, 0.76))}.variant-system{justify-content:center}.variant-system .avatar,.variant-system .header{display:none}.variant-system .content{align-items:center;max-width:var(--q-conversation-system-max-width, min(80ch, 94%))}.variant-system .bubble{color:var(--q-conversation-system-fg, var(--q-fg-muted, #9ca3af));border-color:var(--q-conversation-system-border, transparent);background:var(--q-conversation-system-bg, transparent);box-shadow:none;text-align:center}.is-compact .bubble{padding:var(--q-conversation-compact-padding, 7px 10px)}.is-compact .header{margin-bottom:2px}@media (max-width: 600px){.content{max-width:var(--q-conversation-mobile-max-width, 88%)}.has-avatar .content{max-width:var(--q-conversation-mobile-avatar-max-width, calc(100% - 42px))}}`;
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, a as getElement } from './index-
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, a as getElement } from './index-CIMzZPQO.js';
|
|
2
2
|
import { s as safeParseJson } from './utils-BJiYCN3i.js';
|
|
3
3
|
import { b as getDataTableItemKey, a as getDataTableCellValue, c as getDataTableRowGutterSlotName, g as getDataTableCellSlotName } from './data-table-cell-SzKf4WZF.js';
|
|
4
4
|
import { C as ChevronDown, a as ChevronUp } from './chevron-up-DKrPmn2y.js';
|
|
@@ -581,14 +581,14 @@ const QDataTable = class {
|
|
|
581
581
|
sortColumn: this.sortColumn,
|
|
582
582
|
sortDirection: this.sortDirection,
|
|
583
583
|
});
|
|
584
|
-
return (h("div", { key: '
|
|
584
|
+
return (h("div", { key: '9c73c6d30d081e5519af9ae93a465eac2181fcde', class: "table-container", role: "grid", "aria-label": this.ariaLabel?.trim() || this.toolbarTitle?.trim() || 'Data table' }, renderDataTableToolbar({
|
|
585
585
|
showToolbar: this.showToolbar,
|
|
586
586
|
toolbarTitle: this.toolbarTitle,
|
|
587
587
|
showSearch: this.showSearch,
|
|
588
588
|
searchPlaceholder: this.searchPlaceholder,
|
|
589
589
|
searchValue: this.searchValue,
|
|
590
590
|
onSearchInput: this.handleSearchInput,
|
|
591
|
-
}), h("div", { key: '
|
|
591
|
+
}), h("div", { key: '4b1b1059c2bfd59aefb048188563f3effc8dbf72', class: "table-scroll-area" }, h("table", { key: '790c6909a3ecfd66cd452e5314d1f5a2cd2b70ae', class: "table-el", style: this.twoLineRows ? { '--q-table-action-count': String(model.rowActions.length) } : undefined }, renderDataTableHead({
|
|
592
592
|
model,
|
|
593
593
|
onSelectAllChange: event => this.handleSelectAllChange(event),
|
|
594
594
|
onSortToggle: column => this.handleSortToggle(column),
|
|
@@ -601,7 +601,7 @@ const QDataTable = class {
|
|
|
601
601
|
onRowCheckboxChange: (item, index, event) => this.handleRowCheckboxChange(item, index, event),
|
|
602
602
|
onRowAction: (item, index, action, event) => this.handleRowAction(item, index, action, event),
|
|
603
603
|
renderCell: (item, column) => this.renderCell(item, column),
|
|
604
|
-
}))), h("slot", { key: '
|
|
604
|
+
}))), h("slot", { key: '570258218b4c63d2d48b29d58135e89ffee70add', name: "footer" })));
|
|
605
605
|
}
|
|
606
606
|
};
|
|
607
607
|
QDataTable.style = dataTableCss();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import { w as waitForTransitionEnd, f as focusFirstElement,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-CIMzZPQO.js';
|
|
2
|
+
import { w as waitForTransitionEnd, f as focusFirstElement, a as safeFocus, b as getDeepActiveElement, h as handleTabTrap } from './dom-B610wOGe.js';
|
|
3
3
|
|
|
4
4
|
function resolveDialogBackdropEffect(effect) {
|
|
5
5
|
switch (effect) {
|
|
@@ -254,9 +254,9 @@ const QDialog = class {
|
|
|
254
254
|
'dialog-backdrop': true,
|
|
255
255
|
[`effect-${backdropEffect}`]: true,
|
|
256
256
|
};
|
|
257
|
-
return (h("div", { key: '
|
|
257
|
+
return (h("div", { key: '0befd87b753a6e739e9af9121a09a3c2bd479009', class: classes, onKeyDown: this.handleKeyDown, inert: !this.open ? true : undefined }, h("div", { key: 'c5b4f3f93c4db2975c6892209001efc221d6b396', class: backdropClasses, onClick: this.handleBackdropClick, part: "backdrop" }), h("div", { key: 'a331bc9d80c33e023b030d3c632fba616fb486c4', ref: el => (this.dialogEl = el), class: "dialog-modal", part: "modal", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": ariaLabel, "aria-labelledby": !ariaLabel && titleText ? this.titleId : undefined, "aria-describedby": this.message ? this.descriptionId : undefined, tabindex: "-1" }, h("header", { key: '03a15d5f2a3b84be42fd1209ebf8bdc5b132ccb2', class: "dialog-header", part: "header" }, h("slot", { key: 'ef03d4235b44be631fd970261ff56f36f4569a27', name: "header" }, titleText && h("h2", { key: '066ff0be97249563618aba77ef2dc937b524a9b1', id: this.titleId, class: "dialog-title" }, titleText)), h("button", { key: '2c645e1f6cf629f05dbc968db8e7cb9f09a23733', class: "dialog-close-btn", onClick: this.handleCloseButton, "aria-label": this.closeLabel, disabled: this.loading, part: "close-btn" }, h("svg", { key: '0d0ac5e353a6f576a50e52a9d323079e3b875b1b', class: "close-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { key: 'db1c90be95edcd970aace8858e91ef8188f3f9c7', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: 'ebaaf1378ee3b9b1352873bcea8640afabd1f4a4', x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { key: 'b1de1e1fcf05feb6276c8fbd2a0395cd99f04bca', class: "dialog-body", part: "body" }, h("slot", { key: 'e40b55efc10544d85eaa125ce0b93f038b9cf431' }, this.message && h("p", { key: '654f5e96b6367123338223966c4385d0be6d9df2', id: this.descriptionId, class: "dialog-message" }, this.message))), h("footer", { key: 'd3b13289af5636134cc940ab74bf04f87fb2e183', class: { 'dialog-footer': true, 'is-hidden': !this.showCancel && !this.showConfirm && !this.hasFooter }, part: "footer" }, h("slot", { key: '82db83e94e9d933f75cdfde99a0d7f072619b230', name: "footer", onSlotchange: event => {
|
|
258
258
|
this.hasFooter = event.target.assignedNodes().some(node => node.nodeType === 1 || !!node.textContent?.trim());
|
|
259
|
-
} }, h("div", { key: '
|
|
259
|
+
} }, h("div", { key: 'f4893c09c120757ddde44b85d5745ce106de8e08', class: "dialog-actions" }, this.showCancel && (h("button", { key: 'd14a07895f1a843ac4d89f3c03fbd32d8194aa1c', class: "btn-cancel", onClick: this.handleCancel, disabled: this.loading, part: "cancel-btn" }, this.cancelLabel)), this.showConfirm && (h("button", { key: '810f5b3be5bb24d311fee5a5709522941ee57abc', class: "btn-confirm", onClick: this.handleConfirm, disabled: this.loading, "aria-busy": this.loading ? 'true' : 'false', part: "confirm-btn" }, this.loading && h("span", { key: 'e63ca58d135ac134af4cbb5b5d3ab787b5dc7f20', class: "spinner-el" }), h("span", { key: '0cfe7541848ec0107fbf940e0b794bbc80e81ebe', class: "btn-label" }, this.confirmLabel)))))))));
|
|
260
260
|
}
|
|
261
261
|
static get watchers() { return {
|
|
262
262
|
"open": [{
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CIMzZPQO.js';
|
|
2
|
+
import { s as spaceValue } from './tokens-DbzjRzhu.js';
|
|
3
|
+
|
|
4
|
+
const dividerCss = () => `:host{--_q-divider-inset:var(--q-divider-inset, var(--q-space-sm, .5rem));--_q-divider-usable:max(0px, calc(100% - var(--_q-divider-inset) - var(--_q-divider-inset)));--_q-divider-thickness:var(--q-divider-thickness, 1px);position:relative;display:block;box-sizing:border-box;min-width:0;min-height:0;height:var(--_q-divider-thickness);align-self:stretch;flex:0 0 auto;margin-block:var(--_q-divider-spacing, 0px)}[part='line']{position:absolute;box-sizing:border-box;top:50%;left:50%;transform:translate(-50%, -50%);width:clamp(0px, var(--_q-divider-length, 100%), var(--_q-divider-usable));height:0;border:0 solid var(--q-divider-color, var(--q-border-color, #374151));border-top-width:var(--_q-divider-thickness)}:host([orientation='vertical']){width:var(--_q-divider-thickness);height:auto;margin-block:0;margin-inline:var(--_q-divider-spacing, 0px)}:host([orientation='vertical']) [part='line']{width:0;height:clamp(0px, var(--_q-divider-length, 100%), var(--_q-divider-usable));border-top-width:0;border-left-width:var(--_q-divider-thickness)}@media (forced-colors: active){[part='line']{border-color:CanvasText}}`;
|
|
5
|
+
|
|
6
|
+
const QDivider = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
/** Physical direction of the separator. */
|
|
11
|
+
orientation = 'horizontal';
|
|
12
|
+
/** CSS length or percentage, capped to the allocated extent minus endpoint insets. */
|
|
13
|
+
length = 'auto';
|
|
14
|
+
/** Symmetric external spacing perpendicular to the line. */
|
|
15
|
+
spacing = 'lg';
|
|
16
|
+
/** Hide a purely visual separator from assistive technology. */
|
|
17
|
+
decorative = false;
|
|
18
|
+
render() {
|
|
19
|
+
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" }));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
QDivider.style = dividerCss();
|
|
23
|
+
|
|
24
|
+
export { QDivider as q_divider };
|