@webquark/core 1.1.0-dev.6 → 1.1.0-dev.8
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 +7 -5
- package/dist/cjs/{action.props-CtwTiyf6.js → action.props-N0urQtdP.js} +1 -1
- package/dist/cjs/{chevron-up-Dysp_9UJ.js → chevron-up-D4t2OSHA.js} +2 -2
- package/dist/cjs/{data-table-cell-BAv6IIYx.js → data-table-cell-8uUCk2Qz.js} +5 -0
- package/dist/cjs/{field-CiEtk37y.js → field-CsrQGhG-.js} +2 -2
- package/dist/cjs/form-field-adapter-D0CJ6poh.js +51 -0
- package/dist/cjs/form-field-state-P63wN30v.js +51 -0
- package/dist/cjs/form-submit-action-C6c4aq6C.js +227 -0
- package/dist/cjs/image-crop-BZD5Cxd7.js +53 -0
- package/dist/cjs/{index-BLlc_shC.js → index-DWXhKHCB.js} +25 -26
- package/dist/cjs/index.cjs.js +8 -3
- package/dist/cjs/leaflet-maplibre-gl-JIaCQ-7v.js +1025 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{map.types-DNrz8rJh.js → map.types-BWymIRql.js} +1 -1
- package/dist/cjs/q-accordion.cjs.entry.js +2 -2
- package/dist/cjs/q-alert.cjs.entry.js +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +2 -2
- package/dist/cjs/q-banner.cjs.entry.js +1 -1
- package/dist/cjs/q-button_2.cjs.entry.js +112 -25
- package/dist/cjs/q-card.cjs.entry.js +3 -3
- package/dist/cjs/q-carousel.cjs.entry.js +400 -13
- 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 +73 -11
- package/dist/cjs/q-dialog.cjs.entry.js +4 -4
- package/dist/cjs/q-dropdown.cjs.entry.js +65 -12
- package/dist/cjs/q-form.cjs.entry.js +775 -288
- package/dist/cjs/q-grid.cjs.entry.js +3 -3
- package/dist/cjs/q-icon.cjs.entry.js +143 -89
- package/dist/cjs/q-image-comparison.cjs.entry.js +201 -0
- package/dist/cjs/q-inline.cjs.entry.js +3 -3
- package/dist/cjs/q-input_2.cjs.entry.js +91 -23
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +141 -22
- package/dist/cjs/q-media.cjs.entry.js +3 -3
- package/dist/cjs/q-navbar.cjs.entry.js +4 -4
- package/dist/cjs/q-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q-panel.cjs.entry.js +6 -6
- package/dist/cjs/q-quantity-selector.cjs.entry.js +6 -6
- package/dist/cjs/q-radio-group.cjs.entry.js +49 -12
- package/dist/cjs/q-reel.cjs.entry.js +3 -3
- package/dist/cjs/q-scrollable.cjs.entry.js +4 -4
- package/dist/cjs/q-section.cjs.entry.js +2 -2
- package/dist/cjs/q-sidepanel.cjs.entry.js +145 -25
- package/dist/cjs/q-stack.cjs.entry.js +3 -3
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram.cjs.entry.js +3 -3
- package/dist/cjs/q-syntax-box.cjs.entry.js +418 -301
- package/dist/cjs/q-tabs.cjs.entry.js +3 -3
- package/dist/cjs/q-textarea.cjs.entry.js +67 -22
- package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +59 -13
- package/dist/cjs/q-toolbar.cjs.entry.js +5 -5
- package/dist/cjs/registry-C3IYlNMp.js +323 -0
- package/dist/cjs/tokens-RMRaIOqv.js +957 -0
- package/dist/cjs/webquark.cjs.js +3 -3
- package/dist/collection/assets/icons/spinner.svg +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/actions/button/button.css +6 -6
- package/dist/collection/components/actions/button/button.js +250 -14
- package/dist/collection/components/actions/button/test/button-slots.cmp.test.js +70 -0
- package/dist/collection/components/content/card/card.css +1 -1
- package/dist/collection/components/content/carousel/carousel.css +91 -5
- package/dist/collection/components/content/carousel/carousel.js +511 -20
- package/dist/collection/components/content/carousel/internals/autoplay.js +64 -0
- package/dist/collection/components/content/carousel/internals/slide-state.js +50 -0
- package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +328 -0
- package/dist/collection/components/data-display/accordion/accordion.js +1 -1
- package/dist/collection/components/data-display/data-table/data-table-cell.js +4 -0
- package/dist/collection/components/data-display/data-table/data-table.css +73 -0
- package/dist/collection/components/data-display/data-table/data-table.js +117 -3
- package/dist/collection/components/data-display/data-table/internals/render-table-body.js +15 -3
- package/dist/collection/components/data-display/data-table/internals/render-table-head.js +1 -1
- package/dist/collection/components/data-display/data-table/internals/table-model.js +9 -1
- package/dist/collection/components/data-display/data-table/test/row-gutter.cmp.test.js +104 -0
- package/dist/collection/components/data-display/data-table/test/two-line-rows.cmp.test.js +164 -0
- package/dist/collection/components/data-display/map/internals/marker-controller.js +22 -0
- package/dist/collection/components/data-display/map/internals/marker-presentation.js +51 -2
- package/dist/collection/components/data-display/map/internals/markers.js +16 -1
- package/dist/collection/components/data-display/map/map.css +31 -0
- package/dist/collection/components/data-display/map/map.js +96 -15
- package/dist/collection/components/data-display/map/map.types.js +1 -1
- package/dist/collection/components/data-display/map/test/map.cmp.test.js +213 -0
- package/dist/collection/components/data-display/pagination/pagination.js +1 -1
- package/dist/collection/components/data-display/syntax-box/internals/value-sync.js +6 -23
- package/dist/collection/components/data-display/syntax-box/internals/value-sync.unit.test.js +25 -0
- package/dist/collection/components/data-display/syntax-box/syntax-box.css +12 -5
- package/dist/collection/components/data-display/syntax-box/syntax-box.js +78 -23
- package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +20 -0
- package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +241 -0
- package/dist/collection/components/data-display/syntax-box/test/syntax-fixtures.js +14 -0
- package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +157 -0
- package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
- package/dist/collection/components/inputs/dropdown/dropdown.css +11 -11
- package/dist/collection/components/inputs/dropdown/dropdown.js +64 -10
- package/dist/collection/components/inputs/form/form.css +5 -5
- package/dist/collection/components/inputs/form/form.js +203 -100
- package/dist/collection/components/inputs/form/internals/controls.js +121 -27
- package/dist/collection/components/inputs/form/internals/enter-behavior.js +14 -25
- package/dist/collection/components/inputs/form/internals/field-state.js +129 -0
- package/dist/collection/components/inputs/form/internals/reset.js +50 -0
- package/dist/collection/components/inputs/form/internals/submission.js +140 -0
- package/dist/collection/components/inputs/form/internals/values.js +176 -153
- package/dist/collection/components/inputs/form/internals/values.unit.test.js +59 -0
- package/dist/collection/components/inputs/form/test/form-reset-state.cmp.test.js +559 -0
- package/dist/collection/components/inputs/form/test/form-submit-transport.cmp.test.js +352 -0
- package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +438 -0
- package/dist/collection/components/inputs/form/test/form-values.cmp.test.js +440 -0
- package/dist/collection/components/inputs/input/input.css +10 -10
- package/dist/collection/components/inputs/input/input.js +91 -20
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +6 -6
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
- package/dist/collection/components/inputs/radio-group/radio-group.css +10 -10
- package/dist/collection/components/inputs/radio-group/radio-group.js +51 -9
- package/dist/collection/components/inputs/textarea/textarea.css +10 -10
- package/dist/collection/components/inputs/textarea/textarea.js +70 -18
- package/dist/collection/components/inputs/toggle/toggle.css +10 -10
- package/dist/collection/components/inputs/toggle/toggle.js +57 -10
- package/dist/collection/components/layout/grid/grid.js +1 -1
- package/dist/collection/components/layout/inline/inline.js +1 -1
- package/dist/collection/components/layout/navbar/navbar.css +10 -10
- package/dist/collection/components/layout/navbar/navbar.js +2 -2
- package/dist/collection/components/layout/panel/panel.js +4 -4
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.js +1 -1
- package/dist/collection/components/layout/sidepanel/internals/drawer.js +42 -4
- package/dist/collection/components/layout/sidepanel/sidepanel.css +148 -17
- package/dist/collection/components/layout/sidepanel/sidepanel.js +99 -10
- package/dist/collection/components/layout/sidepanel/test/nav-drawer-transitions.cmp.test.js +120 -0
- package/dist/collection/components/layout/sidepanel/test/panel-transitions.cmp.test.js +180 -0
- package/dist/collection/components/layout/stack/stack.js +1 -1
- package/dist/collection/components/layout/tabs/tabs.css +9 -9
- package/dist/collection/components/layout/tabs/tabs.js +1 -1
- package/dist/collection/components/layout/toolbar/toolbar.css +6 -6
- package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
- package/dist/collection/components/media/avatar/avatar.js +1 -1
- package/dist/collection/components/media/icon/internals/fetch-icon.js +33 -4
- package/dist/collection/components/media/icon/internals/fetch-icon.unit.test.js +51 -0
- package/dist/collection/components/media/icon/internals/policy.js +184 -0
- package/dist/collection/components/media/icon/internals/policy.unit.test.js +65 -0
- package/dist/collection/components/media/icon/internals/registry-lucide.unit.test.js +78 -0
- package/dist/collection/components/media/icon/internals/registry.js +33 -82
- package/dist/collection/components/media/icon/internals/sanitize-svg.js +80 -57
- package/dist/collection/components/media/icon/internals/url.js +31 -27
- package/dist/collection/components/media/icon/internals/url.unit.test.js +34 -0
- package/dist/collection/components/media/icon/test/icon-fixtures.js +47 -0
- package/dist/collection/components/media/icon/test/icon.cmp.test.js +223 -0
- package/dist/collection/components/media/image-comparison/image-comparison.css +124 -0
- package/dist/collection/components/media/image-comparison/image-comparison.js +468 -0
- package/dist/collection/components/media/image-comparison/test/image-comparison.cmp.test.js +234 -0
- package/dist/collection/components/media/media/media.js +22 -22
- package/dist/collection/components/media/reel/reel.js +2 -2
- package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/overlays/dialog/dialog.css +1 -1
- package/dist/collection/components/overlays/dialog/dialog.js +2 -2
- package/dist/collection/components/overlays/tooltip/internals/positioning.js +20 -5
- package/dist/collection/components/overlays/tooltip/tooltip.css +6 -2
- package/dist/collection/components/overlays/tooltip/tooltip.js +9 -3
- package/dist/collection/components/shared/field.js +1 -1
- package/dist/collection/index.js +2 -1
- package/dist/collection/native-content.css +24 -0
- package/dist/collection/playground/assets/comparison-after.svg +1 -0
- package/dist/collection/playground/assets/comparison-before.svg +1 -0
- package/dist/collection/playground/components/playground-header/playground-header.js +1 -1
- package/dist/collection/playground/playground.bundled.js +164 -4
- package/dist/collection/theme/test/foundation.cmp.test.js +6 -0
- package/dist/collection/theme/test/presets.cmp.test.js +129 -0
- package/dist/collection/theme/tokens.js +136 -4
- package/dist/collection/utils/form-field-adapter.js +44 -0
- package/dist/collection/utils/form-field-state.js +45 -0
- package/dist/collection/utils/form-reset-action.js +60 -0
- package/dist/collection/utils/form-submit-action.js +151 -0
- package/dist/collection/utils/form-submit-action.unit.test.js +15 -0
- package/dist/collection/utils/formatter.js +137 -158
- package/dist/collection/utils/formatter.unit.test.js +69 -51
- package/dist/collection/utils/image-crop.js +47 -0
- package/dist/collection/utils/image-crop.unit.test.js +57 -0
- package/dist/collection/utils/syntax.js +210 -81
- package/dist/collection/utils/syntax.unit.test.js +134 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-NEolaUak.js → p-6PPZ2sIO.js} +1 -1
- package/dist/components/p-B4Mg1xEw.js +1 -0
- package/dist/components/{p-BxFGkrUe.js → p-BH4gQWub.js} +1 -1
- package/dist/components/p-BOdNg0jc.js +1 -0
- package/dist/components/p-BcL0NVv0.js +1 -0
- package/dist/components/p-BofcK-7Z.js +1 -0
- package/dist/components/p-C6vxokHH.js +1 -0
- package/dist/components/p-CGml_DQ8.js +1 -0
- package/dist/components/{p-CK7avZdv.js → p-CKuPOxKN.js} +1 -1
- package/dist/components/p-CN1ut2Lb.js +1 -0
- package/dist/components/p-C_RztzNv.js +5 -0
- package/dist/components/p-CoIMrUb3.js +1 -0
- package/dist/components/{p-g9vOVxQ4.js → p-DKrPmn2y.js} +2 -2
- package/dist/components/p-DT6k8Yhx.js +1 -0
- package/dist/components/p-Dfp_If-_.js +1 -0
- package/dist/components/p-DstNl_WY.js +1 -0
- package/dist/components/p-GHhpSfZU.js +1 -0
- package/dist/components/p-SzKf4WZF.js +1 -0
- package/dist/components/p-ye27qtRo.js +1 -0
- package/dist/components/q-accordion.js +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-banner.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-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-image-comparison.d.ts +11 -0
- package/dist/components/q-image-comparison.js +1 -0
- 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 +5 -5
- 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 +5 -5
- 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-CpnGza8z.js} +1 -1
- package/dist/esm/{chevron-up-g9vOVxQ4.js → chevron-up-DKrPmn2y.js} +2 -2
- package/dist/esm/{data-table-cell-DmqVhVoj.js → data-table-cell-SzKf4WZF.js} +5 -1
- package/dist/esm/{field-DkpyvZiX.js → field-zfD6OQ02.js} +2 -2
- package/dist/esm/form-field-adapter-CGml_DQ8.js +46 -0
- package/dist/esm/form-field-state-DstNl_WY.js +47 -0
- package/dist/esm/form-submit-action-CoEIvDqE.js +213 -0
- package/dist/esm/image-crop-BcL0NVv0.js +49 -0
- package/dist/esm/{index-DbGG9Q40.js → index-B5ElFlHv.js} +25 -26
- package/dist/esm/index.js +4 -3
- package/dist/esm/leaflet-maplibre-gl-BvKlNmWf.js +1020 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{map.types-WJHaLJS_.js → map.types-CoIMrUb3.js} +1 -1
- package/dist/esm/q-accordion.entry.js +2 -2
- package/dist/esm/q-alert.entry.js +1 -1
- package/dist/esm/q-avatar.entry.js +2 -2
- package/dist/esm/q-banner.entry.js +1 -1
- package/dist/esm/q-button_2.entry.js +112 -25
- package/dist/esm/q-card.entry.js +3 -3
- package/dist/esm/q-carousel.entry.js +400 -13
- 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 +73 -11
- package/dist/esm/q-dialog.entry.js +4 -4
- package/dist/esm/q-dropdown.entry.js +65 -12
- package/dist/esm/q-form.entry.js +775 -288
- package/dist/esm/q-grid.entry.js +3 -3
- package/dist/esm/q-icon.entry.js +143 -89
- package/dist/esm/q-image-comparison.entry.js +199 -0
- package/dist/esm/q-inline.entry.js +3 -3
- package/dist/esm/q-input_2.entry.js +91 -23
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +141 -22
- package/dist/esm/q-media.entry.js +3 -3
- package/dist/esm/q-navbar.entry.js +4 -4
- package/dist/esm/q-pagination.entry.js +2 -2
- package/dist/esm/q-panel.entry.js +6 -6
- package/dist/esm/q-quantity-selector.entry.js +6 -6
- package/dist/esm/q-radio-group.entry.js +49 -12
- package/dist/esm/q-reel.entry.js +3 -3
- package/dist/esm/q-scrollable.entry.js +4 -4
- package/dist/esm/q-section.entry.js +2 -2
- package/dist/esm/q-sidepanel.entry.js +146 -26
- package/dist/esm/q-stack.entry.js +3 -3
- package/dist/esm/q-step-diagram-item.entry.js +2 -2
- package/dist/esm/q-step-diagram.entry.js +3 -3
- package/dist/esm/q-syntax-box.entry.js +418 -301
- package/dist/esm/q-tabs.entry.js +3 -3
- package/dist/esm/q-textarea.entry.js +67 -22
- package/dist/esm/q-thumbnail.entry.js +3 -3
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +59 -13
- package/dist/esm/q-toolbar.entry.js +5 -5
- package/dist/esm/registry-GHhpSfZU.js +308 -0
- package/dist/esm/tokens-B4Mg1xEw.js +953 -0
- package/dist/esm/webquark.js +4 -4
- package/dist/playground/assets/comparison-after.svg +1 -0
- package/dist/playground/assets/comparison-before.svg +1 -0
- package/dist/playground/assets/icons/check-preview.png +0 -0
- package/dist/playground/assets/icons/spinner.svg +1 -1
- package/dist/playground/build/index.esm.js +1 -1
- package/dist/playground/build/{p-737ca99e.entry.js → p-023f8437.entry.js} +1 -1
- package/dist/{webquark/p-989bdc1a.entry.js → playground/build/p-030ecde3.entry.js} +1 -1
- package/dist/playground/build/p-04c8cb9e.entry.js +1 -0
- package/dist/playground/build/p-059daa8a.entry.js +1 -0
- package/dist/playground/build/{p-ecbc0fee.entry.js → p-09cca7b9.entry.js} +1 -1
- package/dist/playground/build/p-0aa74ad6.entry.js +1 -0
- package/dist/playground/build/p-0ae43d6c.entry.js +1 -0
- package/dist/playground/build/p-0c3aac3f.entry.js +1 -0
- package/dist/playground/build/p-144ef339.entry.js +1 -0
- package/dist/playground/build/p-1d1f7bc3.entry.js +1 -0
- package/dist/playground/build/p-296fbdb1.entry.js +1 -0
- package/dist/playground/build/p-36118d90.entry.js +1 -0
- package/dist/playground/build/{p-742e39f1.entry.js → p-3bc4629c.entry.js} +1 -1
- package/dist/playground/build/{p-8bdababd.entry.js → p-48fb5228.entry.js} +1 -1
- package/dist/{webquark/p-abf54361.entry.js → playground/build/p-4d61b70d.entry.js} +1 -1
- package/dist/playground/build/p-5f232b44.entry.js +13 -0
- package/dist/playground/build/{p-6b63922b.entry.js → p-64096386.entry.js} +1 -1
- package/dist/playground/build/{p-15502232.entry.js → p-6bfffa79.entry.js} +1 -1
- package/dist/{webquark/p-ff1e2363.entry.js → playground/build/p-6e28cfe2.entry.js} +1 -1
- package/dist/playground/build/{p-96ef2b54.entry.js → p-70d9ffde.entry.js} +1 -1
- package/dist/playground/build/{p-97dae970.entry.js → p-8ece2c62.entry.js} +1 -1
- package/dist/playground/build/p-90b0858c.entry.js +1 -0
- package/dist/playground/build/p-91fff6b6.entry.js +1 -0
- package/dist/playground/build/p-923dac41.entry.js +1 -0
- package/dist/playground/build/p-97a89cae.entry.js +1 -0
- package/dist/playground/build/{p-f911c90f.entry.js → p-99d785ca.entry.js} +1 -1
- package/dist/playground/build/p-9e78b796.entry.js +1 -0
- package/dist/{webquark/p-d4a915e5.entry.js → playground/build/p-9ff7e5a4.entry.js} +1 -1
- package/dist/playground/build/p-B4Mg1xEw.js +1 -0
- package/dist/playground/build/p-B5ElFlHv.js +3 -0
- package/dist/playground/build/p-BOdNg0jc.js +1 -0
- package/dist/playground/build/p-BcL0NVv0.js +1 -0
- package/dist/playground/build/p-CGml_DQ8.js +1 -0
- package/dist/playground/build/p-C_RztzNv.js +5 -0
- package/dist/playground/build/p-CoIMrUb3.js +1 -0
- package/dist/{webquark/p-g9vOVxQ4.js → playground/build/p-DKrPmn2y.js} +2 -2
- package/dist/playground/build/{p-BqvCR2U8.js → p-DWO-pleQ.js} +1 -1
- package/dist/playground/build/p-Dhsn99q4.js +1 -0
- package/dist/playground/build/p-DstNl_WY.js +1 -0
- package/dist/playground/build/p-GHhpSfZU.js +1 -0
- package/dist/playground/build/p-SzKf4WZF.js +1 -0
- package/dist/playground/build/p-c523ec6f.entry.js +1 -0
- package/dist/playground/build/p-d0253d64.entry.js +1 -0
- package/dist/playground/build/p-d0fbd2b1.entry.js +1 -0
- package/dist/playground/build/{p-0d98e500.entry.js → p-dd115868.entry.js} +1 -1
- package/dist/playground/build/{p-c4fd89b8.entry.js → p-f1bac94c.entry.js} +1 -1
- package/dist/playground/build/p-f4f97e74.entry.js +1 -0
- package/dist/playground/build/p-f63b7214.entry.js +1 -0
- package/dist/{webquark/p-b465aebd.entry.js → playground/build/p-f98f9439.entry.js} +1 -1
- package/dist/playground/build/{p-de8813be.entry.js → p-f9ad63ff.entry.js} +1 -1
- package/dist/playground/build/p-fe200f68.entry.js +1 -0
- package/dist/playground/build/p-fe8c634a.entry.js +13 -0
- package/dist/playground/build/p-fec6fe0a.entry.js +1 -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/components.manifest.json +1 -0
- package/dist/playground/playground/specs/q-carousel.sandbox.json +15 -0
- package/dist/playground/playground/specs/q-data-table.sandbox.json +24 -0
- package/dist/playground/playground/specs/q-icon.sandbox.json +17 -1
- package/dist/playground/playground/specs/q-image-comparison.sandbox.json +24 -0
- package/dist/playground/playground/specs/q-syntax-box.sandbox.json +68 -24
- package/dist/playground/playground.js +164 -4
- package/dist/playground/presets.html +47 -0
- package/dist/types/components/actions/button/button.d.ts +26 -0
- package/dist/types/components/actions/button/test/button-slots.cmp.test.d.ts +1 -0
- package/dist/types/components/content/carousel/carousel.d.ts +71 -4
- package/dist/types/components/content/carousel/carousel.types.d.ts +5 -0
- package/dist/types/components/content/carousel/internals/autoplay.d.ts +22 -0
- package/dist/types/components/content/carousel/internals/slide-state.d.ts +8 -0
- package/dist/types/components/content/carousel/test/transitions.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/data-table/data-table-cell.d.ts +2 -0
- package/dist/types/components/data-display/data-table/data-table.d.ts +18 -1
- package/dist/types/components/data-display/data-table/data-table.types.d.ts +3 -0
- package/dist/types/components/data-display/data-table/internals/render-table-body.d.ts +1 -0
- package/dist/types/components/data-display/data-table/internals/table-model.d.ts +5 -1
- package/dist/types/components/data-display/data-table/test/row-gutter.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/data-table/test/two-line-rows.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/map/internals/marker-controller.d.ts +2 -0
- package/dist/types/components/data-display/map/map.d.ts +7 -3
- package/dist/types/components/data-display/map/map.types.d.ts +11 -1
- package/dist/types/components/data-display/syntax-box/internals/value-sync.d.ts +1 -4
- package/dist/types/components/data-display/syntax-box/internals/value-sync.unit.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +9 -3
- package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +6 -0
- package/dist/types/components/data-display/syntax-box/test/syntax-box.cmp.test.d.ts +1 -0
- package/dist/types/components/data-display/syntax-box/test/syntax-fixtures.d.ts +9 -0
- package/dist/types/components/data-display/syntax-box/test/syntax-format.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/inputs/form/form.d.ts +12 -7
- package/dist/types/components/inputs/form/form.types.d.ts +2 -0
- package/dist/types/components/inputs/form/internals/controls.d.ts +3 -0
- package/dist/types/components/inputs/form/internals/field-state.d.ts +19 -0
- package/dist/types/components/inputs/form/internals/reset.d.ts +3 -0
- package/dist/types/components/inputs/form/internals/submission.d.ts +17 -0
- package/dist/types/components/inputs/form/internals/values.d.ts +6 -1
- package/dist/types/components/inputs/form/internals/values.unit.test.d.ts +1 -0
- package/dist/types/components/inputs/form/test/form-reset-state.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/test/form-submit-transport.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/test/form-submit.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/test/form-values.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/input/input.d.ts +7 -1
- package/dist/types/components/inputs/radio-group/radio-group.d.ts +4 -0
- package/dist/types/components/inputs/textarea/textarea.d.ts +6 -1
- package/dist/types/components/inputs/toggle/toggle.d.ts +5 -0
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +9 -0
- package/dist/types/components/layout/sidepanel/test/nav-drawer-transitions.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/sidepanel/test/panel-transitions.cmp.test.d.ts +1 -0
- package/dist/types/components/media/icon/internals/fetch-icon.unit.test.d.ts +1 -0
- package/dist/types/components/media/icon/internals/policy.d.ts +19 -0
- package/dist/types/components/media/icon/internals/policy.unit.test.d.ts +1 -0
- package/dist/types/components/media/icon/internals/registry-lucide.unit.test.d.ts +1 -0
- package/dist/types/components/media/icon/internals/sanitize-svg.d.ts +1 -1
- package/dist/types/components/media/icon/internals/url.unit.test.d.ts +1 -0
- package/dist/types/components/media/icon/test/icon-fixtures.d.ts +4 -0
- package/dist/types/components/media/icon/test/icon.cmp.test.d.ts +1 -0
- package/dist/types/components/media/image-comparison/image-comparison.d.ts +63 -0
- package/dist/types/components/media/image-comparison/test/image-comparison.cmp.test.d.ts +1 -0
- package/dist/types/components/media/media/media.d.ts +1 -1
- package/dist/types/components/overlays/tooltip/internals/positioning.d.ts +1 -1
- package/dist/types/components/overlays/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +436 -23
- package/dist/types/index.d.ts +7 -4
- package/dist/types/theme/test/presets.cmp.test.d.ts +7 -0
- package/dist/types/theme/tokens.d.ts +78 -0
- package/dist/types/utils/form-field-adapter.d.ts +17 -0
- package/dist/types/utils/form-field-state.d.ts +4 -0
- package/dist/types/utils/form-reset-action.d.ts +5 -0
- package/dist/types/utils/form-submit-action.d.ts +17 -0
- package/dist/types/utils/form-submit-action.unit.test.d.ts +1 -0
- package/dist/types/utils/formatter.d.ts +10 -19
- package/dist/types/utils/image-crop.d.ts +30 -0
- package/dist/types/utils/image-crop.unit.test.d.ts +1 -0
- package/dist/types/utils/syntax.d.ts +11 -7
- package/dist/types/utils/syntax.unit.test.d.ts +1 -0
- package/dist/webquark/index.esm.js +1 -1
- package/dist/webquark/native-content.css +24 -0
- package/dist/webquark/{p-737ca99e.entry.js → p-023f8437.entry.js} +1 -1
- package/dist/{playground/build/p-989bdc1a.entry.js → webquark/p-030ecde3.entry.js} +1 -1
- package/dist/webquark/p-04c8cb9e.entry.js +1 -0
- package/dist/webquark/p-059daa8a.entry.js +1 -0
- package/dist/webquark/{p-ecbc0fee.entry.js → p-09cca7b9.entry.js} +1 -1
- package/dist/webquark/p-0aa74ad6.entry.js +1 -0
- package/dist/webquark/p-0ae43d6c.entry.js +1 -0
- package/dist/webquark/p-0c3aac3f.entry.js +1 -0
- package/dist/webquark/p-144ef339.entry.js +1 -0
- package/dist/webquark/p-1d1f7bc3.entry.js +1 -0
- package/dist/webquark/p-296fbdb1.entry.js +1 -0
- package/dist/webquark/p-36118d90.entry.js +1 -0
- package/dist/webquark/{p-742e39f1.entry.js → p-3bc4629c.entry.js} +1 -1
- package/dist/webquark/{p-8bdababd.entry.js → p-48fb5228.entry.js} +1 -1
- package/dist/{playground/build/p-abf54361.entry.js → webquark/p-4d61b70d.entry.js} +1 -1
- package/dist/webquark/p-5f232b44.entry.js +13 -0
- package/dist/webquark/{p-6b63922b.entry.js → p-64096386.entry.js} +1 -1
- package/dist/webquark/{p-15502232.entry.js → p-6bfffa79.entry.js} +1 -1
- package/dist/{playground/build/p-ff1e2363.entry.js → webquark/p-6e28cfe2.entry.js} +1 -1
- package/dist/webquark/{p-96ef2b54.entry.js → p-70d9ffde.entry.js} +1 -1
- package/dist/webquark/{p-97dae970.entry.js → p-8ece2c62.entry.js} +1 -1
- package/dist/webquark/p-90b0858c.entry.js +1 -0
- package/dist/webquark/p-91fff6b6.entry.js +1 -0
- package/dist/webquark/p-923dac41.entry.js +1 -0
- package/dist/webquark/p-97a89cae.entry.js +1 -0
- package/dist/webquark/{p-f911c90f.entry.js → p-99d785ca.entry.js} +1 -1
- package/dist/webquark/p-9e78b796.entry.js +1 -0
- package/dist/{playground/build/p-d4a915e5.entry.js → webquark/p-9ff7e5a4.entry.js} +1 -1
- package/dist/webquark/p-B4Mg1xEw.js +1 -0
- package/dist/webquark/p-B5ElFlHv.js +3 -0
- package/dist/webquark/p-BOdNg0jc.js +1 -0
- package/dist/webquark/p-BcL0NVv0.js +1 -0
- package/dist/webquark/p-CGml_DQ8.js +1 -0
- package/dist/webquark/p-C_RztzNv.js +5 -0
- package/dist/webquark/p-CoIMrUb3.js +1 -0
- package/dist/{playground/build/p-g9vOVxQ4.js → webquark/p-DKrPmn2y.js} +2 -2
- package/dist/webquark/{p-BqvCR2U8.js → p-DWO-pleQ.js} +1 -1
- package/dist/webquark/p-Dhsn99q4.js +1 -0
- package/dist/webquark/p-DstNl_WY.js +1 -0
- package/dist/webquark/p-GHhpSfZU.js +1 -0
- package/dist/webquark/p-SzKf4WZF.js +1 -0
- package/dist/webquark/p-c523ec6f.entry.js +1 -0
- package/dist/webquark/p-d0253d64.entry.js +1 -0
- package/dist/webquark/p-d0fbd2b1.entry.js +1 -0
- package/dist/webquark/{p-0d98e500.entry.js → p-dd115868.entry.js} +1 -1
- package/dist/webquark/{p-c4fd89b8.entry.js → p-f1bac94c.entry.js} +1 -1
- package/dist/webquark/p-f4f97e74.entry.js +1 -0
- package/dist/webquark/p-f63b7214.entry.js +1 -0
- package/dist/{playground/build/p-b465aebd.entry.js → webquark/p-f98f9439.entry.js} +1 -1
- package/dist/webquark/{p-de8813be.entry.js → p-f9ad63ff.entry.js} +1 -1
- package/dist/webquark/p-fe200f68.entry.js +1 -0
- package/dist/webquark/p-fe8c634a.entry.js +13 -0
- package/dist/webquark/p-fec6fe0a.entry.js +1 -0
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +17 -19
- package/scripts/webquark-serve.js +9 -7
- package/scripts/wq-switch/README.md +115 -103
- package/scripts/wq-switch/dist/index.js +129 -82
- package/scripts/wq-switch/dist/setup.js +81 -61
- package/dist/cjs/leaflet-maplibre-gl-BJKExsns.js +0 -1031
- package/dist/cjs/registry-BhkCNgxt.js +0 -179
- 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-BvBRW3dl.js +0 -1
- package/dist/components/p-Bw4TVbfm.js +0 -1
- package/dist/components/p-CFuqfXuv.js +0 -9
- package/dist/components/p-Cx1vCuMp.js +0 -1
- package/dist/components/p-D0Q2vrt5.js +0 -1
- package/dist/components/p-DmqVhVoj.js +0 -1
- package/dist/components/p-GU98U1DJ.js +0 -1
- package/dist/components/p-WJHaLJS_.js +0 -1
- package/dist/components/p-f95uguY1.js +0 -1
- package/dist/esm/leaflet-maplibre-gl-BVDAAs7w.js +0 -1026
- package/dist/esm/registry-BvBRW3dl.js +0 -173
- package/dist/esm/tokens-f95uguY1.js +0 -38
- package/dist/playground/build/p-0aea8464.entry.js +0 -1
- 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-408bf48a.entry.js +0 -1
- package/dist/playground/build/p-47253466.entry.js +0 -1
- package/dist/playground/build/p-5f6860f2.entry.js +0 -13
- package/dist/playground/build/p-6b619655.entry.js +0 -1
- package/dist/playground/build/p-71e3d582.entry.js +0 -1
- package/dist/playground/build/p-8115ec23.entry.js +0 -1
- package/dist/playground/build/p-8ad43d7f.entry.js +0 -1
- package/dist/playground/build/p-9418caa0.entry.js +0 -1
- package/dist/playground/build/p-BvBRW3dl.js +0 -1
- package/dist/playground/build/p-CFuqfXuv.js +0 -9
- package/dist/playground/build/p-DbGG9Q40.js +0 -3
- package/dist/playground/build/p-DmqVhVoj.js +0 -1
- package/dist/playground/build/p-JgeOdXyP.js +0 -1
- package/dist/playground/build/p-WJHaLJS_.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-c1f3dca6.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-d7d436c5.entry.js +0 -13
- package/dist/playground/build/p-eb71e335.entry.js +0 -1
- package/dist/playground/build/p-ed327679.entry.js +0 -1
- package/dist/playground/build/p-f95uguY1.js +0 -1
- package/dist/webquark/p-0aea8464.entry.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-408bf48a.entry.js +0 -1
- package/dist/webquark/p-47253466.entry.js +0 -1
- package/dist/webquark/p-5f6860f2.entry.js +0 -13
- package/dist/webquark/p-6b619655.entry.js +0 -1
- package/dist/webquark/p-71e3d582.entry.js +0 -1
- package/dist/webquark/p-8115ec23.entry.js +0 -1
- package/dist/webquark/p-8ad43d7f.entry.js +0 -1
- package/dist/webquark/p-9418caa0.entry.js +0 -1
- package/dist/webquark/p-BvBRW3dl.js +0 -1
- package/dist/webquark/p-CFuqfXuv.js +0 -9
- package/dist/webquark/p-DbGG9Q40.js +0 -3
- package/dist/webquark/p-DmqVhVoj.js +0 -1
- package/dist/webquark/p-JgeOdXyP.js +0 -1
- package/dist/webquark/p-WJHaLJS_.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-c1f3dca6.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-d7d436c5.entry.js +0 -13
- package/dist/webquark/p-eb71e335.entry.js +0 -1
- package/dist/webquark/p-ed327679.entry.js +0 -1
- package/dist/webquark/p-f95uguY1.js +0 -1
|
@@ -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()
|
|
@@ -2521,9 +2523,9 @@ class TokenRow extends HTMLElement {
|
|
|
2521
2523
|
value: hexVal,
|
|
2522
2524
|
onInput: (e) => {
|
|
2523
2525
|
const target = e.target;
|
|
2524
|
-
const
|
|
2525
|
-
if (
|
|
2526
|
-
|
|
2526
|
+
const textInput = this.querySelector(".color-text-input");
|
|
2527
|
+
if (textInput)
|
|
2528
|
+
textInput.value = target.value;
|
|
2527
2529
|
document.documentElement.style.setProperty(this.token.name, target.value);
|
|
2528
2530
|
}
|
|
2529
2531
|
});
|
|
@@ -3612,6 +3614,164 @@ 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": {
|
|
3693
|
+
compact: "var(--q-font-size-lg)",
|
|
3694
|
+
comfortable: "clamp(1.4rem, 1.1rem + 1.2vw, 2rem)"
|
|
3695
|
+
},
|
|
3696
|
+
"--q-heading-3-size": {
|
|
3697
|
+
compact: "var(--q-font-size-lg)",
|
|
3698
|
+
comfortable: "clamp(1.265625rem, 1.0546875rem + 0.84375vw, 1.6875rem)"
|
|
3699
|
+
},
|
|
3700
|
+
"--q-heading-4-size": {
|
|
3701
|
+
compact: "var(--q-font-size-lg)",
|
|
3702
|
+
comfortable: "1.25rem"
|
|
3703
|
+
},
|
|
3704
|
+
"--q-heading-5-size": { compact: "var(--q-font-size-lg)", comfortable: "1.25rem" },
|
|
3705
|
+
"--q-heading-6-size": { compact: "var(--q-font-size-lg)", comfortable: "1.125rem" },
|
|
3706
|
+
...Object.fromEntries([1, 2, 3, 4, 5, 6].map((level) => [
|
|
3707
|
+
`--q-heading-${level}-line-height`,
|
|
3708
|
+
{ compact: "1.3", comfortable: level <= 2 ? "1.2" : "1.3" }
|
|
3709
|
+
])),
|
|
3710
|
+
"--q-content-paragraph-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3711
|
+
"--q-content-heading-gap": { compact: "var(--q-padding-lg)", comfortable: "1.5rem" },
|
|
3712
|
+
"--q-content-section-gap": { compact: "var(--q-space-2xl)", comfortable: "clamp(3rem, 2rem + 4vw, 6rem)" },
|
|
3713
|
+
"--q-content-padding": { compact: "var(--q-padding-lg)", comfortable: "clamp(1.5rem, 1rem + 2vw, 3rem)" },
|
|
3714
|
+
"--q-field-text-size": { compact: ".75rem", comfortable: ".875rem" },
|
|
3715
|
+
"--q-field-text-line": { compact: "1rem", comfortable: "1.25rem" }
|
|
3716
|
+
};
|
|
3717
|
+
var componentPresetTokens = {
|
|
3718
|
+
"--q-toolbar-height": { compact: "0px", comfortable: "72px" },
|
|
3719
|
+
"--q-toolbar-compact-height": { compact: "0px", comfortable: "60px" },
|
|
3720
|
+
"--q-font-size-xs": { compact: "0.7rem", comfortable: "0.8125rem" },
|
|
3721
|
+
"--q-font-size-2xs": { compact: "0.625rem", comfortable: "0.75rem" },
|
|
3722
|
+
"--q-btn-circle-size": { compact: "120px", comfortable: "144px" },
|
|
3723
|
+
"--q-btn-circle-padding": { compact: "12px", comfortable: "16px" },
|
|
3724
|
+
"--q-table-toolbar-padding-block": { compact: "12px", comfortable: "16px" },
|
|
3725
|
+
"--q-table-toolbar-padding-inline": { compact: "16px", comfortable: "24px" },
|
|
3726
|
+
"--q-bar-edge-padding": { compact: "24px", comfortable: "32px" },
|
|
3727
|
+
"--q-bar-edge-compact-padding": { compact: "16px", comfortable: "24px" },
|
|
3728
|
+
"--q-table-cell-padding-block": { compact: "4.5px", comfortable: "10px" },
|
|
3729
|
+
"--q-table-cell-padding-inline": { compact: "8px", comfortable: "14px" },
|
|
3730
|
+
"--q-dropdown-option-padding": { compact: "10px 14px", comfortable: "12px 18px" },
|
|
3731
|
+
"--q-tooltip-padding": { compact: "6px 10px", comfortable: "8px 14px" },
|
|
3732
|
+
"--q-syntax-padding": { compact: "16px", comfortable: "24px" },
|
|
3733
|
+
"--q-syntax-compact-padding": { compact: "10px", comfortable: "16px" },
|
|
3734
|
+
"--q-syntax-header-padding": { compact: "4px 16px", comfortable: "8px 24px" },
|
|
3735
|
+
"--q-sidepanel-nav-font": { compact: "0.875rem", comfortable: "1rem" },
|
|
3736
|
+
"--q-sidepanel-nav-small-font": { compact: "0.75rem", comfortable: "0.875rem" },
|
|
3737
|
+
"--q-sidepanel-nav-badge-font": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3738
|
+
"--q-navbar-item-height": { compact: "36px", comfortable: "44px" },
|
|
3739
|
+
"--q-navbar-gap": { compact: "20px", comfortable: "28px" },
|
|
3740
|
+
"--q-navbar-height": { compact: "64px", comfortable: "72px" },
|
|
3741
|
+
"--q-navbar-compact-height": { compact: "52px", comfortable: "60px" },
|
|
3742
|
+
"--q-navbar-logo-size": { compact: "32px", comfortable: "40px" },
|
|
3743
|
+
"--q-navbar-brand-size": { compact: "1rem", comfortable: "1.25rem" },
|
|
3744
|
+
"--q-navbar-nav-gap": { compact: "6px", comfortable: "10px" },
|
|
3745
|
+
"--q-navbar-action-gap": { compact: "8px", comfortable: "12px" },
|
|
3746
|
+
"--q-navbar-item-gap": { compact: "8px", comfortable: "12px" },
|
|
3747
|
+
"--q-navbar-item-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3748
|
+
"--q-navbar-item-size": { compact: "0.9rem", comfortable: "1rem" },
|
|
3749
|
+
"--q-navbar-item-icon-only-size": { compact: "40px", comfortable: "44px" },
|
|
3750
|
+
"--q-navbar-item-icon-only-padding": { compact: "8px", comfortable: "10px" },
|
|
3751
|
+
"--q-navbar-mobile-panel-padding": { compact: "8px 16px 16px", comfortable: "12px 24px 24px" },
|
|
3752
|
+
"--q-avatar-font-size": { compact: "0.8rem", comfortable: "1rem" },
|
|
3753
|
+
"--q-avatar-font-size-sm": { compact: "0.65rem", comfortable: "0.75rem" },
|
|
3754
|
+
"--q-avatar-font-size-lg": { compact: "1rem", comfortable: "1.25rem" },
|
|
3755
|
+
"--q-conversation-gap": { compact: "10px", comfortable: "16px" },
|
|
3756
|
+
"--q-conversation-header-gap": { compact: "4px", comfortable: "6px" },
|
|
3757
|
+
"--q-conversation-header-inset": { compact: "4px", comfortable: "6px" },
|
|
3758
|
+
"--q-conversation-padding": { compact: "11px 13px", comfortable: "16px 20px" },
|
|
3759
|
+
"--q-conversation-footer-gap": { compact: "10px", comfortable: "16px" },
|
|
3760
|
+
"--q-conversation-footer-margin": { compact: "6px", comfortable: "10px" },
|
|
3761
|
+
"--q-conversation-meta-gap": { compact: "6px", comfortable: "10px" },
|
|
3762
|
+
"--q-conversation-compact-padding": { compact: "7px 10px", comfortable: "10px 14px" },
|
|
3763
|
+
"--q-alert-padding": { compact: "12px 14px", comfortable: "16px 20px" },
|
|
3764
|
+
"--q-alert-gap": { compact: "10px", comfortable: "16px" },
|
|
3765
|
+
"--q-alert-actions-gap": { compact: "8px", comfortable: "12px" },
|
|
3766
|
+
"--q-pagination-button-height": { compact: "30px", comfortable: "44px" },
|
|
3767
|
+
"--q-pagination-button-padding": { compact: "5px 8px", comfortable: "8px 12px" }
|
|
3768
|
+
};
|
|
3769
|
+
var presetTokens = Object.entries(comfortablePreset).map(([name, comfortable]) => {
|
|
3770
|
+
const token = [...dimensionTokens, ...themeGroups.flatMap((group) => group.tokens)].find((token) => token.name === name);
|
|
3771
|
+
if (!token)
|
|
3772
|
+
throw new Error(`Preset token has no compact default: ${name}`);
|
|
3773
|
+
return { name, compact: token.value, comfortable };
|
|
3774
|
+
}).concat(Object.entries({ ...semanticPresetTokens, ...componentPresetTokens }).map(([name, values]) => ({ name, ...values })));
|
|
3615
3775
|
|
|
3616
3776
|
// src/playground/components/theme-designer/theme-designer.tsx
|
|
3617
3777
|
var THEME_TOKENS = [
|
|
@@ -254,6 +254,11 @@ describe('foundation composition in the browser', () => {
|
|
|
254
254
|
dropdown.value = 'not-in-current-page';
|
|
255
255
|
await frame();
|
|
256
256
|
await form.submitForm();
|
|
257
|
+
expect(submissions).toBe(0);
|
|
258
|
+
expect(await dropdown.checkValidity()).toBe(false);
|
|
259
|
+
dropdown.externalSearch = true;
|
|
260
|
+
await frame();
|
|
261
|
+
await form.submitForm();
|
|
257
262
|
expect(submissions).toBe(1);
|
|
258
263
|
dropdown.error = 'Server rejected selection';
|
|
259
264
|
await frame();
|
|
@@ -269,6 +274,7 @@ describe('foundation composition in the browser', () => {
|
|
|
269
274
|
it('participates in native form validation and preserves noValidate', async () => {
|
|
270
275
|
await fixture('<form><q-dropdown name="choice" required></q-dropdown></form><q-form no-validate><q-dropdown name="other" required></q-dropdown></q-form>');
|
|
271
276
|
expect(document.querySelector('form').checkValidity()).toBe(false);
|
|
277
|
+
document.querySelector('q-dropdown').options = ['a'];
|
|
272
278
|
document.querySelector('q-dropdown').value = 'a';
|
|
273
279
|
await frame();
|
|
274
280
|
expect(document.querySelector('form').checkValidity()).toBe(true);
|
|
@@ -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,132 @@ 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': {
|
|
871
|
+
compact: 'var(--q-font-size-lg)',
|
|
872
|
+
comfortable: 'clamp(1.4rem, 1.1rem + 1.2vw, 2rem)',
|
|
873
|
+
},
|
|
874
|
+
'--q-heading-3-size': {
|
|
875
|
+
compact: 'var(--q-font-size-lg)',
|
|
876
|
+
comfortable: 'clamp(1.265625rem, 1.0546875rem + 0.84375vw, 1.6875rem)',
|
|
877
|
+
},
|
|
878
|
+
'--q-heading-4-size': {
|
|
879
|
+
compact: 'var(--q-font-size-lg)',
|
|
880
|
+
comfortable: '1.25rem',
|
|
881
|
+
},
|
|
882
|
+
'--q-heading-5-size': { compact: 'var(--q-font-size-lg)', comfortable: '1.25rem' },
|
|
883
|
+
'--q-heading-6-size': { compact: 'var(--q-font-size-lg)', comfortable: '1.125rem' },
|
|
884
|
+
...Object.fromEntries([1, 2, 3, 4, 5, 6].map(level => [
|
|
885
|
+
`--q-heading-${level}-line-height`, { compact: '1.3', comfortable: level <= 2 ? '1.2' : '1.3' },
|
|
886
|
+
])),
|
|
887
|
+
'--q-content-paragraph-gap': { compact: 'var(--q-padding-lg)', comfortable: '1.5rem' },
|
|
888
|
+
'--q-content-heading-gap': { compact: 'var(--q-padding-lg)', comfortable: '1.5rem' },
|
|
889
|
+
'--q-content-section-gap': { compact: 'var(--q-space-2xl)', comfortable: 'clamp(3rem, 2rem + 4vw, 6rem)' },
|
|
890
|
+
'--q-content-padding': { compact: 'var(--q-padding-lg)', comfortable: 'clamp(1.5rem, 1rem + 2vw, 3rem)' },
|
|
891
|
+
'--q-field-text-size': { compact: '.75rem', comfortable: '.875rem' },
|
|
892
|
+
'--q-field-text-line': { compact: '1rem', comfortable: '1.25rem' },
|
|
893
|
+
};
|
|
894
|
+
// Internal size defaults keep generic and size-specific tab overrides independent.
|
|
895
|
+
export const internalPresetTokens = {
|
|
896
|
+
'--_q-preset-tabs-height-sm': { compact: '34px', comfortable: '40px' },
|
|
897
|
+
'--_q-preset-tabs-height-md': { compact: '42px', comfortable: '48px' },
|
|
898
|
+
'--_q-preset-tabs-height-lg': { compact: '50px', comfortable: '56px' },
|
|
899
|
+
'--_q-preset-tabs-padding-sm': { compact: '6px 10px', comfortable: '8px 14px' },
|
|
900
|
+
'--_q-preset-tabs-padding-md': { compact: '9px 16px', comfortable: '12px 20px' },
|
|
901
|
+
'--_q-preset-tabs-padding-lg': { compact: '14px 18px', comfortable: '16px 24px' },
|
|
902
|
+
};
|
|
903
|
+
export const componentPresetTokens = {
|
|
904
|
+
'--q-toolbar-height': { compact: '0px', comfortable: '72px' },
|
|
905
|
+
'--q-toolbar-compact-height': { compact: '0px', comfortable: '60px' },
|
|
906
|
+
'--q-font-size-xs': { compact: '0.7rem', comfortable: '0.8125rem' },
|
|
907
|
+
'--q-font-size-2xs': { compact: '0.625rem', comfortable: '0.75rem' },
|
|
908
|
+
'--q-btn-circle-size': { compact: '120px', comfortable: '144px' },
|
|
909
|
+
'--q-btn-circle-padding': { compact: '12px', comfortable: '16px' },
|
|
910
|
+
'--q-table-toolbar-padding-block': { compact: '12px', comfortable: '16px' },
|
|
911
|
+
'--q-table-toolbar-padding-inline': { compact: '16px', comfortable: '24px' },
|
|
912
|
+
'--q-bar-edge-padding': { compact: '24px', comfortable: '32px' },
|
|
913
|
+
'--q-bar-edge-compact-padding': { compact: '16px', comfortable: '24px' },
|
|
914
|
+
'--q-table-cell-padding-block': { compact: '4.5px', comfortable: '10px' },
|
|
915
|
+
'--q-table-cell-padding-inline': { compact: '8px', comfortable: '14px' },
|
|
916
|
+
'--q-dropdown-option-padding': { compact: '10px 14px', comfortable: '12px 18px' },
|
|
917
|
+
'--q-tooltip-padding': { compact: '6px 10px', comfortable: '8px 14px' },
|
|
918
|
+
'--q-syntax-padding': { compact: '16px', comfortable: '24px' },
|
|
919
|
+
'--q-syntax-compact-padding': { compact: '10px', comfortable: '16px' },
|
|
920
|
+
'--q-syntax-header-padding': { compact: '4px 16px', comfortable: '8px 24px' },
|
|
921
|
+
'--q-sidepanel-nav-font': { compact: '0.875rem', comfortable: '1rem' },
|
|
922
|
+
'--q-sidepanel-nav-small-font': { compact: '0.75rem', comfortable: '0.875rem' },
|
|
923
|
+
'--q-sidepanel-nav-badge-font': { compact: '0.65rem', comfortable: '0.75rem' },
|
|
924
|
+
'--q-navbar-item-height': { compact: '36px', comfortable: '44px' },
|
|
925
|
+
'--q-navbar-gap': { compact: '20px', comfortable: '28px' },
|
|
926
|
+
'--q-navbar-height': { compact: '64px', comfortable: '72px' },
|
|
927
|
+
'--q-navbar-compact-height': { compact: '52px', comfortable: '60px' },
|
|
928
|
+
'--q-navbar-logo-size': { compact: '32px', comfortable: '40px' },
|
|
929
|
+
'--q-navbar-brand-size': { compact: '1rem', comfortable: '1.25rem' },
|
|
930
|
+
'--q-navbar-nav-gap': { compact: '6px', comfortable: '10px' },
|
|
931
|
+
'--q-navbar-action-gap': { compact: '8px', comfortable: '12px' },
|
|
932
|
+
'--q-navbar-item-gap': { compact: '8px', comfortable: '12px' },
|
|
933
|
+
'--q-navbar-item-padding': { compact: '7px 10px', comfortable: '10px 14px' },
|
|
934
|
+
'--q-navbar-item-size': { compact: '0.9rem', comfortable: '1rem' },
|
|
935
|
+
'--q-navbar-item-icon-only-size': { compact: '40px', comfortable: '44px' },
|
|
936
|
+
'--q-navbar-item-icon-only-padding': { compact: '8px', comfortable: '10px' },
|
|
937
|
+
'--q-navbar-mobile-panel-padding': { compact: '8px 16px 16px', comfortable: '12px 24px 24px' },
|
|
938
|
+
'--q-avatar-font-size': { compact: '0.8rem', comfortable: '1rem' },
|
|
939
|
+
'--q-avatar-font-size-sm': { compact: '0.65rem', comfortable: '0.75rem' },
|
|
940
|
+
'--q-avatar-font-size-lg': { compact: '1rem', comfortable: '1.25rem' },
|
|
941
|
+
'--q-conversation-gap': { compact: '10px', comfortable: '16px' },
|
|
942
|
+
'--q-conversation-header-gap': { compact: '4px', comfortable: '6px' },
|
|
943
|
+
'--q-conversation-header-inset': { compact: '4px', comfortable: '6px' },
|
|
944
|
+
'--q-conversation-padding': { compact: '11px 13px', comfortable: '16px 20px' },
|
|
945
|
+
'--q-conversation-footer-gap': { compact: '10px', comfortable: '16px' },
|
|
946
|
+
'--q-conversation-footer-margin': { compact: '6px', comfortable: '10px' },
|
|
947
|
+
'--q-conversation-meta-gap': { compact: '6px', comfortable: '10px' },
|
|
948
|
+
'--q-conversation-compact-padding': { compact: '7px 10px', comfortable: '10px 14px' },
|
|
949
|
+
'--q-alert-padding': { compact: '12px 14px', comfortable: '16px 20px' },
|
|
950
|
+
'--q-alert-gap': { compact: '10px', comfortable: '16px' },
|
|
951
|
+
'--q-alert-actions-gap': { compact: '8px', comfortable: '12px' },
|
|
952
|
+
'--q-pagination-button-height': { compact: '30px', comfortable: '44px' },
|
|
953
|
+
'--q-pagination-button-padding': { compact: '5px 8px', comfortable: '8px 12px' },
|
|
954
|
+
};
|
|
955
|
+
export const presetTokens = Object.entries(comfortablePreset).map(([name, comfortable]) => {
|
|
956
|
+
const token = [...dimensionTokens, ...themeGroups.flatMap(group => group.tokens)].find(token => token.name === name);
|
|
957
|
+
if (!token)
|
|
958
|
+
throw new Error(`Preset token has no compact default: ${name}`);
|
|
959
|
+
return { name, compact: token.value, comfortable };
|
|
960
|
+
}).concat(Object.entries({ ...semanticPresetTokens, ...componentPresetTokens }).map(([name, values]) => ({ name, ...values })));
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** Private FACE protocol. No consumer shadow traversal or parallel value store. */
|
|
2
|
+
export const formFieldProtocol = Symbol.for('webquark.form-field.v1');
|
|
3
|
+
export const FORM_FIELD_READY_TIMEOUT_MS = 5000;
|
|
4
|
+
function connection(host) {
|
|
5
|
+
const target = host;
|
|
6
|
+
if (!target[formFieldProtocol]) {
|
|
7
|
+
Object.defineProperty(target, formFieldProtocol, { value: { version: 1, waiting: new Set() } });
|
|
8
|
+
}
|
|
9
|
+
return target[formFieldProtocol];
|
|
10
|
+
}
|
|
11
|
+
export function registerFormField(host, field) {
|
|
12
|
+
const state = connection(host);
|
|
13
|
+
state.field = field;
|
|
14
|
+
for (const done of Array.from(state.waiting))
|
|
15
|
+
done();
|
|
16
|
+
}
|
|
17
|
+
export function readFormField(host) {
|
|
18
|
+
const state = host[formFieldProtocol];
|
|
19
|
+
return state?.version === 1 ? state.field : undefined;
|
|
20
|
+
}
|
|
21
|
+
export function awaitFormField(host, signal, timeoutMs = FORM_FIELD_READY_TIMEOUT_MS) {
|
|
22
|
+
const state = connection(host);
|
|
23
|
+
if (state.field || signal?.aborted)
|
|
24
|
+
return Promise.resolve();
|
|
25
|
+
return new Promise((resolve, reject) => {
|
|
26
|
+
const cleanup = () => {
|
|
27
|
+
clearTimeout(timeout);
|
|
28
|
+
state.waiting.delete(done);
|
|
29
|
+
signal?.removeEventListener('abort', done);
|
|
30
|
+
};
|
|
31
|
+
const done = () => {
|
|
32
|
+
cleanup();
|
|
33
|
+
resolve();
|
|
34
|
+
};
|
|
35
|
+
const timeout = setTimeout(() => {
|
|
36
|
+
cleanup();
|
|
37
|
+
const error = new Error(`Form field ${host.tagName.toLowerCase()} did not become ready within ${FORM_FIELD_READY_TIMEOUT_MS}ms.`);
|
|
38
|
+
error.name = 'TimeoutError';
|
|
39
|
+
reject(error);
|
|
40
|
+
}, timeoutMs);
|
|
41
|
+
state.waiting.add(done);
|
|
42
|
+
signal?.addEventListener('abort', done, { once: true });
|
|
43
|
+
});
|
|
44
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Reflect current props before consulting native FACE disabling and association. */
|
|
2
|
+
export function syncFieldHost(host, disabled, name, required) {
|
|
3
|
+
if (!host)
|
|
4
|
+
return Boolean(disabled);
|
|
5
|
+
const flag = (name, enabled) => {
|
|
6
|
+
if (enabled && !host.hasAttribute(name)) {
|
|
7
|
+
host.setAttribute(name, '');
|
|
8
|
+
}
|
|
9
|
+
else if (!enabled && host.hasAttribute(name)) {
|
|
10
|
+
host.removeAttribute(name);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
flag('disabled', Boolean(disabled));
|
|
14
|
+
if (arguments.length >= 3) {
|
|
15
|
+
if (name === undefined || name === null) {
|
|
16
|
+
host.removeAttribute('name');
|
|
17
|
+
}
|
|
18
|
+
else if (host.getAttribute('name') !== name) {
|
|
19
|
+
host.setAttribute('name', name);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
if (required !== undefined)
|
|
23
|
+
flag('required', required);
|
|
24
|
+
return isFieldDisabled(host, disabled);
|
|
25
|
+
}
|
|
26
|
+
export function isFieldDisabled(host, explicit) {
|
|
27
|
+
if (explicit || host?.matches(':disabled'))
|
|
28
|
+
return true;
|
|
29
|
+
for (let parent = host?.parentElement; parent; parent = parent.parentElement) {
|
|
30
|
+
if (parent.tagName !== 'FIELDSET' || !parent.disabled)
|
|
31
|
+
continue;
|
|
32
|
+
const legend = Array.from(parent.children).find(child => child.tagName === 'LEGEND');
|
|
33
|
+
if (!legend?.contains(host))
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
export function syncNativeAttribute(control, name, value) {
|
|
39
|
+
if (value === undefined || value === null) {
|
|
40
|
+
control.removeAttribute(name);
|
|
41
|
+
}
|
|
42
|
+
else if (control.getAttribute(name) !== String(value)) {
|
|
43
|
+
control.setAttribute(name, String(value));
|
|
44
|
+
}
|
|
45
|
+
}
|