@webquark/core 1.1.0-dev.5 → 1.1.0-dev.7
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/README.md +22 -3
- package/dist/cjs/{action.props-CtwTiyf6.js → action.props-B87W5tRu.js} +1 -1
- package/dist/cjs/{field-CiEtk37y.js → field-CbUc_AWx.js} +2 -2
- package/dist/cjs/{index-BLlc_shC.js → index-D_tObBJa.js} +1 -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 +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q-banner.cjs.entry.js +1 -1
- package/dist/cjs/q-button_2.cjs.entry.js +4 -4
- package/dist/cjs/q-card.cjs.entry.js +3 -3
- package/dist/cjs/q-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- 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 +2 -2
- package/dist/cjs/q-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/q-form.cjs.entry.js +4 -4
- package/dist/cjs/q-grid.cjs.entry.js +2 -2
- package/dist/cjs/q-icon.cjs.entry.js +1 -1
- package/dist/cjs/q-inline.cjs.entry.js +2 -2
- package/dist/cjs/q-input_2.cjs.entry.js +3 -3
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +23 -1
- package/dist/cjs/q-media.cjs.entry.js +1 -1
- package/dist/cjs/q-navbar.cjs.entry.js +223 -5
- package/dist/cjs/q-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q-panel.cjs.entry.js +2 -2
- package/dist/cjs/q-quantity-selector.cjs.entry.js +2 -2
- package/dist/cjs/q-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/q-reel.cjs.entry.js +1 -1
- package/dist/cjs/q-scrollable.cjs.entry.js +1 -1
- package/dist/cjs/q-section.cjs.entry.js +1 -1
- package/dist/cjs/q-sidepanel.cjs.entry.js +2 -2
- package/dist/cjs/q-stack.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +1 -1
- package/dist/cjs/q-step-diagram.cjs.entry.js +1 -1
- package/dist/cjs/q-syntax-box.cjs.entry.js +2 -2
- package/dist/cjs/q-tabs.cjs.entry.js +2 -2
- package/dist/cjs/q-textarea.cjs.entry.js +3 -3
- package/dist/cjs/q-thumbnail.cjs.entry.js +1 -1
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +3 -3
- package/dist/cjs/q-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/tokens-DDfS79n9.js +948 -0
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/components/actions/button/button.css +6 -6
- package/dist/collection/components/content/card/card.css +1 -1
- package/dist/collection/components/data-display/map/internals/marker-controller.js +22 -0
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +26 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.css +5 -5
- package/dist/collection/components/inputs/dropdown/dropdown.css +11 -11
- package/dist/collection/components/inputs/form/form.css +5 -5
- package/dist/collection/components/inputs/form/form.js +1 -1
- package/dist/collection/components/inputs/input/input.css +10 -10
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +6 -6
- package/dist/collection/components/inputs/radio-group/radio-group.css +10 -10
- package/dist/collection/components/inputs/textarea/textarea.css +10 -10
- package/dist/collection/components/inputs/toggle/toggle.css +10 -10
- package/dist/collection/components/layout/navbar/navbar.css +129 -10
- package/dist/collection/components/layout/navbar/navbar.js +280 -4
- package/dist/collection/components/layout/navbar/test/navbar.cmp.test.js +317 -1
- package/dist/collection/components/layout/sidepanel/sidepanel.css +3 -3
- package/dist/collection/components/layout/tabs/tabs.css +9 -9
- package/dist/collection/components/layout/toolbar/toolbar.css +6 -6
- package/dist/collection/components/overlays/dialog/dialog.css +1 -1
- package/dist/collection/components/overlays/tooltip/tooltip.css +1 -1
- package/dist/collection/components/shared/field.js +1 -1
- package/dist/collection/native-content.css +24 -0
- package/dist/collection/playground/components/playground-header/playground-header.js +1 -1
- package/dist/collection/playground/playground.bundled.js +152 -1
- package/dist/collection/theme/test/presets.cmp.test.js +129 -0
- package/dist/collection/theme/tokens.js +127 -4
- package/dist/components/index.js +1 -1
- package/dist/components/{p-Cx1vCuMp.js → p-2_cpBb8_.js} +1 -1
- package/dist/components/{p-BxFGkrUe.js → p-BeFSyZjp.js} +1 -1
- package/dist/components/p-BfZVatS6.js +1 -0
- package/dist/components/p-COMoSatC.js +1 -0
- package/dist/components/p-Cn_ChUpc.js +1 -0
- package/dist/components/{p-NEolaUak.js → p-CtUn83Rs.js} +1 -1
- package/dist/components/{p-CK7avZdv.js → p-CuJIyOwp.js} +1 -1
- package/dist/components/p-CyPFM3XV.js +1 -0
- package/dist/components/p-DwnH6_NQ.js +1 -0
- package/dist/components/{p-D0Q2vrt5.js → p-_X1v1o3K.js} +1 -1
- 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-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-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-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-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 +2 -2
- 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-GP1ameE3.js → action.props-BypnAgOy.js} +1 -1
- package/dist/esm/{field-DkpyvZiX.js → field-dFy4PXKT.js} +2 -2
- package/dist/esm/{index-DbGG9Q40.js → index-tSny_c7b.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-accordion.entry.js +1 -1
- package/dist/esm/q-alert.entry.js +1 -1
- package/dist/esm/q-avatar.entry.js +1 -1
- package/dist/esm/q-banner.entry.js +1 -1
- package/dist/esm/q-button_2.entry.js +4 -4
- package/dist/esm/q-card.entry.js +3 -3
- package/dist/esm/q-carousel.entry.js +1 -1
- package/dist/esm/q-chip.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/q-dropdown.entry.js +3 -3
- package/dist/esm/q-form.entry.js +4 -4
- package/dist/esm/q-grid.entry.js +2 -2
- package/dist/esm/q-icon.entry.js +1 -1
- package/dist/esm/q-inline.entry.js +2 -2
- package/dist/esm/q-input_2.entry.js +3 -3
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +23 -1
- package/dist/esm/q-media.entry.js +1 -1
- package/dist/esm/q-navbar.entry.js +223 -5
- package/dist/esm/q-pagination.entry.js +1 -1
- package/dist/esm/q-panel.entry.js +2 -2
- package/dist/esm/q-quantity-selector.entry.js +2 -2
- package/dist/esm/q-radio-group.entry.js +3 -3
- package/dist/esm/q-reel.entry.js +1 -1
- package/dist/esm/q-scrollable.entry.js +1 -1
- package/dist/esm/q-section.entry.js +1 -1
- package/dist/esm/q-sidepanel.entry.js +2 -2
- package/dist/esm/q-stack.entry.js +2 -2
- package/dist/esm/q-step-diagram-item.entry.js +1 -1
- package/dist/esm/q-step-diagram.entry.js +1 -1
- package/dist/esm/q-syntax-box.entry.js +2 -2
- package/dist/esm/q-tabs.entry.js +2 -2
- package/dist/esm/q-textarea.entry.js +3 -3
- package/dist/esm/q-thumbnail.entry.js +1 -1
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +3 -3
- package/dist/esm/q-toolbar.entry.js +3 -3
- package/dist/esm/tokens-CyPFM3XV.js +944 -0
- package/dist/esm/webquark.js +3 -3
- package/dist/{webquark/p-eb71e335.entry.js → playground/build/p-04799ed0.entry.js} +1 -1
- package/dist/playground/build/p-0610d5b2.entry.js +1 -0
- package/dist/playground/build/p-151a555e.entry.js +1 -0
- package/dist/playground/build/{p-9418caa0.entry.js → p-160cb4e4.entry.js} +1 -1
- package/dist/playground/build/p-17011e71.entry.js +1 -0
- package/dist/playground/build/{p-ed327679.entry.js → p-1cf51c80.entry.js} +1 -1
- package/dist/playground/build/{p-8bdababd.entry.js → p-25c3b776.entry.js} +1 -1
- package/dist/playground/build/{p-f911c90f.entry.js → p-362c5608.entry.js} +1 -1
- package/dist/playground/build/p-3d674223.entry.js +1 -0
- package/dist/playground/build/{p-8115ec23.entry.js → p-4fff116c.entry.js} +1 -1
- package/dist/playground/build/p-5453eac7.entry.js +1 -0
- package/dist/playground/build/{p-c4fd89b8.entry.js → p-5eeb922e.entry.js} +1 -1
- package/dist/{webquark/p-5f6860f2.entry.js → playground/build/p-675d0d03.entry.js} +2 -2
- package/dist/playground/build/{p-c1f3dca6.entry.js → p-70c4f92f.entry.js} +1 -1
- package/dist/playground/build/p-72dc1231.entry.js +1 -0
- package/dist/playground/build/{p-408bf48a.entry.js → p-736b1c8c.entry.js} +1 -1
- package/dist/playground/build/{p-737ca99e.entry.js → p-781d3459.entry.js} +1 -1
- package/dist/playground/build/p-81f64d6f.entry.js +1 -0
- package/dist/playground/build/{p-742e39f1.entry.js → p-82810ead.entry.js} +1 -1
- package/dist/playground/build/{p-b465aebd.entry.js → p-9227780b.entry.js} +1 -1
- package/dist/playground/build/{p-ecbc0fee.entry.js → p-964d27e0.entry.js} +1 -1
- package/dist/playground/build/p-96922229.entry.js +1 -0
- package/dist/playground/build/{p-0d98e500.entry.js → p-9b4271ea.entry.js} +1 -1
- package/dist/playground/build/p-BLvl8YLq.js +1 -0
- package/dist/playground/build/p-CGcC-mvi.js +1 -0
- package/dist/playground/build/p-CyPFM3XV.js +1 -0
- package/dist/playground/build/{p-de8813be.entry.js → p-ae4e5ec4.entry.js} +1 -1
- package/dist/{webquark/p-d4a915e5.entry.js → playground/build/p-b08d0ed8.entry.js} +1 -1
- package/dist/{webquark/p-abf54361.entry.js → playground/build/p-b4dfadea.entry.js} +1 -1
- package/dist/playground/build/p-b7ac65c6.entry.js +1 -0
- package/dist/playground/build/{p-6b63922b.entry.js → p-b9e83fa3.entry.js} +1 -1
- package/dist/playground/build/p-bba3c7b4.entry.js +1 -0
- package/dist/{webquark/p-d7d436c5.entry.js → playground/build/p-bf47c46a.entry.js} +2 -2
- package/dist/playground/build/{p-0aea8464.entry.js → p-c448b4ce.entry.js} +1 -1
- package/dist/{webquark/p-989bdc1a.entry.js → playground/build/p-ca240b8b.entry.js} +1 -1
- package/dist/playground/build/p-cb5ebd01.entry.js +1 -0
- package/dist/playground/build/{p-97dae970.entry.js → p-d0c55860.entry.js} +1 -1
- package/dist/playground/build/{p-96ef2b54.entry.js → p-e1c8a9aa.entry.js} +1 -1
- package/dist/playground/build/{p-15502232.entry.js → p-e6603d17.entry.js} +1 -1
- package/dist/playground/build/p-e762a4b7.entry.js +1 -0
- package/dist/playground/build/{p-6b619655.entry.js → p-fb76473e.entry.js} +1 -1
- package/dist/{webquark/p-ff1e2363.entry.js → playground/build/p-fed7219c.entry.js} +1 -1
- package/dist/playground/build/p-tSny_c7b.js +3 -0
- package/dist/playground/build/webquark.css +1 -1
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/playground/native-content.css +24 -0
- package/dist/playground/playground/specs/q-navbar.sandbox.json +8 -0
- package/dist/playground/playground.js +152 -1
- package/dist/playground/presets.html +47 -0
- package/dist/types/components/data-display/map/internals/marker-controller.d.ts +2 -0
- package/dist/types/components/layout/navbar/navbar.d.ts +27 -1
- package/dist/types/components/layout/navbar/navbar.types.d.ts +2 -0
- package/dist/types/components.d.ts +24 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/theme/test/presets.cmp.test.d.ts +7 -0
- package/dist/types/theme/tokens.d.ts +78 -0
- package/dist/webquark/native-content.css +24 -0
- package/dist/{playground/build/p-eb71e335.entry.js → webquark/p-04799ed0.entry.js} +1 -1
- package/dist/webquark/p-0610d5b2.entry.js +1 -0
- package/dist/webquark/p-151a555e.entry.js +1 -0
- package/dist/webquark/{p-9418caa0.entry.js → p-160cb4e4.entry.js} +1 -1
- package/dist/webquark/p-17011e71.entry.js +1 -0
- package/dist/webquark/{p-ed327679.entry.js → p-1cf51c80.entry.js} +1 -1
- package/dist/webquark/{p-8bdababd.entry.js → p-25c3b776.entry.js} +1 -1
- package/dist/webquark/{p-f911c90f.entry.js → p-362c5608.entry.js} +1 -1
- package/dist/webquark/p-3d674223.entry.js +1 -0
- package/dist/webquark/{p-8115ec23.entry.js → p-4fff116c.entry.js} +1 -1
- package/dist/webquark/p-5453eac7.entry.js +1 -0
- package/dist/webquark/{p-c4fd89b8.entry.js → p-5eeb922e.entry.js} +1 -1
- package/dist/{playground/build/p-5f6860f2.entry.js → webquark/p-675d0d03.entry.js} +2 -2
- package/dist/webquark/{p-c1f3dca6.entry.js → p-70c4f92f.entry.js} +1 -1
- package/dist/webquark/p-72dc1231.entry.js +1 -0
- package/dist/webquark/{p-408bf48a.entry.js → p-736b1c8c.entry.js} +1 -1
- package/dist/webquark/{p-737ca99e.entry.js → p-781d3459.entry.js} +1 -1
- package/dist/webquark/p-81f64d6f.entry.js +1 -0
- package/dist/webquark/{p-742e39f1.entry.js → p-82810ead.entry.js} +1 -1
- package/dist/webquark/{p-b465aebd.entry.js → p-9227780b.entry.js} +1 -1
- package/dist/webquark/{p-ecbc0fee.entry.js → p-964d27e0.entry.js} +1 -1
- package/dist/webquark/p-96922229.entry.js +1 -0
- package/dist/webquark/{p-0d98e500.entry.js → p-9b4271ea.entry.js} +1 -1
- package/dist/webquark/p-BLvl8YLq.js +1 -0
- package/dist/webquark/p-CGcC-mvi.js +1 -0
- package/dist/webquark/p-CyPFM3XV.js +1 -0
- package/dist/webquark/{p-de8813be.entry.js → p-ae4e5ec4.entry.js} +1 -1
- package/dist/{playground/build/p-d4a915e5.entry.js → webquark/p-b08d0ed8.entry.js} +1 -1
- package/dist/{playground/build/p-abf54361.entry.js → webquark/p-b4dfadea.entry.js} +1 -1
- package/dist/webquark/p-b7ac65c6.entry.js +1 -0
- package/dist/webquark/{p-6b63922b.entry.js → p-b9e83fa3.entry.js} +1 -1
- package/dist/webquark/p-bba3c7b4.entry.js +1 -0
- package/dist/{playground/build/p-d7d436c5.entry.js → webquark/p-bf47c46a.entry.js} +2 -2
- package/dist/webquark/{p-0aea8464.entry.js → p-c448b4ce.entry.js} +1 -1
- package/dist/{playground/build/p-989bdc1a.entry.js → webquark/p-ca240b8b.entry.js} +1 -1
- package/dist/webquark/p-cb5ebd01.entry.js +1 -0
- package/dist/webquark/{p-97dae970.entry.js → p-d0c55860.entry.js} +1 -1
- package/dist/webquark/{p-96ef2b54.entry.js → p-e1c8a9aa.entry.js} +1 -1
- package/dist/webquark/{p-15502232.entry.js → p-e6603d17.entry.js} +1 -1
- package/dist/webquark/p-e762a4b7.entry.js +1 -0
- package/dist/webquark/{p-6b619655.entry.js → p-fb76473e.entry.js} +1 -1
- package/dist/{playground/build/p-ff1e2363.entry.js → webquark/p-fed7219c.entry.js} +1 -1
- package/dist/webquark/p-tSny_c7b.js +3 -0
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +2 -1
- package/scripts/wq-switch/README.md +47 -11
- package/scripts/wq-switch/dist/index.js +56 -20
- package/scripts/wq-switch/dist/setup.js +32 -16
- package/dist/cjs/tokens-DGECOqpA.js +0 -42
- package/dist/components/p-0PieXMX9.js +0 -1
- package/dist/components/p-BOYjkCNa.js +0 -1
- package/dist/components/p-Bw4TVbfm.js +0 -1
- package/dist/components/p-GU98U1DJ.js +0 -1
- package/dist/components/p-f95uguY1.js +0 -1
- package/dist/esm/tokens-f95uguY1.js +0 -38
- package/dist/playground/build/p-139fec38.entry.js +0 -1
- package/dist/playground/build/p-17340abf.entry.js +0 -1
- package/dist/playground/build/p-303dcac8.entry.js +0 -1
- package/dist/playground/build/p-47253466.entry.js +0 -1
- package/dist/playground/build/p-71e3d582.entry.js +0 -1
- package/dist/playground/build/p-8ad43d7f.entry.js +0 -1
- package/dist/playground/build/p-BqvCR2U8.js +0 -1
- package/dist/playground/build/p-DbGG9Q40.js +0 -3
- package/dist/playground/build/p-JgeOdXyP.js +0 -1
- package/dist/playground/build/p-a4b36120.entry.js +0 -1
- package/dist/playground/build/p-aed4b219.entry.js +0 -1
- package/dist/playground/build/p-b3a07d94.entry.js +0 -1
- package/dist/playground/build/p-c4899c2b.entry.js +0 -1
- package/dist/playground/build/p-cf8f7f2a.entry.js +0 -1
- package/dist/playground/build/p-f95uguY1.js +0 -1
- package/dist/playground/build/p-fdd85ce4.entry.js +0 -1
- package/dist/webquark/p-139fec38.entry.js +0 -1
- package/dist/webquark/p-17340abf.entry.js +0 -1
- package/dist/webquark/p-303dcac8.entry.js +0 -1
- package/dist/webquark/p-47253466.entry.js +0 -1
- package/dist/webquark/p-71e3d582.entry.js +0 -1
- package/dist/webquark/p-8ad43d7f.entry.js +0 -1
- package/dist/webquark/p-BqvCR2U8.js +0 -1
- package/dist/webquark/p-DbGG9Q40.js +0 -3
- package/dist/webquark/p-JgeOdXyP.js +0 -1
- package/dist/webquark/p-a4b36120.entry.js +0 -1
- package/dist/webquark/p-aed4b219.entry.js +0 -1
- package/dist/webquark/p-b3a07d94.entry.js +0 -1
- package/dist/webquark/p-c4899c2b.entry.js +0 -1
- package/dist/webquark/p-cf8f7f2a.entry.js +0 -1
- package/dist/webquark/p-f95uguY1.js +0 -1
- package/dist/webquark/p-fdd85ce4.entry.js +0 -1
|
@@ -1,9 +1,325 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { page } from "vitest/browser";
|
|
2
3
|
import "../navbar";
|
|
3
4
|
import navbarCss from "../navbar.css?inline";
|
|
5
|
+
// Exercise focus through a real shadow root without depending on build output.
|
|
6
|
+
// No delegated focus: the navbar must find and focus the inner control itself.
|
|
7
|
+
if (!customElements.get('navbar-test-control')) {
|
|
8
|
+
customElements.define('navbar-test-control', class extends HTMLElement {
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
if (this.shadowRoot)
|
|
11
|
+
return;
|
|
12
|
+
const button = document.createElement('button');
|
|
13
|
+
button.disabled = this.hasAttribute('disabled');
|
|
14
|
+
button.append(document.createElement('slot'));
|
|
15
|
+
this.attachShadow({ mode: 'open' }).append(button);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
4
19
|
async function nextFrame() {
|
|
5
20
|
await new Promise(resolve => requestAnimationFrame(() => resolve()));
|
|
6
21
|
}
|
|
22
|
+
async function settle() {
|
|
23
|
+
for (let i = 0; i < 6; i++)
|
|
24
|
+
await nextFrame();
|
|
25
|
+
}
|
|
26
|
+
async function aligned(width = 900, html = '<span slot="brand" style="display:block;width:180px">Brand</span><button slot="actions" style="width:70px">Account</button>') {
|
|
27
|
+
const el = document.createElement('q-navbar');
|
|
28
|
+
el.navAlign = 'center';
|
|
29
|
+
el.navCenterWithin = 'container';
|
|
30
|
+
el.items = ['Home', 'Products', 'Contact'];
|
|
31
|
+
el.style.width = `${width}px`;
|
|
32
|
+
el.innerHTML = html;
|
|
33
|
+
document.body.append(el);
|
|
34
|
+
await nextFrame();
|
|
35
|
+
const sheet = new CSSStyleSheet();
|
|
36
|
+
await sheet.replace(navbarCss);
|
|
37
|
+
el.shadowRoot.adoptedStyleSheets = [...el.shadowRoot.adoptedStyleSheets, sheet];
|
|
38
|
+
await settle();
|
|
39
|
+
return el;
|
|
40
|
+
}
|
|
41
|
+
function part(el, selector) {
|
|
42
|
+
return el.shadowRoot.querySelector(selector);
|
|
43
|
+
}
|
|
44
|
+
function collapsed(el) { return part(el, '.navbar').classList.contains('is-collapsed'); }
|
|
45
|
+
function center(el) { const r = el.getBoundingClientRect(); return (r.left + r.right) / 2; }
|
|
46
|
+
describe('q-navbar alignment and collision geometry', () => {
|
|
47
|
+
beforeEach(async () => { await page.viewport(1280, 800); });
|
|
48
|
+
afterEach(() => { document.body.replaceChildren(); });
|
|
49
|
+
it('centres the actual group with unequal, missing and changing sides', async () => {
|
|
50
|
+
const el = await aligned();
|
|
51
|
+
expect(collapsed(el)).toBe(false);
|
|
52
|
+
expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
|
|
53
|
+
el.querySelector('[slot="brand"]').remove();
|
|
54
|
+
await settle();
|
|
55
|
+
expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
|
|
56
|
+
el.querySelector('[slot="actions"]').style.width = '240px';
|
|
57
|
+
await settle();
|
|
58
|
+
expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
|
|
59
|
+
el.navCenterWithin = 'available';
|
|
60
|
+
await settle();
|
|
61
|
+
const brand = part(el, '.brand-link').getBoundingClientRect();
|
|
62
|
+
const actions = part(el, '.desktop-actions').getBoundingClientRect();
|
|
63
|
+
const items = el.shadowRoot.querySelectorAll('.nav-item-shell');
|
|
64
|
+
expect((items[0].getBoundingClientRect().left + items[2].getBoundingClientRect().right) / 2).toBeCloseTo((brand.right + actions.left) / 2, 0);
|
|
65
|
+
});
|
|
66
|
+
it('applies optical displacement only on desktop and reverses it in RTL', async () => {
|
|
67
|
+
const el = await aligned();
|
|
68
|
+
el.style.setProperty('--q-navbar-nav-offset-inline', '13px');
|
|
69
|
+
await settle();
|
|
70
|
+
expect(center(part(el, '.desktop-nav')) - center(el)).toBeCloseTo(13, 0);
|
|
71
|
+
el.dir = 'rtl';
|
|
72
|
+
await settle();
|
|
73
|
+
expect(center(part(el, '.desktop-nav')) - center(el)).toBeCloseTo(-13, 0);
|
|
74
|
+
el.style.width = '350px';
|
|
75
|
+
await settle();
|
|
76
|
+
expect(collapsed(el)).toBe(true);
|
|
77
|
+
part(el, '.menu-button').click();
|
|
78
|
+
await settle();
|
|
79
|
+
expect(getComputedStyle(part(el, '.desktop-nav')).insetInlineStart).toBe('auto');
|
|
80
|
+
});
|
|
81
|
+
it('uses stable intrinsic widths and an 8px recovery margin without oscillation', async () => {
|
|
82
|
+
const el = await aligned(900, '<span slot="brand" style="display:block;width:100px">Brand</span>');
|
|
83
|
+
const navWidth = part(el, '.desktop-nav').getBoundingClientRect().width;
|
|
84
|
+
const threshold = 48 + 40 + 200 + navWidth;
|
|
85
|
+
el.style.width = `${threshold - 1}px`;
|
|
86
|
+
await settle();
|
|
87
|
+
expect(collapsed(el)).toBe(true);
|
|
88
|
+
el.style.width = `${threshold + 7}px`;
|
|
89
|
+
await settle();
|
|
90
|
+
expect(collapsed(el)).toBe(true);
|
|
91
|
+
for (let i = 0; i < 12; i++) {
|
|
92
|
+
await nextFrame();
|
|
93
|
+
expect(collapsed(el)).toBe(true);
|
|
94
|
+
}
|
|
95
|
+
el.style.width = `${threshold + 9}px`;
|
|
96
|
+
await settle();
|
|
97
|
+
expect(collapsed(el)).toBe(false);
|
|
98
|
+
});
|
|
99
|
+
it('retains custom navigation, actions and add-ons without duplicating nodes', async () => {
|
|
100
|
+
const el = await aligned(350, '<span slot="brand">Brand</span><button slot="nav" style="width:220px">Custom</button><button slot="actions">Action</button><span slot="badge" style="display:block;width:260px">Badge</span>');
|
|
101
|
+
el.items = [{ label: 'Home', value: 'home', addonSlot: 'badge' }];
|
|
102
|
+
await settle();
|
|
103
|
+
expect(collapsed(el)).toBe(true);
|
|
104
|
+
part(el, '.menu-button').click();
|
|
105
|
+
await settle();
|
|
106
|
+
expect(el.querySelector('[slot="nav"]').checkVisibility()).toBe(true);
|
|
107
|
+
expect(el.querySelector('[slot="actions"]').checkVisibility()).toBe(true);
|
|
108
|
+
expect(el.querySelector('[slot="badge"]').checkVisibility()).toBe(true);
|
|
109
|
+
expect(el.querySelectorAll('[slot="nav"]')).toHaveLength(1);
|
|
110
|
+
el.insertAdjacentHTML('beforeend', '<button slot="mobile-nav">Mobile</button><button slot="mobile-actions">Mobile action</button>');
|
|
111
|
+
await settle();
|
|
112
|
+
expect(el.querySelector('[slot="nav"]').checkVisibility()).toBe(false);
|
|
113
|
+
expect(el.querySelector('[slot="actions"]').checkVisibility()).toBe(false);
|
|
114
|
+
expect(el.querySelector('[slot="mobile-nav"]').checkVisibility()).toBe(true);
|
|
115
|
+
});
|
|
116
|
+
it('protects focus and emits only real open-state changes', async () => {
|
|
117
|
+
const el = await aligned();
|
|
118
|
+
const events = [];
|
|
119
|
+
el.addEventListener('qMenuToggle', e => events.push(e.detail));
|
|
120
|
+
const item = part(el, '.nav-item');
|
|
121
|
+
item.focus();
|
|
122
|
+
el.style.width = '300px';
|
|
123
|
+
await settle();
|
|
124
|
+
expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
|
|
125
|
+
expect(events).toEqual([]);
|
|
126
|
+
part(el, '.menu-button').click();
|
|
127
|
+
await settle();
|
|
128
|
+
item.focus();
|
|
129
|
+
document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
|
130
|
+
await settle();
|
|
131
|
+
expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
|
|
132
|
+
part(el, '.menu-button').click();
|
|
133
|
+
await settle();
|
|
134
|
+
el.style.width = '900px';
|
|
135
|
+
await settle();
|
|
136
|
+
expect(el.shadowRoot.activeElement).toBe(item);
|
|
137
|
+
expect(events).toEqual([true, false, true, false]);
|
|
138
|
+
});
|
|
139
|
+
it('wraps inline mode onto its own row and puts bottom menus above the brand', async () => {
|
|
140
|
+
const el = await aligned(350);
|
|
141
|
+
el.mobileMode = 'inline';
|
|
142
|
+
await settle();
|
|
143
|
+
expect(part(el, '.desktop-nav').getBoundingClientRect().top).toBeGreaterThanOrEqual(part(el, '.brand-link').getBoundingClientRect().bottom);
|
|
144
|
+
expect(part(el, '.menu-button').checkVisibility()).toBe(false);
|
|
145
|
+
el.mobileMode = 'menu';
|
|
146
|
+
el.edge = 'bottom';
|
|
147
|
+
await settle();
|
|
148
|
+
part(el, '.menu-button').click();
|
|
149
|
+
await settle();
|
|
150
|
+
expect(part(el, '.desktop-nav').getBoundingClientRect().bottom).toBeLessThanOrEqual(part(el, '.brand-link').getBoundingClientRect().top);
|
|
151
|
+
});
|
|
152
|
+
it('preserves the 720px breakpoint and default/vertical layouts', async () => {
|
|
153
|
+
const el = await aligned(900);
|
|
154
|
+
await page.viewport(720, 800);
|
|
155
|
+
await settle();
|
|
156
|
+
expect(collapsed(el)).toBe(false);
|
|
157
|
+
expect(part(el, '.menu-button').checkVisibility()).toBe(true);
|
|
158
|
+
await page.viewport(721, 800);
|
|
159
|
+
await settle();
|
|
160
|
+
expect(part(el, '.menu-button').checkVisibility()).toBe(false);
|
|
161
|
+
el.navAlign = 'start';
|
|
162
|
+
el.style.width = '200px';
|
|
163
|
+
await settle();
|
|
164
|
+
expect(collapsed(el)).toBe(false);
|
|
165
|
+
el.navAlign = 'center';
|
|
166
|
+
el.edge = 'left';
|
|
167
|
+
await settle();
|
|
168
|
+
expect(collapsed(el)).toBe(false);
|
|
169
|
+
expect(getComputedStyle(part(el, '.navbar-row')).flexDirection).toBe('column');
|
|
170
|
+
});
|
|
171
|
+
it('remeasures late images, changing item text and completed fonts', async () => {
|
|
172
|
+
const el = await aligned(700, '<img slot="brand" alt="Brand"><button slot="actions">Action</button>');
|
|
173
|
+
expect(collapsed(el)).toBe(false);
|
|
174
|
+
const img = el.querySelector('img');
|
|
175
|
+
img.src = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="300" height="30"/>');
|
|
176
|
+
await img.decode();
|
|
177
|
+
await settle();
|
|
178
|
+
expect(collapsed(el)).toBe(true);
|
|
179
|
+
img.remove();
|
|
180
|
+
await settle();
|
|
181
|
+
expect(collapsed(el)).toBe(false);
|
|
182
|
+
el.items = ['A very long navigation entry repeated to consume the row', 'Another very long navigation entry'];
|
|
183
|
+
await settle();
|
|
184
|
+
expect(collapsed(el)).toBe(true);
|
|
185
|
+
el.items = ['Home'];
|
|
186
|
+
const face = new FontFace('NavbarTest', 'local("Arial"), local("Liberation Sans"), local("DejaVu Sans")');
|
|
187
|
+
el.style.fontFamily = 'NavbarTest, monospace';
|
|
188
|
+
const fonts = document.fonts;
|
|
189
|
+
fonts.add(face);
|
|
190
|
+
await face.load();
|
|
191
|
+
await document.fonts.ready;
|
|
192
|
+
await settle();
|
|
193
|
+
expect(collapsed(el)).toBe(false);
|
|
194
|
+
fonts.delete(face);
|
|
195
|
+
});
|
|
196
|
+
it('keeps sticky positioning during scrolling', async () => {
|
|
197
|
+
const el = await aligned();
|
|
198
|
+
const scroller = document.createElement('div');
|
|
199
|
+
scroller.style.cssText = 'height:180px;overflow:auto';
|
|
200
|
+
el.sticky = true;
|
|
201
|
+
document.body.append(scroller);
|
|
202
|
+
scroller.append(el);
|
|
203
|
+
const spacer = document.createElement('div');
|
|
204
|
+
spacer.style.height = '1000px';
|
|
205
|
+
scroller.append(spacer);
|
|
206
|
+
await settle();
|
|
207
|
+
const top = el.getBoundingClientRect().top;
|
|
208
|
+
scroller.scrollTop = 160;
|
|
209
|
+
await settle();
|
|
210
|
+
expect(el.getBoundingClientRect().top).toBeCloseTo(top, 0);
|
|
211
|
+
expect(collapsed(el)).toBe(false);
|
|
212
|
+
});
|
|
213
|
+
it('includes visible add-on overhang in the collision requirement', async () => {
|
|
214
|
+
const el = await aligned(600, '<span slot="brand" style="display:block;width:100px">Brand</span><span slot="badge" style="display:block;width:400px">Badge</span>');
|
|
215
|
+
el.items = [{ label: 'Home', value: 'home' }];
|
|
216
|
+
await settle();
|
|
217
|
+
expect(collapsed(el)).toBe(false);
|
|
218
|
+
el.items = [{ label: 'Home', value: 'home', addonSlot: 'badge', addonPlacement: 'top-start' }];
|
|
219
|
+
await settle();
|
|
220
|
+
expect(collapsed(el)).toBe(true);
|
|
221
|
+
el.querySelector('[slot="badge"]').style.display = 'none';
|
|
222
|
+
await settle();
|
|
223
|
+
expect(collapsed(el)).toBe(false);
|
|
224
|
+
});
|
|
225
|
+
it('centres in the padded box and responds to a resizing parent', async () => {
|
|
226
|
+
const el = await aligned();
|
|
227
|
+
el.style.padding = '0';
|
|
228
|
+
el.style.setProperty('--q-navbar-padding', '0 70px 0 10px');
|
|
229
|
+
await settle();
|
|
230
|
+
expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el) - 30, 0);
|
|
231
|
+
const parent = document.createElement('div');
|
|
232
|
+
parent.style.width = '900px';
|
|
233
|
+
document.body.append(parent);
|
|
234
|
+
parent.append(el);
|
|
235
|
+
el.style.width = '100%';
|
|
236
|
+
await settle();
|
|
237
|
+
parent.style.width = '350px';
|
|
238
|
+
await settle();
|
|
239
|
+
expect(collapsed(el)).toBe(true);
|
|
240
|
+
parent.style.width = '900px';
|
|
241
|
+
await settle();
|
|
242
|
+
expect(collapsed(el)).toBe(false);
|
|
243
|
+
const brand = part(el, '.brand-link').getBoundingClientRect();
|
|
244
|
+
const nav = part(el, '.desktop-nav').getBoundingClientRect();
|
|
245
|
+
const actions = part(el, '.desktop-actions').getBoundingClientRect();
|
|
246
|
+
expect(brand.right).toBeLessThan(nav.left);
|
|
247
|
+
expect(nav.right).toBeLessThan(actions.left);
|
|
248
|
+
});
|
|
249
|
+
it('restores custom-only focus from an explicit mobile slot', async () => {
|
|
250
|
+
const el = await aligned(300, '<span slot="brand" style="display:block;width:100px">Brand</span><button slot="nav" style="width:200px">Desktop</button><button slot="mobile-nav">Mobile</button>');
|
|
251
|
+
el.items = [];
|
|
252
|
+
await settle();
|
|
253
|
+
part(el, '.menu-button').click();
|
|
254
|
+
await settle();
|
|
255
|
+
el.querySelector('[slot="mobile-nav"]').focus();
|
|
256
|
+
el.style.width = '900px';
|
|
257
|
+
await settle();
|
|
258
|
+
expect(document.activeElement).toBe(el.querySelector('[slot="nav"]'));
|
|
259
|
+
});
|
|
260
|
+
it('keeps focus visible when switching a collapsed menu to inline mode', async () => {
|
|
261
|
+
const el = await aligned(300);
|
|
262
|
+
part(el, '.menu-button').focus();
|
|
263
|
+
el.mobileMode = 'inline';
|
|
264
|
+
await settle();
|
|
265
|
+
expect(el.shadowRoot.activeElement).toBe(part(el, '.nav-item'));
|
|
266
|
+
el.mobileMode = 'menu';
|
|
267
|
+
await settle();
|
|
268
|
+
expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
|
|
269
|
+
});
|
|
270
|
+
it('recovers focus inside custom controls, skipping hidden, disabled and inert choices', async () => {
|
|
271
|
+
const el = await aligned(300, `<span slot="brand" style="display:block;width:100px">Brand</span>
|
|
272
|
+
<div slot="nav" style="width:250px">
|
|
273
|
+
<button style="display:none">Hidden</button>
|
|
274
|
+
<button style="visibility:hidden">Invisible</button>
|
|
275
|
+
<navbar-test-control disabled>Disabled custom control</navbar-test-control>
|
|
276
|
+
<div inert><button>Inert control</button></div>
|
|
277
|
+
<navbar-test-control id="enabled-navigation">Desktop control</navbar-test-control>
|
|
278
|
+
</div>
|
|
279
|
+
<button slot="mobile-nav">Mobile control</button>`);
|
|
280
|
+
el.items = [];
|
|
281
|
+
await settle();
|
|
282
|
+
expect(collapsed(el)).toBe(true);
|
|
283
|
+
part(el, '.menu-button').click();
|
|
284
|
+
await settle();
|
|
285
|
+
el.querySelector('[slot="mobile-nav"]').focus();
|
|
286
|
+
el.style.width = '900px';
|
|
287
|
+
await settle();
|
|
288
|
+
const control = el.querySelector('#enabled-navigation');
|
|
289
|
+
expect(document.activeElement).toBe(control);
|
|
290
|
+
expect(control.shadowRoot.activeElement).toBe(control.shadowRoot.querySelector('button'));
|
|
291
|
+
});
|
|
292
|
+
it('recovers mobile-slot focus and preserves custom control focus across mode changes', async () => {
|
|
293
|
+
const el = await aligned(300, '<span slot="brand" style="width:100px">Brand</span><navbar-test-control slot="nav" style="width:250px">Desktop</navbar-test-control><button slot="mobile-nav">Mobile</button>');
|
|
294
|
+
el.items = [];
|
|
295
|
+
await settle();
|
|
296
|
+
part(el, '.menu-button').click();
|
|
297
|
+
await settle();
|
|
298
|
+
el.querySelector('[slot="mobile-nav"]').focus();
|
|
299
|
+
el.mobileMode = 'inline';
|
|
300
|
+
await settle();
|
|
301
|
+
const control = el.querySelector('navbar-test-control');
|
|
302
|
+
const button = control.shadowRoot.querySelector('button');
|
|
303
|
+
expect(control.shadowRoot.activeElement).toBe(button);
|
|
304
|
+
el.mobileMode = 'menu';
|
|
305
|
+
await settle();
|
|
306
|
+
expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
|
|
307
|
+
el.mobileMode = 'inline';
|
|
308
|
+
await settle();
|
|
309
|
+
expect(control.shadowRoot.activeElement).toBe(button);
|
|
310
|
+
});
|
|
311
|
+
it('preserves brand focus when changing from inline to menu', async () => {
|
|
312
|
+
const el = await aligned(300);
|
|
313
|
+
el.mobileMode = 'inline';
|
|
314
|
+
await settle();
|
|
315
|
+
const brand = el.querySelector('[slot="brand"]');
|
|
316
|
+
brand.tabIndex = 0;
|
|
317
|
+
brand.focus();
|
|
318
|
+
el.mobileMode = 'menu';
|
|
319
|
+
await settle();
|
|
320
|
+
expect(document.activeElement).toBe(brand);
|
|
321
|
+
});
|
|
322
|
+
});
|
|
7
323
|
describe('q-navbar item sizing in Chromium', () => {
|
|
8
324
|
afterEach(() => {
|
|
9
325
|
document.body.replaceChildren();
|
|
@@ -342,7 +342,7 @@ slot[name='footer'] {
|
|
|
342
342
|
/* padding-left is set inline per depth level */
|
|
343
343
|
cursor: pointer;
|
|
344
344
|
border-radius: 0;
|
|
345
|
-
font-size: 0.875rem;
|
|
345
|
+
font-size: var(--q-sidepanel-nav-font, 0.875rem);
|
|
346
346
|
font-weight: 400;
|
|
347
347
|
line-height: 1.4;
|
|
348
348
|
color: #f9fafb; /* static fallback */
|
|
@@ -396,7 +396,7 @@ slot[name='footer'] {
|
|
|
396
396
|
|
|
397
397
|
/* Parent group label */
|
|
398
398
|
.nav-item--parent {
|
|
399
|
-
font-size: 0.75rem;
|
|
399
|
+
font-size: var(--q-sidepanel-nav-small-font, 0.75rem);
|
|
400
400
|
font-weight: 700;
|
|
401
401
|
letter-spacing: 0.06em;
|
|
402
402
|
color: var(--q-sidepanel-nav-depth-color);
|
|
@@ -452,7 +452,7 @@ slot[name='footer'] {
|
|
|
452
452
|
border-radius: 999px;
|
|
453
453
|
color: var(--q-fg-base);
|
|
454
454
|
background: var(--q-color-primary);
|
|
455
|
-
font-size: 0.65rem;
|
|
455
|
+
font-size: var(--q-sidepanel-nav-badge-font, 0.65rem);
|
|
456
456
|
font-weight: 700;
|
|
457
457
|
pointer-events: none;
|
|
458
458
|
}
|
|
@@ -68,35 +68,35 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
.tab-list.size-sm .tab {
|
|
71
|
-
min-height: var(--q-tabs-height-sm, var(--q-tabs-height, 34px));
|
|
72
|
-
padding: var(--q-tabs-padding-sm, var(--q-tabs-padding, 6px 10px));
|
|
71
|
+
min-height: var(--q-tabs-height-sm, var(--q-tabs-height, var(--_q-preset-tabs-height-sm, 34px)));
|
|
72
|
+
padding: var(--q-tabs-padding-sm, var(--q-tabs-padding, var(--_q-preset-tabs-padding-sm, 6px 10px)));
|
|
73
73
|
font-size: var(--q-tabs-font-size-sm, var(--q-tabs-font-size, var(--q-font-size-sm, 0.7rem)));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.tab-list.size-md .tab {
|
|
77
|
-
min-height: var(--q-tabs-height-md, var(--q-tabs-height, 42px));
|
|
78
|
-
padding: var(--q-tabs-padding-md, var(--q-tabs-padding, 9px 16px));
|
|
77
|
+
min-height: var(--q-tabs-height-md, var(--q-tabs-height, var(--_q-preset-tabs-height-md, 42px)));
|
|
78
|
+
padding: var(--q-tabs-padding-md, var(--q-tabs-padding, var(--_q-preset-tabs-padding-md, 9px 16px)));
|
|
79
79
|
font-size: var(--q-tabs-font-size-md, var(--q-tabs-font-size, var(--q-font-size-base, 0.9rem)));
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.tab-list.size-lg .tab {
|
|
83
|
-
min-height: var(--q-tabs-height-lg, var(--q-tabs-height, 50px));
|
|
84
|
-
padding: var(--q-tabs-padding-lg, var(--q-tabs-padding, 14px 18px));
|
|
83
|
+
min-height: var(--q-tabs-height-lg, var(--q-tabs-height, var(--_q-preset-tabs-height-lg, 50px)));
|
|
84
|
+
padding: var(--q-tabs-padding-lg, var(--q-tabs-padding, var(--_q-preset-tabs-padding-lg, 14px 18px)));
|
|
85
85
|
font-size: var(--q-tabs-font-size-lg, var(--q-tabs-font-size, var(--q-font-size-lg, 1rem)));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.tab-list.size-sm .tab.is-icon-only {
|
|
89
|
-
width: var(--q-tabs-icon-only-width-sm, var(--q-tabs-height-sm, var(--q-tabs-height, 34px)));
|
|
89
|
+
width: var(--q-tabs-icon-only-width-sm, var(--q-tabs-height-sm, var(--q-tabs-height, var(--_q-preset-tabs-height-sm, 34px))));
|
|
90
90
|
padding-inline: 0;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.tab-list.size-md .tab.is-icon-only {
|
|
94
|
-
width: var(--q-tabs-icon-only-width-md, var(--q-tabs-height-md, var(--q-tabs-height, 42px)));
|
|
94
|
+
width: var(--q-tabs-icon-only-width-md, var(--q-tabs-height-md, var(--q-tabs-height, var(--_q-preset-tabs-height-md, 42px))));
|
|
95
95
|
padding-inline: 0;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.tab-list.size-lg .tab.is-icon-only {
|
|
99
|
-
width: var(--q-tabs-icon-only-width-lg, var(--q-tabs-height-lg, var(--q-tabs-height, 50px)));
|
|
99
|
+
width: var(--q-tabs-icon-only-width-lg, var(--q-tabs-height-lg, var(--q-tabs-height, var(--_q-preset-tabs-height-lg, 50px))));
|
|
100
100
|
padding-inline: 0;
|
|
101
101
|
}
|
|
102
102
|
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:host([edge='top']) {
|
|
9
|
-
--q-toolbar-edge-padding: max(0px, env(safe-area-inset-top, 0px)) 24px 0;
|
|
10
|
-
--q-toolbar-edge-compact-padding: max(0px, env(safe-area-inset-top, 0px)) 16px 0;
|
|
9
|
+
--q-toolbar-edge-padding: max(0px, env(safe-area-inset-top, 0px)) var(--q-bar-edge-padding, 24px) 0;
|
|
10
|
+
--q-toolbar-edge-compact-padding: max(0px, env(safe-area-inset-top, 0px)) var(--q-bar-edge-compact-padding, 16px) 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
:host([edge='bottom']) {
|
|
14
|
-
--q-toolbar-edge-padding: 0 24px max(0px, env(safe-area-inset-bottom, 0px));
|
|
15
|
-
--q-toolbar-edge-compact-padding: 0 16px max(0px, env(safe-area-inset-bottom, 0px));
|
|
14
|
+
--q-toolbar-edge-padding: 0 var(--q-bar-edge-padding, 24px) max(0px, env(safe-area-inset-bottom, 0px));
|
|
15
|
+
--q-toolbar-edge-compact-padding: 0 var(--q-bar-edge-compact-padding, 16px) max(0px, env(safe-area-inset-bottom, 0px));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
:host([edge='left']),
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
:host([edge='left']) {
|
|
25
|
-
--q-toolbar-edge-padding: 16px 16px 16px max(16px, env(safe-area-inset-left, 0px));
|
|
25
|
+
--q-toolbar-edge-padding: var(--q-bar-edge-compact-padding, 16px) var(--q-bar-edge-compact-padding, 16px) var(--q-bar-edge-compact-padding, 16px) max(var(--q-bar-edge-compact-padding, 16px), env(safe-area-inset-left, 0px));
|
|
26
26
|
--q-toolbar-edge-compact-padding: 12px 12px 12px max(12px, env(safe-area-inset-left, 0px));
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
:host([edge='right']) {
|
|
30
|
-
--q-toolbar-edge-padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px 16px;
|
|
30
|
+
--q-toolbar-edge-padding: var(--q-bar-edge-compact-padding, 16px) max(var(--q-bar-edge-compact-padding, 16px), env(safe-area-inset-right, 0px)) var(--q-bar-edge-compact-padding, 16px) var(--q-bar-edge-compact-padding, 16px);
|
|
31
31
|
--q-toolbar-edge-compact-padding: 12px max(12px, env(safe-area-inset-right, 0px)) 12px 12px;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
background: var(--q-bg-surface-3, #1e293b);
|
|
55
55
|
color: var(--q-fg-base);
|
|
56
56
|
border: 1px solid var(--q-border-color, rgba(255, 255, 255, 0.08));
|
|
57
|
-
padding: 6px 10px;
|
|
57
|
+
padding: var(--q-tooltip-padding, 6px 10px);
|
|
58
58
|
border-radius: var(--q-radius-sm, 4px);
|
|
59
59
|
font-family: var(--q-font-family, system-ui, -apple-system, sans-serif);
|
|
60
60
|
font-size: var(--q-font-size-sm);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
export function feedbackStyle(reserve) {
|
|
3
|
-
return { '--_q-feedback-min': reserve === undefined ? 'var(--q-context-feedback-min,
|
|
3
|
+
return { '--_q-feedback-min': reserve === undefined ? 'var(--q-context-feedback-min, calc(var(--_q-context-feedback-reserve, 0) * var(--q-field-text-line, 1rem)))' : reserve ? 'var(--q-field-text-line, 1rem)' : '0px' };
|
|
4
4
|
}
|
|
5
5
|
/** Kept in the control's own shadow root so describedby never crosses a boundary. */
|
|
6
6
|
export function fieldFeedback(id, error, description) {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* Optional native content styles. Import after webquark.css and opt in with .q-prose. */
|
|
2
|
+
:where(.q-prose, .q-prose [data-wq-preset]) {
|
|
3
|
+
font-family: var(--q-font-family);
|
|
4
|
+
font-size: var(--q-text-body-size, var(--q-font-size-base, .9rem));
|
|
5
|
+
font-weight: var(--q-font-weight-normal, 400);
|
|
6
|
+
line-height: var(--q-text-body-line-height, 1.5);
|
|
7
|
+
}
|
|
8
|
+
:where(.q-prose) :where(h1, h2, h3, h4, h5, h6, .q-display) {
|
|
9
|
+
font-family: var(--q-font-family);
|
|
10
|
+
font-weight: var(--q-font-weight-bold, 600);
|
|
11
|
+
margin-block: 0 var(--q-content-heading-gap, 1rem);
|
|
12
|
+
overflow-wrap: anywhere;
|
|
13
|
+
}
|
|
14
|
+
:where(.q-prose) :where(h1) { font-size: var(--q-heading-1-size, 1rem); line-height: var(--q-heading-1-line-height, 1.3); }
|
|
15
|
+
:where(.q-prose) :where(h2) { font-size: var(--q-heading-2-size, 1rem); line-height: var(--q-heading-2-line-height, 1.3); }
|
|
16
|
+
:where(.q-prose) :where(h3) { font-size: var(--q-heading-3-size, 1rem); line-height: var(--q-heading-3-line-height, 1.3); }
|
|
17
|
+
:where(.q-prose) :where(h4) { font-size: var(--q-heading-4-size, 1rem); line-height: var(--q-heading-4-line-height, 1.3); }
|
|
18
|
+
:where(.q-prose) :where(h5) { font-size: var(--q-heading-5-size, 1rem); line-height: var(--q-heading-5-line-height, 1.3); }
|
|
19
|
+
:where(.q-prose) :where(h6) { font-size: var(--q-heading-6-size, 1rem); line-height: var(--q-heading-6-line-height, 1.3); }
|
|
20
|
+
:where(.q-prose) :where(.q-display) { font-size: var(--q-heading-display-size, 1rem); line-height: var(--q-heading-display-line-height, 1.3); }
|
|
21
|
+
:where(.q-prose) :where(p, ul, ol) { margin-block: 0 var(--q-content-paragraph-gap, 1rem); }
|
|
22
|
+
:where(.q-prose) :where(small) { font-size: var(--q-text-small-size, .7rem); line-height: var(--q-text-small-line-height, 1.5); }
|
|
23
|
+
:where(.q-content-section) { padding: var(--q-content-padding, 1rem); }
|
|
24
|
+
:where(.q-content-section + .q-content-section) { margin-block-start: var(--q-content-section-gap, 2rem); }
|
|
@@ -7,7 +7,7 @@ class PlaygroundHeader extends HTMLElement {
|
|
|
7
7
|
connectedCallback() {
|
|
8
8
|
// 1. Render template via TSX
|
|
9
9
|
this.innerHTML = '';
|
|
10
|
-
this.appendChild(h("header", { class: "app-header" }, h("button", { class: "hamburger-menu", id: "hamburgerMenu", "aria-label": "Toggle Menu", type: "button", onClick: () => this.toggleSidebar() }, h("span", { class: "hamburger-line" }), h("span", { class: "hamburger-line" }), h("span", { class: "hamburger-line" })), h("div", { class: "header-logo" }, h("img", { src: "/logo.svg", class: "logo-image", alt: "WebQuark Logo" }), h("div", { class: "logo-text" }, "WebQuark")), h("div", { class: "header-actions" }, h("q-button", { id: "themeToggle", variant: "ghost", onClick: () => this.toggleTheme() }, h("q-icon", { id: "themeIcon", slot: "icon-left", name: "sun" })))));
|
|
10
|
+
this.appendChild(h("header", { class: "app-header" }, h("button", { class: "hamburger-menu", id: "hamburgerMenu", "aria-label": "Toggle Menu", type: "button", onClick: () => this.toggleSidebar() }, h("span", { class: "hamburger-line" }), h("span", { class: "hamburger-line" }), h("span", { class: "hamburger-line" })), h("div", { class: "header-logo" }, h("img", { src: "/logo.svg", class: "logo-image", alt: "WebQuark Logo" }), h("div", { class: "logo-text" }, "WebQuark")), h("div", { class: "header-actions" }, h("a", { href: "./presets.html" }, "Design presets"), h("q-button", { id: "themeToggle", variant: "ghost", onClick: () => this.toggleTheme() }, h("q-icon", { id: "themeIcon", slot: "icon-left", name: "sun" })))));
|
|
11
11
|
// 2. Inject CSS stylesheet (scoped style wrapper)
|
|
12
12
|
const styleId = 'playground-header-style';
|
|
13
13
|
if (!document.getElementById(styleId)) {
|