@webquark/browser 1.1.0-dev.11 → 1.1.0-dev.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{action.props-DmLaQuU2.js → action.props-B6vl_1p5.js} +1 -1
- package/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
- package/dist/cjs/{field-CEZ9NsWK.js → field-B5nxD8Kc.js} +1 -1
- package/dist/cjs/{index-CMAcJ6t1.js → index-BD6Jjssb.js} +4 -0
- package/dist/cjs/loader.cjs.js +2 -2
- 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 +5 -5
- package/dist/cjs/q-card.cjs.entry.js +2 -2
- package/dist/cjs/q-carousel.cjs.entry.js +120 -18
- package/dist/cjs/q-chip.cjs.entry.js +2 -2
- package/dist/cjs/q-control-group.cjs.entry.js +64 -0
- package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
- package/dist/cjs/q-data-table.cjs.entry.js +4 -4
- package/dist/cjs/q-dialog.cjs.entry.js +4 -4
- package/dist/cjs/q-divider.cjs.entry.js +2 -2
- package/dist/cjs/q-dropdown.cjs.entry.js +218 -21
- package/dist/cjs/q-form.cjs.entry.js +15 -5
- package/dist/cjs/q-grid.cjs.entry.js +2 -2
- package/dist/cjs/q-icon.cjs.entry.js +1 -1
- package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
- package/dist/cjs/q-inline.cjs.entry.js +2 -2
- package/dist/cjs/q-input_2.cjs.entry.js +7 -7
- package/dist/cjs/q-link.cjs.entry.js +2 -2
- package/dist/cjs/q-map.cjs.entry.js +2 -2
- package/dist/cjs/q-media.cjs.entry.js +2 -2
- package/dist/cjs/q-navbar.cjs.entry.js +3 -3
- package/dist/cjs/q-pagination.cjs.entry.js +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 +4 -4
- package/dist/cjs/q-reel.cjs.entry.js +4 -4
- 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 +2 -2
- package/dist/cjs/q-slider.cjs.entry.js +122 -0
- package/dist/cjs/q-stack.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
- package/dist/cjs/q-step-diagram.cjs.entry.js +4 -4
- package/dist/cjs/q-syntax-box.cjs.entry.js +1 -1
- package/dist/cjs/q-tabs.cjs.entry.js +2 -2
- package/dist/cjs/q-textarea.cjs.entry.js +4 -4
- package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
- package/dist/cjs/q-toast.cjs.entry.js +1 -1
- package/dist/cjs/q-toggle.cjs.entry.js +6 -6
- package/dist/cjs/q-toolbar.cjs.entry.js +3 -3
- package/dist/cjs/webquark.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/actions/button/button.css +22 -0
- package/dist/collection/components/content/carousel/carousel.css +7 -0
- package/dist/collection/components/content/carousel/carousel.js +256 -10
- package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
- package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
- package/dist/collection/components/data-display/accordion/accordion.js +1 -1
- 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/map/test/map.cmp.test.js +1 -1
- package/dist/collection/components/data-display/pagination/pagination.js +1 -1
- 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 +115 -0
- package/dist/collection/components/inputs/dropdown/dropdown.js +274 -23
- package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
- package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
- package/dist/collection/components/inputs/form/form.js +2 -2
- package/dist/collection/components/inputs/form/internals/controls.js +1 -1
- package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
- package/dist/collection/components/inputs/form/internals/values.js +5 -0
- package/dist/collection/components/inputs/input/input.css +22 -0
- package/dist/collection/components/inputs/input/input.js +3 -3
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
- package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
- package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
- package/dist/collection/components/inputs/slider/slider.css +44 -0
- package/dist/collection/components/inputs/slider/slider.js +383 -0
- package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
- package/dist/collection/components/inputs/textarea/textarea.js +2 -2
- package/dist/collection/components/inputs/toggle/toggle.css +22 -0
- package/dist/collection/components/inputs/toggle/toggle.js +3 -3
- package/dist/collection/components/layout/control-group/control-group.css +108 -0
- package/dist/collection/components/layout/control-group/control-group.js +142 -0
- package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
- package/dist/collection/components/layout/divider/divider.js +1 -1
- package/dist/collection/components/layout/grid/grid.js +1 -1
- package/dist/collection/components/layout/inline/inline.js +1 -1
- package/dist/collection/components/layout/navbar/navbar.js +2 -2
- package/dist/collection/components/layout/panel/panel.js +4 -4
- package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
- package/dist/collection/components/layout/section/section.js +1 -1
- package/dist/collection/components/layout/stack/stack.js +1 -1
- package/dist/collection/components/layout/tabs/tabs.js +1 -1
- package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
- package/dist/collection/components/media/avatar/avatar.js +1 -1
- package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
- package/dist/collection/components/media/media/media.js +1 -1
- package/dist/collection/components/media/reel/reel.js +2 -2
- package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
- package/dist/collection/components/overlays/dialog/dialog.js +2 -2
- package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
- package/dist/collection/utils/dom.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-iXEnb5d5.js → p-BGHNFaaC.js} +1 -1
- package/dist/components/{p--r63tfQH.js → p-BZXIeEKC.js} +1 -1
- package/dist/components/{p-DbI_F3z0.js → p-Bc2_QcLn.js} +1 -1
- package/dist/components/{p-DBbiaYqQ.js → p-Bp6Xr92S.js} +1 -1
- package/dist/components/{p-CSucjZb7.js → p-BwPMm43W.js} +1 -1
- package/dist/components/p-CArIPzJU.js +1 -0
- package/dist/components/p-CpkX9YAW.js +1 -0
- package/dist/components/{p-CLErjC1f.js → p-D2nxHd1b.js} +1 -1
- package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
- package/dist/components/p-IwIJb0Mc.js +1 -0
- package/dist/components/{p-0feRVg70.js → p-kfrqZyfJ.js} +1 -1
- package/dist/components/{p-CYG3Oakz.js → p-x3C-wjU9.js} +1 -1
- package/dist/components/q-accordion.js +1 -1
- package/dist/components/q-alert.js +1 -1
- package/dist/components/q-avatar.js +1 -1
- package/dist/components/q-banner.js +1 -1
- package/dist/components/q-button.js +1 -1
- package/dist/components/q-card.js +1 -1
- package/dist/components/q-carousel.js +1 -1
- package/dist/components/q-chip.js +1 -1
- package/dist/components/q-control-group.d.ts +11 -0
- package/dist/components/q-control-group.js +1 -0
- package/dist/components/q-conversation-bubble.js +1 -1
- package/dist/components/q-data-table.js +1 -1
- package/dist/components/q-dialog.js +1 -1
- package/dist/components/q-divider.js +1 -1
- package/dist/components/q-dropdown.js +1 -1
- package/dist/components/q-form.js +1 -1
- package/dist/components/q-grid.js +1 -1
- package/dist/components/q-icon.js +1 -1
- package/dist/components/q-image-comparison.js +1 -1
- package/dist/components/q-inline.js +1 -1
- package/dist/components/q-input.js +1 -1
- package/dist/components/q-link.js +1 -1
- package/dist/components/q-map.js +1 -1
- package/dist/components/q-media.js +1 -1
- package/dist/components/q-navbar.js +1 -1
- package/dist/components/q-pagination.js +1 -1
- package/dist/components/q-panel.js +1 -1
- package/dist/components/q-progress.js +1 -1
- package/dist/components/q-quantity-selector.js +1 -1
- package/dist/components/q-radio-group.js +1 -1
- package/dist/components/q-reel.js +1 -1
- package/dist/components/q-scrollable.js +1 -1
- package/dist/components/q-section.js +1 -1
- package/dist/components/q-sidepanel.js +1 -1
- package/dist/components/q-slider.d.ts +11 -0
- package/dist/components/q-slider.js +1 -0
- package/dist/components/q-stack.js +1 -1
- package/dist/components/q-step-diagram-item.js +1 -1
- package/dist/components/q-step-diagram.js +1 -1
- package/dist/components/q-syntax-box.js +2 -2
- package/dist/components/q-tabs.js +1 -1
- package/dist/components/q-textarea.js +1 -1
- package/dist/components/q-thumbnail.js +1 -1
- package/dist/components/q-toast.js +1 -1
- package/dist/components/q-toggle.js +1 -1
- package/dist/components/q-toolbar.js +1 -1
- package/dist/components/q-tooltip.js +1 -1
- package/dist/esm/{action.props-DhnvhbLl.js → action.props-Di_LpF5H.js} +1 -1
- package/dist/esm/{dom-ByfrUWx1.js → dom-CArIPzJU.js} +1 -1
- package/dist/esm/{field-u-k7C7Rf.js → field-C4Iilew6.js} +1 -1
- package/dist/esm/{index-DaJmsCb7.js → index-DoGM9gsC.js} +4 -1
- package/dist/esm/loader.js +3 -3
- 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 +5 -5
- package/dist/esm/q-card.entry.js +2 -2
- package/dist/esm/q-carousel.entry.js +120 -18
- package/dist/esm/q-chip.entry.js +2 -2
- package/dist/esm/q-control-group.entry.js +62 -0
- package/dist/esm/q-conversation-bubble.entry.js +1 -1
- package/dist/esm/q-data-table.entry.js +4 -4
- package/dist/esm/q-dialog.entry.js +4 -4
- package/dist/esm/q-divider.entry.js +2 -2
- package/dist/esm/q-dropdown.entry.js +218 -21
- package/dist/esm/q-form.entry.js +15 -5
- package/dist/esm/q-grid.entry.js +2 -2
- package/dist/esm/q-icon.entry.js +1 -1
- package/dist/esm/q-image-comparison.entry.js +2 -2
- package/dist/esm/q-inline.entry.js +2 -2
- package/dist/esm/q-input_2.entry.js +7 -7
- package/dist/esm/q-link.entry.js +2 -2
- package/dist/esm/q-map.entry.js +2 -2
- package/dist/esm/q-media.entry.js +2 -2
- package/dist/esm/q-navbar.entry.js +3 -3
- package/dist/esm/q-pagination.entry.js +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 +4 -4
- package/dist/esm/q-reel.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/q-slider.entry.js +120 -0
- package/dist/esm/q-stack.entry.js +2 -2
- package/dist/esm/q-step-diagram-item.entry.js +2 -2
- package/dist/esm/q-step-diagram.entry.js +4 -4
- package/dist/esm/q-syntax-box.entry.js +1 -1
- package/dist/esm/q-tabs.entry.js +2 -2
- package/dist/esm/q-textarea.entry.js +4 -4
- package/dist/esm/q-thumbnail.entry.js +3 -3
- package/dist/esm/q-toast.entry.js +1 -1
- package/dist/esm/q-toggle.entry.js +6 -6
- package/dist/esm/q-toolbar.entry.js +3 -3
- package/dist/esm/webquark.js +3 -3
- package/dist/types/components/content/carousel/carousel.d.ts +23 -2
- package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
- package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
- package/dist/types/components/inputs/dropdown/dropdown.d.ts +29 -2
- package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
- package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
- package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
- package/dist/types/components/inputs/slider/slider.d.ts +45 -0
- package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
- package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
- package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
- package/dist/types/components.d.ts +284 -9
- package/dist/types/index.d.ts +1 -1
- package/dist/types/utils/form-field-adapter.d.ts +3 -3
- package/dist/webquark/{p-b8f4994a.entry.js → p-0182e114.entry.js} +1 -1
- package/dist/webquark/{p-4d611b93.entry.js → p-048103e0.entry.js} +1 -1
- package/dist/webquark/{p-a30d212f.entry.js → p-0a2c52de.entry.js} +1 -1
- package/dist/webquark/p-0baf478a.entry.js +1 -0
- package/dist/webquark/{p-5d6fb0d1.entry.js → p-15bad9ef.entry.js} +1 -1
- package/dist/webquark/p-17b9713f.entry.js +1 -0
- package/dist/webquark/{p-32055acd.entry.js → p-222405b8.entry.js} +1 -1
- package/dist/webquark/{p-7723e966.entry.js → p-2eaa3a9f.entry.js} +1 -1
- package/dist/webquark/{p-e7384b6e.entry.js → p-3daafc56.entry.js} +1 -1
- package/dist/webquark/{p-220ec9cf.entry.js → p-44bbe12f.entry.js} +1 -1
- package/dist/webquark/{p-dee50f0a.entry.js → p-4609c362.entry.js} +1 -1
- package/dist/webquark/{p-0f04ceab.entry.js → p-5b584d3c.entry.js} +1 -1
- package/dist/webquark/p-65fe9cac.entry.js +1 -0
- package/dist/webquark/{p-1e8797d1.entry.js → p-846dc838.entry.js} +1 -1
- package/dist/webquark/{p-d2c4696f.entry.js → p-84b350a3.entry.js} +1 -1
- package/dist/webquark/p-85131314.entry.js +1 -0
- package/dist/webquark/{p-a87f0bde.entry.js → p-852e88ae.entry.js} +1 -1
- package/dist/webquark/{p-596737cc.entry.js → p-86c05afd.entry.js} +1 -1
- package/dist/webquark/p-8c5b2706.entry.js +1 -0
- package/dist/webquark/p-923527f0.entry.js +1 -0
- package/dist/webquark/{p-687be7d4.entry.js → p-9a76cd71.entry.js} +1 -1
- package/dist/webquark/p-CArIPzJU.js +1 -0
- package/dist/webquark/{p-BuctNczf.js → p-DDUED8LT.js} +1 -1
- package/dist/webquark/{p-Bk4FnOfb.js → p-Dnz3WmdX.js} +1 -1
- package/dist/webquark/{p-DaJmsCb7.js → p-DoGM9gsC.js} +1 -1
- package/dist/webquark/p-a0d97367.entry.js +1 -0
- package/dist/webquark/{p-3af50215.entry.js → p-a16bd8d5.entry.js} +2 -2
- package/dist/webquark/{p-6d2d016a.entry.js → p-a2334abe.entry.js} +1 -1
- package/dist/webquark/{p-5cccb6bc.entry.js → p-a2ff1b64.entry.js} +1 -1
- package/dist/webquark/{p-a199de7d.entry.js → p-a314bc21.entry.js} +1 -1
- package/dist/webquark/p-a3e1096d.entry.js +1 -0
- package/dist/webquark/{p-b9c8c081.entry.js → p-a66550da.entry.js} +1 -1
- package/dist/webquark/{p-b75ec829.entry.js → p-aa342e81.entry.js} +1 -1
- package/dist/webquark/{p-c662904e.entry.js → p-b1c771fb.entry.js} +1 -1
- package/dist/webquark/p-b21ad707.entry.js +1 -0
- package/dist/webquark/p-b45ca926.entry.js +1 -0
- package/dist/webquark/{p-e3c18c0e.entry.js → p-b8fdef4f.entry.js} +1 -1
- package/dist/webquark/{p-78c56cd3.entry.js → p-d4788321.entry.js} +1 -1
- package/dist/webquark/{p-191a7063.entry.js → p-d86bd51d.entry.js} +1 -1
- package/dist/webquark/{p-b82aaf4c.entry.js → p-dbcf7592.entry.js} +1 -1
- package/dist/webquark/p-e0943d41.entry.js +1 -0
- package/dist/webquark/{p-41deb44c.entry.js → p-e2721e77.entry.js} +1 -1
- package/dist/webquark/{p-ddeb2d4c.entry.js → p-e723a7ae.entry.js} +1 -1
- package/dist/webquark/p-eb800d1e.entry.js +1 -0
- package/dist/webquark/{p-fbd1cbbe.entry.js → p-f4d23ffe.entry.js} +1 -1
- package/dist/webquark/{p-cab898c2.entry.js → p-f51e1098.entry.js} +1 -1
- package/dist/webquark/{p-44eda084.entry.js → p-fe14f038.entry.js} +1 -1
- package/dist/webquark/webquark.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-ByfrUWx1.js +0 -1
- package/dist/components/p-cSh-5xis.js +0 -1
- package/dist/webquark/p-10dc5cce.entry.js +0 -1
- package/dist/webquark/p-2291095e.entry.js +0 -1
- package/dist/webquark/p-473a1810.entry.js +0 -1
- package/dist/webquark/p-4cf40080.entry.js +0 -1
- package/dist/webquark/p-6a5033da.entry.js +0 -1
- package/dist/webquark/p-70e3a23a.entry.js +0 -1
- package/dist/webquark/p-8a0733a1.entry.js +0 -1
- package/dist/webquark/p-ByfrUWx1.js +0 -1
- package/dist/webquark/p-bf568cda.entry.js +0 -1
- package/dist/webquark/p-f63fd66f.entry.js +0 -1
- package/dist/webquark/p-f95aeb8d.entry.js +0 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
import { controlScope } from "../../../theme/tokens";
|
|
3
|
+
const supportedControls = new Set(['Q-INPUT', 'Q-DROPDOWN', 'Q-TOGGLE', 'Q-QUANTITY-SELECTOR', 'Q-BUTTON']);
|
|
4
|
+
const marker = 'data-q-control-group';
|
|
5
|
+
const ownership = new WeakMap();
|
|
6
|
+
/**
|
|
7
|
+
* Visually joined controls with consumer-owned values and interactions.
|
|
8
|
+
* @slot - Direct input, dropdown, toggle, quantity selector or button children.
|
|
9
|
+
* @part group - Layout container; each child retains its own control surface.
|
|
10
|
+
*/
|
|
11
|
+
export class QControlGroup {
|
|
12
|
+
el;
|
|
13
|
+
size = 'inherit';
|
|
14
|
+
orientation = 'horizontal';
|
|
15
|
+
/** Name of the group; each child still needs its own accessible name. */
|
|
16
|
+
ariaLabel = null;
|
|
17
|
+
observer;
|
|
18
|
+
managedChildren = new Set();
|
|
19
|
+
connectedCallback() {
|
|
20
|
+
this.observer = new MutationObserver(() => this.updateChildren());
|
|
21
|
+
this.observer.observe(this.el, { childList: true, subtree: true, attributes: true, attributeFilter: ['hidden', 'slot'] });
|
|
22
|
+
this.updateChildren();
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.observer?.disconnect();
|
|
26
|
+
for (const child of this.managedChildren)
|
|
27
|
+
this.restoreChild(child);
|
|
28
|
+
}
|
|
29
|
+
restoreChild(child) {
|
|
30
|
+
const previous = ownership.get(child);
|
|
31
|
+
if (previous?.owner === this.el) {
|
|
32
|
+
if (previous.original === null)
|
|
33
|
+
child.removeAttribute(marker);
|
|
34
|
+
else
|
|
35
|
+
child.setAttribute(marker, previous.original);
|
|
36
|
+
ownership.delete(child);
|
|
37
|
+
}
|
|
38
|
+
this.managedChildren.delete(child);
|
|
39
|
+
}
|
|
40
|
+
updateChildren = () => {
|
|
41
|
+
const controls = Array.from(this.el.children).filter((child) => child instanceof HTMLElement && supportedControls.has(child.tagName) && !child.hidden && !child.slot);
|
|
42
|
+
for (const child of this.managedChildren) {
|
|
43
|
+
if (!controls.includes(child))
|
|
44
|
+
this.restoreChild(child);
|
|
45
|
+
}
|
|
46
|
+
controls.forEach((child, index) => {
|
|
47
|
+
if (!this.managedChildren.has(child)) {
|
|
48
|
+
const previous = ownership.get(child);
|
|
49
|
+
ownership.set(child, { owner: this.el, original: previous ? previous.original : child.getAttribute(marker) });
|
|
50
|
+
this.managedChildren.add(child);
|
|
51
|
+
}
|
|
52
|
+
child.setAttribute(marker, controls.length === 1 ? 'only' : index === 0 ? 'first' : index === controls.length - 1 ? 'last' : 'middle');
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
render() {
|
|
56
|
+
return (h(Host, { key: '3a3eafef4761711a81b71645caa3407e00bc016f', style: controlScope(this.size) }, h("div", { key: '70c4fb37543a2a67921d4a8d8eecb4372b871fbf', part: "group", role: "group", "aria-label": this.ariaLabel || undefined }, h("slot", { key: '145ad01a8d6991b3137f642abe514051660c96e8', onSlotchange: this.updateChildren }))));
|
|
57
|
+
}
|
|
58
|
+
static get is() { return "q-control-group"; }
|
|
59
|
+
static get encapsulation() { return "shadow"; }
|
|
60
|
+
static get originalStyleUrls() {
|
|
61
|
+
return {
|
|
62
|
+
"$": ["control-group.css"]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get styleUrls() {
|
|
66
|
+
return {
|
|
67
|
+
"$": ["control-group.css"]
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static get properties() {
|
|
71
|
+
return {
|
|
72
|
+
"size": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "QControlSize",
|
|
77
|
+
"resolved": "\"inherit\" | \"lg\" | \"md\" | \"sm\"",
|
|
78
|
+
"references": {
|
|
79
|
+
"QControlSize": {
|
|
80
|
+
"location": "import",
|
|
81
|
+
"path": "../../../theme/tokens",
|
|
82
|
+
"id": "../../../src/browser/theme/tokens.ts::QControlSize",
|
|
83
|
+
"referenceLocation": "QControlSize"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": ""
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"attribute": "size",
|
|
97
|
+
"defaultValue": "'inherit'"
|
|
98
|
+
},
|
|
99
|
+
"orientation": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "'horizontal' | 'vertical'",
|
|
104
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": true,
|
|
116
|
+
"attribute": "orientation",
|
|
117
|
+
"defaultValue": "'horizontal'"
|
|
118
|
+
},
|
|
119
|
+
"ariaLabel": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "string | null",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {}
|
|
126
|
+
},
|
|
127
|
+
"required": false,
|
|
128
|
+
"optional": false,
|
|
129
|
+
"docs": {
|
|
130
|
+
"tags": [],
|
|
131
|
+
"text": "Name of the group; each child still needs its own accessible name."
|
|
132
|
+
},
|
|
133
|
+
"getter": false,
|
|
134
|
+
"setter": false,
|
|
135
|
+
"reflect": false,
|
|
136
|
+
"attribute": "aria-label",
|
|
137
|
+
"defaultValue": "null"
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
static get elementRef() { return "el"; }
|
|
142
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
2
|
+
import "../../../../../../packages/browser/components/dist/components/q-control-group.js";
|
|
3
|
+
import "../../../../../../packages/browser/components/dist/components/q-input.js";
|
|
4
|
+
import "../../../../../../packages/browser/components/dist/components/q-dropdown.js";
|
|
5
|
+
import "../../../../../../packages/browser/components/dist/components/q-toggle.js";
|
|
6
|
+
import "../../../../../../packages/browser/components/dist/components/q-quantity-selector.js";
|
|
7
|
+
import "../../../../../../packages/browser/components/dist/components/q-button.js";
|
|
8
|
+
import "../../../../../../packages/browser/components/dist/components/q-form.js";
|
|
9
|
+
import tokens from "../../../../theme/tokens.css?raw";
|
|
10
|
+
import presets from "../../../../theme/token-presets.css?raw";
|
|
11
|
+
const frame = async () => { await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); };
|
|
12
|
+
const element = (id) => document.getElementById(id);
|
|
13
|
+
const surface = (id) => element(id).shadowRoot.querySelector('.input-control,.dropdown-trigger,.toggle-wrapper,.quantity-selector,.btn');
|
|
14
|
+
const height = (id) => Math.round(surface(id).getBoundingClientRect().height);
|
|
15
|
+
async function fixture(html) {
|
|
16
|
+
document.body.innerHTML = `<style>${tokens}\n${presets}</style>${html}`;
|
|
17
|
+
await Promise.all(['q-control-group', 'q-input', 'q-dropdown', 'q-toggle', 'q-quantity-selector', 'q-button', 'q-form'].map(tag => customElements.whenDefined(tag)));
|
|
18
|
+
await frame();
|
|
19
|
+
}
|
|
20
|
+
afterEach(() => { document.body.innerHTML = ''; });
|
|
21
|
+
describe('q-control-group', () => {
|
|
22
|
+
it('joins all five controls without changing standalone geometry or child values', async () => {
|
|
23
|
+
await fixture(`<q-input id="standalone" label="Outside" label-hidden value="original"></q-input>
|
|
24
|
+
<q-control-group aria-label="Mixed controls" id="group">
|
|
25
|
+
<q-toggle id="toggle" label="Enabled" checked></q-toggle>
|
|
26
|
+
<q-input id="amount" label="Amount" label-hidden type="number" value="5" width="xs"></q-input>
|
|
27
|
+
<q-dropdown id="unit" label="Unit" label-hidden options='["Minutes","Hours"]' value="Minutes"></q-dropdown>
|
|
28
|
+
<q-quantity-selector id="quantity" value="2"></q-quantity-selector>
|
|
29
|
+
<q-button id="button">Apply</q-button>
|
|
30
|
+
</q-control-group>`);
|
|
31
|
+
for (const id of ['toggle', 'amount', 'unit', 'quantity', 'button'])
|
|
32
|
+
expect(height(id)).toBe(height('standalone'));
|
|
33
|
+
expect(element('standalone').hasAttribute('data-q-control-group')).toBe(false);
|
|
34
|
+
expect(getComputedStyle(surface('standalone')).borderStartStartRadius).not.toBe('0px');
|
|
35
|
+
expect(getComputedStyle(surface('amount')).borderStartStartRadius).toBe('0px');
|
|
36
|
+
expect(element('amount').value).toBe('5');
|
|
37
|
+
expect(element('toggle').checked).toBe(true);
|
|
38
|
+
expect(element('group').shadowRoot.querySelector('[role="group"]').getAttribute('aria-label')).toBe('Mixed controls');
|
|
39
|
+
expect(element('group').tabIndex).toBe(-1);
|
|
40
|
+
});
|
|
41
|
+
it('tracks hidden, repeated and moved children and restores standalone styling', async () => {
|
|
42
|
+
await fixture('<q-control-group id="a"><q-input id="one"></q-input><q-input id="two"></q-input><q-button id="three">Save</q-button></q-control-group><q-control-group id="b"></q-control-group>');
|
|
43
|
+
const originalRadius = getComputedStyle(surface('one')).borderStartStartRadius;
|
|
44
|
+
element('one').hidden = true;
|
|
45
|
+
await frame();
|
|
46
|
+
expect(element('one').hasAttribute('data-q-control-group')).toBe(false);
|
|
47
|
+
expect(element('two').getAttribute('data-q-control-group')).toBe('first');
|
|
48
|
+
element('b').append(element('two'));
|
|
49
|
+
await frame();
|
|
50
|
+
expect(element('two').getAttribute('data-q-control-group')).toBe('only');
|
|
51
|
+
document.body.append(element('two'));
|
|
52
|
+
await frame();
|
|
53
|
+
expect(element('two').hasAttribute('data-q-control-group')).toBe(false);
|
|
54
|
+
expect(getComputedStyle(surface('two')).borderStartStartRadius).toBe(originalRadius);
|
|
55
|
+
element('one').hidden = false;
|
|
56
|
+
element('a').prepend(element('three'));
|
|
57
|
+
await frame();
|
|
58
|
+
expect(element('three').getAttribute('data-q-control-group')).toBe('first');
|
|
59
|
+
expect(element('one').getAttribute('data-q-control-group')).toBe('last');
|
|
60
|
+
});
|
|
61
|
+
it('inherits changing preset, size and palette scopes without leaking outside', async () => {
|
|
62
|
+
await fixture(`<q-form size="sm"><div id="scope" data-wq-preset="comfortable" style="--q-border-color:rgb(120, 10, 30)">
|
|
63
|
+
<q-input id="outside" label-hidden label="Outside"></q-input>
|
|
64
|
+
<q-control-group id="group"><q-input id="inside" label-hidden label="Inside"></q-input><q-button id="large" size="lg">Save</q-button></q-control-group>
|
|
65
|
+
<div data-wq-preset="compact"><q-control-group><q-input id="nested" label-hidden label="Nested"></q-input></q-control-group></div>
|
|
66
|
+
</div></q-form>`);
|
|
67
|
+
expect(height('inside')).toBe(height('outside'));
|
|
68
|
+
expect(height('inside')).toBe(36);
|
|
69
|
+
expect(height('nested')).toBe(28);
|
|
70
|
+
expect(height('large')).toBe(52);
|
|
71
|
+
element('scope').dataset.wqPreset = 'compact';
|
|
72
|
+
element('scope').style.setProperty('--q-border-color', 'rgb(10, 90, 40)');
|
|
73
|
+
await frame();
|
|
74
|
+
expect(height('inside')).toBe(height('outside'));
|
|
75
|
+
expect(height('inside')).toBe(28);
|
|
76
|
+
await expect.poll(() => height('large')).toBe(44);
|
|
77
|
+
expect(getComputedStyle(surface('inside')).borderColor).toBe(getComputedStyle(surface('outside')).borderColor);
|
|
78
|
+
element('group').setAttribute('size', 'lg');
|
|
79
|
+
await frame();
|
|
80
|
+
await expect.poll(() => height('inside')).toBe(44);
|
|
81
|
+
expect(height('outside')).toBe(28);
|
|
82
|
+
});
|
|
83
|
+
it('preserves form values, reset, validation and events', async () => {
|
|
84
|
+
await fixture(`<form id="form"><q-control-group>
|
|
85
|
+
<q-input id="input" name="amount" label="Amount" label-hidden value="5" required></q-input>
|
|
86
|
+
<q-toggle id="enabled" name="enabled" label="Enabled" checked></q-toggle>
|
|
87
|
+
<q-dropdown id="unit" name="unit" label="Unit" label-hidden options='["Minutes","Hours"]' value="Minutes"></q-dropdown>
|
|
88
|
+
</q-control-group></form>`);
|
|
89
|
+
const form = element('form');
|
|
90
|
+
expect(new FormData(form).get('amount')).toBe('5');
|
|
91
|
+
expect(new FormData(form).get('unit')).toBe('Minutes');
|
|
92
|
+
const input = element('input');
|
|
93
|
+
input.value = '';
|
|
94
|
+
await frame();
|
|
95
|
+
expect(await input.checkValidity()).toBe(false);
|
|
96
|
+
form.reset();
|
|
97
|
+
await frame();
|
|
98
|
+
expect(input.value).toBe('5');
|
|
99
|
+
let changes = 0;
|
|
100
|
+
element('enabled').addEventListener('qChange', () => changes++);
|
|
101
|
+
surface('enabled').click();
|
|
102
|
+
await frame();
|
|
103
|
+
expect(changes).toBe(1);
|
|
104
|
+
expect(new FormData(form).has('enabled')).toBe(false);
|
|
105
|
+
});
|
|
106
|
+
it('keeps explicit host and preset widths without growing them into spare space', async () => {
|
|
107
|
+
await fixture('<q-control-group style="width:600px"><q-input id="fixed" style="width:120px" label-hidden label="Code"></q-input><q-button>Find</q-button></q-control-group><q-control-group style="width:600px"><q-input id="small" width="xs" label-hidden label="Amount"></q-input><q-dropdown label-hidden label="Unit"></q-dropdown></q-control-group>');
|
|
108
|
+
expect(element('fixed').getBoundingClientRect().width).toBe(120);
|
|
109
|
+
expect(element('small').getBoundingClientRect().width).toBe(80);
|
|
110
|
+
});
|
|
111
|
+
it('preserves child appearance and actions across light and dark themes', async () => {
|
|
112
|
+
await fixture(`<div id="theme" data-theme="light">
|
|
113
|
+
<q-control-group><q-input id="input" label="Amount" label-hidden type="number" value="5"></q-input><q-dropdown id="dropdown" label="Supplier" label-hidden searchable options='["Acme","Example"]'></q-dropdown><q-button id="action">Use supplier</q-button></q-control-group>
|
|
114
|
+
<q-input id="standalone" label="Amount" label-hidden type="number" value="5"></q-input></div>`);
|
|
115
|
+
for (const theme of ['light', 'dark']) {
|
|
116
|
+
element('theme').dataset.theme = theme;
|
|
117
|
+
await frame();
|
|
118
|
+
await expect.poll(() => getComputedStyle(surface('input')).backgroundColor).toBe(getComputedStyle(surface('standalone')).backgroundColor);
|
|
119
|
+
expect(height('input')).toBe(height('standalone'));
|
|
120
|
+
}
|
|
121
|
+
element('input').shadowRoot.querySelector('[aria-label="Increase value"]').click();
|
|
122
|
+
await frame();
|
|
123
|
+
expect(element('input').value).toBe('6');
|
|
124
|
+
let actions = 0;
|
|
125
|
+
element('action').addEventListener('qClick', () => actions++);
|
|
126
|
+
surface('action').click();
|
|
127
|
+
expect(actions).toBe(1);
|
|
128
|
+
element('action').disabled = true;
|
|
129
|
+
await frame();
|
|
130
|
+
surface('action').click();
|
|
131
|
+
expect(actions).toBe(1);
|
|
132
|
+
surface('dropdown').click();
|
|
133
|
+
await frame();
|
|
134
|
+
const option = element('dropdown').shadowRoot.querySelector('[role="option"]');
|
|
135
|
+
option.click();
|
|
136
|
+
await frame();
|
|
137
|
+
expect(element('dropdown').value).toBe('Acme');
|
|
138
|
+
});
|
|
139
|
+
it('preserves q-form discovery, reset and disabled fields through the slot', async () => {
|
|
140
|
+
await fixture('<q-form id="form"><q-control-group><q-input id="input" label="Amount" label-hidden name="amount" value="5"></q-input><q-input name="ignored" disabled value="hidden"></q-input></q-control-group></q-form>');
|
|
141
|
+
const form = element('form');
|
|
142
|
+
expect(await form.getValues()).toEqual({ amount: '5' });
|
|
143
|
+
await form.setValues({ amount: '10' });
|
|
144
|
+
expect(element('input').value).toBe('10');
|
|
145
|
+
await form.resetForm();
|
|
146
|
+
expect(await form.getValues()).toEqual({ amount: '5' });
|
|
147
|
+
});
|
|
148
|
+
it('keeps focus and dropdown menus outside the shared outline in RTL and vertical layouts', async () => {
|
|
149
|
+
await fixture(`<q-control-group id="group" dir="rtl" style="width:300px"><q-input id="input" label="Amount" label-hidden></q-input>
|
|
150
|
+
<q-dropdown id="dropdown" label="Unit" label-hidden options='["Minutes","Hours"]'></q-dropdown></q-control-group>`);
|
|
151
|
+
expect(getComputedStyle(surface('input')).borderTopRightRadius).not.toBe('0px');
|
|
152
|
+
await element('input').focusElement();
|
|
153
|
+
expect(element('input').shadowRoot.activeElement?.tagName).toBe('INPUT');
|
|
154
|
+
surface('dropdown').click();
|
|
155
|
+
await frame();
|
|
156
|
+
const menu = element('dropdown').shadowRoot.querySelector('[role="listbox"]');
|
|
157
|
+
expect(menu.getBoundingClientRect().height).toBeGreaterThan(0);
|
|
158
|
+
expect(getComputedStyle(element('group').shadowRoot.querySelector('[part="group"]')).overflow).toBe('visible');
|
|
159
|
+
element('group').setAttribute('orientation', 'vertical');
|
|
160
|
+
await frame();
|
|
161
|
+
expect(surface('dropdown').getBoundingClientRect().top).toBeGreaterThan(surface('input').getBoundingClientRect().top);
|
|
162
|
+
});
|
|
163
|
+
});
|
|
@@ -13,7 +13,7 @@ export class QDivider {
|
|
|
13
13
|
/** Hide a purely visual separator from assistive technology. */
|
|
14
14
|
decorative = false;
|
|
15
15
|
render() {
|
|
16
|
-
return h(Host, { key: '
|
|
16
|
+
return h(Host, { key: 'eadd9334a6f43375fdf364710462eef9dc0b2b22', role: this.decorative ? undefined : 'separator', "aria-orientation": this.decorative ? undefined : this.orientation, "aria-hidden": this.decorative ? 'true' : undefined, style: { '--_q-divider-length': this.length === 'auto' ? '100%' : this.length, '--_q-divider-spacing': spaceValue(this.spacing) } }, h("span", { key: '999050a927f952484de99c165f2b20132d64eec4', part: "line", "aria-hidden": "true" }));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "q-divider"; }
|
|
19
19
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,7 +12,7 @@ export class QGrid {
|
|
|
12
12
|
columnGap;
|
|
13
13
|
render() {
|
|
14
14
|
const columns = Math.min(4, Math.max(1, Number(this.columns) || 2));
|
|
15
|
-
return h("div", { key: '
|
|
15
|
+
return h("div", { key: '6cb6f253b692cb98163938ac77b1017706921e0a', part: "layout", style: { '--_q-columns': String(columns), '--_q-min-item': this.minItemWidth, '--_q-column-gap': spaceValue(this.columnGap ?? this.gap), rowGap: spaceValue(this.rowGap ?? this.gap) } }, h("slot", { key: '6e2c2c61901e9444ad4cc789201ee1702c817d92' }));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "q-grid"; }
|
|
18
18
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QInline {
|
|
|
10
10
|
justify = 'start';
|
|
11
11
|
wrap = true;
|
|
12
12
|
render() {
|
|
13
|
-
return h("div", { key: '
|
|
13
|
+
return h("div", { key: '4a738a5cfb63fbfe527ef97e0d4fdc5b2b9d92bb', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align, justifyContent: this.justify === 'between' ? 'space-between' : this.justify, flexWrap: this.wrap ? 'wrap' : 'nowrap' } }, h("slot", { key: '441ff02b18335a81b7674d6b8078102bd22a46f5' }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-inline"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -386,7 +386,7 @@ export class QNavbar {
|
|
|
386
386
|
const items = identifyItems(this.parsedItems, item => item.value, { warningContext: 'q-navbar.items' });
|
|
387
387
|
const hasItems = items.length > 0;
|
|
388
388
|
const ariaLabel = this.ariaLabel?.trim() || undefined;
|
|
389
|
-
return (h("div", { key: '
|
|
389
|
+
return (h("div", { key: '72300427ebcdcbd1fbf35538fe36af599674eec7', class: {
|
|
390
390
|
'navbar': true,
|
|
391
391
|
'is-open': this.menuOpen,
|
|
392
392
|
'is-sticky': this.sticky,
|
|
@@ -396,7 +396,7 @@ export class QNavbar {
|
|
|
396
396
|
'is-collapsed': this.collision,
|
|
397
397
|
'has-mobile-nav': this.hasMobileNav,
|
|
398
398
|
'has-mobile-actions': this.hasMobileActions,
|
|
399
|
-
}, part: "navbar" }, h("div", { key: '
|
|
399
|
+
}, part: "navbar" }, h("div", { key: '356a76e80a441df888f98d49cdea2dc0a5173480', class: "navbar-row" }, this.renderBrand(), h("nav", { key: '16cd03606d948a4ad0caefe2461d09b4b2e0214d', id: this.primaryNavId, class: "desktop-nav", "aria-label": ariaLabel || 'Primary navigation', part: "nav" }, hasItems && this.renderNavItems(items), h("slot", { key: '1df39d562f06cb2f7a2b76161a122d9f73405aff', name: "nav" })), h("div", { key: '99c982b99446849f1c8669c9c2b92eb0530e8bb6', class: "desktop-actions", part: "actions" }, h("slot", { key: '97fe69941ea841fbd570a8d2bc306d292642699c', name: "actions" })), h("button", { key: '55ac3eb3c878dcbba1709c28444f5ceed9d65952', class: "menu-button", type: "button", "aria-label": this.mobileLabel, "aria-expanded": this.menuOpen ? 'true' : 'false', "aria-controls": `${this.primaryNavId} ${this.mobilePanelId}`, "aria-haspopup": "true", onClick: this.handleMenuToggle, part: "menu-button" }, h("span", { key: 'a4969f428a53183aff6162ca99c49344c9e22c43' }), h("span", { key: '67d19e78025a71de533d64be9648959055f371e6' }), h("span", { key: 'd8b4c1e9ad64d9c165b687b3331e035cbedde1c5' }))), h("div", { key: '7e4404dbce5035e890c3fb82774da5409532afaf', id: this.mobilePanelId, class: { 'mobile-panel': true, 'has-content': this.hasMobileContent }, part: "mobile-panel" }, h("nav", { key: 'eff22494d13789eb4ddb95a0db64e1bfc60bc457', class: "mobile-nav", "aria-label": ariaLabel || 'Mobile navigation' }, h("slot", { key: '5f6acd5b274ab9fd2cd6762912c05787802be39c', name: "mobile-nav", onSlotchange: this.handleMobileSlotChange })), h("div", { key: '262bfccfc84486b53b607f78c82f5e203ec79bad', class: "mobile-actions" }, h("slot", { key: '9c631d7e8d89f424442fba93e094c5562f98ea68', name: "mobile-actions", onSlotchange: this.handleMobileSlotChange })))));
|
|
400
400
|
}
|
|
401
401
|
static get is() { return "q-navbar"; }
|
|
402
402
|
static get encapsulation() { return "shadow"; }
|
|
@@ -55,7 +55,7 @@ export class QPanel {
|
|
|
55
55
|
}
|
|
56
56
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
57
57
|
render() {
|
|
58
|
-
return (h("section", { key: '
|
|
58
|
+
return (h("section", { key: 'e4d17eda76e6fd5c295178a0cf7440e0dfa4f2bb', style: { '--_q-surface': surfaceValue(this.surface ?? (this.variant === 'plain' ? 'transparent' : 'panel')), '--_q-body-padding': spaceValue(this.padding), '--_q-header-padding': spaceValue(this.headerPadding ?? this.padding), '--_q-footer-padding': spaceValue(this.footerPadding ?? this.padding) }, class: {
|
|
59
59
|
'panel': true,
|
|
60
60
|
'has-dividers': this.dividers,
|
|
61
61
|
[`variant-${this.variant}`]: true,
|
|
@@ -66,13 +66,13 @@ export class QPanel {
|
|
|
66
66
|
'has-sticky-header': this.stickyHeader,
|
|
67
67
|
'has-sticky-footer': this.stickyFooter,
|
|
68
68
|
'uses-sticky-scroll': this.scrollable && (this.stickyHeader || this.stickyFooter),
|
|
69
|
-
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '
|
|
69
|
+
}, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '653bb1def51fb6ad21914ef7e5a54cbfb147640e', class: {
|
|
70
70
|
'panel-header': true,
|
|
71
71
|
'is-hidden': !this.hasHeader,
|
|
72
|
-
}, part: "header" }, h("slot", { key: '
|
|
72
|
+
}, part: "header" }, h("slot", { key: '06cc3f354673d5fe3fde67b1b86ec392e03be7df', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: 'cb4a97900e5524015eae2ee57fa78509a9bb776d', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: '3dbcb6ca0b4fa46edbf706537905d4fe073f755f' })), h("div", { key: '422214dca7949db96461944299d42c1c0aa484b3', class: {
|
|
73
73
|
'panel-footer': true,
|
|
74
74
|
'is-hidden': !this.hasFooter,
|
|
75
|
-
}, part: "footer" }, h("slot", { key: '
|
|
75
|
+
}, part: "footer" }, h("slot", { key: '4738de4fdffc4802c02f3de0e32c6c2d2cf30f4b', name: "footer", onSlotchange: this.handleSlotChange }))));
|
|
76
76
|
}
|
|
77
77
|
static get is() { return "q-panel"; }
|
|
78
78
|
static get encapsulation() { return "shadow"; }
|
|
@@ -326,13 +326,13 @@ export class QScrollable {
|
|
|
326
326
|
height: this.height,
|
|
327
327
|
maxHeight: this.maxHeight || undefined,
|
|
328
328
|
};
|
|
329
|
-
return (h(Host, { key: '
|
|
329
|
+
return (h(Host, { key: '6dfe263ff199a234244d309b4b9173a0aa179651', class: {
|
|
330
330
|
'is-scrolling': this.isScrolling,
|
|
331
331
|
'is-dragging': this.isDragging,
|
|
332
|
-
}, style: hostStyle }, h("div", { key: '
|
|
332
|
+
}, style: hostStyle }, h("div", { key: '6ecf6002545a4fe54a3d8f7c79996c5f172eeafb', class: "q-scrollable-host" }, h("div", { key: '049712eb9a314295b2aeba91c85a7d2a955badbd', id: this.viewportId, class: "q-scrollable-viewport", ref: this.setViewportRef, onScroll: this.handleScroll, tabindex: 0, part: "viewport" }, h("div", { key: '2526fef43264a34029ab3de291cd5ad8b8169ab7', class: "q-scrollable-content", ref: this.setContentRef, part: "content" }, h("slot", { key: '826a4cabc557ad0560bddbbd366aaf0d895d0265' }))), this.mode === 'custom' && (h("div", { key: 'd6f2628d74339e74aca7c0de609f9e56e211666a', class: {
|
|
333
333
|
'q-scrollbar-track': true,
|
|
334
334
|
'is-dragging': this.isDragging,
|
|
335
|
-
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '
|
|
335
|
+
}, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '49bcccd913a9ce1d991d234ef024c586a4549904', class: "q-scrollbar-thumb", ref: (el) => (this.thumbEl = el), onPointerDown: this.handlePointerDown, onKeyDown: this.handleThumbKeyDown, role: "scrollbar", "aria-controls": this.viewportId, "aria-orientation": "vertical", "aria-valuemin": "0", "aria-valuemax": this.scrollValueMax, "aria-valuenow": this.scrollValueNow, "aria-label": "Scroll content", tabindex: 0, part: "thumb" }))))));
|
|
336
336
|
}
|
|
337
337
|
static get is() { return "q-scrollable"; }
|
|
338
338
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QSection {
|
|
|
10
10
|
reverse = false;
|
|
11
11
|
columns = 1;
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: 'c324ed569083addd204d27d7fd74bb3f9a1ec616' }, h("slot", { key: 'e8a7d513bf2d3a817f69c71b47d1691ef33ebf1f', name: "media" }), h("slot", { key: '0d6d389f6778f523434900e58b2631668364c9a5' }), h("slot", { key: 'a65738487e173661217ef1513d7a57d88801ef76', name: "actions" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-section"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class QStack {
|
|
|
8
8
|
gap = 'lg';
|
|
9
9
|
align = 'stretch';
|
|
10
10
|
render() {
|
|
11
|
-
return h("div", { key: '
|
|
11
|
+
return h("div", { key: 'ff2923042dd41fa65f782701074ef8fac385803b', part: "layout", style: { gap: spaceValue(this.gap), alignItems: this.align } }, h("slot", { key: 'fb01b80bb7193336e9fbf210c0c972d137780e4a' }));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "q-stack"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
|
@@ -70,7 +70,7 @@ export class QTabs {
|
|
|
70
70
|
warningContext: 'q-tabs items',
|
|
71
71
|
});
|
|
72
72
|
const activeIndex = this.getActiveIndex(items);
|
|
73
|
-
return (h("div", { key: '
|
|
73
|
+
return (h("div", { key: '32da2b9996b98b24ce121fced18f670d5b2652fe', class: {
|
|
74
74
|
'tab-list': true,
|
|
75
75
|
[`size-${this.size}`]: true,
|
|
76
76
|
[`variant-${this.variant}`]: true,
|
|
@@ -24,12 +24,12 @@ export class QToolbar {
|
|
|
24
24
|
/** Accessible label for the toolbar content group. */
|
|
25
25
|
ariaLabel = null;
|
|
26
26
|
render() {
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: 'a6ee427416e1b2804d27a5c508286e7c8145de5e', style: { ...controlScope(this.size), '--_q-toolbar-gap': spaceValue(this.gap) } }, h("div", { key: 'f6e2c4ed7ef2a0e517dd396c1f92cd709e638e4e', class: {
|
|
28
28
|
toolbar: true,
|
|
29
29
|
'is-compact': this.compact,
|
|
30
30
|
'is-transparent': this.transparent,
|
|
31
31
|
'is-bordered': this.bordered,
|
|
32
|
-
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: '
|
|
32
|
+
}, role: this.ariaLabel ? 'group' : undefined, "aria-label": this.ariaLabel, part: "toolbar" }, h("div", { key: 'a67f45efad7bbe963e23c491ac055328b8940b75', class: "toolbar-row", part: "row" }, h("div", { key: '7a9201f4bd923d8b4b4576083bb18735d31d8eb0', class: "toolbar-start", part: "start" }, h("slot", { key: '7d1931b85bbc9dfd62c2a4bba4f2edfdc390c5c6', name: "start" })), h("div", { key: '4c5a681c11c91247913e234424bf774293f600f5', class: "toolbar-content", part: "content" }, h("slot", { key: 'd60e8dfefd9db036961510af3ff687e1f17996cd' })), h("div", { key: '3c7b45b143cafd7a848d7e39770494b0346f28d4', class: "toolbar-end", part: "end" }, h("slot", { key: '3a53678160791e3f0967bbecb72345621be67fc7', name: "end" }))))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "q-toolbar"; }
|
|
35
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -81,7 +81,7 @@ export class QAvatar {
|
|
|
81
81
|
const preset = typeof this.size === 'string' && ['sm', 'md', 'lg'].includes(this.size)
|
|
82
82
|
? this.size
|
|
83
83
|
: 'custom';
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: '4756953378ca0e5ba3b882086f19f4e797aa0966', class: {
|
|
85
85
|
avatar: true,
|
|
86
86
|
[`size-${preset}`]: true,
|
|
87
87
|
[`shape-${this.shape}`]: true,
|
|
@@ -173,7 +173,7 @@ export class QImageComparison {
|
|
|
173
173
|
const afterSrc = this.afterSrc;
|
|
174
174
|
const ratio = this.frameRatio;
|
|
175
175
|
const failed = !beforeSrc || !afterSrc || this.beforeStatus === 'error' || this.afterStatus === 'error' || this.cropUnavailable;
|
|
176
|
-
return (h("div", { key: '
|
|
176
|
+
return (h("div", { key: 'e5410625988c20e6a76cccff54da4f2c1b6a9c21', part: "frame", class: { frame: true, ready: this.ready }, style: { aspectRatio: String(ratio) }, ref: el => this.frame = el, onPointerDown: this.handlePointerDown, onPointerMove: this.handlePointerMove, onPointerUp: this.handlePointerEnd, onPointerCancel: this.handlePointerEnd, onLostPointerCapture: this.handlePointerEnd }, this.renderImage('after', afterSrc, generation, ratio), this.renderImage('before', beforeSrc, generation, ratio), !this.ready && (h("div", { key: 'e9ec809349bcdca73642dd85dfce7be2c85e8e5d', part: "status", class: "status", role: "status" }, failed ? 'Comparison unavailable' : 'Loading images…')), this.ready && (h("div", { key: '261f042c581b98249982bbaacb5e011e83e3815c', class: "decorations", "aria-hidden": "true" }, h("span", { key: 'e44600d0ebea85584ade0032ac67b2760d26fc78', part: "before-label", class: "label before-label" }, this.beforeLabel), h("span", { key: '8b5ab613e9f85fe0b8031c73a18e42baa8199f13', part: "after-label", class: "label after-label" }, this.afterLabel), h("div", { key: '61cd1aa7fa75b4a17e1fdeb8b5589716e481fe30', part: "divider", class: "divider", style: { left: `${this.position}%` } }, h("span", { key: 'c6e5a4ac428bd57659be6ab0c1f6fdc49b1c596b', part: "handle", class: "handle" }, "\u2194")))), h("input", { key: 'd070ec8fc8404a6f37385b918cedd8ebd6414204', part: "control", class: "control", ref: el => this.range = el, type: "range", min: "0", max: "100", step: "1", value: this.position, disabled: !this.ready, "aria-label": this.ariaLabel || 'Image comparison', "aria-valuetext": `${Math.round(this.position)}% ${this.beforeLabel || 'Before'} revealed`, onInput: event => this.updatePosition(Number(event.target.value)) })));
|
|
177
177
|
}
|
|
178
178
|
static get is() { return "q-image-comparison"; }
|
|
179
179
|
static get encapsulation() { return "shadow"; }
|
|
@@ -10,7 +10,7 @@ export class QMedia {
|
|
|
10
10
|
loading = 'lazy';
|
|
11
11
|
alt = '';
|
|
12
12
|
render() {
|
|
13
|
-
return h(Host, { key: '
|
|
13
|
+
return h(Host, { key: '49f6d5a90a5cb7afeee7ab095fef25de2033640a' }, h("slot", { key: '96b02b03210be05385b0cef1e815ea2e1815696f' }), h("slot", { key: 'ed0a47203720efe45c55e00718d20f2120c1c183', name: "fallback" }));
|
|
14
14
|
}
|
|
15
15
|
static get is() { return "q-media"; }
|
|
16
16
|
static get encapsulation() { return "shadow"; }
|
|
@@ -148,10 +148,10 @@ export class QReel {
|
|
|
148
148
|
const currentIdx = this.getActiveIndex(thumbnails);
|
|
149
149
|
const hasPrev = currentIdx > 0;
|
|
150
150
|
const hasNext = currentIdx !== -1 && currentIdx < thumbnails.length - 1;
|
|
151
|
-
return (h("div", { key: '
|
|
151
|
+
return (h("div", { key: '8c380eddb422e7aa04daa42d54944bf3e321cfd1', class: {
|
|
152
152
|
'reel-container': true,
|
|
153
153
|
[`layout-${this.layout}`]: true,
|
|
154
|
-
} }, h("slot", { key: '
|
|
154
|
+
} }, h("slot", { key: 'f28ad233d221f13eb8c72b15fc2cd32d8792d58c' }), this.activeMedia && (h("div", { key: 'f3a6e64dd9f1a1b35fe8319d47a70245b7d47fa7', class: "lightbox-overlay", onClick: this.closeLightbox, onKeyDown: this.handleKeyDown, role: "dialog", "aria-modal": "true", "aria-label": this.activeMedia.label || 'Media Viewer', tabindex: "-1" }, h("button", { key: '7063a5f5f0e14bcbd1e1f94b2bfc49bc3197c687', class: "lightbox-close", onClick: this.handleCloseButtonClick, "aria-label": "Close viewer", ref: (el) => (this.closeButtonRef = el) }, h("svg", { key: '7f7857e3d503c5c59593207f274a489293d2f806', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { key: 'a17b42d0f8be9105b6709202efe08ecba719fcd3', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: '205fbf145f34926042d8563c9bc17b00f499c14a', x1: "6", y1: "6", x2: "18", y2: "18" }))), hasPrev && (h("button", { key: '76fb2144308dc2c42c73c87bb4a487c68fe738ef', class: "lightbox-prev", onClick: this.handlePreviousClick, "aria-label": "Previous media" }, h("svg", { key: 'f4e3069acf0ed623ece4e36d1990e1871d780943', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { key: '3b7eca129e4de80e7a6a7a64e5674a888fab9cf1', points: "15 18 9 12 15 6" })))), hasNext && (h("button", { key: '3a37c591dcedcab431c3d3104d71c61688820599', class: "lightbox-next", onClick: this.handleNextClick, "aria-label": "Next media" }, h("svg", { key: 'f9b9fdb2158fa7d8e64f1d5980781f0c7f902095', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { key: '8a3f09375a1ec756623ee492a1b9605d5f13a0c9', points: "9 18 15 12 9 6" })))), h("div", { key: '589de81633eea3ca158bae65f593db95a7ce52a7', class: "lightbox-content", onClick: (e) => e.stopPropagation() }, this.activeMedia.video ? (h("video", { class: "lightbox-media", src: this.activeMedia.src, controls: true, autoplay: true, loop: true })) : (h("img", { class: "lightbox-media", src: this.activeMedia.src, alt: this.activeMedia.alt })), this.activeMedia.label && (h("div", { key: '600aafa8078da0fc103f49c6d81bd30f1c569a08', class: "lightbox-caption" }, this.activeMedia.label)))))));
|
|
155
155
|
}
|
|
156
156
|
static get is() { return "q-reel"; }
|
|
157
157
|
static get encapsulation() { return "shadow"; }
|
|
@@ -34,11 +34,11 @@ export class QThumbnail {
|
|
|
34
34
|
};
|
|
35
35
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
36
36
|
render() {
|
|
37
|
-
return (h("div", { key: '
|
|
37
|
+
return (h("div", { key: '16b166cd500f563aed661e72911d4f446293765a', class: {
|
|
38
38
|
'thumb-wrapper': true,
|
|
39
39
|
'is-highlighted': this.highlighted,
|
|
40
40
|
'is-video': this.video,
|
|
41
|
-
}, onClick: this.handleTrigger, role: "button", tabindex: "0", "aria-label": this.label || this.alt || 'Media item', onKeyDown: this.handleKeyDown }, h("div", { key: '
|
|
41
|
+
}, onClick: this.handleTrigger, role: "button", tabindex: "0", "aria-label": this.label || this.alt || 'Media item', onKeyDown: this.handleKeyDown }, h("div", { key: '7469ffc9550790a406f2fea4c62e45e6410d6f44', class: "thumb-media-container" }, h("img", { key: 'd9fe1697df917b78ea8dc7ba4555f8b61e986872', class: "thumb-image", src: this.src, alt: this.alt, loading: "lazy" }), this.video && (h("div", { key: 'e052677c066596d04fbee87b7231d590b7cb4b90', class: "video-play-indicator", "aria-hidden": "true" }, h("svg", { key: 'a74a05147b38972b004c53bd04c5f1270acbe4a5', viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, h("polygon", { key: 'b53e1938fa735055278b22f9cdedf217befed643', points: "5 3 19 12 5 21 5 3" }))))), this.label && (h("div", { key: '9f9cfb421b6313e07cd71705b082245969184581', class: "thumb-caption" }, h("span", { key: '686d3ec6e4bb05b0ab0fd3ae78e73ba5c9930862', class: "caption-text" }, this.label))), h("slot", { key: '14f7ea0aba31712761a749516407a35fc17215fe' })));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "q-thumbnail"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -198,9 +198,9 @@ export class QDialog {
|
|
|
198
198
|
'dialog-backdrop': true,
|
|
199
199
|
[`effect-${backdropEffect}`]: true,
|
|
200
200
|
};
|
|
201
|
-
return (h("div", { key: '
|
|
201
|
+
return (h("div", { key: 'c0ac67222109ef770da940730d15f7b8bc7247be', class: classes, onKeyDown: this.handleKeyDown, inert: !this.open ? true : undefined }, h("div", { key: 'bae02db8240037595e49ba4a24f0500b27d9dcdf', class: backdropClasses, onClick: this.handleBackdropClick, part: "backdrop" }), h("div", { key: 'af17425f8d0e1bc49dafe666d9c784e38404e807', ref: el => (this.dialogEl = el), class: "dialog-modal", part: "modal", role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? 'false' : 'true', "aria-label": ariaLabel, "aria-labelledby": !ariaLabel && titleText ? this.titleId : undefined, "aria-describedby": this.message ? this.descriptionId : undefined, tabindex: "-1" }, h("header", { key: '040b01428317995ed761e4fe8ba8acfa9f98005a', class: "dialog-header", part: "header" }, h("slot", { key: '9fb2d093c17e214f3aee8e87506bde98cfe6e1c7', name: "header" }, titleText && h("h2", { key: 'e3ddb11d7ec13ba667beeeec46cbc939f47429fc', id: this.titleId, class: "dialog-title" }, titleText)), h("button", { key: 'd719f755f33f0a540dd842d87a23c08563afc35d', class: "dialog-close-btn", onClick: this.handleCloseButton, "aria-label": this.closeLabel, disabled: this.loading, part: "close-btn" }, h("svg", { key: '679be75b97c3cb307dc0c8e36ada30796b9b67c5', class: "close-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { key: '40f190e8c82b440a67b2f82c5e1eb0c76092d14d', x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { key: 'e96bc59a92ad0b1111907c899362ed05c54a2a30', x1: "6", y1: "6", x2: "18", y2: "18" })))), h("div", { key: 'a024b5365a183400ca8fda240e967eb4b6258fdf', class: "dialog-body", part: "body" }, h("slot", { key: 'c0aa788e43f7615732a291cd21d035426acf76ff' }, this.message && h("p", { key: 'cd68e2e7b245a85a0b92ed2b523b1859b65f3c9f', id: this.descriptionId, class: "dialog-message" }, this.message))), h("footer", { key: '066698d99c33dbdb3266d19c3d3b4acc69fa8570', class: { 'dialog-footer': true, 'is-hidden': !this.showCancel && !this.showConfirm && !this.hasFooter }, part: "footer" }, h("slot", { key: 'd6ee1006406316e8e822a82a20ea501825db14bd', name: "footer", onSlotchange: event => {
|
|
202
202
|
this.hasFooter = event.target.assignedNodes().some(node => node.nodeType === 1 || !!node.textContent?.trim());
|
|
203
|
-
} }, h("div", { key: '
|
|
203
|
+
} }, h("div", { key: '97dceeacd21f3d045bfc885510b3b2b71dc9264a', class: "dialog-actions" }, this.showCancel && (h("button", { key: '5e46a756f1894edb95ee746048bf8b60aa942acd', class: "btn-cancel", onClick: this.handleCancel, disabled: this.loading, part: "cancel-btn" }, this.cancelLabel)), this.showConfirm && (h("button", { key: 'f1769f0987e836ec5e02095e64a9efe9e9a88743', class: "btn-confirm", onClick: this.handleConfirm, disabled: this.loading, "aria-busy": this.loading ? 'true' : 'false', part: "confirm-btn" }, this.loading && h("span", { key: 'a8fe2b08e474ad71c07dd1a1c0f10e617a7ce2ed', class: "spinner-el" }), h("span", { key: '36f6f2690bc5043754fe2a889a132b1533249f0f', class: "btn-label" }, this.confirmLabel)))))))));
|
|
204
204
|
}
|
|
205
205
|
static get is() { return "q-dialog"; }
|
|
206
206
|
static get encapsulation() { return "shadow"; }
|
|
@@ -101,9 +101,9 @@ export class QTooltip {
|
|
|
101
101
|
}
|
|
102
102
|
// ===================== [6] RENDER (Visual Template Only) =====================
|
|
103
103
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: 'f4a681553a400552be065481315cd5503c2bcc74', class: {
|
|
105
105
|
'is-visible': this.visible,
|
|
106
|
-
}, "aria-hidden": this.visible ? 'false' : 'true', role: "tooltip" }, h("div", { key: '
|
|
106
|
+
}, "aria-hidden": this.visible ? 'false' : 'true', role: "tooltip" }, h("div", { key: 'ba8dcfb45999154c9157458d749f1423952bae81', class: "tooltip-bubble" }, this.content || h("slot", { key: 'f22b541d862e0e9e48e738127f4f2ec8e6dcf155' }))));
|
|
107
107
|
}
|
|
108
108
|
static get is() { return "q-tooltip"; }
|
|
109
109
|
static get encapsulation() { return "shadow"; }
|