@webquark/core 1.1.0-dev.4 → 1.1.0-dev.5
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 +24 -9
- package/dist/cjs/{action.props-CkEZpMY6.js → action.props-CtwTiyf6.js} +1 -1
- package/dist/cjs/field-CiEtk37y.js +14 -0
- package/dist/cjs/{index-B7ex88C2.js → index-BLlc_shC.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/q-accordion.cjs.entry.js +18 -0
- package/dist/cjs/q-alert.cjs.entry.js +1 -1
- package/dist/cjs/q-avatar.cjs.entry.js +6 -6
- package/dist/cjs/q-banner.cjs.entry.js +19 -0
- package/dist/cjs/q-button_2.cjs.entry.js +7 -7
- package/dist/cjs/q-card.cjs.entry.js +17 -6
- package/dist/cjs/q-carousel.cjs.entry.js +3 -3
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +6 -6
- package/dist/cjs/q-data-table.cjs.entry.js +4 -4
- package/dist/cjs/q-dialog.cjs.entry.js +22 -8
- package/dist/cjs/q-dropdown.cjs.entry.js +50 -6
- package/dist/cjs/q-form.cjs.entry.js +11 -5
- package/dist/cjs/q-grid.cjs.entry.js +24 -0
- package/dist/cjs/q-icon.cjs.entry.js +16 -6
- package/dist/cjs/q-inline.cjs.entry.js +22 -0
- package/dist/cjs/q-input_2.cjs.entry.js +14 -7
- package/dist/cjs/q-link.cjs.entry.js +5 -5
- package/dist/cjs/q-map.cjs.entry.js +2 -2
- package/dist/cjs/q-media.cjs.entry.js +21 -0
- package/dist/cjs/q-navbar.cjs.entry.js +9 -6
- package/dist/cjs/q-pagination.cjs.entry.js +2 -2
- package/dist/cjs/q-panel.cjs.entry.js +17 -8
- package/dist/cjs/q-quantity-selector.cjs.entry.js +15 -8
- package/dist/cjs/q-radio-group.cjs.entry.js +14 -7
- 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 +20 -0
- package/dist/cjs/q-sidepanel.cjs.entry.js +14 -7
- package/dist/cjs/q-stack.cjs.entry.js +20 -0
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +7 -4
- package/dist/cjs/q-step-diagram.cjs.entry.js +21 -11
- package/dist/cjs/q-syntax-box.cjs.entry.js +1 -1
- package/dist/cjs/q-tabs.cjs.entry.js +3 -3
- package/dist/cjs/q-textarea.cjs.entry.js +61 -7
- package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
- package/dist/cjs/q-toast.cjs.entry.js +3 -3
- package/dist/cjs/q-toggle.cjs.entry.js +14 -6
- package/dist/cjs/q-toolbar.cjs.entry.js +8 -4
- package/dist/cjs/tokens-DGECOqpA.js +42 -0
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +16 -9
- package/dist/collection/components/actions/button/button.css +55 -4
- package/dist/collection/components/actions/button/button.js +4 -4
- package/dist/collection/components/actions/link/link.js +8 -5
- package/dist/collection/components/{data-display → communication}/alert/alert.js +2 -2
- package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.js +40 -40
- package/dist/collection/components/{overlays → communication}/toast/test/toast.cmp.test.js +1 -1
- package/dist/collection/components/{overlays → communication}/toast/toast.js +14 -14
- package/dist/collection/components/content/banner/banner.css +1 -0
- package/dist/collection/components/content/banner/banner.js +84 -0
- package/dist/collection/components/{layout → content}/card/card.css +12 -0
- package/dist/collection/components/content/card/card.js +308 -0
- package/dist/collection/components/{layout → content}/carousel/carousel.js +4 -4
- package/dist/collection/components/data-display/accordion/accordion.css +1 -0
- package/dist/collection/components/data-display/accordion/accordion.js +54 -0
- package/dist/collection/components/{actions → data-display}/chip/chip.js +5 -5
- package/dist/collection/components/data-display/data-table/data-table.js +3 -3
- package/dist/collection/components/data-display/map/map.js +1 -1
- package/dist/collection/components/data-display/pagination/pagination.js +1 -1
- package/dist/collection/components/indicators/step-diagram/step-diagram.js +50 -11
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.css +7 -7
- package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +36 -4
- package/dist/collection/components/inputs/dropdown/dropdown.css +77 -34
- package/dist/collection/components/inputs/dropdown/dropdown.js +202 -6
- package/dist/collection/components/inputs/form/form.css +85 -0
- package/dist/collection/components/{layout → inputs}/form/form.js +105 -13
- package/dist/collection/components/inputs/form/form.types.js +1 -0
- package/dist/collection/components/inputs/input/input.css +78 -62
- package/dist/collection/components/inputs/input/input.js +77 -9
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +43 -3
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +70 -7
- package/dist/collection/components/inputs/radio-group/radio-group.css +77 -30
- package/dist/collection/components/inputs/radio-group/radio-group.js +77 -9
- package/dist/collection/components/inputs/textarea/textarea.css +85 -1
- package/dist/collection/components/inputs/textarea/textarea.js +149 -7
- package/dist/collection/components/inputs/toggle/toggle.css +80 -48
- package/dist/collection/components/inputs/toggle/toggle.js +72 -6
- package/dist/collection/components/layout/grid/grid.css +11 -0
- package/dist/collection/components/layout/grid/grid.js +152 -0
- package/dist/collection/components/layout/inline/inline.css +4 -0
- package/dist/collection/components/layout/inline/inline.js +118 -0
- package/dist/collection/components/layout/navbar/navbar.js +32 -7
- package/dist/collection/components/layout/panel/panel.css +13 -12
- package/dist/collection/components/layout/panel/panel.js +139 -10
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.css +1 -0
- package/dist/collection/components/layout/section/section.js +98 -0
- package/dist/collection/components/layout/section/section.types.js +1 -0
- package/dist/collection/components/layout/sidepanel/internals/nav-items.js +1 -1
- package/dist/collection/components/layout/sidepanel/sidepanel.js +90 -10
- package/dist/collection/components/layout/stack/stack.css +4 -0
- package/dist/collection/components/layout/stack/stack.js +76 -0
- package/dist/collection/components/layout/tabs/tabs.js +2 -2
- package/dist/collection/components/layout/toolbar/toolbar.css +24 -1
- package/dist/collection/components/layout/toolbar/toolbar.js +81 -3
- package/dist/collection/components/media/avatar/avatar.js +43 -43
- package/dist/collection/components/media/icon/icon.js +79 -18
- package/dist/collection/components/media/media/media.css +1 -0
- package/dist/collection/components/media/media/media.js +125 -0
- package/dist/collection/components/media/media/media.types.js +1 -0
- 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 +16 -0
- package/dist/collection/components/overlays/dialog/dialog.js +144 -14
- package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
- package/dist/collection/components/shared/field.js +8 -0
- package/dist/collection/components/shared/test/orientation.cmp.test.js +36 -0
- package/dist/collection/index.js +1 -1
- package/dist/collection/playground/components/playground-event-log/playground-event-log.js +1 -1
- package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +5 -3
- package/dist/collection/playground/components/theme-designer/theme-designer.js +13 -35
- package/dist/collection/playground/components/theme-designer/token-row.js +26 -7
- package/dist/collection/playground/playground.bundled.js +846 -34
- package/dist/collection/theme/test/foundation.cmp.test.js +347 -0
- package/dist/collection/theme/tokens.js +828 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-0PieXMX9.js +1 -0
- package/dist/components/p-BOYjkCNa.js +1 -0
- package/dist/components/p-Bw4TVbfm.js +1 -0
- package/dist/components/{p-7oXL29Gu.js → p-BxFGkrUe.js} +1 -1
- package/dist/components/{p-CQofbR9q.js → p-CK7avZdv.js} +1 -1
- package/dist/components/p-Cx1vCuMp.js +1 -0
- package/dist/components/{p-Czf3kP0S.js → p-D0Q2vrt5.js} +1 -1
- package/dist/components/p-GU98U1DJ.js +1 -0
- package/dist/components/{p-C8fq-feq.js → p-NEolaUak.js} +1 -1
- package/dist/components/p-f95uguY1.js +1 -0
- package/dist/components/q-accordion.d.ts +11 -0
- package/dist/components/q-accordion.js +1 -0
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-banner.d.ts +11 -0
- package/dist/components/q-banner.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/q-grid.js +1 -0
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-inline.d.ts +11 -0
- package/dist/components/q-inline.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/q-media.js +1 -0
- 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.d.ts +11 -0
- package/dist/components/q-section.js +1 -0
- package/dist/components/q-sidepanel.js +3 -3
- package/dist/components/q-stack.d.ts +11 -0
- package/dist/components/q-stack.js +1 -0
- 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-CJoxGHR7.js → action.props-GP1ameE3.js} +1 -1
- package/dist/esm/field-DkpyvZiX.js +11 -0
- package/dist/esm/{index-VFWyFa-_.js → index-DbGG9Q40.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/q-accordion.entry.js +16 -0
- package/dist/esm/q-alert.entry.js +1 -1
- package/dist/esm/q-avatar.entry.js +6 -6
- package/dist/esm/q-banner.entry.js +17 -0
- package/dist/esm/q-button_2.entry.js +7 -7
- package/dist/esm/q-card.entry.js +17 -6
- package/dist/esm/q-carousel.entry.js +3 -3
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-conversation-bubble.entry.js +6 -6
- package/dist/esm/q-data-table.entry.js +4 -4
- package/dist/esm/q-dialog.entry.js +22 -8
- package/dist/esm/q-dropdown.entry.js +50 -6
- package/dist/esm/q-form.entry.js +11 -5
- package/dist/esm/q-grid.entry.js +22 -0
- package/dist/esm/q-icon.entry.js +16 -6
- package/dist/esm/q-inline.entry.js +20 -0
- package/dist/esm/q-input_2.entry.js +14 -7
- package/dist/esm/q-link.entry.js +5 -5
- package/dist/esm/q-map.entry.js +2 -2
- package/dist/esm/q-media.entry.js +19 -0
- package/dist/esm/q-navbar.entry.js +9 -6
- package/dist/esm/q-pagination.entry.js +2 -2
- package/dist/esm/q-panel.entry.js +17 -8
- package/dist/esm/q-quantity-selector.entry.js +15 -8
- package/dist/esm/q-radio-group.entry.js +14 -7
- 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 +18 -0
- package/dist/esm/q-sidepanel.entry.js +14 -7
- package/dist/esm/q-stack.entry.js +18 -0
- package/dist/esm/q-step-diagram-item.entry.js +7 -4
- package/dist/esm/q-step-diagram.entry.js +21 -11
- package/dist/esm/q-syntax-box.entry.js +1 -1
- package/dist/esm/q-tabs.entry.js +3 -3
- package/dist/esm/q-textarea.entry.js +61 -7
- package/dist/esm/q-thumbnail.entry.js +3 -3
- package/dist/esm/q-toast.entry.js +3 -3
- package/dist/esm/q-toggle.entry.js +14 -6
- package/dist/esm/q-toolbar.entry.js +8 -4
- package/dist/esm/tokens-f95uguY1.js +38 -0
- package/dist/esm/webquark.js +3 -3
- package/dist/playground/build/p-0aea8464.entry.js +1 -0
- package/dist/playground/build/p-0d98e500.entry.js +1 -0
- package/dist/playground/build/p-139fec38.entry.js +1 -0
- package/dist/{webquark/p-0053ec76.entry.js → playground/build/p-15502232.entry.js} +1 -1
- package/dist/playground/build/p-17340abf.entry.js +1 -0
- package/dist/playground/build/p-303dcac8.entry.js +1 -0
- package/dist/playground/build/p-408bf48a.entry.js +1 -0
- package/dist/playground/build/p-47253466.entry.js +1 -0
- package/dist/playground/build/p-5f6860f2.entry.js +13 -0
- package/dist/playground/build/p-6b619655.entry.js +1 -0
- package/dist/playground/build/p-6b63922b.entry.js +1 -0
- package/dist/playground/build/p-71e3d582.entry.js +1 -0
- package/dist/playground/build/p-737ca99e.entry.js +1 -0
- package/dist/playground/build/{p-41421759.entry.js → p-742e39f1.entry.js} +1 -1
- package/dist/playground/build/p-8115ec23.entry.js +1 -0
- package/dist/playground/build/{p-8ada8fc6.entry.js → p-8ad43d7f.entry.js} +1 -1
- package/dist/playground/build/{p-885572ee.entry.js → p-8bdababd.entry.js} +1 -1
- package/dist/playground/build/p-9418caa0.entry.js +1 -0
- package/dist/playground/build/p-96ef2b54.entry.js +1 -0
- package/dist/playground/build/p-97dae970.entry.js +1 -0
- package/dist/{webquark/p-b5066051.entry.js → playground/build/p-989bdc1a.entry.js} +1 -1
- package/dist/playground/build/{p-DoS2fiWw.js → p-BqvCR2U8.js} +1 -1
- package/dist/playground/build/p-DbGG9Q40.js +3 -0
- package/dist/playground/build/p-JgeOdXyP.js +1 -0
- package/dist/playground/build/p-a4b36120.entry.js +1 -0
- package/dist/playground/build/p-abf54361.entry.js +1 -0
- package/dist/playground/build/p-aed4b219.entry.js +1 -0
- package/dist/playground/build/p-b3a07d94.entry.js +1 -0
- package/dist/{webquark/p-8077aa3f.entry.js → playground/build/p-b465aebd.entry.js} +1 -1
- package/dist/playground/build/p-c1f3dca6.entry.js +1 -0
- package/dist/playground/build/p-c4899c2b.entry.js +1 -0
- package/dist/{webquark/p-1c9a82b8.entry.js → playground/build/p-c4fd89b8.entry.js} +1 -1
- package/dist/playground/build/p-cf8f7f2a.entry.js +1 -0
- package/dist/playground/build/{p-2e2b3ca9.entry.js → p-d4a915e5.entry.js} +1 -1
- package/dist/{webquark/p-6c0bc4b9.entry.js → playground/build/p-d7d436c5.entry.js} +1 -1
- package/dist/playground/build/{p-316a92e2.entry.js → p-de8813be.entry.js} +1 -1
- package/dist/{webquark/p-8ec7d250.entry.js → playground/build/p-eb71e335.entry.js} +1 -1
- package/dist/playground/build/p-ecbc0fee.entry.js +1 -0
- package/dist/{webquark/p-d837603c.entry.js → playground/build/p-ed327679.entry.js} +1 -1
- package/dist/{webquark/p-e0e6b68f.entry.js → playground/build/p-f911c90f.entry.js} +1 -1
- package/dist/playground/build/p-f95uguY1.js +1 -0
- package/dist/playground/build/{p-5c08aa94.entry.js → p-fdd85ce4.entry.js} +1 -1
- package/dist/{webquark/p-13329777.entry.js → playground/build/p-ff1e2363.entry.js} +1 -1
- package/dist/playground/build/webquark.css +1 -1
- package/dist/playground/build/webquark.esm.js +1 -1
- package/dist/playground/playground/components.manifest.json +40 -35
- package/dist/playground/playground/specs/q-button.sandbox.json +3 -2
- package/dist/playground/playground/specs/q-card.sandbox.json +37 -3
- package/dist/playground/playground/specs/q-dialog.sandbox.json +16 -6
- package/dist/playground/playground/specs/q-dropdown.sandbox.json +12 -2
- package/dist/playground/playground/specs/q-form.sandbox.json +88 -10
- package/dist/playground/playground/specs/q-grid.sandbox.json +56 -0
- package/dist/playground/playground/specs/q-icon.sandbox.json +11 -11
- package/dist/playground/playground/specs/q-inline.sandbox.json +60 -0
- package/dist/playground/playground/specs/q-input.sandbox.json +12 -2
- package/dist/playground/playground/specs/q-navbar.sandbox.json +3 -3
- package/dist/playground/playground/specs/q-panel.sandbox.json +138 -17
- package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +13 -2
- package/dist/playground/playground/specs/q-radio-group.sandbox.json +46 -10
- package/dist/playground/playground/specs/q-sidepanel.sandbox.json +7 -7
- package/dist/playground/playground/specs/q-stack.sandbox.json +56 -0
- package/dist/playground/playground/specs/q-step-diagram.sandbox.json +5 -5
- package/dist/playground/playground/specs/q-textarea.sandbox.json +20 -0
- package/dist/playground/playground/specs/q-toggle.sandbox.json +12 -2
- package/dist/playground/playground/specs/q-toolbar.sandbox.json +99 -14
- package/dist/playground/playground.js +846 -34
- package/dist/types/components/actions/button/button.types.d.ts +2 -1
- package/dist/types/components/actions/link/link.d.ts +1 -1
- package/dist/types/components/communication/toast/test/toast.cmp.test.d.ts +2 -0
- package/dist/types/components/communication/toast/test/toast.unit.test.d.ts +1 -0
- package/dist/types/components/content/banner/banner.d.ts +12 -0
- package/dist/types/components/content/banner/banner.types.d.ts +2 -0
- package/dist/types/components/{layout → content}/card/card.d.ts +11 -0
- package/dist/types/components/content/card/card.types.d.ts +1 -0
- package/dist/types/components/{layout → content}/card/card.utils.d.ts +1 -1
- package/dist/types/components/data-display/accordion/accordion.d.ts +9 -0
- package/dist/types/components/data-display/accordion/accordion.types.d.ts +1 -0
- package/dist/types/components/indicators/step-diagram/step-diagram.d.ts +6 -3
- package/dist/types/components/indicators/step-diagram/step-diagram.types.d.ts +3 -1
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.d.ts +4 -2
- package/dist/types/components/indicators/step-diagram-item/step-diagram-item.types.d.ts +3 -1
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +13 -0
- package/dist/types/components/inputs/dropdown/dropdown.types.d.ts +2 -1
- package/dist/types/components/{layout → inputs}/form/form.d.ts +6 -0
- package/dist/types/components/inputs/input/input.d.ts +7 -1
- package/dist/types/components/inputs/input/input.types.d.ts +2 -1
- package/dist/types/components/inputs/quantity-selector/quantity-selector.d.ts +6 -1
- package/dist/types/components/inputs/quantity-selector/quantity-selector.types.d.ts +3 -1
- package/dist/types/components/inputs/radio-group/radio-group.d.ts +7 -1
- package/dist/types/components/inputs/radio-group/radio-group.types.d.ts +2 -1
- package/dist/types/components/inputs/textarea/textarea.d.ts +16 -1
- package/dist/types/components/inputs/toggle/toggle.d.ts +6 -0
- package/dist/types/components/inputs/toggle/toggle.types.d.ts +2 -1
- package/dist/types/components/layout/grid/grid.d.ts +13 -0
- package/dist/types/components/layout/inline/inline.d.ts +12 -0
- package/dist/types/components/layout/navbar/navbar.d.ts +2 -0
- package/dist/types/components/layout/panel/panel.d.ts +8 -0
- package/dist/types/components/layout/panel/panel.types.d.ts +2 -1
- package/dist/types/components/layout/section/section.d.ts +13 -0
- package/dist/types/components/layout/section/section.types.d.ts +1 -0
- package/dist/types/components/layout/sidepanel/sidepanel.d.ts +7 -0
- package/dist/types/components/layout/stack/stack.d.ts +10 -0
- package/dist/types/components/layout/toolbar/toolbar.d.ts +4 -0
- package/dist/types/components/media/avatar/avatar.d.ts +4 -4
- package/dist/types/components/media/icon/icon.d.ts +7 -3
- package/dist/types/components/media/media/media.d.ts +13 -0
- package/dist/types/components/media/media/media.types.d.ts +2 -0
- package/dist/types/components/overlays/dialog/dialog.d.ts +14 -2
- package/dist/types/components/shared/field.d.ts +3 -0
- package/dist/types/components/shared/test/orientation.cmp.test.d.ts +1 -0
- package/dist/types/components.d.ts +887 -66
- package/dist/types/index.d.ts +7 -2
- package/dist/types/playground/components/theme-designer/token-row.d.ts +2 -1
- package/dist/types/theme/test/assets.d.ts +4 -0
- package/dist/types/theme/test/foundation.cmp.test.d.ts +16 -0
- package/dist/types/theme/tokens.d.ts +63 -0
- package/dist/webquark/p-0aea8464.entry.js +1 -0
- package/dist/webquark/p-0d98e500.entry.js +1 -0
- package/dist/webquark/p-139fec38.entry.js +1 -0
- package/dist/{playground/build/p-0053ec76.entry.js → webquark/p-15502232.entry.js} +1 -1
- package/dist/webquark/p-17340abf.entry.js +1 -0
- package/dist/webquark/p-303dcac8.entry.js +1 -0
- package/dist/webquark/p-408bf48a.entry.js +1 -0
- package/dist/webquark/p-47253466.entry.js +1 -0
- package/dist/webquark/p-5f6860f2.entry.js +13 -0
- package/dist/webquark/p-6b619655.entry.js +1 -0
- package/dist/webquark/p-6b63922b.entry.js +1 -0
- package/dist/webquark/p-71e3d582.entry.js +1 -0
- package/dist/webquark/p-737ca99e.entry.js +1 -0
- package/dist/webquark/{p-41421759.entry.js → p-742e39f1.entry.js} +1 -1
- package/dist/webquark/p-8115ec23.entry.js +1 -0
- package/dist/webquark/{p-8ada8fc6.entry.js → p-8ad43d7f.entry.js} +1 -1
- package/dist/webquark/{p-885572ee.entry.js → p-8bdababd.entry.js} +1 -1
- package/dist/webquark/p-9418caa0.entry.js +1 -0
- package/dist/webquark/p-96ef2b54.entry.js +1 -0
- package/dist/webquark/p-97dae970.entry.js +1 -0
- package/dist/{playground/build/p-b5066051.entry.js → webquark/p-989bdc1a.entry.js} +1 -1
- package/dist/webquark/{p-DoS2fiWw.js → p-BqvCR2U8.js} +1 -1
- package/dist/webquark/p-DbGG9Q40.js +3 -0
- package/dist/webquark/p-JgeOdXyP.js +1 -0
- package/dist/webquark/p-a4b36120.entry.js +1 -0
- package/dist/webquark/p-abf54361.entry.js +1 -0
- package/dist/webquark/p-aed4b219.entry.js +1 -0
- package/dist/webquark/p-b3a07d94.entry.js +1 -0
- package/dist/{playground/build/p-8077aa3f.entry.js → webquark/p-b465aebd.entry.js} +1 -1
- package/dist/webquark/p-c1f3dca6.entry.js +1 -0
- package/dist/webquark/p-c4899c2b.entry.js +1 -0
- package/dist/{playground/build/p-1c9a82b8.entry.js → webquark/p-c4fd89b8.entry.js} +1 -1
- package/dist/webquark/p-cf8f7f2a.entry.js +1 -0
- package/dist/webquark/{p-2e2b3ca9.entry.js → p-d4a915e5.entry.js} +1 -1
- package/dist/{playground/build/p-6c0bc4b9.entry.js → webquark/p-d7d436c5.entry.js} +1 -1
- package/dist/webquark/{p-316a92e2.entry.js → p-de8813be.entry.js} +1 -1
- package/dist/{playground/build/p-8ec7d250.entry.js → webquark/p-eb71e335.entry.js} +1 -1
- package/dist/webquark/p-ecbc0fee.entry.js +1 -0
- package/dist/{playground/build/p-d837603c.entry.js → webquark/p-ed327679.entry.js} +1 -1
- package/dist/{playground/build/p-e0e6b68f.entry.js → webquark/p-f911c90f.entry.js} +1 -1
- package/dist/webquark/p-f95uguY1.js +1 -0
- package/dist/webquark/{p-5c08aa94.entry.js → p-fdd85ce4.entry.js} +1 -1
- package/dist/{playground/build/p-13329777.entry.js → webquark/p-ff1e2363.entry.js} +1 -1
- package/dist/webquark/webquark.css +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +68 -5
- package/scripts/wq-switch/README.md +113 -0
- package/scripts/wq-switch/dist/index.js +530 -0
- package/scripts/wq-switch/dist/setup.js +333 -0
- package/dist/collection/components/layout/card/card.js +0 -168
- package/dist/collection/components/layout/form/form.css +0 -49
- package/dist/components/p-BygmcFxM.js +0 -1
- package/dist/components/p-CVtof65h.js +0 -1
- package/dist/components/p-I81wUKud.js +0 -1
- package/dist/components/p-vv3X99Ji.js +0 -1
- package/dist/playground/build/p-0363c0e6.entry.js +0 -1
- package/dist/playground/build/p-0e3dbe01.entry.js +0 -1
- package/dist/playground/build/p-226c2f79.entry.js +0 -13
- package/dist/playground/build/p-38b92be6.entry.js +0 -1
- package/dist/playground/build/p-42831108.entry.js +0 -1
- package/dist/playground/build/p-50ca27f7.entry.js +0 -1
- package/dist/playground/build/p-611ef3e0.entry.js +0 -1
- package/dist/playground/build/p-684292dd.entry.js +0 -1
- package/dist/playground/build/p-7081c96b.entry.js +0 -1
- package/dist/playground/build/p-789eb3c9.entry.js +0 -1
- package/dist/playground/build/p-8d0aa5a7.entry.js +0 -1
- package/dist/playground/build/p-9978ae38.entry.js +0 -1
- package/dist/playground/build/p-VFWyFa-_.js +0 -3
- package/dist/playground/build/p-b99541cd.entry.js +0 -1
- package/dist/playground/build/p-ca1a1d25.entry.js +0 -1
- package/dist/playground/build/p-e15e6d76.entry.js +0 -1
- package/dist/playground/build/p-e272dd45.entry.js +0 -1
- package/dist/playground/build/p-e8003179.entry.js +0 -1
- package/dist/types/components/layout/card/card.types.d.ts +0 -1
- package/dist/types/components/overlays/toast/test/toast.cmp.test.d.ts +0 -2
- package/dist/webquark/p-0363c0e6.entry.js +0 -1
- package/dist/webquark/p-0e3dbe01.entry.js +0 -1
- package/dist/webquark/p-226c2f79.entry.js +0 -13
- package/dist/webquark/p-38b92be6.entry.js +0 -1
- package/dist/webquark/p-42831108.entry.js +0 -1
- package/dist/webquark/p-50ca27f7.entry.js +0 -1
- package/dist/webquark/p-611ef3e0.entry.js +0 -1
- package/dist/webquark/p-684292dd.entry.js +0 -1
- package/dist/webquark/p-7081c96b.entry.js +0 -1
- package/dist/webquark/p-789eb3c9.entry.js +0 -1
- package/dist/webquark/p-8d0aa5a7.entry.js +0 -1
- package/dist/webquark/p-9978ae38.entry.js +0 -1
- package/dist/webquark/p-VFWyFa-_.js +0 -3
- package/dist/webquark/p-b99541cd.entry.js +0 -1
- package/dist/webquark/p-ca1a1d25.entry.js +0 -1
- package/dist/webquark/p-e15e6d76.entry.js +0 -1
- package/dist/webquark/p-e272dd45.entry.js +0 -1
- package/dist/webquark/p-e8003179.entry.js +0 -1
- package/dist/collection/components/{data-display → communication}/alert/alert.css +0 -0
- package/dist/collection/components/{data-display → communication}/alert/alert.types.js +0 -0
- package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.css +0 -0
- package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.types.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/internals/icons.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/internals/queue.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/internals/timers.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/test/toast.unit.test.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/toast-controller.js +0 -0
- package/dist/collection/components/{overlays → communication}/toast/toast.css +0 -0
- package/dist/collection/components/{overlays → communication}/toast/toast.types.js +0 -0
- package/dist/collection/components/{actions/chip/chip.types.js → content/banner/banner.types.js} +0 -0
- package/dist/collection/components/{layout → content}/card/card.types.js +0 -0
- package/dist/collection/components/{layout → content}/card/card.utils.js +0 -0
- package/dist/collection/components/{layout → content}/carousel/carousel.css +0 -0
- package/dist/collection/components/{layout → content}/carousel/carousel.types.js +0 -0
- package/dist/collection/components/{layout → content}/carousel/carousel.utils.js +0 -0
- package/dist/collection/components/{layout → content}/carousel/internals/metrics.js +0 -0
- package/dist/collection/components/{layout/form/form.types.js → data-display/accordion/accordion.types.js} +0 -0
- package/dist/collection/components/{actions → data-display}/chip/chip.css +0 -0
- package/dist/{types/components/overlays/toast/test/toast.unit.test.d.ts → collection/components/data-display/chip/chip.types.js} +0 -0
- package/dist/collection/components/{layout → inputs}/form/internals/controls.js +0 -0
- package/dist/collection/components/{layout → inputs}/form/internals/enter-behavior.js +0 -0
- package/dist/collection/components/{layout → inputs}/form/internals/values.js +0 -0
- package/dist/collection/components/{layout → inputs}/form/test/form.cmp.test.js +0 -0
- package/dist/types/components/{data-display → communication}/alert/alert.d.ts +0 -0
- package/dist/types/components/{data-display → communication}/alert/alert.types.d.ts +0 -0
- package/dist/types/components/{data-display → communication}/conversation-bubble/conversation-bubble.d.ts +3 -3
- /package/dist/types/components/{data-display → communication}/conversation-bubble/conversation-bubble.types.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/internals/icons.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/internals/queue.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/internals/timers.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/toast-controller.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/toast.d.ts +0 -0
- /package/dist/types/components/{overlays → communication}/toast/toast.types.d.ts +0 -0
- /package/dist/types/components/{layout → content}/carousel/carousel.d.ts +0 -0
- /package/dist/types/components/{layout → content}/carousel/carousel.types.d.ts +0 -0
- /package/dist/types/components/{layout → content}/carousel/carousel.utils.d.ts +0 -0
- /package/dist/types/components/{layout → content}/carousel/internals/metrics.d.ts +0 -0
- /package/dist/types/components/{actions → data-display}/chip/chip.d.ts +0 -0
- /package/dist/types/components/{actions → data-display}/chip/chip.types.d.ts +0 -0
- /package/dist/types/components/{layout → inputs}/form/form.types.d.ts +0 -0
- /package/dist/types/components/{layout → inputs}/form/internals/controls.d.ts +0 -0
- /package/dist/types/components/{layout → inputs}/form/internals/enter-behavior.d.ts +0 -0
- /package/dist/types/components/{layout → inputs}/form/internals/values.d.ts +0 -0
- /package/dist/types/components/{layout → inputs}/form/test/form.cmp.test.d.ts +0 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import "../../../dist/components/q-button.js";
|
|
3
|
+
import "../../../dist/components/q-input.js";
|
|
4
|
+
import "../../../dist/components/q-dropdown.js";
|
|
5
|
+
import "../../../dist/components/q-textarea.js";
|
|
6
|
+
import "../../../dist/components/q-radio-group.js";
|
|
7
|
+
import "../../../dist/components/q-toggle.js";
|
|
8
|
+
import "../../../dist/components/q-quantity-selector.js";
|
|
9
|
+
import "../../../dist/components/q-form.js";
|
|
10
|
+
import "../../../dist/components/q-card.js";
|
|
11
|
+
import "../../../dist/components/q-panel.js";
|
|
12
|
+
import "../../../dist/components/q-grid.js";
|
|
13
|
+
import "../../../dist/components/q-stack.js";
|
|
14
|
+
import "../../../dist/components/q-inline.js";
|
|
15
|
+
import "../../../dist/components/q-toolbar.js";
|
|
16
|
+
import "../../../dist/components/q-icon.js";
|
|
17
|
+
import "../../../dist/components/q-dialog.js";
|
|
18
|
+
import globalCss from "../../../dist/webquark/webquark.css?raw";
|
|
19
|
+
const frame = async () => { await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); };
|
|
20
|
+
async function fixture(html) {
|
|
21
|
+
document.body.innerHTML = html;
|
|
22
|
+
await Promise.all([...new Set(Array.from(document.querySelectorAll('*')).map(el => el.localName).filter(tag => tag.startsWith('q-')))].map(tag => customElements.whenDefined(tag)));
|
|
23
|
+
await frame();
|
|
24
|
+
}
|
|
25
|
+
const part = (tag, name) => document.querySelector(tag).shadowRoot.querySelector(`[part~="${name}"]`);
|
|
26
|
+
const height = (el) => el.getBoundingClientRect().height;
|
|
27
|
+
describe('foundation composition in the browser', () => {
|
|
28
|
+
afterEach(() => { document.body.replaceChildren(); document.documentElement.style.cssText = ''; });
|
|
29
|
+
it('preserves automatic and explicit theme palettes after catalog generation', async () => {
|
|
30
|
+
await fixture('<div id="light" data-theme="light"><q-input></q-input><div id="dark" data-theme="dark"><q-button>Save</q-button></div></div>');
|
|
31
|
+
const style = document.createElement('style');
|
|
32
|
+
style.textContent = globalCss;
|
|
33
|
+
document.body.append(style);
|
|
34
|
+
const token = (el, name) => getComputedStyle(el).getPropertyValue(name).trim();
|
|
35
|
+
expect(token(document.documentElement, '--q-bg-base')).toBe(matchMedia('(prefers-color-scheme: light)').matches ? '#ffffff' : '#0b0f19');
|
|
36
|
+
expect(token(document.querySelector('#light'), '--q-bg-base')).toBe('#ffffff');
|
|
37
|
+
expect(token(document.querySelector('#dark'), '--q-bg-base')).toBe('#0b0f19');
|
|
38
|
+
expect(token(document.querySelector('#dark'), '--q-color-primary')).toBe('#60a5fa');
|
|
39
|
+
document.querySelector('#dark').style.setProperty('--q-color-primary', '#123456');
|
|
40
|
+
expect(token(document.querySelector('q-button'), '--q-color-primary')).toBe('#123456');
|
|
41
|
+
});
|
|
42
|
+
for (const stylesheet of [false, true]) {
|
|
43
|
+
it(`shares control radii across explicit and inherited sizes ${stylesheet ? 'with' : 'without'} global CSS`, async () => {
|
|
44
|
+
await fixture('<q-form><q-button>Save</q-button><q-input></q-input><q-textarea></q-textarea><q-dropdown></q-dropdown><q-radio-group></q-radio-group><q-quantity-selector></q-quantity-selector></q-form><q-toolbar size="sm"><q-button id="toolbar-button">Action</q-button></q-toolbar>');
|
|
45
|
+
if (stylesheet) {
|
|
46
|
+
const style = document.createElement('style');
|
|
47
|
+
style.textContent = globalCss;
|
|
48
|
+
document.body.append(style);
|
|
49
|
+
}
|
|
50
|
+
const form = document.querySelector('q-form');
|
|
51
|
+
const selectors = [
|
|
52
|
+
['q-button', 'button', '--q-btn-radius'],
|
|
53
|
+
['q-input', '.input-control', '--q-input-radius'],
|
|
54
|
+
['q-textarea', 'textarea', '--q-input-radius'],
|
|
55
|
+
['q-dropdown', '.dropdown-trigger', '--q-dropdown-radius'],
|
|
56
|
+
['q-radio-group', '.options', '--q-radio-group-radius'],
|
|
57
|
+
['q-quantity-selector', '.quantity-selector', '--q-quantity-selector-radius'],
|
|
58
|
+
];
|
|
59
|
+
const radius = (tag, selector) => getComputedStyle(document.querySelector(tag).shadowRoot.querySelector(selector)).borderRadius;
|
|
60
|
+
for (const [size, expected] of [['sm', '5.5px'], ['md', '7px'], ['lg', '8.5px']]) {
|
|
61
|
+
form.size = size;
|
|
62
|
+
await frame();
|
|
63
|
+
for (const [tag, selector] of selectors)
|
|
64
|
+
await expect.poll(() => radius(tag, selector)).toBe(expected);
|
|
65
|
+
for (const [tag] of selectors)
|
|
66
|
+
document.querySelector(tag).size = 'sm';
|
|
67
|
+
await frame();
|
|
68
|
+
for (const [tag, selector] of selectors)
|
|
69
|
+
await expect.poll(() => radius(tag, selector)).toBe('5.5px');
|
|
70
|
+
for (const [tag] of selectors)
|
|
71
|
+
document.querySelector(tag).size = 'inherit';
|
|
72
|
+
}
|
|
73
|
+
await expect.poll(() => radius('#toolbar-button', 'button')).toBe('5.5px');
|
|
74
|
+
form.style.setProperty('--q-control-radius-lg', '10px');
|
|
75
|
+
for (const [tag, selector] of selectors)
|
|
76
|
+
await expect.poll(() => radius(tag, selector)).toBe('10px');
|
|
77
|
+
form.style.setProperty('--q-field-radius', '12px');
|
|
78
|
+
for (const [tag, selector] of selectors.slice(1))
|
|
79
|
+
await expect.poll(() => radius(tag, selector)).toBe('12px');
|
|
80
|
+
for (const [tag, selector, token] of selectors) {
|
|
81
|
+
document.querySelector(tag).style.setProperty(token, '3px');
|
|
82
|
+
await expect.poll(() => radius(tag, selector)).toBe('3px');
|
|
83
|
+
}
|
|
84
|
+
const button = document.querySelector('q-button');
|
|
85
|
+
button.size = 'sm';
|
|
86
|
+
button.style.setProperty('--q-btn-radius-sm', '2px');
|
|
87
|
+
await expect.poll(() => radius('q-button', 'button')).toBe('2px');
|
|
88
|
+
button.shape = 'pill';
|
|
89
|
+
await expect.poll(() => radius('q-button', 'button')).toBe('999px');
|
|
90
|
+
button.shape = 'circle';
|
|
91
|
+
await expect.poll(() => radius('q-button', 'button')).toBe('50%');
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
it('auto-grows after inherited and explicit size changes, container resizing, and reconnecting', async () => {
|
|
95
|
+
await fixture('<q-form size="sm" style="width:400px"><q-textarea></q-textarea></q-form>');
|
|
96
|
+
const form = document.querySelector('q-form');
|
|
97
|
+
const field = document.querySelector('q-textarea');
|
|
98
|
+
const area = field.shadowRoot.querySelector('textarea');
|
|
99
|
+
field.value = Array(8).fill('A full line of text for resizing').join('\n');
|
|
100
|
+
await frame();
|
|
101
|
+
await expect.poll(() => area.scrollHeight - area.clientHeight).toBe(0);
|
|
102
|
+
const smallHeight = height(area);
|
|
103
|
+
form.size = 'lg';
|
|
104
|
+
await frame();
|
|
105
|
+
await expect.poll(() => area.scrollHeight - area.clientHeight).toBe(0);
|
|
106
|
+
expect(height(area)).toBeGreaterThan(smallHeight);
|
|
107
|
+
field.size = 'sm';
|
|
108
|
+
await frame();
|
|
109
|
+
await expect.poll(() => height(area)).toBe(smallHeight);
|
|
110
|
+
field.size = 'inherit';
|
|
111
|
+
await frame();
|
|
112
|
+
await expect.poll(() => area.scrollHeight - area.clientHeight).toBe(0);
|
|
113
|
+
const wideHeight = height(area);
|
|
114
|
+
form.style.width = '180px';
|
|
115
|
+
await frame();
|
|
116
|
+
await expect.poll(() => area.scrollHeight - area.clientHeight).toBe(0);
|
|
117
|
+
expect(height(area)).toBeGreaterThan(wideHeight);
|
|
118
|
+
field.remove();
|
|
119
|
+
form.size = 'sm';
|
|
120
|
+
form.style.width = '400px';
|
|
121
|
+
form.append(field);
|
|
122
|
+
await frame();
|
|
123
|
+
await expect.poll(() => height(area)).toBe(smallHeight);
|
|
124
|
+
await frame();
|
|
125
|
+
expect(height(area)).toBe(smallHeight);
|
|
126
|
+
});
|
|
127
|
+
for (const mode of ['manual', 'fixed']) {
|
|
128
|
+
it(`preserves ${mode} textarea height when inherited size changes`, async () => {
|
|
129
|
+
await fixture(`<q-form size="sm"><q-textarea resize-mode="${mode}"></q-textarea></q-form>`);
|
|
130
|
+
const area = document.querySelector('q-textarea').shadowRoot.querySelector('textarea');
|
|
131
|
+
area.style.height = '120px';
|
|
132
|
+
document.querySelector('q-form').size = 'lg';
|
|
133
|
+
await frame();
|
|
134
|
+
await frame();
|
|
135
|
+
expect(height(area)).toBe(120);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
for (const [size, expected] of [['sm', 28], ['md', 36], ['lg', 44]]) {
|
|
139
|
+
it(`sizes ${size} color inputs and preserves icon-only padding overrides`, async () => {
|
|
140
|
+
await fixture(`<q-form size="${size}"><q-input type="color"></q-input></q-form><q-input id="explicit" type="color" size="${size}"></q-input><q-button size="${size}" icon-only aria-label="Action"><span slot="icon-left">X</span></q-button>`);
|
|
141
|
+
expect(height(part('q-input', 'control'))).toBe(expected);
|
|
142
|
+
expect(height(part('#explicit', 'control'))).toBe(expected);
|
|
143
|
+
const button = document.querySelector('q-button');
|
|
144
|
+
expect(height(part('q-button', 'button'))).toBe(expected);
|
|
145
|
+
const style = document.createElement('style');
|
|
146
|
+
style.textContent = globalCss;
|
|
147
|
+
document.body.append(style);
|
|
148
|
+
await frame();
|
|
149
|
+
expect(height(part('q-input', 'control'))).toBe(expected);
|
|
150
|
+
expect(height(part('q-button', 'button'))).toBe(expected);
|
|
151
|
+
button.style.setProperty(`--q-btn-icon-padding-${size}`, '20px');
|
|
152
|
+
await frame();
|
|
153
|
+
await expect.poll(() => getComputedStyle(part('q-button', 'button')).padding).toBe('20px');
|
|
154
|
+
button.shape = 'circle';
|
|
155
|
+
await frame();
|
|
156
|
+
await expect.poll(() => getComputedStyle(part('q-button', 'button')).padding).toBe('20px');
|
|
157
|
+
const input = document.querySelector('q-input');
|
|
158
|
+
input.style.setProperty('--q-input-height', '50px');
|
|
159
|
+
await frame();
|
|
160
|
+
expect(height(part('q-input', 'control'))).toBe(50);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
for (const stylesheet of [false, true]) {
|
|
164
|
+
it(`preserves textarea field-padding overrides ${stylesheet ? 'with' : 'without'} global CSS`, async () => {
|
|
165
|
+
await fixture('<q-textarea></q-textarea>');
|
|
166
|
+
if (stylesheet) {
|
|
167
|
+
const style = document.createElement('style');
|
|
168
|
+
style.textContent = globalCss;
|
|
169
|
+
document.body.append(style);
|
|
170
|
+
}
|
|
171
|
+
const field = document.querySelector('q-textarea');
|
|
172
|
+
const area = field.shadowRoot.querySelector('textarea');
|
|
173
|
+
await frame();
|
|
174
|
+
expect(getComputedStyle(area).padding).toBe('8px 12px');
|
|
175
|
+
field.style.setProperty('--q-field-padding', '20px 30px');
|
|
176
|
+
await frame();
|
|
177
|
+
expect(getComputedStyle(area).padding).toBe('20px 30px');
|
|
178
|
+
field.style.setProperty('--q-input-padding', '4px 6px');
|
|
179
|
+
await frame();
|
|
180
|
+
expect(getComputedStyle(area).padding).toBe('4px 6px');
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
for (const [size, expected] of [['sm', 28], ['md', 36], ['lg', 44]]) {
|
|
184
|
+
it(`aligns ${size} controls without global CSS, including inherited and explicit sizes`, async () => {
|
|
185
|
+
await fixture(`<q-form size="${size}"><q-inline><q-button>Save</q-button><q-input aria-label="Name"></q-input><q-dropdown aria-label="Choice"></q-dropdown><q-radio-group orientation="horizontal" aria-label="Kind"></q-radio-group><q-quantity-selector></q-quantity-selector></q-inline><q-button id="override" size="lg">Override</q-button></q-form>`);
|
|
186
|
+
const radios = document.querySelector('q-radio-group');
|
|
187
|
+
radios.options = [{ label: 'First', value: 'a', icon: 'check' }, { label: 'Second', value: 'b' }];
|
|
188
|
+
await frame();
|
|
189
|
+
for (const [tag, name] of [['q-button', 'button'], ['q-input', 'control'], ['q-dropdown', 'trigger'], ['q-radio-group', 'options']]) {
|
|
190
|
+
expect(Math.abs(height(part(tag, name)) - expected), tag).toBeLessThanOrEqual(1);
|
|
191
|
+
}
|
|
192
|
+
expect(height(part('#override', 'button'))).toBe(44);
|
|
193
|
+
expect(height(document.querySelector('q-quantity-selector').shadowRoot.querySelector('.quantity-selector'))).toBe(expected);
|
|
194
|
+
document.querySelector('q-form').size = 'sm';
|
|
195
|
+
await frame();
|
|
196
|
+
expect(height(part('q-input', 'control'))).toBe(28);
|
|
197
|
+
expect(height(part('#override', 'button'))).toBe(44);
|
|
198
|
+
expect(height(document.querySelector('q-radio-group').shadowRoot.querySelector('q-icon'))).toBe(14);
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
it('inherits feedback space and supports an explicit false override', async () => {
|
|
202
|
+
await fixture('<q-form reserve-feedback><q-stack><q-input label="Name"></q-input><q-input id="off" label="Other"></q-input></q-stack></q-form>');
|
|
203
|
+
document.querySelector('#off').reserveFeedback = false;
|
|
204
|
+
await frame();
|
|
205
|
+
expect(height(part('q-input', 'feedback'))).toBe(16);
|
|
206
|
+
expect(height(part('#off', 'feedback'))).toBe(0);
|
|
207
|
+
const input = document.querySelector('q-input');
|
|
208
|
+
const reservedHeight = height(input);
|
|
209
|
+
input.description = 'Supporting text';
|
|
210
|
+
await frame();
|
|
211
|
+
expect(input.shadowRoot.querySelector('input').getAttribute('aria-describedby')).toBe('q-field-error');
|
|
212
|
+
expect(part('q-input', 'feedback').textContent).toBe('Supporting text');
|
|
213
|
+
expect(height(input)).toBe(reservedHeight);
|
|
214
|
+
input.labelHidden = true;
|
|
215
|
+
input.error = 'Please correct this';
|
|
216
|
+
await frame();
|
|
217
|
+
expect(part('q-input', 'feedback').textContent).toBe('Please correct this');
|
|
218
|
+
});
|
|
219
|
+
it('caps columns and lets full-row items and narrow containers fit', async () => {
|
|
220
|
+
await fixture('<q-grid style="width:800px" min-item-width="12rem" columns="3"><div>A</div><div>B</div><div>C</div><div data-q-span="full">Full</div></q-grid>');
|
|
221
|
+
const grid = document.querySelector('q-grid');
|
|
222
|
+
const layout = part('q-grid', 'layout');
|
|
223
|
+
expect(getComputedStyle(layout).gridTemplateColumns.split(' ').length).toBe(3);
|
|
224
|
+
expect(grid.children[3].getBoundingClientRect().width).toBe(800);
|
|
225
|
+
grid.style.width = '180px';
|
|
226
|
+
await frame();
|
|
227
|
+
expect(getComputedStyle(layout).gridTemplateColumns.split(' ').length).toBe(1);
|
|
228
|
+
expect(layout.scrollWidth).toBeLessThanOrEqual(180);
|
|
229
|
+
});
|
|
230
|
+
it('preserves component error colors in shared feedback', async () => {
|
|
231
|
+
await fixture('<q-radio-group error="Choose one" style="--q-radio-group-error-color:rgb(120, 20, 30)"></q-radio-group><q-toggle error="Review this" style="--q-toggle-error-color:rgb(30, 40, 150)"></q-toggle>');
|
|
232
|
+
expect(getComputedStyle(part('q-radio-group', 'feedback')).color).toBe('rgb(120, 20, 30)');
|
|
233
|
+
expect(getComputedStyle(part('q-toggle', 'feedback')).color).toBe('rgb(30, 40, 150)');
|
|
234
|
+
});
|
|
235
|
+
it('keeps explicit surface roles and padding local', async () => {
|
|
236
|
+
await fixture('<q-panel variant="plain" surface="card" padding="none" style="--q-bg-card:rgb(12, 34, 56)"><q-card><span slot="footer">Footer</span>Body</q-card></q-panel>');
|
|
237
|
+
expect(getComputedStyle(part('q-panel', 'panel')).backgroundColor).toBe('rgb(12, 34, 56)');
|
|
238
|
+
expect(getComputedStyle(part('q-panel', 'body')).padding).toBe('0px');
|
|
239
|
+
expect(getComputedStyle(part('q-card', 'body')).padding).toBe('16px');
|
|
240
|
+
expect(getComputedStyle(part('q-card', 'footer')).display).not.toBe('none');
|
|
241
|
+
document.querySelector('q-panel').style.setProperty('--q-panel-bg', 'rgb(56, 34, 12)');
|
|
242
|
+
await frame();
|
|
243
|
+
expect(getComputedStyle(part('q-panel', 'panel')).backgroundColor).toBe('rgb(56, 34, 12)');
|
|
244
|
+
});
|
|
245
|
+
it('validates dropdowns through q-form while accepting remotely loaded values', async () => {
|
|
246
|
+
await fixture('<q-form><q-grid><q-dropdown name="country" label="Country" required></q-dropdown></q-grid></q-form>');
|
|
247
|
+
const form = document.querySelector('q-form');
|
|
248
|
+
const dropdown = document.querySelector('q-dropdown');
|
|
249
|
+
let submissions = 0;
|
|
250
|
+
form.addEventListener('qSubmit', () => submissions++);
|
|
251
|
+
expect(await dropdown.checkValidity()).toBe(false);
|
|
252
|
+
await form.submitForm();
|
|
253
|
+
expect(submissions).toBe(0);
|
|
254
|
+
dropdown.value = 'not-in-current-page';
|
|
255
|
+
await frame();
|
|
256
|
+
await form.submitForm();
|
|
257
|
+
expect(submissions).toBe(1);
|
|
258
|
+
dropdown.error = 'Server rejected selection';
|
|
259
|
+
await frame();
|
|
260
|
+
expect(await dropdown.checkValidity()).toBe(false);
|
|
261
|
+
dropdown.disabled = true;
|
|
262
|
+
await frame();
|
|
263
|
+
expect(await dropdown.checkValidity()).toBe(true);
|
|
264
|
+
dropdown.disabled = false;
|
|
265
|
+
dropdown.error = undefined;
|
|
266
|
+
await form.resetForm();
|
|
267
|
+
expect(dropdown.value).toBe('');
|
|
268
|
+
});
|
|
269
|
+
it('participates in native form validation and preserves noValidate', async () => {
|
|
270
|
+
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
|
+
expect(document.querySelector('form').checkValidity()).toBe(false);
|
|
272
|
+
document.querySelector('q-dropdown').value = 'a';
|
|
273
|
+
await frame();
|
|
274
|
+
expect(document.querySelector('form').checkValidity()).toBe(true);
|
|
275
|
+
let submitted = false;
|
|
276
|
+
document.querySelector('q-form').addEventListener('qSubmit', () => submitted = true);
|
|
277
|
+
await document.querySelector('q-form').submitForm();
|
|
278
|
+
expect(submitted).toBe(true);
|
|
279
|
+
});
|
|
280
|
+
it('wraps horizontal toolbar actions and honors compact and custom padding', async () => {
|
|
281
|
+
await fixture('<q-toolbar size="sm" compact style="width:240px"><strong>Page</strong><q-button slot="end">First action</q-button><q-button slot="end">Second action</q-button><q-button slot="end">Third action</q-button></q-toolbar>');
|
|
282
|
+
const toolbar = document.querySelector('q-toolbar');
|
|
283
|
+
const row = toolbar.shadowRoot.querySelector('.toolbar-row');
|
|
284
|
+
expect(row.scrollWidth).toBeLessThanOrEqual(240);
|
|
285
|
+
expect(getComputedStyle(row).paddingTop).toBe('4px');
|
|
286
|
+
expect(height(part('q-button', 'button'))).toBe(28);
|
|
287
|
+
toolbar.style.setProperty('--q-toolbar-padding', '0px');
|
|
288
|
+
await frame();
|
|
289
|
+
expect(getComputedStyle(row).padding).toBe('0px');
|
|
290
|
+
toolbar.edge = 'left';
|
|
291
|
+
toolbar.gap = 'md';
|
|
292
|
+
await frame();
|
|
293
|
+
expect(getComputedStyle(row).display).toBe('grid');
|
|
294
|
+
expect(getComputedStyle(row).rowGap).toBe('12px');
|
|
295
|
+
});
|
|
296
|
+
it('keeps dialog actions within the viewport and restores focus', async () => {
|
|
297
|
+
await fixture('<button id="opener">Open</button><q-dialog dialog-title="Details" cancel-label="Cancel editing these details" confirm-label="Save and continue to the next step"></q-dialog>');
|
|
298
|
+
const opener = document.querySelector('#opener');
|
|
299
|
+
opener.focus();
|
|
300
|
+
const dialog = document.querySelector('q-dialog');
|
|
301
|
+
dialog.open = true;
|
|
302
|
+
await frame();
|
|
303
|
+
const modal = part('q-dialog', 'modal');
|
|
304
|
+
expect(modal.getBoundingClientRect().width).toBeLessThanOrEqual(window.innerWidth - 32);
|
|
305
|
+
expect(modal.scrollWidth).toBeLessThanOrEqual(modal.clientWidth);
|
|
306
|
+
dialog.open = false;
|
|
307
|
+
await frame();
|
|
308
|
+
expect(document.activeElement).toBe(opener);
|
|
309
|
+
dialog.showCancel = false;
|
|
310
|
+
dialog.showConfirm = false;
|
|
311
|
+
await frame();
|
|
312
|
+
expect(getComputedStyle(part('q-dialog', 'footer')).display).toBe('none');
|
|
313
|
+
const footer = document.createElement('span');
|
|
314
|
+
footer.slot = 'footer';
|
|
315
|
+
footer.textContent = 'Custom actions';
|
|
316
|
+
dialog.append(footer);
|
|
317
|
+
await frame();
|
|
318
|
+
expect(getComputedStyle(part('q-dialog', 'footer')).display).not.toBe('none');
|
|
319
|
+
footer.remove();
|
|
320
|
+
await frame();
|
|
321
|
+
expect(getComputedStyle(part('q-dialog', 'footer')).display).toBe('none');
|
|
322
|
+
});
|
|
323
|
+
for (const stylesheet of [false, true]) {
|
|
324
|
+
it(`resolves local palettes, panel padding, and explicit geometry overrides ${stylesheet ? 'with' : 'without'} global CSS`, async () => {
|
|
325
|
+
await fixture('<div style="--q-bg-surface-2:rgb(13, 27, 39)"><q-card>Card</q-card></div><q-panel padding="sm">Panel</q-panel><q-input size="sm"></q-input><q-button size="lg">Large</q-button>');
|
|
326
|
+
if (stylesheet) {
|
|
327
|
+
const style = document.createElement('style');
|
|
328
|
+
style.textContent = globalCss;
|
|
329
|
+
document.body.append(style);
|
|
330
|
+
}
|
|
331
|
+
await frame();
|
|
332
|
+
expect(getComputedStyle(part('q-card', 'container')).backgroundColor).toBe('rgb(13, 27, 39)');
|
|
333
|
+
expect(getComputedStyle(part('q-panel', 'body')).padding).toBe('8px');
|
|
334
|
+
expect(height(part('q-input', 'control'))).toBe(28);
|
|
335
|
+
expect(height(part('q-button', 'button'))).toBe(44);
|
|
336
|
+
const panel = document.querySelector('q-panel');
|
|
337
|
+
panel.style.setProperty('--q-panel-padding-sm', '21px');
|
|
338
|
+
await frame();
|
|
339
|
+
expect(getComputedStyle(part('q-panel', 'body')).padding).toBe('21px');
|
|
340
|
+
panel.style.setProperty('--q-panel-padding', '3px');
|
|
341
|
+
document.querySelector('q-input').style.setProperty('--q-input-height', '50px');
|
|
342
|
+
await frame();
|
|
343
|
+
expect(getComputedStyle(part('q-panel', 'body')).padding).toBe('3px');
|
|
344
|
+
expect(height(part('q-input', 'control'))).toBe(50);
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
});
|