@webquark/core 1.1.0-dev.6 → 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 +3 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- 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 +10 -10
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/{webquark/p-0aea8464.entry.js → playground/build/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.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/index.d.ts +1 -1
- 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/{playground/build/p-0aea8464.entry.js → webquark/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 +9 -1
- package/scripts/wq-switch/dist/index.js +25 -2
- package/scripts/wq-switch/dist/setup.js +1 -1
- 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-0aecd9b1.entry.js +0 -1
- 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/webquark/p-0aecd9b1.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
|
@@ -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)) {
|
|
@@ -368,7 +368,9 @@ class PlaygroundHeader extends HTMLElement {
|
|
|
368
368
|
class: "logo-text"
|
|
369
369
|
}, "WebQuark")), /* @__PURE__ */ h("div", {
|
|
370
370
|
class: "header-actions"
|
|
371
|
-
}, /* @__PURE__ */ h("
|
|
371
|
+
}, /* @__PURE__ */ h("a", {
|
|
372
|
+
href: "./presets.html"
|
|
373
|
+
}, "Design presets"), /* @__PURE__ */ h("q-button", {
|
|
372
374
|
id: "themeToggle",
|
|
373
375
|
variant: "ghost",
|
|
374
376
|
onClick: () => this.toggleTheme()
|
|
@@ -3612,6 +3614,155 @@ var themeGroups = [
|
|
|
3612
3614
|
]
|
|
3613
3615
|
}
|
|
3614
3616
|
];
|
|
3617
|
+
var comfortablePreset = {
|
|
3618
|
+
"--q-space-none": "0rem",
|
|
3619
|
+
"--q-space-xs": "0.375rem",
|
|
3620
|
+
"--q-space-sm": "0.75rem",
|
|
3621
|
+
"--q-space-md": "1rem",
|
|
3622
|
+
"--q-space-lg": "1.5rem",
|
|
3623
|
+
"--q-space-xl": "2rem",
|
|
3624
|
+
"--q-space-2xl": "3rem",
|
|
3625
|
+
"--q-space-3xl": "4rem",
|
|
3626
|
+
"--q-control-height-sm": "2.25rem",
|
|
3627
|
+
"--q-control-font-sm": "0.875rem",
|
|
3628
|
+
"--q-control-line-sm": "1.25rem",
|
|
3629
|
+
"--q-control-padding-sm": "0.75rem",
|
|
3630
|
+
"--q-control-icon-sm": "1rem",
|
|
3631
|
+
"--q-control-height-md": "2.75rem",
|
|
3632
|
+
"--q-control-font-md": "1rem",
|
|
3633
|
+
"--q-control-line-md": "1.5rem",
|
|
3634
|
+
"--q-control-padding-md": "1rem",
|
|
3635
|
+
"--q-control-icon-md": "1.25rem",
|
|
3636
|
+
"--q-control-height-lg": "3.25rem",
|
|
3637
|
+
"--q-control-font-lg": "1.125rem",
|
|
3638
|
+
"--q-control-line-lg": "1.75rem",
|
|
3639
|
+
"--q-control-padding-lg": "1.25rem",
|
|
3640
|
+
"--q-control-icon-lg": "1.5rem",
|
|
3641
|
+
"--q-font-size-sm": "0.875rem",
|
|
3642
|
+
"--q-font-size-base": "1.125rem",
|
|
3643
|
+
"--q-font-size-lg": "1.5rem",
|
|
3644
|
+
"--q-padding-sm": "var(--q-space-sm, .75rem)",
|
|
3645
|
+
"--q-padding-md": "var(--q-space-md, 1rem)",
|
|
3646
|
+
"--q-padding-lg": "var(--q-space-lg, 1.5rem)",
|
|
3647
|
+
"--q-step-diag-icon-size": "40px",
|
|
3648
|
+
"--q-step-diag-item-gap": "32px",
|
|
3649
|
+
"--q-reel-gap": "24px",
|
|
3650
|
+
"--q-avatar-size-sm": "32px",
|
|
3651
|
+
"--q-avatar-size-md": "48px",
|
|
3652
|
+
"--q-avatar-size-lg": "64px",
|
|
3653
|
+
"--q-carousel-gap": "24px",
|
|
3654
|
+
"--q-carousel-padding": "32px 24px",
|
|
3655
|
+
"--q-carousel-arrow-size": "44px",
|
|
3656
|
+
"--q-carousel-indicator-gap": "12px",
|
|
3657
|
+
"--q-carousel-indicator-size": "8px",
|
|
3658
|
+
"--q-progress-linear-height-sm": "6px",
|
|
3659
|
+
"--q-progress-linear-height-md": "8px",
|
|
3660
|
+
"--q-progress-linear-height-lg": "10px",
|
|
3661
|
+
"--q-progress-circular-size-sm": "80px",
|
|
3662
|
+
"--q-progress-circular-size-md": "144px",
|
|
3663
|
+
"--q-progress-circular-size-lg": "200px",
|
|
3664
|
+
"--q-progress-circular-stroke-width-sm": "8px",
|
|
3665
|
+
"--q-progress-circular-stroke-width-md": "10px",
|
|
3666
|
+
"--q-progress-circular-stroke-width-lg": "12px",
|
|
3667
|
+
"--q-btn-icon-padding-sm": "6px",
|
|
3668
|
+
"--q-btn-icon-padding-md": "8px",
|
|
3669
|
+
"--q-btn-icon-padding-lg": "12px",
|
|
3670
|
+
"--q-chip-padding-sm": "6px 12px",
|
|
3671
|
+
"--q-chip-padding-md": "8px 16px",
|
|
3672
|
+
"--q-chip-padding-lg": "10px 20px",
|
|
3673
|
+
"--q-chip-height-sm": "32px",
|
|
3674
|
+
"--q-chip-height-md": "40px",
|
|
3675
|
+
"--q-chip-height-lg": "48px",
|
|
3676
|
+
"--q-sidepanel-panel-padding": "var(--q-padding-lg)",
|
|
3677
|
+
"--q-sidepanel-panel-header-padding": "var(--q-padding-lg)",
|
|
3678
|
+
"--q-sidepanel-panel-footer-padding": "var(--q-padding-lg)",
|
|
3679
|
+
"--q-map-marker-size": "24px",
|
|
3680
|
+
"--q-map-marker-size-small": "20px",
|
|
3681
|
+
"--q-map-marker-size-medium": "var(--q-map-marker-size)",
|
|
3682
|
+
"--q-map-marker-size-large": "28px"
|
|
3683
|
+
};
|
|
3684
|
+
var semanticPresetTokens = {
|
|
3685
|
+
"--q-text-body-size": { compact: "var(--q-font-size-base)", comfortable: "var(--q-font-size-base)" },
|
|
3686
|
+
"--q-text-body-line-height": { compact: "1.5", comfortable: "1.6" },
|
|
3687
|
+
"--q-text-small-size": { compact: "var(--q-font-size-sm)", comfortable: "var(--q-font-size-sm)" },
|
|
3688
|
+
"--q-text-small-line-height": { compact: "1.5", comfortable: "1.5" },
|
|
3689
|
+
"--q-heading-display-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(2.5rem, 1.75rem + 3vw, 4rem)" },
|
|
3690
|
+
"--q-heading-display-line-height": { compact: "1.3", comfortable: "1.1" },
|
|
3691
|
+
"--q-heading-1-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(27px, 1.5rem + 2vw, 36px)" },
|
|
3692
|
+
"--q-heading-2-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(1.75rem, 1.375rem + 1.5vw, 2.5rem)" },
|
|
3693
|
+
"--q-heading-3-size": { compact: "var(--q-font-size-lg)", comfortable: "clamp(1.5rem, 1.25rem + 1vw, 2rem)" },
|
|
3694
|
+
"--q-heading-4-size": { compact: "var(--q-font-size-lg)", comfortable: "1.375rem" },
|
|
3695
|
+
"--q-heading-5-size": { compact: "var(--q-font-size-lg)", comfortable: "1.25rem" },
|
|
3696
|
+
"--q-heading-6-size": { compact: "var(--q-font-size-lg)", comfortable: "1.125rem" },
|
|
3697
|
+
...Object.fromEntries([1, 2, 3, 4, 5, 6].map((level) => [
|
|
3698
|
+
`--q-heading-${level}-line-height`,
|
|
3699
|
+
{ compact: "1.3", comfortable: level <= 2 ? "1.2" : "1.3" }
|
|
3700
|
+
])),
|
|
3701
|
+
"--q-content-paragraph-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3702
|
+
"--q-content-heading-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3703
|
+
"--q-content-section-gap": { compact: "var(--q-space-2xl)", comfortable: "clamp(3rem, 2rem + 4vw, 6rem)" },
|
|
3704
|
+
"--q-content-padding": { compact: "var(--q-padding-lg)", comfortable: "clamp(1.5rem, 1rem + 2vw, 3rem)" },
|
|
3705
|
+
"--q-field-text-size": { compact: ".75rem", comfortable: ".875rem" },
|
|
3706
|
+
"--q-field-text-line": { compact: "1rem", comfortable: "1.25rem" }
|
|
3707
|
+
};
|
|
3708
|
+
var componentPresetTokens = {
|
|
3709
|
+
"--q-toolbar-height": { compact: "0px", comfortable: "72px" },
|
|
3710
|
+
"--q-toolbar-compact-height": { compact: "0px", comfortable: "60px" },
|
|
3711
|
+
"--q-font-size-xs": { compact: "0.7rem", comfortable: "0.8125rem" },
|
|
3712
|
+
"--q-font-size-2xs": { compact: "0.625rem", comfortable: "0.75rem" },
|
|
3713
|
+
"--q-btn-circle-size": { compact: "120px", comfortable: "144px" },
|
|
3714
|
+
"--q-btn-circle-padding": { compact: "12px", comfortable: "16px" },
|
|
3715
|
+
"--q-table-toolbar-padding-block": { compact: "12px", comfortable: "16px" },
|
|
3716
|
+
"--q-table-toolbar-padding-inline": { compact: "16px", comfortable: "24px" },
|
|
3717
|
+
"--q-bar-edge-padding": { compact: "24px", comfortable: "32px" },
|
|
3718
|
+
"--q-bar-edge-compact-padding": { compact: "16px", comfortable: "24px" },
|
|
3719
|
+
"--q-table-cell-padding-block": { compact: "4.5px", comfortable: "10px" },
|
|
3720
|
+
"--q-table-cell-padding-inline": { compact: "8px", comfortable: "14px" },
|
|
3721
|
+
"--q-dropdown-option-padding": { compact: "10px 14px", comfortable: "12px 18px" },
|
|
3722
|
+
"--q-tooltip-padding": { compact: "6px 10px", comfortable: "8px 14px" },
|
|
3723
|
+
"--q-syntax-padding": { compact: "16px", comfortable: "24px" },
|
|
3724
|
+
"--q-syntax-compact-padding": { compact: "10px", comfortable: "16px" },
|
|
3725
|
+
"--q-syntax-header-padding": { compact: "4px 16px", comfortable: "8px 24px" },
|
|
3726
|
+
"--q-sidepanel-nav-font": { compact: "0.875rem", comfortable: "1rem" },
|
|
3727
|
+
"--q-sidepanel-nav-small-font": { compact: "0.75rem", comfortable: "0.875rem" },
|
|
3728
|
+
"--q-sidepanel-nav-badge-font": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3729
|
+
"--q-navbar-item-height": { compact: "36px", comfortable: "44px" },
|
|
3730
|
+
"--q-navbar-gap": { compact: "20px", comfortable: "28px" },
|
|
3731
|
+
"--q-navbar-height": { compact: "64px", comfortable: "72px" },
|
|
3732
|
+
"--q-navbar-compact-height": { compact: "52px", comfortable: "60px" },
|
|
3733
|
+
"--q-navbar-logo-size": { compact: "32px", comfortable: "40px" },
|
|
3734
|
+
"--q-navbar-brand-size": { compact: "1rem", comfortable: "1.25rem" },
|
|
3735
|
+
"--q-navbar-nav-gap": { compact: "6px", comfortable: "10px" },
|
|
3736
|
+
"--q-navbar-action-gap": { compact: "8px", comfortable: "12px" },
|
|
3737
|
+
"--q-navbar-item-gap": { compact: "8px", comfortable: "12px" },
|
|
3738
|
+
"--q-navbar-item-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3739
|
+
"--q-navbar-item-size": { compact: "0.9rem", comfortable: "1rem" },
|
|
3740
|
+
"--q-navbar-item-icon-only-size": { compact: "40px", comfortable: "44px" },
|
|
3741
|
+
"--q-navbar-item-icon-only-padding": { compact: "8px", comfortable: "10px" },
|
|
3742
|
+
"--q-navbar-mobile-panel-padding": { compact: "8px 16px 16px", comfortable: "12px 24px 24px" },
|
|
3743
|
+
"--q-avatar-font-size": { compact: "0.8rem", comfortable: "1rem" },
|
|
3744
|
+
"--q-avatar-font-size-sm": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3745
|
+
"--q-avatar-font-size-lg": { compact: "1rem", comfortable: "1.25rem" },
|
|
3746
|
+
"--q-conversation-gap": { compact: "10px", comfortable: "16px" },
|
|
3747
|
+
"--q-conversation-header-gap": { compact: "4px", comfortable: "6px" },
|
|
3748
|
+
"--q-conversation-header-inset": { compact: "4px", comfortable: "6px" },
|
|
3749
|
+
"--q-conversation-padding": { compact: "11px 13px", comfortable: "16px 20px" },
|
|
3750
|
+
"--q-conversation-footer-gap": { compact: "10px", comfortable: "16px" },
|
|
3751
|
+
"--q-conversation-footer-margin": { compact: "6px", comfortable: "10px" },
|
|
3752
|
+
"--q-conversation-meta-gap": { compact: "6px", comfortable: "10px" },
|
|
3753
|
+
"--q-conversation-compact-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3754
|
+
"--q-alert-padding": { compact: "12px 14px", comfortable: "16px 20px" },
|
|
3755
|
+
"--q-alert-gap": { compact: "10px", comfortable: "16px" },
|
|
3756
|
+
"--q-alert-actions-gap": { compact: "8px", comfortable: "12px" },
|
|
3757
|
+
"--q-pagination-button-height": { compact: "30px", comfortable: "44px" },
|
|
3758
|
+
"--q-pagination-button-padding": { compact: "5px 8px", comfortable: "8px 12px" }
|
|
3759
|
+
};
|
|
3760
|
+
var presetTokens = Object.entries(comfortablePreset).map(([name, comfortable]) => {
|
|
3761
|
+
const token = [...dimensionTokens, ...themeGroups.flatMap((group) => group.tokens)].find((token2) => token2.name === name);
|
|
3762
|
+
if (!token)
|
|
3763
|
+
throw new Error(`Preset token has no compact default: ${name}`);
|
|
3764
|
+
return { name, compact: token.value, comfortable };
|
|
3765
|
+
}).concat(Object.entries({ ...semanticPresetTokens, ...componentPresetTokens }).map(([name, values]) => ({ name, ...values })));
|
|
3615
3766
|
|
|
3616
3767
|
// src/playground/components/theme-designer/theme-designer.tsx
|
|
3617
3768
|
var THEME_TOKENS = [
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import "../../../dist/components/q-button.js";
|
|
3
|
+
import "../../../dist/components/q-form.js";
|
|
4
|
+
import "../../../dist/components/q-input.js";
|
|
5
|
+
import "../../../dist/components/q-card.js";
|
|
6
|
+
import "../../../dist/components/q-dropdown.js";
|
|
7
|
+
import "../../../dist/components/q-tabs.js";
|
|
8
|
+
import "../../../dist/components/q-toolbar.js";
|
|
9
|
+
import shared from "../tokens.css?raw";
|
|
10
|
+
import presets from "../token-presets.css?raw";
|
|
11
|
+
import native from "../behaviors/native-content.css?raw";
|
|
12
|
+
const frame = async () => { await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); };
|
|
13
|
+
async function fixture(html) {
|
|
14
|
+
document.body.innerHTML = `<style>${shared}\n${presets}\n${native}</style>${html}`;
|
|
15
|
+
await Promise.all(['q-button', 'q-form', 'q-input', 'q-card', 'q-dropdown', 'q-tabs', 'q-toolbar'].map(tag => customElements.whenDefined(tag)));
|
|
16
|
+
await frame();
|
|
17
|
+
}
|
|
18
|
+
const button = (id) => document.getElementById(id).shadowRoot.querySelector('button');
|
|
19
|
+
const height = (id) => button(id).getBoundingClientRect().height;
|
|
20
|
+
describe('design presets', () => {
|
|
21
|
+
afterEach(() => { document.body.replaceChildren(); document.documentElement.removeAttribute('data-wq-preset'); });
|
|
22
|
+
it('preserves content-sized compact toolbars and applies taller minimums only in comfortable', async () => {
|
|
23
|
+
const toolbars = (prefix) => `<q-toolbar id="${prefix}-normal"><q-button>Save</q-button></q-toolbar><q-toolbar id="${prefix}-small" compact><q-button>Save</q-button></q-toolbar>`;
|
|
24
|
+
await fixture(`${toolbars('default')}<div data-wq-preset="comfortable">${toolbars('comfortable')}<div data-wq-preset="compact">${toolbars('compact')}</div></div>`);
|
|
25
|
+
const rowHeight = (id) => document.getElementById(id).shadowRoot.querySelector('[part="row"]').getBoundingClientRect().height;
|
|
26
|
+
for (const preset of ['default', 'compact']) {
|
|
27
|
+
expect(rowHeight(`${preset}-normal`)).toBe(52);
|
|
28
|
+
expect(rowHeight(`${preset}-small`)).toBe(44);
|
|
29
|
+
}
|
|
30
|
+
expect(rowHeight('comfortable-normal')).toBe(72);
|
|
31
|
+
expect(rowHeight('comfortable-small')).toBe(60);
|
|
32
|
+
document.documentElement.dataset.wqPreset = 'comfortable';
|
|
33
|
+
await expect.poll(() => rowHeight('default-normal')).toBe(72);
|
|
34
|
+
await expect.poll(() => rowHeight('default-small')).toBe(60);
|
|
35
|
+
document.documentElement.dataset.wqPreset = 'compact';
|
|
36
|
+
await expect.poll(() => rowHeight('default-normal')).toBe(52);
|
|
37
|
+
await expect.poll(() => rowHeight('default-small')).toBe(44);
|
|
38
|
+
document.getElementById('compact-normal').style.setProperty('--q-toolbar-height', '80px');
|
|
39
|
+
expect(rowHeight('compact-normal')).toBe(80);
|
|
40
|
+
});
|
|
41
|
+
it('keeps default and explicit compact dimensions and changes comfortable, including at the document root', async () => {
|
|
42
|
+
await fixture('<q-button id="default">Save</q-button><div data-wq-preset="compact"><q-button id="compact">Save</q-button></div><div data-wq-preset="comfortable"><q-button id="comfortable">Save</q-button></div>');
|
|
43
|
+
expect(height('default')).toBe(36);
|
|
44
|
+
expect(height('compact')).toBe(36);
|
|
45
|
+
expect(height('comfortable')).toBe(44);
|
|
46
|
+
expect(getComputedStyle(button('comfortable')).fontSize).toBe('16px');
|
|
47
|
+
document.documentElement.dataset.wqPreset = 'comfortable';
|
|
48
|
+
await frame();
|
|
49
|
+
await expect.poll(() => height('default')).toBe(44);
|
|
50
|
+
expect(height('compact')).toBe(36);
|
|
51
|
+
});
|
|
52
|
+
it('carries inherited size intent through nested and runtime preset changes', async () => {
|
|
53
|
+
await fixture('<q-form size="sm"><div id="scope" data-wq-preset="comfortable"><q-button id="small">Save</q-button><q-button id="large" size="lg">Save</q-button><div data-wq-preset="compact"><q-button id="nested">Save</q-button></div></div></q-form>');
|
|
54
|
+
expect(height('small')).toBe(36);
|
|
55
|
+
expect(height('large')).toBe(52);
|
|
56
|
+
expect(height('nested')).toBe(28);
|
|
57
|
+
document.getElementById('scope').dataset.wqPreset = 'compact';
|
|
58
|
+
await frame();
|
|
59
|
+
await expect.poll(() => height('small')).toBe(28);
|
|
60
|
+
await expect.poll(() => height('large')).toBe(44);
|
|
61
|
+
document.querySelector('q-form').size = 'lg';
|
|
62
|
+
await frame();
|
|
63
|
+
await expect.poll(() => height('small')).toBe(44);
|
|
64
|
+
});
|
|
65
|
+
it('resolves padding aliases at nested boundaries and preserves explicit overrides', async () => {
|
|
66
|
+
await fixture('<div data-wq-preset="comfortable"><q-card id="card">Text</q-card><div data-wq-preset="compact"><q-card id="compact">Text</q-card></div><q-button id="custom" style="--q-btn-height:60px">Save</q-button></div>');
|
|
67
|
+
const padding = (id) => getComputedStyle(document.getElementById(id).shadowRoot.querySelector('.card-body')).padding;
|
|
68
|
+
expect(padding('card')).toBe('24px');
|
|
69
|
+
expect(padding('compact')).toBe('16px');
|
|
70
|
+
expect(height('custom')).toBe(60);
|
|
71
|
+
});
|
|
72
|
+
it('provides native reading roles without changing page margins or colours', async () => {
|
|
73
|
+
const originalMargin = getComputedStyle(document.body).margin;
|
|
74
|
+
await fixture('<main class="q-prose" data-wq-preset="comfortable" data-theme="light"><h1>Heading</h1><p>Readable text</p><div data-wq-preset="compact"><h1 id="small-heading">Compact</h1></div></main>');
|
|
75
|
+
expect(getComputedStyle(document.querySelector('p')).fontSize).toBe('18px');
|
|
76
|
+
expect(parseFloat(getComputedStyle(document.querySelector('h1')).fontSize)).toBeGreaterThanOrEqual(32);
|
|
77
|
+
expect(getComputedStyle(document.getElementById('small-heading')).fontSize).toBe('16px');
|
|
78
|
+
expect(getComputedStyle(document.body).margin).toBe(originalMargin);
|
|
79
|
+
expect(getComputedStyle(document.querySelector('main')).getPropertyValue('--q-bg-base').trim()).toBe('#ffffff');
|
|
80
|
+
});
|
|
81
|
+
it('reserves feedback using the nearest preset line height', async () => {
|
|
82
|
+
await fixture('<q-form reserve-feedback><div data-wq-preset="comfortable"><q-input label="Name"></q-input></div></q-form>');
|
|
83
|
+
const feedback = document.querySelector('q-input').shadowRoot.querySelector('.q-field-feedback');
|
|
84
|
+
expect(getComputedStyle(feedback).minBlockSize).toBe('20px');
|
|
85
|
+
expect(getComputedStyle(feedback).lineHeight).toBe('20px');
|
|
86
|
+
});
|
|
87
|
+
it('preserves explicit scope and legacy font override precedence', async () => {
|
|
88
|
+
await fixture('<div style="--q-context-control-height:60px;--q-context-feedback-min:40px"><q-form size="sm"><q-button id="scoped">Save</q-button><q-input></q-input></q-form></div><q-card style="--q-font-size-lg:24px"><span slot="header">Title</span>Body</q-card>');
|
|
89
|
+
document.querySelector('q-form').reserveFeedback = false;
|
|
90
|
+
await frame();
|
|
91
|
+
expect(height('scoped')).toBe(28);
|
|
92
|
+
expect(getComputedStyle(document.querySelector('q-input').shadowRoot.querySelector('.q-field-feedback')).minBlockSize).toBe('0px');
|
|
93
|
+
expect(getComputedStyle(document.querySelector('q-card').shadowRoot.querySelector('.card-header')).fontSize).toBe('24px');
|
|
94
|
+
});
|
|
95
|
+
it('keeps an open dropdown menu in the nearest preset when switching', async () => {
|
|
96
|
+
await fixture('<div id="scope" data-wq-preset="comfortable"><q-dropdown label="Choose"></q-dropdown></div>');
|
|
97
|
+
const dropdown = document.querySelector('q-dropdown');
|
|
98
|
+
dropdown.options = [{ label: 'First option', value: 'first' }];
|
|
99
|
+
await frame();
|
|
100
|
+
dropdown.shadowRoot.querySelector('[part="trigger"]').click();
|
|
101
|
+
await frame();
|
|
102
|
+
const option = () => dropdown.shadowRoot.querySelector('[role="option"]');
|
|
103
|
+
expect(getComputedStyle(option()).fontSize).toBe('18px');
|
|
104
|
+
document.getElementById('scope').dataset.wqPreset = 'compact';
|
|
105
|
+
await expect.poll(() => getComputedStyle(option()).fontSize).toBe('14.4px');
|
|
106
|
+
expect(dropdown.shadowRoot.querySelector('[part="trigger"]').getAttribute('aria-expanded')).toBe('true');
|
|
107
|
+
});
|
|
108
|
+
it('keeps generic and size-specific tab overrides above private preset defaults', async () => {
|
|
109
|
+
await fixture('<div id="scope" data-wq-preset="comfortable"><q-tabs></q-tabs></div>');
|
|
110
|
+
const tabs = document.querySelector('q-tabs');
|
|
111
|
+
tabs.items = ['First', 'Second'];
|
|
112
|
+
await frame();
|
|
113
|
+
const style = () => getComputedStyle(tabs.shadowRoot.querySelector('[part~="tab"]'));
|
|
114
|
+
expect(style().minHeight).toBe('48px');
|
|
115
|
+
tabs.style.setProperty('--q-tabs-height', '60px');
|
|
116
|
+
tabs.style.setProperty('--q-tabs-padding', '3px 7px');
|
|
117
|
+
expect(style().minHeight).toBe('60px');
|
|
118
|
+
expect(style().padding).toBe('3px 7px');
|
|
119
|
+
tabs.style.setProperty('--q-tabs-height-md', '70px');
|
|
120
|
+
expect(style().minHeight).toBe('70px');
|
|
121
|
+
document.getElementById('scope').dataset.wqPreset = 'compact';
|
|
122
|
+
expect(style().minHeight).toBe('70px');
|
|
123
|
+
tabs.style.removeProperty('--q-tabs-height-md');
|
|
124
|
+
tabs.style.removeProperty('--q-tabs-height');
|
|
125
|
+
tabs.style.removeProperty('--q-tabs-padding');
|
|
126
|
+
expect(style().minHeight).toBe('42px');
|
|
127
|
+
expect(style().padding).toBe('9px 16px');
|
|
128
|
+
});
|
|
129
|
+
});
|
|
@@ -17,10 +17,13 @@ export function spaceValue(value) {
|
|
|
17
17
|
}
|
|
18
18
|
/** Only scope owners publish context metrics; leaf controls never change them. */
|
|
19
19
|
export function controlScope(size) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
// Carry size intent, rather than resolved lengths, through nested preset boundaries.
|
|
21
|
+
return { ...Object.fromEntries(Object.keys(controls).map(key => [
|
|
22
|
+
`--_q-context-size-${key}`,
|
|
23
|
+
size === 'inherit' ? '' : size === key ? '1' : '0',
|
|
24
|
+
])), ...Object.fromEntries(Object.keys(controls.md).map(metric => [
|
|
25
|
+
`--q-context-control-${metric}`, size === 'inherit' ? '' : 'initial',
|
|
26
|
+
])) };
|
|
24
27
|
}
|
|
25
28
|
/** Resolve roles at the component, not at :root, to respect scoped palettes. */
|
|
26
29
|
export function surfaceValue(surface) {
|
|
@@ -826,3 +829,123 @@ export const themeGroups = [
|
|
|
826
829
|
]
|
|
827
830
|
}
|
|
828
831
|
];
|
|
832
|
+
/** Comfortable overrides for the existing density tokens. Compact values stay in their canonical catalog above. */
|
|
833
|
+
export const comfortablePreset = {
|
|
834
|
+
'--q-space-none': '0rem', '--q-space-xs': '0.375rem', '--q-space-sm': '0.75rem',
|
|
835
|
+
'--q-space-md': '1rem', '--q-space-lg': '1.5rem', '--q-space-xl': '2rem',
|
|
836
|
+
'--q-space-2xl': '3rem', '--q-space-3xl': '4rem',
|
|
837
|
+
'--q-control-height-sm': '2.25rem', '--q-control-font-sm': '0.875rem',
|
|
838
|
+
'--q-control-line-sm': '1.25rem', '--q-control-padding-sm': '0.75rem', '--q-control-icon-sm': '1rem',
|
|
839
|
+
'--q-control-height-md': '2.75rem', '--q-control-font-md': '1rem',
|
|
840
|
+
'--q-control-line-md': '1.5rem', '--q-control-padding-md': '1rem', '--q-control-icon-md': '1.25rem',
|
|
841
|
+
'--q-control-height-lg': '3.25rem', '--q-control-font-lg': '1.125rem',
|
|
842
|
+
'--q-control-line-lg': '1.75rem', '--q-control-padding-lg': '1.25rem', '--q-control-icon-lg': '1.5rem',
|
|
843
|
+
'--q-font-size-sm': '0.875rem', '--q-font-size-base': '1.125rem', '--q-font-size-lg': '1.5rem',
|
|
844
|
+
'--q-padding-sm': 'var(--q-space-sm, .75rem)', '--q-padding-md': 'var(--q-space-md, 1rem)',
|
|
845
|
+
'--q-padding-lg': 'var(--q-space-lg, 1.5rem)',
|
|
846
|
+
'--q-step-diag-icon-size': '40px', '--q-step-diag-item-gap': '32px', '--q-reel-gap': '24px',
|
|
847
|
+
'--q-avatar-size-sm': '32px', '--q-avatar-size-md': '48px', '--q-avatar-size-lg': '64px',
|
|
848
|
+
'--q-carousel-gap': '24px', '--q-carousel-padding': '32px 24px', '--q-carousel-arrow-size': '44px',
|
|
849
|
+
'--q-carousel-indicator-gap': '12px', '--q-carousel-indicator-size': '8px',
|
|
850
|
+
'--q-progress-linear-height-sm': '6px', '--q-progress-linear-height-md': '8px', '--q-progress-linear-height-lg': '10px',
|
|
851
|
+
'--q-progress-circular-size-sm': '80px', '--q-progress-circular-size-md': '144px', '--q-progress-circular-size-lg': '200px',
|
|
852
|
+
'--q-progress-circular-stroke-width-sm': '8px', '--q-progress-circular-stroke-width-md': '10px', '--q-progress-circular-stroke-width-lg': '12px',
|
|
853
|
+
'--q-btn-icon-padding-sm': '6px', '--q-btn-icon-padding-md': '8px', '--q-btn-icon-padding-lg': '12px',
|
|
854
|
+
'--q-chip-padding-sm': '6px 12px', '--q-chip-padding-md': '8px 16px', '--q-chip-padding-lg': '10px 20px',
|
|
855
|
+
'--q-chip-height-sm': '32px', '--q-chip-height-md': '40px', '--q-chip-height-lg': '48px',
|
|
856
|
+
'--q-sidepanel-panel-padding': 'var(--q-padding-lg)',
|
|
857
|
+
'--q-sidepanel-panel-header-padding': 'var(--q-padding-lg)', '--q-sidepanel-panel-footer-padding': 'var(--q-padding-lg)',
|
|
858
|
+
'--q-map-marker-size': '24px', '--q-map-marker-size-small': '20px',
|
|
859
|
+
'--q-map-marker-size-medium': 'var(--q-map-marker-size)', '--q-map-marker-size-large': '28px',
|
|
860
|
+
};
|
|
861
|
+
/** New reading roles. Compact preserves the existing native-client text conventions. */
|
|
862
|
+
export const semanticPresetTokens = {
|
|
863
|
+
'--q-text-body-size': { compact: 'var(--q-font-size-base)', comfortable: 'var(--q-font-size-base)' },
|
|
864
|
+
'--q-text-body-line-height': { compact: '1.5', comfortable: '1.6' },
|
|
865
|
+
'--q-text-small-size': { compact: 'var(--q-font-size-sm)', comfortable: 'var(--q-font-size-sm)' },
|
|
866
|
+
'--q-text-small-line-height': { compact: '1.5', comfortable: '1.5' },
|
|
867
|
+
'--q-heading-display-size': { compact: 'var(--q-font-size-lg)', comfortable: 'clamp(2.5rem, 1.75rem + 3vw, 4rem)' },
|
|
868
|
+
'--q-heading-display-line-height': { compact: '1.3', comfortable: '1.1' },
|
|
869
|
+
'--q-heading-1-size': { compact: 'var(--q-font-size-lg)', comfortable: 'clamp(27px, 1.5rem + 2vw, 36px)' },
|
|
870
|
+
'--q-heading-2-size': { compact: 'var(--q-font-size-lg)', comfortable: 'clamp(1.75rem, 1.375rem + 1.5vw, 2.5rem)' },
|
|
871
|
+
'--q-heading-3-size': { compact: 'var(--q-font-size-lg)', comfortable: 'clamp(1.5rem, 1.25rem + 1vw, 2rem)' },
|
|
872
|
+
'--q-heading-4-size': { compact: 'var(--q-font-size-lg)', comfortable: '1.375rem' },
|
|
873
|
+
'--q-heading-5-size': { compact: 'var(--q-font-size-lg)', comfortable: '1.25rem' },
|
|
874
|
+
'--q-heading-6-size': { compact: 'var(--q-font-size-lg)', comfortable: '1.125rem' },
|
|
875
|
+
...Object.fromEntries([1, 2, 3, 4, 5, 6].map(level => [
|
|
876
|
+
`--q-heading-${level}-line-height`, { compact: '1.3', comfortable: level <= 2 ? '1.2' : '1.3' },
|
|
877
|
+
])),
|
|
878
|
+
'--q-content-paragraph-gap': { compact: 'var(--q-padding-lg)', comfortable: '1.5rem' },
|
|
879
|
+
'--q-content-heading-gap': { compact: 'var(--q-padding-lg)', comfortable: '1.5rem' },
|
|
880
|
+
'--q-content-section-gap': { compact: 'var(--q-space-2xl)', comfortable: 'clamp(3rem, 2rem + 4vw, 6rem)' },
|
|
881
|
+
'--q-content-padding': { compact: 'var(--q-padding-lg)', comfortable: 'clamp(1.5rem, 1rem + 2vw, 3rem)' },
|
|
882
|
+
'--q-field-text-size': { compact: '.75rem', comfortable: '.875rem' },
|
|
883
|
+
'--q-field-text-line': { compact: '1rem', comfortable: '1.25rem' },
|
|
884
|
+
};
|
|
885
|
+
// Internal size defaults keep generic and size-specific tab overrides independent.
|
|
886
|
+
export const internalPresetTokens = {
|
|
887
|
+
'--_q-preset-tabs-height-sm': { compact: '34px', comfortable: '40px' },
|
|
888
|
+
'--_q-preset-tabs-height-md': { compact: '42px', comfortable: '48px' },
|
|
889
|
+
'--_q-preset-tabs-height-lg': { compact: '50px', comfortable: '56px' },
|
|
890
|
+
'--_q-preset-tabs-padding-sm': { compact: '6px 10px', comfortable: '8px 14px' },
|
|
891
|
+
'--_q-preset-tabs-padding-md': { compact: '9px 16px', comfortable: '12px 20px' },
|
|
892
|
+
'--_q-preset-tabs-padding-lg': { compact: '14px 18px', comfortable: '16px 24px' },
|
|
893
|
+
};
|
|
894
|
+
export const componentPresetTokens = {
|
|
895
|
+
'--q-toolbar-height': { compact: '0px', comfortable: '72px' },
|
|
896
|
+
'--q-toolbar-compact-height': { compact: '0px', comfortable: '60px' },
|
|
897
|
+
'--q-font-size-xs': { compact: '0.7rem', comfortable: '0.8125rem' },
|
|
898
|
+
'--q-font-size-2xs': { compact: '0.625rem', comfortable: '0.75rem' },
|
|
899
|
+
'--q-btn-circle-size': { compact: '120px', comfortable: '144px' },
|
|
900
|
+
'--q-btn-circle-padding': { compact: '12px', comfortable: '16px' },
|
|
901
|
+
'--q-table-toolbar-padding-block': { compact: '12px', comfortable: '16px' },
|
|
902
|
+
'--q-table-toolbar-padding-inline': { compact: '16px', comfortable: '24px' },
|
|
903
|
+
'--q-bar-edge-padding': { compact: '24px', comfortable: '32px' },
|
|
904
|
+
'--q-bar-edge-compact-padding': { compact: '16px', comfortable: '24px' },
|
|
905
|
+
'--q-table-cell-padding-block': { compact: '4.5px', comfortable: '10px' },
|
|
906
|
+
'--q-table-cell-padding-inline': { compact: '8px', comfortable: '14px' },
|
|
907
|
+
'--q-dropdown-option-padding': { compact: '10px 14px', comfortable: '12px 18px' },
|
|
908
|
+
'--q-tooltip-padding': { compact: '6px 10px', comfortable: '8px 14px' },
|
|
909
|
+
'--q-syntax-padding': { compact: '16px', comfortable: '24px' },
|
|
910
|
+
'--q-syntax-compact-padding': { compact: '10px', comfortable: '16px' },
|
|
911
|
+
'--q-syntax-header-padding': { compact: '4px 16px', comfortable: '8px 24px' },
|
|
912
|
+
'--q-sidepanel-nav-font': { compact: '0.875rem', comfortable: '1rem' },
|
|
913
|
+
'--q-sidepanel-nav-small-font': { compact: '0.75rem', comfortable: '0.875rem' },
|
|
914
|
+
'--q-sidepanel-nav-badge-font': { compact: '0.65rem', comfortable: '0.75rem' },
|
|
915
|
+
'--q-navbar-item-height': { compact: '36px', comfortable: '44px' },
|
|
916
|
+
'--q-navbar-gap': { compact: '20px', comfortable: '28px' },
|
|
917
|
+
'--q-navbar-height': { compact: '64px', comfortable: '72px' },
|
|
918
|
+
'--q-navbar-compact-height': { compact: '52px', comfortable: '60px' },
|
|
919
|
+
'--q-navbar-logo-size': { compact: '32px', comfortable: '40px' },
|
|
920
|
+
'--q-navbar-brand-size': { compact: '1rem', comfortable: '1.25rem' },
|
|
921
|
+
'--q-navbar-nav-gap': { compact: '6px', comfortable: '10px' },
|
|
922
|
+
'--q-navbar-action-gap': { compact: '8px', comfortable: '12px' },
|
|
923
|
+
'--q-navbar-item-gap': { compact: '8px', comfortable: '12px' },
|
|
924
|
+
'--q-navbar-item-padding': { compact: '7px 10px', comfortable: '10px 14px' },
|
|
925
|
+
'--q-navbar-item-size': { compact: '0.9rem', comfortable: '1rem' },
|
|
926
|
+
'--q-navbar-item-icon-only-size': { compact: '40px', comfortable: '44px' },
|
|
927
|
+
'--q-navbar-item-icon-only-padding': { compact: '8px', comfortable: '10px' },
|
|
928
|
+
'--q-navbar-mobile-panel-padding': { compact: '8px 16px 16px', comfortable: '12px 24px 24px' },
|
|
929
|
+
'--q-avatar-font-size': { compact: '0.8rem', comfortable: '1rem' },
|
|
930
|
+
'--q-avatar-font-size-sm': { compact: '0.65rem', comfortable: '0.75rem' },
|
|
931
|
+
'--q-avatar-font-size-lg': { compact: '1rem', comfortable: '1.25rem' },
|
|
932
|
+
'--q-conversation-gap': { compact: '10px', comfortable: '16px' },
|
|
933
|
+
'--q-conversation-header-gap': { compact: '4px', comfortable: '6px' },
|
|
934
|
+
'--q-conversation-header-inset': { compact: '4px', comfortable: '6px' },
|
|
935
|
+
'--q-conversation-padding': { compact: '11px 13px', comfortable: '16px 20px' },
|
|
936
|
+
'--q-conversation-footer-gap': { compact: '10px', comfortable: '16px' },
|
|
937
|
+
'--q-conversation-footer-margin': { compact: '6px', comfortable: '10px' },
|
|
938
|
+
'--q-conversation-meta-gap': { compact: '6px', comfortable: '10px' },
|
|
939
|
+
'--q-conversation-compact-padding': { compact: '7px 10px', comfortable: '10px 14px' },
|
|
940
|
+
'--q-alert-padding': { compact: '12px 14px', comfortable: '16px 20px' },
|
|
941
|
+
'--q-alert-gap': { compact: '10px', comfortable: '16px' },
|
|
942
|
+
'--q-alert-actions-gap': { compact: '8px', comfortable: '12px' },
|
|
943
|
+
'--q-pagination-button-height': { compact: '30px', comfortable: '44px' },
|
|
944
|
+
'--q-pagination-button-padding': { compact: '5px 8px', comfortable: '8px 12px' },
|
|
945
|
+
};
|
|
946
|
+
export const presetTokens = Object.entries(comfortablePreset).map(([name, comfortable]) => {
|
|
947
|
+
const token = [...dimensionTokens, ...themeGroups.flatMap(group => group.tokens)].find(token => token.name === name);
|
|
948
|
+
if (!token)
|
|
949
|
+
throw new Error(`Preset token has no compact default: ${name}`);
|
|
950
|
+
return { name, compact: token.value, comfortable };
|
|
951
|
+
}).concat(Object.entries({ ...semanticPresetTokens, ...componentPresetTokens }).map(([name, values]) => ({ name, ...values })));
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-
|
|
1
|
+
export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Cn_ChUpc.js";export{f as format}from"./p-BJiYCN3i.js";export{i as identifyItems,r as reconcileByIdentity}from"./p-CGZPmEUB.js";export{Q as Q_MAP_DEFAULT_CLUSTER_GROUP,a as Q_MAP_MARKER_CALLOUT_PLACEMENTS,b as Q_MAP_MARKER_CALLOUT_STAT_LAYOUTS,c as Q_MAP_MARKER_CALLOUT_VISIBILITIES,d as Q_MAP_MARKER_KINDS,e as Q_MAP_MARKER_RINGS,f as Q_MAP_MARKER_SIZES,g as Q_MAP_MARKER_VARIANTS,h as Q_MAP_RASTER_TILE_LOADING_POLICIES}from"./p-WJHaLJS_.js";export{g as getDataTableCellSlotName,a as getDataTableCellValue,b as getDataTableItemKey}from"./p-DmqVhVoj.js";export{c as configureQIcons,r as registerQIcons}from"./p-BvBRW3dl.js";export{t as toast}from"./p-BIIQL66b.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,t as i,p as e,H as s}from"./p-
|
|
1
|
+
import{h as t,t as i,p as e,H as s}from"./p-Cn_ChUpc.js";import{a as n,p as r,i as o}from"./p-BvBRW3dl.js";function a(i){const[e,s,n]=i;return t(e,s,n?.map(a))}const l=new Set(["script","foreignobject","iframe","object","embed","link","meta"]),h=/<\s*(script|foreignObject|iframe|object|embed|link|meta)\b[\s\S]*?(?:<\/\s*\1\s*>|\/\s*>)/gi,c=/\s+on[a-z]+\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,d=/\s+(style|tabindex)\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,f=/\s+(xlink:href|href)\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,u=/\s+[a-z_:.-]+\s*=\s*("[^"]*javascript:[^"]*"|'[^']*javascript:[^']*'|[^\s>]*javascript:[^\s>]*)/gi;function g(t){return/<svg[\s>]/i.test(t)?t.replace(h,"").replace(c,"").replace(d,"").replace(u,"").replace(f,((t,i,e)=>String(e).replace(/^['"]|['"]$/g,"").trim().toLowerCase().startsWith("#")?t:"")).replace(/<svg\b([^>]*)>/i,((t,i)=>`<svg${String(i).replace(/\s+aria-hidden\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,"").replace(/\s+focusable\s*=\s*("[^"]*"|'[^']*'|[^\s>]+)/gi,"")} aria-hidden="true" focusable="false">`)).trim():""}const m=[".png",".jpg",".jpeg",".webp",".gif",".ico"];function p(t,i){const e=t?.trim();return e||i}const v=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}name;library;lib="lucide";localPath="/assets/icons/";libraryVersion;libVersion;fetchTimeout=8e3;definition;size="md";color="currentColor";label;svgContent="";isBinary=!1;resolvedUrl="";hasError=!1;resolvedDefinition;fetchId=0;watchHandler(){this.loadIcon()}componentWillLoad(){this.loadIcon()}componentWillRender(){this.syncHostState()}componentDidRender(){this.syncHostState()}componentDidLoad(){this.syncHostState()}componentDidUpdate(){this.syncHostState()}get accessibleLabel(){const t=this.label?.trim();return t||void 0}handleImageError=()=>{this.hasError=!0,this.syncHostState()};syncHostState(){if(!this.el)return;const t=function(t){const i=t?String(t).trim():"md";return"sm"===i?"16px":"md"===i?"24px":"lg"===i?"32px":/^\d+$/.test(i)?`${i}px`:i}(this.size),i=this.accessibleLabel;this.el.style.width=t,this.el.style.height=t,this.el.style.color=this.color,this.el.classList.toggle("q-icon-error",this.hasError),this.el.classList.toggle("q-icon-binary",!this.hasError&&this.isBinary),this.el.classList.toggle("q-icon-svg",!this.hasError&&!this.isBinary),i?(this.el.setAttribute("role","img"),this.el.setAttribute("aria-label",i),this.el.setAttribute("aria-hidden","false")):(this.el.removeAttribute("role"),this.el.removeAttribute("aria-label"),this.el.setAttribute("aria-hidden","true"))}async loadIcon(){const t=++this.fetchId;this.hasError=!1,this.resolvedDefinition=void 0,this.syncHostState();const i=this.definition??n(this.name);if(i){try{this.resolvedDefinition=this.definition?r(i,"q-icon definition"):i,this.svgContent="",this.resolvedUrl="",this.isBinary=!1}catch(t){console.error(t),this.hasError=!0}return void this.syncHostState()}if(!this.name)return this.svgContent="",this.resolvedUrl="",this.isBinary=!1,void this.syncHostState();if(o())return this.svgContent="",this.resolvedUrl="",this.isBinary=!1,this.hasError=!0,void this.syncHostState();const e=function(t){const i=t.name.trim();if("lucide"===t.library)return`https://cdn.jsdelivr.net/npm/lucide-static@${p(t.libraryVersion,"0.416.0")}/icons/${encodeURIComponent(i)}.svg`;if("font-awesome"===t.library||"fontawesome"===t.library)return`https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@${p(t.libraryVersion,"6.7.2")}/svgs/solid/${encodeURIComponent(i)}.svg`;if("local"===t.library){let e=t.localPath||"/assets/icons/";return e.endsWith("/")||(e+="/"),`${e}${i}${i.includes(".")?"":".svg"}`}if(t.library.includes("{name}"))return t.library.replace("{name}",i);let e=t.library;return e.endsWith("/")||(e+="/"),`${e}${i}`}({name:this.name,library:this.library??this.lib,localPath:this.localPath,libraryVersion:this.libraryVersion??this.libVersion});if(function(t){const i=t.toLowerCase();return m.some((t=>i.endsWith(t)))}(e))this.fetchId===t&&(this.isBinary=!0,this.resolvedUrl=e,this.svgContent="",this.syncHostState());else{this.fetchId===t&&(this.isBinary=!1,this.resolvedUrl="",this.syncHostState());try{const i=function(t,i=("undefined"!=typeof window?window.location:void 0)){if(!i||/^https?:\/\//i.test(t)||t.startsWith("data:"))return t;const e=i.origin&&"null"!==i.origin?i.origin:"http://localhost";try{return new URL(t,e).href}catch(i){return t}}(e),s=await async function(t,i){const e=Number.isFinite(i)&&i>0?i:8e3,s="undefined"!=typeof AbortController?new AbortController:void 0,n=s?setTimeout((()=>s.abort()),e):void 0;try{const i=await fetch(t,s?{signal:s.signal}:void 0);if(!i.ok)throw new Error(`Failed to load icon SVG from ${t} (status: ${i.status})`);return await i.text()}finally{void 0!==n&&clearTimeout(n)}}(i,this.fetchTimeout),n=function(t){if("undefined"==typeof DOMParser||"undefined"==typeof XMLSerializer)return g(t);const i=(new DOMParser).parseFromString(t,"image/svg+xml"),e=i.querySelector("parsererror"),s=i.documentElement;if(e||!s||"svg"!==s.tagName.toLowerCase())return g(t);const n=t=>{const i=t.tagName.toLowerCase();l.has(i)?t.remove():(Array.from(t.attributes).forEach((e=>{const s=e.name.toLowerCase(),n=e.value.trim().toLowerCase();(s.startsWith("on")||"style"===s||"tabindex"===s||n.startsWith("javascript:")||n.includes("url(javascript:")||("href"===s||"xlink:href"===s)&&"use"===i&&!n.startsWith("#"))&&t.removeAttribute(e.name)})),Array.from(t.children).forEach(n))};return n(s),s.setAttribute("aria-hidden","true"),s.setAttribute("focusable","false"),(new XMLSerializer).serializeToString(s)}(s);if(!n)throw new Error(`Failed to sanitize icon SVG from ${i}`);this.fetchId===t&&(this.svgContent=n,this.syncHostState())}catch(i){console.error(i),this.fetchId===t&&(this.hasError=!0,this.svgContent="",this.syncHostState())}}}render(){return this.hasError?t("div",{class:"icon-fallback",part:"fallback"},t("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",focusable:"false"},t("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),t("line",{x1:"9",y1:"9",x2:"15",y2:"15"}),t("line",{x1:"15",y1:"9",x2:"9",y2:"15"}))):this.resolvedDefinition?t("div",{class:"svg-container",part:"svg"},function(i){const e={xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i.width??i.size??24} ${i.height??i.size??24}`,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...i.attributes,width:"100%",height:"100%","aria-hidden":"true",focusable:"false"};return t("svg",e,i.node.map(a))}(this.resolvedDefinition)):this.isBinary?t("img",{src:this.resolvedUrl,alt:"","aria-hidden":"true",part:"image",style:{width:"100%",height:"100%",objectFit:"contain"},onError:this.handleImageError}):t("div",{class:"svg-container",part:"svg",innerHTML:this.svgContent})}static get watchers(){return{name:[{watchHandler:0}],definition:[{watchHandler:0}],lib:[{watchHandler:0}],library:[{watchHandler:0}],localPath:[{watchHandler:0}],libVersion:[{watchHandler:0}],libraryVersion:[{watchHandler:0}]}}static get style(){return":host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;vertical-align:middle;line-height:1}.svg-container{display:inline-flex;width:100%;height:100%;align-items:center;justify-content:center}.svg-container svg{width:100% !important;height:100% !important;stroke-width:var(--q-icon-stroke-width, 2.1) !important;display:block}.icon-fallback{display:inline-flex;align-items:center;justify-content:center;color:var(--q-color-danger, #f87171);opacity:0.8;width:100%;height:100%}.icon-fallback svg{width:100%;height:100%;stroke-width:var(--q-icon-stroke-width, 2.1);display:block}"}},[513,"q-icon",{name:[1],library:[1],lib:[1],localPath:[1,"local-path"],libraryVersion:[1,"library-version"],libVersion:[1,"lib-version"],fetchTimeout:[2,"fetch-timeout"],definition:[16],size:[8],color:[1],label:[1],svgContent:[32],isBinary:[32],resolvedUrl:[32],hasError:[32],resolvedDefinition:[32]},void 0,{name:[{watchHandler:0}],definition:[{watchHandler:0}],lib:[{watchHandler:0}],library:[{watchHandler:0}],localPath:[{watchHandler:0}],libVersion:[{watchHandler:0}],libraryVersion:[{watchHandler:0}]}]);function b(){"undefined"!=typeof customElements&&["q-icon"].forEach((t=>{"q-icon"===t&&(customElements.get(i(t))||customElements.define(i(t),v))}))}b();export{v as Q,b as d}
|