@webquark/browser 1.1.0 → 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-B6vl_1p5.js → action.props-CNe2JXR5.js} +1 -1
- package/dist/cjs/{field-B5nxD8Kc.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-BD6Jjssb.js → index-BN-WdOQM.js} +13 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q-accordion.cjs.entry.js +1 -1
- 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 +2 -2
- package/dist/cjs/q-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-control-group.cjs.entry.js +3 -3
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +1 -1
- package/dist/cjs/q-dialog.cjs.entry.js +3 -3
- package/dist/cjs/q-divider.cjs.entry.js +3 -3
- package/dist/cjs/q-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/q-form.cjs.entry.js +6 -6
- 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 +6 -6
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/q-panel.cjs.entry.js +6 -6
- package/dist/cjs/q-quantity-selector.cjs.entry.js +5 -5
- package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/q-reel.cjs.entry.js +23 -23
- package/dist/cjs/q-section.cjs.entry.js +2 -2
- package/dist/cjs/q-sidepanel.cjs.entry.js +4 -3
- package/dist/cjs/q-slider.cjs.entry.js +2 -2
- 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 +3 -3
- 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 +5 -5
- 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 +6 -6
- package/dist/cjs/q-toolbar.cjs.entry.js +4 -4
- package/dist/cjs/syntax-content-BmSExDiW.js +910 -0
- package/dist/cjs/{tokens-Cd7g-VMz.js → tokens-BMrfol_M.js} +1 -1
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/actions/button/button.css +27 -9
- package/dist/collection/components/communication/alert/alert.css +4 -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/components/data-display/syntax-box/internals/{formatter.unit.test.js → 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/components/data-display/syntax-box/internals/{formatter.js → 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/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-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.js +2 -2
- 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/input/input.js +3 -3
- 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.js +1 -1
- package/dist/collection/components/inputs/textarea/textarea.js +2 -2
- package/dist/collection/components/inputs/toggle/toggle.js +3 -3
- package/dist/collection/components/layout/control-group/control-group.js +1 -1
- package/dist/collection/components/layout/divider/divider.js +1 -1
- 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/tokens.js +1 -1
- package/dist/collection/utils/form-control-validity.js +3 -3
- package/dist/components/index.js +1 -1
- package/dist/components/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
- package/dist/components/p-BGlbV43y.js +13 -0
- package/dist/components/{p-BZXIeEKC.js → p-BKWL9zOn.js} +1 -1
- package/dist/components/p-BxxU73QQ.js +1 -0
- package/dist/components/{p-kfrqZyfJ.js → p-CVEQfA-v.js} +1 -1
- package/dist/components/p-CpbWWDiY.js +1 -0
- package/dist/components/{p-BwPMm43W.js → p-D2fczi8m.js} +1 -1
- package/dist/components/{p-BGHNFaaC.js → p-D5vpGqZ9.js} +1 -1
- package/dist/components/p-DQIYo8zC.js +1 -0
- package/dist/components/{p-IwIJb0Mc.js → p-DX6PCIPS.js} +1 -1
- package/dist/components/{p-CpkX9YAW.js → p-DY9D4z7Z.js} +1 -1
- package/dist/{webquark/p-BDsIecIx.js → components/p-DbzjRzhu.js} +1 -1
- package/dist/components/{p-Bp6Xr92S.js → p-RX4DjgmV.js} +1 -1
- package/dist/components/{p-Bc2_QcLn.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.js +1 -1
- 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.js +1 -1
- 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.js +1 -1
- 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-Di_LpF5H.js → action.props-CbSH7c-q.js} +1 -1
- package/dist/esm/{dom-CArIPzJU.js → dom-B610wOGe.js} +1 -1
- package/dist/esm/{field-C4Iilew6.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-DoGM9gsC.js → index-CIMzZPQO.js} +13 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-accordion.entry.js +1 -1
- 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 +2 -2
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-control-group.entry.js +3 -3
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +1 -1
- package/dist/esm/q-dialog.entry.js +4 -4
- package/dist/esm/q-divider.entry.js +3 -3
- package/dist/esm/q-dropdown.entry.js +4 -4
- package/dist/esm/q-form.entry.js +7 -7
- 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 +7 -7
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/q-panel.entry.js +7 -7
- package/dist/esm/q-quantity-selector.entry.js +5 -5
- 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 +2 -2
- 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 +5 -5
- 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 +6 -6
- package/dist/esm/q-toolbar.entry.js +4 -4
- package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
- package/dist/esm/{tokens-BDsIecIx.js → tokens-DbzjRzhu.js} +1 -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/token-row.js +45 -74
- package/dist/playground/utils/color.js +14 -25
- 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/formatter.unit.test.d.ts +1 -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/components/data-display/syntax-box/internals/syntax.d.ts +1 -1
- 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/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 +201 -7
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +1 -1
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +1 -0
- package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -8
- package/dist/types/utils/form-control-validity.d.ts +2 -1
- package/dist/webquark/{p-846dc838.entry.js → p-014c2f4a.entry.js} +1 -1
- package/dist/webquark/{p-0182e114.entry.js → p-0389577c.entry.js} +1 -1
- package/dist/webquark/p-041e17c1.entry.js +1 -0
- package/dist/webquark/p-0479c571.entry.js +1 -0
- package/dist/webquark/{p-17b9713f.entry.js → p-0ebca9be.entry.js} +1 -1
- package/dist/webquark/{p-0a2c52de.entry.js → p-1bf375f7.entry.js} +2 -2
- package/dist/webquark/{p-e2721e77.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-f4d23ffe.entry.js → p-3a60086d.entry.js} +1 -1
- package/dist/webquark/{p-e723a7ae.entry.js → p-3ab798aa.entry.js} +1 -1
- package/dist/webquark/{p-15bad9ef.entry.js → p-3b580baf.entry.js} +1 -1
- package/dist/webquark/{p-4609c362.entry.js → p-3b65f787.entry.js} +1 -1
- package/dist/webquark/p-4bf610f8.entry.js +1 -0
- package/dist/webquark/{p-f51e1098.entry.js → p-4d30227e.entry.js} +1 -1
- package/dist/webquark/p-4de536ae.entry.js +1 -0
- package/dist/webquark/{p-3daafc56.entry.js → p-4e4d70c9.entry.js} +1 -1
- package/dist/webquark/p-4efeb7c9.entry.js +1 -0
- package/dist/webquark/{p-a314bc21.entry.js → p-51b3d71b.entry.js} +1 -1
- package/dist/webquark/p-778b6bbb.entry.js +1 -0
- package/dist/webquark/{p-a66550da.entry.js → p-7da78b2f.entry.js} +1 -1
- package/dist/webquark/{p-fe14f038.entry.js → p-7f8f986b.entry.js} +1 -1
- package/dist/webquark/{p-e0943d41.entry.js → p-8253c742.entry.js} +1 -1
- package/dist/webquark/{p-a2334abe.entry.js → p-9a1ddeb7.entry.js} +1 -1
- package/dist/webquark/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
- 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/webquark/{p-DDUED8LT.js → p-D8p28N9s.js} +1 -1
- package/dist/{components/p-BDsIecIx.js → webquark/p-DbzjRzhu.js} +1 -1
- package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
- package/dist/webquark/p-a2b1de23.entry.js +1 -0
- package/dist/webquark/{p-dbcf7592.entry.js → p-a55edc17.entry.js} +1 -1
- package/dist/webquark/p-a8808020.entry.js +1 -0
- package/dist/webquark/{p-9a76cd71.entry.js → p-b1084b3c.entry.js} +1 -1
- package/dist/webquark/{p-a2ff1b64.entry.js → p-b6c4dff4.entry.js} +1 -1
- package/dist/webquark/{p-b21ad707.entry.js → p-b962e950.entry.js} +1 -1
- package/dist/webquark/{p-5b584d3c.entry.js → p-bc369cd6.entry.js} +1 -1
- package/dist/webquark/p-c119a8ea.entry.js +1 -0
- package/dist/webquark/{p-85131314.entry.js → p-c6b77e9a.entry.js} +1 -1
- package/dist/webquark/{p-84b350a3.entry.js → p-ca1c03b4.entry.js} +1 -1
- package/dist/webquark/{p-b8fdef4f.entry.js → p-ce436162.entry.js} +1 -1
- package/dist/webquark/{p-86c05afd.entry.js → p-d0a47a7c.entry.js} +1 -1
- package/dist/webquark/{p-222405b8.entry.js → p-e1fbc8fc.entry.js} +1 -1
- package/dist/webquark/{p-44bbe12f.entry.js → p-e32833ce.entry.js} +1 -1
- package/dist/webquark/{p-d86bd51d.entry.js → p-e369a4aa.entry.js} +1 -1
- package/dist/webquark/p-e4430c61.entry.js +1 -0
- package/dist/webquark/{p-aa342e81.entry.js → p-e9c0052b.entry.js} +1 -1
- package/dist/webquark/{p-852e88ae.entry.js → p-f5c4ca18.entry.js} +1 -1
- package/dist/webquark/{p-d4788321.entry.js → p-f6683126.entry.js} +1 -1
- package/dist/webquark/{p-Dnz3WmdX.js → p-ojSDiptZ.js} +1 -1
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +5 -1
- 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-Bj2RJb2E.js +0 -1
- package/dist/components/p-D2nxHd1b.js +0 -1
- package/dist/components/p-x3C-wjU9.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/components/data-display/syntax-box/internals/formatter.d.ts +0 -15
- package/dist/webquark/p-048103e0.entry.js +0 -1
- package/dist/webquark/p-0baf478a.entry.js +0 -1
- package/dist/webquark/p-2eaa3a9f.entry.js +0 -1
- package/dist/webquark/p-65fe9cac.entry.js +0 -1
- package/dist/webquark/p-8c5b2706.entry.js +0 -1
- package/dist/webquark/p-923527f0.entry.js +0 -1
- package/dist/webquark/p-Bj2RJb2E.js +0 -1
- package/dist/webquark/p-DoGM9gsC.js +0 -3
- package/dist/webquark/p-a0d97367.entry.js +0 -1
- package/dist/webquark/p-a16bd8d5.entry.js +0 -13
- package/dist/webquark/p-a3e1096d.entry.js +0 -1
- package/dist/webquark/p-b1c771fb.entry.js +0 -1
- package/dist/webquark/p-b45ca926.entry.js +0 -1
- package/dist/webquark/p-eb800d1e.entry.js +0 -1
- /package/dist/{types/components/data-display/syntax-box/internals/formatter.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
|
@@ -0,0 +1,903 @@
|
|
|
1
|
+
import { M as Mixin, r as registerInstance, c as createEvent, a as getElement, h, H as Host } from './index-CIMzZPQO.js';
|
|
2
|
+
import { k as registerSubmitOwner, e as scheduleSubmitAction, c as scheduleResetAction } from './form-submit-action-BjjfVWyu.js';
|
|
3
|
+
import { i as isFieldDisabled, s as syncFieldHost, a as syncNativeAttribute } from './form-field-state-DstNl_WY.js';
|
|
4
|
+
import { a as withActionProps } from './action.props-CbSH7c-q.js';
|
|
5
|
+
|
|
6
|
+
const buttonCss = () => `: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:inline-block;box-sizing:border-box}:host([expand]){display:block;width:100%}.btn{display:inline-flex;align-items:center;justify-content:center;position:relative;text-decoration:none;border-radius:var(--q-btn-radius, var(--_q-control-radius));font-family:var(--q-font-family, inherit);font-weight:var(--q-btn-font-weight, var(--q-font-weight-bold, 600));border:1px solid transparent;line-height:1.2;box-sizing:border-box;outline:none;cursor:pointer;user-select:none;-webkit-user-select:none;transition:var(--q-btn-transition, all 150ms cubic-bezier(0.4, 0, 0.2, 1))}.btn.is-expanded{width:100%}.size-sm{border-radius:var(--q-btn-radius-sm, var(--q-btn-radius, var(--_q-control-radius)));padding:var(--q-btn-padding-sm, 6px 10px);font-size:var(--q-font-size-sm, 0.7rem)}.size-md{border-radius:var(--q-btn-radius-md, var(--q-btn-radius, var(--_q-control-radius)));padding:var(--q-btn-padding-md, 5px 8px);font-size:var(--q-btn-font-size, var(--q-font-size-base, 0.9rem))}.size-lg{border-radius:var(--q-btn-radius-lg, var(--q-btn-radius, var(--_q-control-radius)));padding:var(--q-btn-padding-lg, 9px 16px);font-size:var(--q-font-size-lg, 1rem)}.btn.is-icon-only.size-sm{padding:var(--q-btn-icon-padding-sm, 4px);--_q-btn-icon-padding:var(--q-btn-icon-padding-sm, 0px)}.btn.is-icon-only.size-md{padding:var(--q-btn-icon-padding-md, 6px);--_q-btn-icon-padding:var(--q-btn-icon-padding-md, 0px)}.btn.is-icon-only.size-lg{padding:var(--q-btn-icon-padding-lg, 9px);--_q-btn-icon-padding:var(--q-btn-icon-padding-lg, 0px)}.btn.shape-pill{border-radius:999px}.btn.shape-circle{--_q-circle-diameter:var(--q-btn-circle-size, 120px);--_q-btn-block-padding:var(--q-btn-circle-padding, 12px);width:var(--_q-circle-diameter);height:var(--_q-circle-diameter);padding:var(--_q-btn-block-padding);border-radius:50%}.shape-circle.is-icon-only.size-inherit q-icon[part='icon']{--_q-control-icon:calc(var(--_q-circle-diameter) * 0.4)}.btn.layout-stacked .btn-content-wrap{flex-direction:column;gap:var(--q-btn-stacked-gap, var(--_q-btn-block-padding, 8px))}.variant-primary{background:var(--q-color-primary, #60a5fa);color:var(--q-fg-base, #f9fafb)}.variant-primary:hover:not(.is-disabled){background:var(--q-color-primary-hover, #93c5fd)}.variant-secondary{background:var(--q-color-secondary, #4b5563);color:#ffffff}.variant-secondary:hover:not(.is-disabled){opacity:0.9}.variant-success{background:var(--q-color-success, #34d399);color:var(--q-bg-base, #111827)}.variant-success:hover:not(.is-disabled){opacity:0.9}.variant-danger{background:var(--q-color-danger, #f87171);color:var(--q-bg-base, #111827)}.variant-danger:hover:not(.is-disabled){opacity:0.9}.variant-ghost{background:transparent;border:var(--q-border, 1px solid var(--q-border-color, #374151));color:var(--q-fg-base, #f9fafb)}.variant-ghost:hover:not(.is-disabled){background:rgba(249, 250, 251, 0.08);background:var(--q-btn-hover-overlay, color-mix(in srgb, var(--q-fg-base, #f9fafb) 8%, transparent));border-color:var(--q-color-primary, #60a5fa);color:var(--q-color-primary, #60a5fa)}.variant-text{background:transparent;color:var(--q-fg-base, #f9fafb)}.variant-text:hover:not(.is-disabled){color:var(--q-color-primary, #60a5fa);background:rgba(249, 250, 251, 0.05);background:var(--q-btn-hover-overlay, color-mix(in srgb, var(--q-fg-base, #f9fafb) 5%, transparent))}.btn:active:not(.is-disabled){transform:var(--q-btn-active-transform, scale(0.97))}.btn:focus-visible{outline:var(--q-focus-ring, 2px solid var(--q-color-primary, #60a5fa));outline-offset:2px}.is-disabled{opacity:0.5;cursor:not-allowed}.btn-spinner{position:absolute;width:18px;height:18px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:btn-spin 0.6s linear infinite}.btn-content-wrap{display:inline-flex;align-items:center;gap:var(--q-btn-content-gap, 8px)}.size-sm .btn-content-wrap{gap:var(--q-btn-content-gap-sm, var(--q-btn-content-gap, 4px))}.btn.is-icon-only .btn-label:not(.has-default-slot-icon){display:none}@keyframes btn-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.btn:not(.shape-circle){--_q-btn-min-height:var(--q-btn-height, var(--_q-control-height));--_q-btn-default-padding:var(--_q-btn-block-padding, 0px) var(--_q-control-padding);min-height:var(--_q-btn-min-height);padding:var(--q-btn-padding, var(--_q-btn-padding, var(--_q-btn-default-padding)));font-size:var(--q-btn-font-size, var(--_q-control-font));line-height:var(--_q-control-line)}.btn:not(.is-icon-only):not(.shape-circle){--_q-btn-block-padding:max(0px, calc((var(--_q-btn-min-height) - 1lh) / 2 - 1px))}.btn.is-icon-only:not(.shape-circle){min-width:var(--q-btn-height, var(--_q-control-height));padding:var(--_q-btn-icon-padding, 0px)}.btn-content-wrap{gap:var(--q-btn-content-gap, var(--q-space-sm, .5rem))}.size-sm{--_q-btn-padding:var(--q-btn-padding-sm, var(--_q-btn-default-padding))}.size-md{--_q-btn-padding:var(--q-btn-padding-md, var(--_q-btn-default-padding))}.size-lg{--_q-btn-padding:var(--q-btn-padding-lg, var(--_q-btn-default-padding))}.btn{max-width:100%}.btn-content-wrap,.btn-label{min-width:0;overflow-wrap:anywhere}:host([data-q-control-group]) :is(.input-control,.dropdown-trigger,.quantity-selector,.btn,.toggle-wrapper){border-start-start-radius:var(--_q-group-start-start, 0px);border-start-end-radius:var(--_q-group-start-end, 0px);border-end-start-radius:var(--_q-group-end-start, 0px);border-end-end-radius:var(--_q-group-end-end, 0px)}:host([data-q-control-group]) .toggle-wrapper{box-sizing:border-box;min-height:var(--_q-control-height);padding-inline:var(--_q-control-padding);border:var(--q-border, 1px solid var(--q-border-color, #4b5563));background:var(--q-bg-field, var(--q-bg-surface-3, #22304d))}:host([data-q-control-group]) :is(.btn,.toggle-wrapper,.quantity-selector){width:100%}`;
|
|
7
|
+
|
|
8
|
+
const QButton = class extends Mixin(withActionProps) {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
super();
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.qClick = createEvent(this, "qClick");
|
|
13
|
+
this.qFocus = createEvent(this, "qFocus");
|
|
14
|
+
this.qBlur = createEvent(this, "qBlur");
|
|
15
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
16
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
20
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
get el() { return getElement(this); }
|
|
24
|
+
internals;
|
|
25
|
+
/** Lucide icon rendered before the label. Use icon slots for custom content. */
|
|
26
|
+
icon;
|
|
27
|
+
/** Auto-detected from slotted icon content when omitted. */
|
|
28
|
+
iconOnly;
|
|
29
|
+
/** Required when an icon-only button has no accessible text. */
|
|
30
|
+
ariaLabel = null;
|
|
31
|
+
/** Successful submission value when this button is the submitter. */
|
|
32
|
+
value = '';
|
|
33
|
+
variant = 'primary';
|
|
34
|
+
size = 'inherit';
|
|
35
|
+
/** The `circle` shape uses a fixed-size circular presentation. */
|
|
36
|
+
shape = 'default';
|
|
37
|
+
layout = 'inline';
|
|
38
|
+
expand = false;
|
|
39
|
+
/** Shows a spinner and prevents interaction while loading. */
|
|
40
|
+
loading = false;
|
|
41
|
+
target;
|
|
42
|
+
/** Applied to the native `<button>` when `href` is unset. */
|
|
43
|
+
type = 'button';
|
|
44
|
+
/** Successful submission name when this button is the submitter. */
|
|
45
|
+
name;
|
|
46
|
+
/** Explicit native form ID in this tree; unresolved IDs do not fall back. */
|
|
47
|
+
form;
|
|
48
|
+
/** Overrides the owning form's action for this submission. */
|
|
49
|
+
formAction;
|
|
50
|
+
/** Overrides the owning form's method for this submission. */
|
|
51
|
+
formMethod;
|
|
52
|
+
/** Overrides the owning form's encoding for this submission. */
|
|
53
|
+
formEnctype;
|
|
54
|
+
/** Overrides the owning form's browsing context for this submission. */
|
|
55
|
+
formTarget;
|
|
56
|
+
/** Skips validation for this submitter while retaining cancellation and collection. */
|
|
57
|
+
formNoValidate = false;
|
|
58
|
+
/** Emitted on activation unless disabled or loading. */
|
|
59
|
+
qClick;
|
|
60
|
+
qFocus;
|
|
61
|
+
qBlur;
|
|
62
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
63
|
+
autoIconOnly = false;
|
|
64
|
+
defaultSlotIcon = false;
|
|
65
|
+
hasWarnedMissingAccessibleName = false;
|
|
66
|
+
disabledState = false;
|
|
67
|
+
get isDisabled() {
|
|
68
|
+
return isFieldDisabled(this.el, this.disabled);
|
|
69
|
+
}
|
|
70
|
+
syncButtonState() {
|
|
71
|
+
const disabled = syncFieldHost(this.el, this.disabled, this.name);
|
|
72
|
+
syncNativeAttribute(this.el, 'form', this.form);
|
|
73
|
+
registerSubmitOwner(this.el, () => this.internals?.form ?? null);
|
|
74
|
+
if (this.disabledState !== disabled)
|
|
75
|
+
this.disabledState = disabled;
|
|
76
|
+
const button = this.el.shadowRoot?.querySelector('button');
|
|
77
|
+
if (button)
|
|
78
|
+
button.disabled = disabled || this.loading;
|
|
79
|
+
const anchor = this.el.shadowRoot?.querySelector('a');
|
|
80
|
+
if (anchor) {
|
|
81
|
+
const unavailable = disabled || this.loading;
|
|
82
|
+
anchor.setAttribute('aria-disabled', String(unavailable));
|
|
83
|
+
if (unavailable)
|
|
84
|
+
anchor.tabIndex = -1;
|
|
85
|
+
else
|
|
86
|
+
anchor.removeAttribute('tabindex');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
formDisabledCallback() {
|
|
90
|
+
this.syncButtonState();
|
|
91
|
+
}
|
|
92
|
+
componentDidRender() { this.syncButtonState(); }
|
|
93
|
+
watchDisabled() {
|
|
94
|
+
this.syncButtonState();
|
|
95
|
+
}
|
|
96
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
97
|
+
componentWillLoad() {
|
|
98
|
+
this.checkIconOnly();
|
|
99
|
+
}
|
|
100
|
+
componentDidLoad() {
|
|
101
|
+
this.warnForMissingAccessibleName();
|
|
102
|
+
}
|
|
103
|
+
handleIconAccessibilityChange() {
|
|
104
|
+
this.checkIconOnly();
|
|
105
|
+
this.warnForMissingAccessibleName();
|
|
106
|
+
}
|
|
107
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
108
|
+
checkIconOnly = () => {
|
|
109
|
+
this.defaultSlotIcon = this.hasDefaultSlotIcon();
|
|
110
|
+
const text = this.getVisibleText();
|
|
111
|
+
const hasIcon = this.hasShortcutIcon() ||
|
|
112
|
+
this.el.querySelector('q-icon') !== null ||
|
|
113
|
+
this.el.querySelector('[slot="icon-left"]') !== null ||
|
|
114
|
+
this.el.querySelector('[slot="icon-right"]') !== null;
|
|
115
|
+
this.autoIconOnly = text === '' && hasIcon;
|
|
116
|
+
};
|
|
117
|
+
handleSlotChange = () => {
|
|
118
|
+
this.checkIconOnly();
|
|
119
|
+
this.warnForMissingAccessibleName();
|
|
120
|
+
};
|
|
121
|
+
getVisibleText() {
|
|
122
|
+
return this.getDefaultSlotNodes()
|
|
123
|
+
.map(node => node.textContent || '')
|
|
124
|
+
.join('')
|
|
125
|
+
.trim();
|
|
126
|
+
}
|
|
127
|
+
getDefaultSlotNodes() {
|
|
128
|
+
return Array.from(this.el.childNodes).filter(node => node.nodeType === 3 || (node.nodeType === 1 && !node.slot));
|
|
129
|
+
}
|
|
130
|
+
getShortcutIcon() {
|
|
131
|
+
const icon = this.icon?.trim();
|
|
132
|
+
return icon || undefined;
|
|
133
|
+
}
|
|
134
|
+
hasShortcutIcon() {
|
|
135
|
+
return this.getShortcutIcon() !== undefined;
|
|
136
|
+
}
|
|
137
|
+
hasIconContent() {
|
|
138
|
+
return this.hasShortcutIcon() ||
|
|
139
|
+
this.el.querySelector('q-icon') !== null ||
|
|
140
|
+
this.el.querySelector('[slot="icon-left"]') !== null ||
|
|
141
|
+
this.el.querySelector('[slot="icon-right"]') !== null;
|
|
142
|
+
}
|
|
143
|
+
hasDefaultSlotIcon() {
|
|
144
|
+
return this.getDefaultSlotNodes().some(node => node.nodeType === 1 && (node.matches('q-icon') || node.querySelector('q-icon') !== null));
|
|
145
|
+
}
|
|
146
|
+
warnForMissingAccessibleName() {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
handleClick = (e) => {
|
|
150
|
+
if (this.isDisabled || this.loading) {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
e.stopPropagation();
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const emitted = this.qClick.emit(e);
|
|
156
|
+
if (this.type === 'submit' && !this.href)
|
|
157
|
+
scheduleSubmitAction(this.el, e, emitted);
|
|
158
|
+
if (this.type === 'reset' && !this.href)
|
|
159
|
+
scheduleResetAction(this.el, e, emitted, () => this.internals?.form ?? null);
|
|
160
|
+
};
|
|
161
|
+
handleFocus = (ev) => {
|
|
162
|
+
this.qFocus.emit(ev);
|
|
163
|
+
};
|
|
164
|
+
handleBlur = (ev) => {
|
|
165
|
+
this.qBlur.emit(ev);
|
|
166
|
+
};
|
|
167
|
+
getResolvedRel() {
|
|
168
|
+
if (this.rel)
|
|
169
|
+
return this.rel;
|
|
170
|
+
return this.target === '_blank' ? 'noopener noreferrer' : undefined;
|
|
171
|
+
}
|
|
172
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
173
|
+
render() {
|
|
174
|
+
const isLink = this.href !== undefined && this.href !== null && this.href !== '';
|
|
175
|
+
const isBtnDisabled = this.isDisabled || this.loading;
|
|
176
|
+
const isIcon = this.iconOnly !== undefined ? this.iconOnly : this.autoIconOnly;
|
|
177
|
+
const shortcutIcon = this.getShortcutIcon();
|
|
178
|
+
const ariaLabel = this.ariaLabel?.trim() || undefined;
|
|
179
|
+
const classes = {
|
|
180
|
+
'btn': true,
|
|
181
|
+
[`variant-${this.variant}`]: true,
|
|
182
|
+
[`size-${this.size}`]: true,
|
|
183
|
+
[`shape-${this.shape}`]: true,
|
|
184
|
+
[`layout-${this.layout}`]: true,
|
|
185
|
+
'is-disabled': isBtnDisabled,
|
|
186
|
+
'is-expanded': this.expand,
|
|
187
|
+
'is-icon-only': isIcon,
|
|
188
|
+
};
|
|
189
|
+
const innerContent = [
|
|
190
|
+
this.loading && h("div", { class: "btn-spinner", part: "spinner" }),
|
|
191
|
+
h("span", { class: "btn-content-wrap", style: { visibility: this.loading ? 'hidden' : 'visible' } }, h("slot", { name: "icon-left", onSlotchange: this.handleSlotChange }, shortcutIcon && h("q-icon", { name: shortcutIcon, size: "var(--_q-control-icon)", part: "icon" })), h("span", { class: { 'btn-label': true, 'has-default-slot-icon': this.defaultSlotIcon } }, h("slot", { onSlotchange: this.handleSlotChange })), h("slot", { name: "icon-right", onSlotchange: this.handleSlotChange }))
|
|
192
|
+
];
|
|
193
|
+
if (isLink) {
|
|
194
|
+
return (h("a", { class: classes, part: "button", href: this.href, target: this.target, rel: this.getResolvedRel(), download: this.download, tabindex: isBtnDisabled ? -1 : undefined, "aria-disabled": isBtnDisabled ? 'true' : 'false', "aria-busy": this.loading ? 'true' : 'false', "aria-label": ariaLabel, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur }, innerContent));
|
|
195
|
+
}
|
|
196
|
+
return (h("button", { class: classes, part: "button", type: this.type, disabled: isBtnDisabled, "aria-busy": this.loading ? 'true' : 'false', "aria-label": ariaLabel, onClick: this.handleClick, onFocus: this.handleFocus, onBlur: this.handleBlur }, innerContent));
|
|
197
|
+
}
|
|
198
|
+
static get delegatesFocus() { return true; }
|
|
199
|
+
static get formAssociated() { return true; }
|
|
200
|
+
static get watchers() { return {
|
|
201
|
+
"disabled": [{
|
|
202
|
+
"watchDisabled": 0
|
|
203
|
+
}],
|
|
204
|
+
"loading": [{
|
|
205
|
+
"watchDisabled": 0
|
|
206
|
+
}],
|
|
207
|
+
"name": [{
|
|
208
|
+
"watchDisabled": 0
|
|
209
|
+
}],
|
|
210
|
+
"form": [{
|
|
211
|
+
"watchDisabled": 0
|
|
212
|
+
}],
|
|
213
|
+
"icon": [{
|
|
214
|
+
"handleIconAccessibilityChange": 0
|
|
215
|
+
}],
|
|
216
|
+
"iconOnly": [{
|
|
217
|
+
"handleIconAccessibilityChange": 0
|
|
218
|
+
}],
|
|
219
|
+
"ariaLabel": [{
|
|
220
|
+
"handleIconAccessibilityChange": 0
|
|
221
|
+
}]
|
|
222
|
+
}; }
|
|
223
|
+
};
|
|
224
|
+
QButton.style = buttonCss();
|
|
225
|
+
|
|
226
|
+
function getScrollMetrics(viewport) {
|
|
227
|
+
if (!viewport) {
|
|
228
|
+
return {
|
|
229
|
+
scrollTop: 0,
|
|
230
|
+
scrollHeight: 0,
|
|
231
|
+
clientHeight: 0,
|
|
232
|
+
maxScrollTop: 0,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
const maxScrollTop = Math.max(0, viewport.scrollHeight - viewport.clientHeight);
|
|
236
|
+
return {
|
|
237
|
+
scrollTop: viewport.scrollTop,
|
|
238
|
+
scrollHeight: viewport.scrollHeight,
|
|
239
|
+
clientHeight: viewport.clientHeight,
|
|
240
|
+
maxScrollTop,
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function getThumbLayout(options) {
|
|
244
|
+
const { metrics, trackHeight, minThumbHeight } = options;
|
|
245
|
+
if (metrics.scrollHeight <= metrics.clientHeight || metrics.maxScrollTop <= 0) {
|
|
246
|
+
return {
|
|
247
|
+
height: 0,
|
|
248
|
+
translateY: 0,
|
|
249
|
+
isScrollable: false,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
const calculatedHeight = (metrics.clientHeight * metrics.clientHeight) / metrics.scrollHeight;
|
|
253
|
+
const height = Math.max(minThumbHeight, calculatedHeight);
|
|
254
|
+
const resolvedThumbHeight = options.thumbHeight || height;
|
|
255
|
+
const maxThumbTranslate = Math.max(0, trackHeight - resolvedThumbHeight);
|
|
256
|
+
const translateY = maxThumbTranslate > 0 ? (metrics.scrollTop / metrics.maxScrollTop) * maxThumbTranslate : 0;
|
|
257
|
+
return {
|
|
258
|
+
height,
|
|
259
|
+
translateY,
|
|
260
|
+
isScrollable: true,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
function clampScrollTop(scrollTop, metrics) {
|
|
264
|
+
return Math.max(0, Math.min(metrics.maxScrollTop, scrollTop));
|
|
265
|
+
}
|
|
266
|
+
function getKeyboardScrollTarget(options) {
|
|
267
|
+
const pageStep = Math.max(options.step, options.clientHeight - options.step);
|
|
268
|
+
switch (options.key) {
|
|
269
|
+
case 'ArrowDown':
|
|
270
|
+
case 'ArrowRight':
|
|
271
|
+
return options.scrollTop + options.step;
|
|
272
|
+
case 'ArrowUp':
|
|
273
|
+
case 'ArrowLeft':
|
|
274
|
+
return options.scrollTop - options.step;
|
|
275
|
+
case 'PageDown':
|
|
276
|
+
return options.scrollTop + pageStep;
|
|
277
|
+
case 'PageUp':
|
|
278
|
+
return options.scrollTop - pageStep;
|
|
279
|
+
case 'Home':
|
|
280
|
+
return 0;
|
|
281
|
+
case 'End':
|
|
282
|
+
return options.maxScrollTop;
|
|
283
|
+
default:
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const SCROLLABLE_TARGET_ID_ATTR = 'data-q-scrollable-target-id';
|
|
289
|
+
function resolveNativeScrollTarget(host, target) {
|
|
290
|
+
if (!target) {
|
|
291
|
+
return host.parentElement;
|
|
292
|
+
}
|
|
293
|
+
const root = host.getRootNode();
|
|
294
|
+
return root.querySelector(target);
|
|
295
|
+
}
|
|
296
|
+
function ensureNativeScrollTargetId(targetEl) {
|
|
297
|
+
let targetId = targetEl.getAttribute(SCROLLABLE_TARGET_ID_ATTR);
|
|
298
|
+
if (!targetId) {
|
|
299
|
+
targetId = `q-scroll-${Math.random().toString(36).slice(2, 11)}`;
|
|
300
|
+
targetEl.setAttribute(SCROLLABLE_TARGET_ID_ATTR, targetId);
|
|
301
|
+
}
|
|
302
|
+
return targetId;
|
|
303
|
+
}
|
|
304
|
+
function buildNativeScrollbarStyle(targetId) {
|
|
305
|
+
return `
|
|
306
|
+
[${SCROLLABLE_TARGET_ID_ATTR}="${targetId}"]::-webkit-scrollbar {
|
|
307
|
+
width: var(--q-scrollbar-width, 6px);
|
|
308
|
+
height: var(--q-scrollbar-width, 6px);
|
|
309
|
+
}
|
|
310
|
+
[${SCROLLABLE_TARGET_ID_ATTR}="${targetId}"]::-webkit-scrollbar-track {
|
|
311
|
+
background: var(--q-scrollbar-track-color, transparent);
|
|
312
|
+
}
|
|
313
|
+
[${SCROLLABLE_TARGET_ID_ATTR}="${targetId}"]::-webkit-scrollbar-thumb {
|
|
314
|
+
background: var(--q-scrollbar-thumb-color, var(--q-border-color, #374151));
|
|
315
|
+
border-radius: var(--q-scrollbar-radius, 4px);
|
|
316
|
+
}
|
|
317
|
+
[${SCROLLABLE_TARGET_ID_ATTR}="${targetId}"]::-webkit-scrollbar-thumb:hover {
|
|
318
|
+
background: var(--q-scrollbar-thumb-color-hover, var(--q-color-primary, #60a5fa));
|
|
319
|
+
}
|
|
320
|
+
[${SCROLLABLE_TARGET_ID_ATTR}="${targetId}"] {
|
|
321
|
+
scrollbar-width: var(--q-scrollbar-width-thin, thin);
|
|
322
|
+
scrollbar-color: var(--q-scrollbar-thumb-color, var(--q-border-color, #374151)) var(--q-scrollbar-track-color, transparent);
|
|
323
|
+
}
|
|
324
|
+
`;
|
|
325
|
+
}
|
|
326
|
+
function removeNativeScrollTargetId(targetEl) {
|
|
327
|
+
targetEl?.removeAttribute(SCROLLABLE_TARGET_ID_ATTR);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
const scrollableCss = () => `:host{display:block;box-sizing:border-box;height:100%;min-height:0}.q-scrollable-host{position:relative;width:100%;height:100%;max-height:inherit;overflow:hidden;box-sizing:border-box}.q-scrollable-viewport{width:100%;height:100%;max-height:inherit;overflow:auto;box-sizing:border-box}:host([mode='custom']) .q-scrollable-viewport{scrollbar-width:none;-ms-overflow-style:none;padding-right:12px;}:host([mode='custom']) .q-scrollable-viewport::-webkit-scrollbar{display:none;}:host([mode='native']) .q-scrollable-viewport{scrollbar-width:var(--q-scrollbar-width-thin, thin);scrollbar-color:var(--q-scrollbar-thumb-color, var(--q-border-color, #374151)) var(--q-scrollbar-track-color, transparent)}:host([mode='native']) .q-scrollable-viewport::-webkit-scrollbar{width:var(--q-scrollbar-width, 6px);height:var(--q-scrollbar-width, 6px);display:block}:host([mode='native']) .q-scrollable-viewport::-webkit-scrollbar-track{background:var(--q-scrollbar-track-color, transparent)}:host([mode='native']) .q-scrollable-viewport::-webkit-scrollbar-thumb{background:var(--q-scrollbar-thumb-color, var(--q-border-color, #374151));border-radius:var(--q-scrollbar-radius, 4px)}:host([mode='native']) .q-scrollable-viewport::-webkit-scrollbar-thumb:hover{background:var(--q-scrollbar-thumb-color-hover, var(--q-color-primary, #60a5fa))}.q-scrollbar-track{position:absolute;top:4px;right:4px;bottom:4px;width:var(--q-scrollbar-width, 6px);background:var(--q-scrollbar-track-color, transparent);border-radius:var(--q-scrollbar-radius, 4px);z-index:10;pointer-events:auto;opacity:0;transition:opacity 250ms ease;user-select:none;-webkit-user-select:none}.q-scrollbar-thumb{position:absolute;width:100%;background:var(--q-scrollbar-thumb-color, var(--q-border-color, #374151));border-radius:var(--q-scrollbar-radius, 4px);cursor:pointer;transform:translateY(0);transition:background-color 150ms ease;user-select:none;-webkit-user-select:none}.q-scrollbar-thumb:hover,.q-scrollbar-thumb:focus-visible{background:var(--q-scrollbar-thumb-color-hover, var(--q-color-primary, #60a5fa));outline:none}.q-scrollable-host:hover .q-scrollbar-track,.q-scrollable-host.is-scrolling .q-scrollbar-track,.q-scrollbar-track.is-dragging{opacity:1}.q-scrollable-host.is-dragging{user-select:none;-webkit-user-select:none}@media (hover: none) and (pointer: coarse){:host([native-on-mobile]) .q-scrollbar-track{display:none !important}:host([native-on-mobile]) .q-scrollable-viewport{scrollbar-width:auto;-ms-overflow-style:auto}:host([native-on-mobile]) .q-scrollable-viewport::-webkit-scrollbar{display:block}}`;
|
|
331
|
+
|
|
332
|
+
let scrollableIds = 0;
|
|
333
|
+
const QScrollable = class {
|
|
334
|
+
constructor(hostRef) {
|
|
335
|
+
registerInstance(this, hostRef);
|
|
336
|
+
this.qScroll = createEvent(this, "qScroll");
|
|
337
|
+
}
|
|
338
|
+
get el() { return getElement(this); }
|
|
339
|
+
height = '100%';
|
|
340
|
+
maxHeight = '';
|
|
341
|
+
/** `custom` renders a WebQuark thumb; `native` styles browser scrollbars. */
|
|
342
|
+
mode = 'custom';
|
|
343
|
+
/** CSS selector for an external native-scroll target resolved from this component's root node. */
|
|
344
|
+
target = '';
|
|
345
|
+
/** Uses native scrollbars on coarse-pointer devices. */
|
|
346
|
+
nativeOnMobile = true;
|
|
347
|
+
/** Hides the custom scrollbar until hover, scroll, or drag activity. */
|
|
348
|
+
autoHide = true;
|
|
349
|
+
qScroll;
|
|
350
|
+
isScrolling = false;
|
|
351
|
+
isDragging = false;
|
|
352
|
+
scrollValueNow = 0;
|
|
353
|
+
scrollValueMax = 0;
|
|
354
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
355
|
+
static MIN_THUMB_HEIGHT_PX = 36;
|
|
356
|
+
static KEY_SCROLL_STEP_PX = 40;
|
|
357
|
+
viewportId = `q-scrollable-viewport-${++scrollableIds}`;
|
|
358
|
+
viewportEl;
|
|
359
|
+
contentEl;
|
|
360
|
+
trackEl;
|
|
361
|
+
thumbEl;
|
|
362
|
+
resizeObserver;
|
|
363
|
+
scrollTimeout;
|
|
364
|
+
isUpdatingPosition = false;
|
|
365
|
+
dragStartY = 0;
|
|
366
|
+
dragStartScrollTop = 0;
|
|
367
|
+
nativeStyleEl;
|
|
368
|
+
activeTargetEl;
|
|
369
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
370
|
+
componentDidLoad() {
|
|
371
|
+
this.applyNativeStyles();
|
|
372
|
+
this.setupCustomScroll();
|
|
373
|
+
}
|
|
374
|
+
componentDidUpdate() {
|
|
375
|
+
if (this.mode === 'custom') {
|
|
376
|
+
this.updateScrollbarSize();
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
disconnectedCallback() {
|
|
380
|
+
this.removeNativeStyles();
|
|
381
|
+
if (this.resizeObserver) {
|
|
382
|
+
this.resizeObserver.disconnect();
|
|
383
|
+
}
|
|
384
|
+
if (this.scrollTimeout) {
|
|
385
|
+
clearTimeout(this.scrollTimeout);
|
|
386
|
+
}
|
|
387
|
+
if (this.thumbEl) {
|
|
388
|
+
this.thumbEl.removeEventListener('pointermove', this.handlePointerMove);
|
|
389
|
+
this.thumbEl.removeEventListener('pointerup', this.handlePointerUp);
|
|
390
|
+
this.thumbEl.removeEventListener('pointercancel', this.handlePointerUp);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
handleModeOrTargetChange() {
|
|
394
|
+
if (this.mode === 'native') {
|
|
395
|
+
if (this.resizeObserver) {
|
|
396
|
+
this.resizeObserver.disconnect();
|
|
397
|
+
this.resizeObserver = undefined;
|
|
398
|
+
}
|
|
399
|
+
this.applyNativeStyles();
|
|
400
|
+
}
|
|
401
|
+
else {
|
|
402
|
+
this.removeNativeStyles();
|
|
403
|
+
this.setupCustomScroll();
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
// ============================ [4] EXPOSED METHODS ============================
|
|
407
|
+
async scrollToBottom() {
|
|
408
|
+
if (this.viewportEl) {
|
|
409
|
+
this.setViewportScrollTop(this.viewportEl.scrollHeight);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
async scrollToPosition(top) {
|
|
413
|
+
if (this.viewportEl) {
|
|
414
|
+
this.setViewportScrollTop(top);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
418
|
+
setViewportRef = (el) => {
|
|
419
|
+
this.viewportEl = this.syncResizeObserver(this.viewportEl, el);
|
|
420
|
+
};
|
|
421
|
+
setContentRef = (el) => {
|
|
422
|
+
this.contentEl = this.syncResizeObserver(this.contentEl, el);
|
|
423
|
+
};
|
|
424
|
+
syncResizeObserver(previousEl, nextEl) {
|
|
425
|
+
if (previousEl && this.resizeObserver) {
|
|
426
|
+
try {
|
|
427
|
+
this.resizeObserver.unobserve(previousEl);
|
|
428
|
+
}
|
|
429
|
+
catch (e) {
|
|
430
|
+
// Ignore
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
const resolvedEl = nextEl || undefined;
|
|
434
|
+
if (this.mode === 'custom' && resolvedEl && typeof ResizeObserver !== 'undefined') {
|
|
435
|
+
this.ensureResizeObserver();
|
|
436
|
+
this.resizeObserver?.observe(resolvedEl);
|
|
437
|
+
}
|
|
438
|
+
if (this.mode === 'custom') {
|
|
439
|
+
this.updateScrollbarSize();
|
|
440
|
+
}
|
|
441
|
+
return resolvedEl;
|
|
442
|
+
}
|
|
443
|
+
ensureResizeObserver() {
|
|
444
|
+
if (this.resizeObserver || typeof ResizeObserver === 'undefined')
|
|
445
|
+
return;
|
|
446
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
447
|
+
this.updateScrollbarSize();
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
setupCustomScroll() {
|
|
451
|
+
if (this.mode !== 'custom') {
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
if (typeof ResizeObserver !== 'undefined') {
|
|
455
|
+
this.ensureResizeObserver();
|
|
456
|
+
if (this.viewportEl) {
|
|
457
|
+
this.resizeObserver?.observe(this.viewportEl);
|
|
458
|
+
}
|
|
459
|
+
if (this.contentEl) {
|
|
460
|
+
this.resizeObserver?.observe(this.contentEl);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
this.updateScrollbarSize();
|
|
464
|
+
}
|
|
465
|
+
applyNativeStyles() {
|
|
466
|
+
this.removeNativeStyles();
|
|
467
|
+
if (this.mode !== 'native') {
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
const targetEl = resolveNativeScrollTarget(this.el, this.target);
|
|
471
|
+
if (!targetEl) {
|
|
472
|
+
return;
|
|
473
|
+
}
|
|
474
|
+
this.activeTargetEl = targetEl;
|
|
475
|
+
const targetId = ensureNativeScrollTargetId(targetEl);
|
|
476
|
+
const styleEl = document.createElement('style');
|
|
477
|
+
styleEl.id = `q-style-${targetId}`;
|
|
478
|
+
styleEl.textContent = buildNativeScrollbarStyle(targetId);
|
|
479
|
+
targetEl.appendChild(styleEl);
|
|
480
|
+
this.nativeStyleEl = styleEl;
|
|
481
|
+
}
|
|
482
|
+
removeNativeStyles() {
|
|
483
|
+
if (this.nativeStyleEl && this.nativeStyleEl.parentNode) {
|
|
484
|
+
this.nativeStyleEl.parentNode.removeChild(this.nativeStyleEl);
|
|
485
|
+
}
|
|
486
|
+
this.nativeStyleEl = undefined;
|
|
487
|
+
if (this.activeTargetEl) {
|
|
488
|
+
removeNativeScrollTargetId(this.activeTargetEl);
|
|
489
|
+
this.activeTargetEl = undefined;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
updateScrollbarSize() {
|
|
493
|
+
if (this.mode !== 'custom' || !this.viewportEl || !this.trackEl || !this.thumbEl) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
const metrics = getScrollMetrics(this.viewportEl);
|
|
497
|
+
const layout = getThumbLayout({
|
|
498
|
+
metrics,
|
|
499
|
+
trackHeight: this.trackEl.clientHeight,
|
|
500
|
+
thumbHeight: this.thumbEl.clientHeight,
|
|
501
|
+
minThumbHeight: QScrollable.MIN_THUMB_HEIGHT_PX,
|
|
502
|
+
});
|
|
503
|
+
if (!layout.isScrollable) {
|
|
504
|
+
this.thumbEl.style.height = '0px';
|
|
505
|
+
this.trackEl.style.display = 'none';
|
|
506
|
+
this.updateScrollMetrics();
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
this.trackEl.style.display = '';
|
|
510
|
+
this.thumbEl.style.height = `${layout.height}px`;
|
|
511
|
+
this.updateThumbPosition();
|
|
512
|
+
}
|
|
513
|
+
updateThumbPosition() {
|
|
514
|
+
if (!this.viewportEl || !this.trackEl || !this.thumbEl) {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
const metrics = getScrollMetrics(this.viewportEl);
|
|
518
|
+
const layout = getThumbLayout({
|
|
519
|
+
metrics,
|
|
520
|
+
trackHeight: this.trackEl.clientHeight,
|
|
521
|
+
thumbHeight: this.thumbEl.clientHeight,
|
|
522
|
+
minThumbHeight: QScrollable.MIN_THUMB_HEIGHT_PX,
|
|
523
|
+
});
|
|
524
|
+
if (!layout.isScrollable) {
|
|
525
|
+
this.updateScrollMetrics();
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
this.thumbEl.style.transform = `translateY(${layout.translateY}px)`;
|
|
529
|
+
this.updateScrollMetrics();
|
|
530
|
+
}
|
|
531
|
+
updateScrollMetrics() {
|
|
532
|
+
const metrics = getScrollMetrics(this.viewportEl);
|
|
533
|
+
this.scrollValueNow = Math.round(metrics.scrollTop);
|
|
534
|
+
this.scrollValueMax = Math.round(metrics.maxScrollTop);
|
|
535
|
+
}
|
|
536
|
+
handleScroll = () => {
|
|
537
|
+
if (this.viewportEl) {
|
|
538
|
+
this.qScroll.emit({
|
|
539
|
+
scrollTop: this.viewportEl.scrollTop,
|
|
540
|
+
scrollHeight: this.viewportEl.scrollHeight,
|
|
541
|
+
clientHeight: this.viewportEl.clientHeight,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
this.updateScrollMetrics();
|
|
545
|
+
if (this.mode !== 'custom') {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
this.showScrollbarTemporarily();
|
|
549
|
+
if (!this.isUpdatingPosition) {
|
|
550
|
+
this.isUpdatingPosition = true;
|
|
551
|
+
requestAnimationFrame(() => {
|
|
552
|
+
this.updateThumbPosition();
|
|
553
|
+
this.isUpdatingPosition = false;
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
showScrollbarTemporarily() {
|
|
558
|
+
if (!this.autoHide) {
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
this.isScrolling = true;
|
|
562
|
+
if (this.scrollTimeout) {
|
|
563
|
+
clearTimeout(this.scrollTimeout);
|
|
564
|
+
}
|
|
565
|
+
this.scrollTimeout = setTimeout(() => {
|
|
566
|
+
this.isScrolling = false;
|
|
567
|
+
}, 1500);
|
|
568
|
+
}
|
|
569
|
+
handlePointerDown = (e) => {
|
|
570
|
+
if (e.button !== 0) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
if (!this.thumbEl || !this.viewportEl || !this.trackEl) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
this.isDragging = true;
|
|
577
|
+
this.dragStartY = e.clientY;
|
|
578
|
+
this.dragStartScrollTop = this.viewportEl.scrollTop;
|
|
579
|
+
this.thumbEl.setPointerCapture(e.pointerId);
|
|
580
|
+
this.thumbEl.addEventListener('pointermove', this.handlePointerMove);
|
|
581
|
+
this.thumbEl.addEventListener('pointerup', this.handlePointerUp);
|
|
582
|
+
this.thumbEl.addEventListener('pointercancel', this.handlePointerUp);
|
|
583
|
+
e.preventDefault();
|
|
584
|
+
e.stopPropagation();
|
|
585
|
+
};
|
|
586
|
+
handlePointerMove = (e) => {
|
|
587
|
+
if (!this.isDragging || !this.viewportEl || !this.trackEl || !this.thumbEl) {
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
590
|
+
const metrics = getScrollMetrics(this.viewportEl);
|
|
591
|
+
const deltaY = e.clientY - this.dragStartY;
|
|
592
|
+
const maxThumbTranslate = this.trackEl.clientHeight - this.thumbEl.clientHeight;
|
|
593
|
+
if (maxThumbTranslate <= 0 || metrics.maxScrollTop <= 0) {
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
const startTranslateY = (this.dragStartScrollTop / metrics.maxScrollTop) * maxThumbTranslate;
|
|
597
|
+
const newTranslateY = Math.max(0, Math.min(maxThumbTranslate, startTranslateY + deltaY));
|
|
598
|
+
const newScrollTop = (newTranslateY / maxThumbTranslate) * metrics.maxScrollTop;
|
|
599
|
+
this.setViewportScrollTop(newScrollTop);
|
|
600
|
+
this.updateThumbPosition();
|
|
601
|
+
};
|
|
602
|
+
handleThumbKeyDown = (e) => {
|
|
603
|
+
if (!this.viewportEl)
|
|
604
|
+
return;
|
|
605
|
+
const metrics = getScrollMetrics(this.viewportEl);
|
|
606
|
+
const nextScrollTop = getKeyboardScrollTarget({
|
|
607
|
+
key: e.key,
|
|
608
|
+
scrollTop: metrics.scrollTop,
|
|
609
|
+
clientHeight: metrics.clientHeight,
|
|
610
|
+
maxScrollTop: metrics.maxScrollTop,
|
|
611
|
+
step: QScrollable.KEY_SCROLL_STEP_PX,
|
|
612
|
+
});
|
|
613
|
+
if (nextScrollTop === undefined)
|
|
614
|
+
return;
|
|
615
|
+
e.preventDefault();
|
|
616
|
+
this.setViewportScrollTop(nextScrollTop);
|
|
617
|
+
this.updateThumbPosition();
|
|
618
|
+
};
|
|
619
|
+
setViewportScrollTop(scrollTop) {
|
|
620
|
+
if (!this.viewportEl)
|
|
621
|
+
return;
|
|
622
|
+
const nextScrollTop = clampScrollTop(scrollTop, getScrollMetrics(this.viewportEl));
|
|
623
|
+
this.viewportEl.style.scrollBehavior = 'auto';
|
|
624
|
+
this.viewportEl.scrollTop = nextScrollTop;
|
|
625
|
+
this.viewportEl.style.scrollBehavior = '';
|
|
626
|
+
this.updateScrollMetrics();
|
|
627
|
+
}
|
|
628
|
+
handlePointerUp = (e) => {
|
|
629
|
+
if (!this.isDragging) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
this.isDragging = false;
|
|
633
|
+
if (this.thumbEl) {
|
|
634
|
+
try {
|
|
635
|
+
this.thumbEl.releasePointerCapture(e.pointerId);
|
|
636
|
+
}
|
|
637
|
+
catch (err) {
|
|
638
|
+
// Ignore
|
|
639
|
+
}
|
|
640
|
+
this.thumbEl.removeEventListener('pointermove', this.handlePointerMove);
|
|
641
|
+
this.thumbEl.removeEventListener('pointerup', this.handlePointerUp);
|
|
642
|
+
this.thumbEl.removeEventListener('pointercancel', this.handlePointerUp);
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
646
|
+
render() {
|
|
647
|
+
const hostStyle = {
|
|
648
|
+
height: this.height,
|
|
649
|
+
maxHeight: this.maxHeight || undefined,
|
|
650
|
+
};
|
|
651
|
+
return (h(Host, { key: '046bbaa5aeab2799e72aa0113cfbe389ce059a42', class: {
|
|
652
|
+
'is-scrolling': this.isScrolling,
|
|
653
|
+
'is-dragging': this.isDragging,
|
|
654
|
+
}, 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: {
|
|
655
|
+
'q-scrollbar-track': true,
|
|
656
|
+
'is-dragging': this.isDragging,
|
|
657
|
+
}, 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" }))))));
|
|
658
|
+
}
|
|
659
|
+
static get watchers() { return {
|
|
660
|
+
"mode": [{
|
|
661
|
+
"handleModeOrTargetChange": 0
|
|
662
|
+
}],
|
|
663
|
+
"target": [{
|
|
664
|
+
"handleModeOrTargetChange": 0
|
|
665
|
+
}]
|
|
666
|
+
}; }
|
|
667
|
+
};
|
|
668
|
+
QScrollable.style = scrollableCss();
|
|
669
|
+
|
|
670
|
+
function ensureTooltipDescribedBy(options) {
|
|
671
|
+
const tooltipId = options.host.id || options.fallbackId;
|
|
672
|
+
if (!options.host.id) {
|
|
673
|
+
options.host.id = tooltipId;
|
|
674
|
+
}
|
|
675
|
+
const describedBy = options.trigger.getAttribute('aria-describedby');
|
|
676
|
+
const ids = describedBy ? describedBy.split(/\s+/).filter(Boolean) : [];
|
|
677
|
+
if (ids.includes(tooltipId)) {
|
|
678
|
+
return { tooltipId, added: false };
|
|
679
|
+
}
|
|
680
|
+
options.trigger.setAttribute('aria-describedby', [...ids, tooltipId].join(' '));
|
|
681
|
+
return { tooltipId, added: true };
|
|
682
|
+
}
|
|
683
|
+
function removeTooltipDescribedBy(options) {
|
|
684
|
+
if (!options.trigger || !options.added || !options.tooltipId)
|
|
685
|
+
return;
|
|
686
|
+
const describedBy = options.trigger.getAttribute('aria-describedby');
|
|
687
|
+
if (!describedBy)
|
|
688
|
+
return;
|
|
689
|
+
const ids = describedBy.split(/\s+/).filter(id => id && id !== options.tooltipId);
|
|
690
|
+
if (ids.length) {
|
|
691
|
+
options.trigger.setAttribute('aria-describedby', ids.join(' '));
|
|
692
|
+
}
|
|
693
|
+
else {
|
|
694
|
+
options.trigger.removeAttribute('aria-describedby');
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
function getContainingBlock(el) {
|
|
699
|
+
let current = el;
|
|
700
|
+
while (current) {
|
|
701
|
+
let parent = current.parentElement;
|
|
702
|
+
if (!parent && current.parentNode) {
|
|
703
|
+
const node = current.parentNode;
|
|
704
|
+
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE && node.host) {
|
|
705
|
+
parent = node.host;
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
parent = node;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
if (!parent || parent.nodeType !== Node.ELEMENT_NODE) {
|
|
712
|
+
current = parent;
|
|
713
|
+
continue;
|
|
714
|
+
}
|
|
715
|
+
const parentEl = parent;
|
|
716
|
+
const style = window.getComputedStyle(parentEl);
|
|
717
|
+
const backdropFilter = style.backdropFilter || style.webkitBackdropFilter;
|
|
718
|
+
if ((style.transform && style.transform !== 'none') ||
|
|
719
|
+
(style.perspective && style.perspective !== 'none') ||
|
|
720
|
+
(style.filter && style.filter !== 'none') ||
|
|
721
|
+
(backdropFilter && backdropFilter !== 'none') ||
|
|
722
|
+
(style.willChange && (style.willChange.includes('transform') ||
|
|
723
|
+
style.willChange.includes('perspective') ||
|
|
724
|
+
style.willChange.includes('filter') ||
|
|
725
|
+
style.willChange.includes('backdrop-filter'))) ||
|
|
726
|
+
(style.contain && (style.contain.includes('paint') ||
|
|
727
|
+
style.contain.includes('contain') ||
|
|
728
|
+
style.contain.includes('layout') ||
|
|
729
|
+
style.contain.includes('content') ||
|
|
730
|
+
style.contain.includes('strict')))) {
|
|
731
|
+
return parentEl;
|
|
732
|
+
}
|
|
733
|
+
current = parent;
|
|
734
|
+
}
|
|
735
|
+
return null;
|
|
736
|
+
}
|
|
737
|
+
function getTooltipPosition(host, trigger, position, viewportPadding) {
|
|
738
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
739
|
+
const container = getContainingBlock(host);
|
|
740
|
+
const containerRect = container?.getBoundingClientRect();
|
|
741
|
+
const offsetLeft = containerRect?.left || 0;
|
|
742
|
+
const offsetTop = containerRect?.top || 0;
|
|
743
|
+
let anchor;
|
|
744
|
+
switch (position) {
|
|
745
|
+
case 'bottom':
|
|
746
|
+
anchor = {
|
|
747
|
+
left: triggerRect.left + triggerRect.width / 2 - offsetLeft,
|
|
748
|
+
top: triggerRect.bottom - offsetTop,
|
|
749
|
+
};
|
|
750
|
+
break;
|
|
751
|
+
case 'left':
|
|
752
|
+
anchor = {
|
|
753
|
+
left: triggerRect.left - offsetLeft,
|
|
754
|
+
top: triggerRect.top + triggerRect.height / 2 - offsetTop,
|
|
755
|
+
};
|
|
756
|
+
break;
|
|
757
|
+
case 'right':
|
|
758
|
+
anchor = {
|
|
759
|
+
left: triggerRect.right - offsetLeft,
|
|
760
|
+
top: triggerRect.top + triggerRect.height / 2 - offsetTop,
|
|
761
|
+
};
|
|
762
|
+
break;
|
|
763
|
+
case 'top':
|
|
764
|
+
default:
|
|
765
|
+
anchor = {
|
|
766
|
+
left: triggerRect.left + triggerRect.width / 2 - offsetLeft,
|
|
767
|
+
top: triggerRect.top - offsetTop,
|
|
768
|
+
};
|
|
769
|
+
break;
|
|
770
|
+
}
|
|
771
|
+
if (!Number.isFinite(viewportPadding) || viewportPadding < 0)
|
|
772
|
+
return anchor;
|
|
773
|
+
const width = host.offsetWidth;
|
|
774
|
+
const height = host.offsetHeight;
|
|
775
|
+
const x = position === 'left' ? -width - 8 : position === 'right' ? 8 : -width / 2;
|
|
776
|
+
const y = position === 'top' ? -height - 8 : position === 'bottom' ? 8 : -height / 2;
|
|
777
|
+
const padding = viewportPadding;
|
|
778
|
+
const left = Math.max(padding, Math.min(anchor.left + offsetLeft + x, window.innerWidth - padding - width));
|
|
779
|
+
const top = Math.max(padding, Math.min(anchor.top + offsetTop + y, window.innerHeight - padding - height));
|
|
780
|
+
return { left: left - offsetLeft - x, top: top - offsetTop - y };
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
function addTooltipScrollListeners(trigger, listener) {
|
|
784
|
+
window.addEventListener('scroll', listener, { passive: true });
|
|
785
|
+
window.addEventListener('resize', listener);
|
|
786
|
+
let parent = trigger;
|
|
787
|
+
while (parent) {
|
|
788
|
+
parent.addEventListener('scroll', listener, { passive: true });
|
|
789
|
+
parent = parent.parentElement;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
function removeTooltipScrollListeners(trigger, listener) {
|
|
793
|
+
window.removeEventListener('scroll', listener);
|
|
794
|
+
window.removeEventListener('resize', listener);
|
|
795
|
+
let parent = trigger;
|
|
796
|
+
while (parent) {
|
|
797
|
+
parent.removeEventListener('scroll', listener);
|
|
798
|
+
parent = parent.parentElement;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
const tooltipCss = () => `:host{position:fixed;pointer-events:none;z-index:1000;opacity:0;display:block;width:var(--q-tooltip-width, auto);max-width:var(--q-tooltip-max-width, none);transition:opacity 0.15s ease-out, transform 0.15s ease-out}:host(.is-visible){opacity:1}:host([position="top"]){transform:translate(-50%, -100%) translate(0, 4px)}:host([position="top"].is-visible){transform:translate(-50%, -100%) translate(0, -8px)}:host([position="bottom"]){transform:translate(-50%, 0) translate(0, -4px)}:host([position="bottom"].is-visible){transform:translate(-50%, 0) translate(0, 8px)}:host([position="left"]){transform:translate(-100%, -50%) translate(4px, 0)}:host([position="left"].is-visible){transform:translate(-100%, -50%) translate(-8px, 0)}:host([position="right"]){transform:translate(0, -50%) translate(-4px, 0)}:host([position="right"].is-visible){transform:translate(0, -50%) translate(8px, 0)}.tooltip-bubble{background:var(--q-bg-surface-3, #1e293b);color:var(--q-fg-base);border:1px solid var(--q-border-color, rgba(255, 255, 255, 0.08));padding:var(--q-tooltip-padding, 6px 10px);border-radius:var(--q-radius-sm, 4px);font-family:var(--q-font-family, system-ui, -apple-system, sans-serif);font-size:var(--q-font-size-sm);font-weight:500;max-width:var(--q-tooltip-max-width, none);white-space:var(--q-tooltip-white-space, nowrap);overflow-wrap:var(--q-tooltip-overflow-wrap, normal);box-shadow:0 4px 12px rgba(0, 0, 0, 0.25);line-height:1.2}`;
|
|
803
|
+
|
|
804
|
+
let tooltipId = 0;
|
|
805
|
+
const QTooltip = class {
|
|
806
|
+
constructor(hostRef) {
|
|
807
|
+
registerInstance(this, hostRef);
|
|
808
|
+
}
|
|
809
|
+
get el() { return getElement(this); }
|
|
810
|
+
content;
|
|
811
|
+
position = 'top';
|
|
812
|
+
/** Delay in milliseconds before showing. */
|
|
813
|
+
delay = 200;
|
|
814
|
+
visible = false;
|
|
815
|
+
showTimer;
|
|
816
|
+
// ========================= [2] INTERNAL STATE & REFS =========================
|
|
817
|
+
parentEl = null;
|
|
818
|
+
describedByAdded = false;
|
|
819
|
+
tooltipId = '';
|
|
820
|
+
// ========================= [3] LIFECYCLE & WATCHERS ==========================
|
|
821
|
+
connectedCallback() {
|
|
822
|
+
this.parentEl = this.el.parentElement;
|
|
823
|
+
if (this.parentEl) {
|
|
824
|
+
this.syncAriaDescribedBy();
|
|
825
|
+
this.parentEl.addEventListener('mouseenter', this.show);
|
|
826
|
+
this.parentEl.addEventListener('mouseleave', this.hide);
|
|
827
|
+
this.parentEl.addEventListener('focusin', this.show);
|
|
828
|
+
this.parentEl.addEventListener('focusout', this.hide);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
disconnectedCallback() {
|
|
832
|
+
if (this.parentEl) {
|
|
833
|
+
this.parentEl.removeEventListener('mouseenter', this.show);
|
|
834
|
+
this.parentEl.removeEventListener('mouseleave', this.hide);
|
|
835
|
+
this.parentEl.removeEventListener('focusin', this.show);
|
|
836
|
+
this.parentEl.removeEventListener('focusout', this.hide);
|
|
837
|
+
this.removeAriaDescribedBy();
|
|
838
|
+
}
|
|
839
|
+
this.removeScrollListeners();
|
|
840
|
+
clearTimeout(this.showTimer);
|
|
841
|
+
}
|
|
842
|
+
// =================== [5] EVENT HANDLERS & INTERNAL METHODS ===================
|
|
843
|
+
updatePosition = () => {
|
|
844
|
+
if (!this.parentEl)
|
|
845
|
+
return;
|
|
846
|
+
const padding = parseFloat(getComputedStyle(this.el).getPropertyValue('--q-tooltip-viewport-padding'));
|
|
847
|
+
const { left, top } = getTooltipPosition(this.el, this.parentEl, this.position, padding);
|
|
848
|
+
this.el.style.left = `${left}px`;
|
|
849
|
+
this.el.style.top = `${top}px`;
|
|
850
|
+
};
|
|
851
|
+
show = () => {
|
|
852
|
+
clearTimeout(this.showTimer);
|
|
853
|
+
this.showTimer = setTimeout(() => {
|
|
854
|
+
this.visible = true;
|
|
855
|
+
this.updatePosition();
|
|
856
|
+
this.addScrollListeners();
|
|
857
|
+
}, this.delay);
|
|
858
|
+
};
|
|
859
|
+
hide = () => {
|
|
860
|
+
clearTimeout(this.showTimer);
|
|
861
|
+
if (this.visible) {
|
|
862
|
+
this.visible = false;
|
|
863
|
+
this.removeScrollListeners();
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
handleScroll = () => {
|
|
867
|
+
this.hide();
|
|
868
|
+
};
|
|
869
|
+
syncAriaDescribedBy() {
|
|
870
|
+
if (!this.parentEl)
|
|
871
|
+
return;
|
|
872
|
+
const result = ensureTooltipDescribedBy({
|
|
873
|
+
host: this.el,
|
|
874
|
+
trigger: this.parentEl,
|
|
875
|
+
fallbackId: `q-tooltip-${++tooltipId}`,
|
|
876
|
+
});
|
|
877
|
+
this.tooltipId = result.tooltipId;
|
|
878
|
+
this.describedByAdded = result.added;
|
|
879
|
+
}
|
|
880
|
+
removeAriaDescribedBy() {
|
|
881
|
+
removeTooltipDescribedBy({
|
|
882
|
+
trigger: this.parentEl,
|
|
883
|
+
tooltipId: this.tooltipId,
|
|
884
|
+
added: this.describedByAdded,
|
|
885
|
+
});
|
|
886
|
+
this.describedByAdded = false;
|
|
887
|
+
}
|
|
888
|
+
addScrollListeners() {
|
|
889
|
+
addTooltipScrollListeners(this.parentEl, this.handleScroll);
|
|
890
|
+
}
|
|
891
|
+
removeScrollListeners() {
|
|
892
|
+
removeTooltipScrollListeners(this.parentEl, this.handleScroll);
|
|
893
|
+
}
|
|
894
|
+
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
895
|
+
render() {
|
|
896
|
+
return (h(Host, { key: '66d5e67ca034bd9661929295a1cd21261f91fd90', class: {
|
|
897
|
+
'is-visible': this.visible,
|
|
898
|
+
}, "aria-hidden": this.visible ? 'false' : 'true', role: "tooltip" }, h("div", { key: '013fc07ba7b829734a7c323c06b3fb22deb25d6b', class: "tooltip-bubble" }, this.content || h("slot", { key: '71234028dbdacbac2b5529f75e5e19e473b0bfe3' }))));
|
|
899
|
+
}
|
|
900
|
+
};
|
|
901
|
+
QTooltip.style = tooltipCss();
|
|
902
|
+
|
|
903
|
+
export { QButton as q_button, QScrollable as q_scrollable, QTooltip as q_tooltip };
|