@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.
Files changed (287) hide show
  1. package/dist/cjs/{action.props-DmLaQuU2.js → action.props-B6vl_1p5.js} +1 -1
  2. package/dist/cjs/{dom-Dk77oFF6.js → dom-BYrqRYna.js} +1 -1
  3. package/dist/cjs/{field-CEZ9NsWK.js → field-B5nxD8Kc.js} +1 -1
  4. package/dist/cjs/{index-CMAcJ6t1.js → index-BD6Jjssb.js} +4 -0
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/q-accordion.cjs.entry.js +2 -2
  7. package/dist/cjs/q-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/q-avatar.cjs.entry.js +2 -2
  9. package/dist/cjs/q-banner.cjs.entry.js +1 -1
  10. package/dist/cjs/q-button_2.cjs.entry.js +5 -5
  11. package/dist/cjs/q-card.cjs.entry.js +2 -2
  12. package/dist/cjs/q-carousel.cjs.entry.js +120 -18
  13. package/dist/cjs/q-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/q-control-group.cjs.entry.js +64 -0
  15. package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
  16. package/dist/cjs/q-data-table.cjs.entry.js +4 -4
  17. package/dist/cjs/q-dialog.cjs.entry.js +4 -4
  18. package/dist/cjs/q-divider.cjs.entry.js +2 -2
  19. package/dist/cjs/q-dropdown.cjs.entry.js +218 -21
  20. package/dist/cjs/q-form.cjs.entry.js +15 -5
  21. package/dist/cjs/q-grid.cjs.entry.js +2 -2
  22. package/dist/cjs/q-icon.cjs.entry.js +1 -1
  23. package/dist/cjs/q-image-comparison.cjs.entry.js +2 -2
  24. package/dist/cjs/q-inline.cjs.entry.js +2 -2
  25. package/dist/cjs/q-input_2.cjs.entry.js +7 -7
  26. package/dist/cjs/q-link.cjs.entry.js +2 -2
  27. package/dist/cjs/q-map.cjs.entry.js +2 -2
  28. package/dist/cjs/q-media.cjs.entry.js +2 -2
  29. package/dist/cjs/q-navbar.cjs.entry.js +3 -3
  30. package/dist/cjs/q-pagination.cjs.entry.js +2 -2
  31. package/dist/cjs/q-panel.cjs.entry.js +6 -6
  32. package/dist/cjs/q-quantity-selector.cjs.entry.js +6 -6
  33. package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
  34. package/dist/cjs/q-reel.cjs.entry.js +4 -4
  35. package/dist/cjs/q-scrollable.cjs.entry.js +4 -4
  36. package/dist/cjs/q-section.cjs.entry.js +2 -2
  37. package/dist/cjs/q-sidepanel.cjs.entry.js +2 -2
  38. package/dist/cjs/q-slider.cjs.entry.js +122 -0
  39. package/dist/cjs/q-stack.cjs.entry.js +2 -2
  40. package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
  41. package/dist/cjs/q-step-diagram.cjs.entry.js +4 -4
  42. package/dist/cjs/q-syntax-box.cjs.entry.js +1 -1
  43. package/dist/cjs/q-tabs.cjs.entry.js +2 -2
  44. package/dist/cjs/q-textarea.cjs.entry.js +4 -4
  45. package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
  46. package/dist/cjs/q-toast.cjs.entry.js +1 -1
  47. package/dist/cjs/q-toggle.cjs.entry.js +6 -6
  48. package/dist/cjs/q-toolbar.cjs.entry.js +3 -3
  49. package/dist/cjs/webquark.cjs.js +2 -2
  50. package/dist/collection/collection-manifest.json +2 -0
  51. package/dist/collection/components/actions/button/button.css +22 -0
  52. package/dist/collection/components/content/carousel/carousel.css +7 -0
  53. package/dist/collection/components/content/carousel/carousel.js +256 -10
  54. package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
  55. package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
  56. package/dist/collection/components/data-display/accordion/accordion.js +1 -1
  57. package/dist/collection/components/data-display/data-table/data-table.js +3 -3
  58. package/dist/collection/components/data-display/map/map.js +1 -1
  59. package/dist/collection/components/data-display/map/test/map.cmp.test.js +1 -1
  60. package/dist/collection/components/data-display/pagination/pagination.js +1 -1
  61. package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
  62. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
  63. package/dist/collection/components/inputs/dropdown/dropdown.css +115 -0
  64. package/dist/collection/components/inputs/dropdown/dropdown.js +274 -23
  65. package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
  66. package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
  67. package/dist/collection/components/inputs/form/form.js +2 -2
  68. package/dist/collection/components/inputs/form/internals/controls.js +1 -1
  69. package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
  70. package/dist/collection/components/inputs/form/internals/values.js +5 -0
  71. package/dist/collection/components/inputs/input/input.css +22 -0
  72. package/dist/collection/components/inputs/input/input.js +3 -3
  73. package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
  74. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
  75. package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
  76. package/dist/collection/components/inputs/slider/slider.css +44 -0
  77. package/dist/collection/components/inputs/slider/slider.js +383 -0
  78. package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
  79. package/dist/collection/components/inputs/textarea/textarea.js +2 -2
  80. package/dist/collection/components/inputs/toggle/toggle.css +22 -0
  81. package/dist/collection/components/inputs/toggle/toggle.js +3 -3
  82. package/dist/collection/components/layout/control-group/control-group.css +108 -0
  83. package/dist/collection/components/layout/control-group/control-group.js +142 -0
  84. package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
  85. package/dist/collection/components/layout/divider/divider.js +1 -1
  86. package/dist/collection/components/layout/grid/grid.js +1 -1
  87. package/dist/collection/components/layout/inline/inline.js +1 -1
  88. package/dist/collection/components/layout/navbar/navbar.js +2 -2
  89. package/dist/collection/components/layout/panel/panel.js +4 -4
  90. package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
  91. package/dist/collection/components/layout/section/section.js +1 -1
  92. package/dist/collection/components/layout/stack/stack.js +1 -1
  93. package/dist/collection/components/layout/tabs/tabs.js +1 -1
  94. package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
  95. package/dist/collection/components/media/avatar/avatar.js +1 -1
  96. package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
  97. package/dist/collection/components/media/media/media.js +1 -1
  98. package/dist/collection/components/media/reel/reel.js +2 -2
  99. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  100. package/dist/collection/components/overlays/dialog/dialog.js +2 -2
  101. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  102. package/dist/collection/utils/dom.js +1 -1
  103. package/dist/components/index.js +1 -1
  104. package/dist/components/{p-iXEnb5d5.js → p-BGHNFaaC.js} +1 -1
  105. package/dist/components/{p--r63tfQH.js → p-BZXIeEKC.js} +1 -1
  106. package/dist/components/{p-DbI_F3z0.js → p-Bc2_QcLn.js} +1 -1
  107. package/dist/components/{p-DBbiaYqQ.js → p-Bp6Xr92S.js} +1 -1
  108. package/dist/components/{p-CSucjZb7.js → p-BwPMm43W.js} +1 -1
  109. package/dist/components/p-CArIPzJU.js +1 -0
  110. package/dist/components/p-CpkX9YAW.js +1 -0
  111. package/dist/components/{p-CLErjC1f.js → p-D2nxHd1b.js} +1 -1
  112. package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
  113. package/dist/components/p-IwIJb0Mc.js +1 -0
  114. package/dist/components/{p-0feRVg70.js → p-kfrqZyfJ.js} +1 -1
  115. package/dist/components/{p-CYG3Oakz.js → p-x3C-wjU9.js} +1 -1
  116. package/dist/components/q-accordion.js +1 -1
  117. package/dist/components/q-alert.js +1 -1
  118. package/dist/components/q-avatar.js +1 -1
  119. package/dist/components/q-banner.js +1 -1
  120. package/dist/components/q-button.js +1 -1
  121. package/dist/components/q-card.js +1 -1
  122. package/dist/components/q-carousel.js +1 -1
  123. package/dist/components/q-chip.js +1 -1
  124. package/dist/components/q-control-group.d.ts +11 -0
  125. package/dist/components/q-control-group.js +1 -0
  126. package/dist/components/q-conversation-bubble.js +1 -1
  127. package/dist/components/q-data-table.js +1 -1
  128. package/dist/components/q-dialog.js +1 -1
  129. package/dist/components/q-divider.js +1 -1
  130. package/dist/components/q-dropdown.js +1 -1
  131. package/dist/components/q-form.js +1 -1
  132. package/dist/components/q-grid.js +1 -1
  133. package/dist/components/q-icon.js +1 -1
  134. package/dist/components/q-image-comparison.js +1 -1
  135. package/dist/components/q-inline.js +1 -1
  136. package/dist/components/q-input.js +1 -1
  137. package/dist/components/q-link.js +1 -1
  138. package/dist/components/q-map.js +1 -1
  139. package/dist/components/q-media.js +1 -1
  140. package/dist/components/q-navbar.js +1 -1
  141. package/dist/components/q-pagination.js +1 -1
  142. package/dist/components/q-panel.js +1 -1
  143. package/dist/components/q-progress.js +1 -1
  144. package/dist/components/q-quantity-selector.js +1 -1
  145. package/dist/components/q-radio-group.js +1 -1
  146. package/dist/components/q-reel.js +1 -1
  147. package/dist/components/q-scrollable.js +1 -1
  148. package/dist/components/q-section.js +1 -1
  149. package/dist/components/q-sidepanel.js +1 -1
  150. package/dist/components/q-slider.d.ts +11 -0
  151. package/dist/components/q-slider.js +1 -0
  152. package/dist/components/q-stack.js +1 -1
  153. package/dist/components/q-step-diagram-item.js +1 -1
  154. package/dist/components/q-step-diagram.js +1 -1
  155. package/dist/components/q-syntax-box.js +2 -2
  156. package/dist/components/q-tabs.js +1 -1
  157. package/dist/components/q-textarea.js +1 -1
  158. package/dist/components/q-thumbnail.js +1 -1
  159. package/dist/components/q-toast.js +1 -1
  160. package/dist/components/q-toggle.js +1 -1
  161. package/dist/components/q-toolbar.js +1 -1
  162. package/dist/components/q-tooltip.js +1 -1
  163. package/dist/esm/{action.props-DhnvhbLl.js → action.props-Di_LpF5H.js} +1 -1
  164. package/dist/esm/{dom-ByfrUWx1.js → dom-CArIPzJU.js} +1 -1
  165. package/dist/esm/{field-u-k7C7Rf.js → field-C4Iilew6.js} +1 -1
  166. package/dist/esm/{index-DaJmsCb7.js → index-DoGM9gsC.js} +4 -1
  167. package/dist/esm/loader.js +3 -3
  168. package/dist/esm/q-accordion.entry.js +2 -2
  169. package/dist/esm/q-alert.entry.js +1 -1
  170. package/dist/esm/q-avatar.entry.js +2 -2
  171. package/dist/esm/q-banner.entry.js +1 -1
  172. package/dist/esm/q-button_2.entry.js +5 -5
  173. package/dist/esm/q-card.entry.js +2 -2
  174. package/dist/esm/q-carousel.entry.js +120 -18
  175. package/dist/esm/q-chip.entry.js +2 -2
  176. package/dist/esm/q-control-group.entry.js +62 -0
  177. package/dist/esm/q-conversation-bubble.entry.js +1 -1
  178. package/dist/esm/q-data-table.entry.js +4 -4
  179. package/dist/esm/q-dialog.entry.js +4 -4
  180. package/dist/esm/q-divider.entry.js +2 -2
  181. package/dist/esm/q-dropdown.entry.js +218 -21
  182. package/dist/esm/q-form.entry.js +15 -5
  183. package/dist/esm/q-grid.entry.js +2 -2
  184. package/dist/esm/q-icon.entry.js +1 -1
  185. package/dist/esm/q-image-comparison.entry.js +2 -2
  186. package/dist/esm/q-inline.entry.js +2 -2
  187. package/dist/esm/q-input_2.entry.js +7 -7
  188. package/dist/esm/q-link.entry.js +2 -2
  189. package/dist/esm/q-map.entry.js +2 -2
  190. package/dist/esm/q-media.entry.js +2 -2
  191. package/dist/esm/q-navbar.entry.js +3 -3
  192. package/dist/esm/q-pagination.entry.js +2 -2
  193. package/dist/esm/q-panel.entry.js +6 -6
  194. package/dist/esm/q-quantity-selector.entry.js +6 -6
  195. package/dist/esm/q-radio-group.entry.js +4 -4
  196. package/dist/esm/q-reel.entry.js +4 -4
  197. package/dist/esm/q-scrollable.entry.js +4 -4
  198. package/dist/esm/q-section.entry.js +2 -2
  199. package/dist/esm/q-sidepanel.entry.js +2 -2
  200. package/dist/esm/q-slider.entry.js +120 -0
  201. package/dist/esm/q-stack.entry.js +2 -2
  202. package/dist/esm/q-step-diagram-item.entry.js +2 -2
  203. package/dist/esm/q-step-diagram.entry.js +4 -4
  204. package/dist/esm/q-syntax-box.entry.js +1 -1
  205. package/dist/esm/q-tabs.entry.js +2 -2
  206. package/dist/esm/q-textarea.entry.js +4 -4
  207. package/dist/esm/q-thumbnail.entry.js +3 -3
  208. package/dist/esm/q-toast.entry.js +1 -1
  209. package/dist/esm/q-toggle.entry.js +6 -6
  210. package/dist/esm/q-toolbar.entry.js +3 -3
  211. package/dist/esm/webquark.js +3 -3
  212. package/dist/types/components/content/carousel/carousel.d.ts +23 -2
  213. package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
  214. package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
  215. package/dist/types/components/inputs/dropdown/dropdown.d.ts +29 -2
  216. package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
  217. package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
  218. package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
  219. package/dist/types/components/inputs/slider/slider.d.ts +45 -0
  220. package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
  221. package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
  222. package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
  223. package/dist/types/components.d.ts +284 -9
  224. package/dist/types/index.d.ts +1 -1
  225. package/dist/types/utils/form-field-adapter.d.ts +3 -3
  226. package/dist/webquark/{p-b8f4994a.entry.js → p-0182e114.entry.js} +1 -1
  227. package/dist/webquark/{p-4d611b93.entry.js → p-048103e0.entry.js} +1 -1
  228. package/dist/webquark/{p-a30d212f.entry.js → p-0a2c52de.entry.js} +1 -1
  229. package/dist/webquark/p-0baf478a.entry.js +1 -0
  230. package/dist/webquark/{p-5d6fb0d1.entry.js → p-15bad9ef.entry.js} +1 -1
  231. package/dist/webquark/p-17b9713f.entry.js +1 -0
  232. package/dist/webquark/{p-32055acd.entry.js → p-222405b8.entry.js} +1 -1
  233. package/dist/webquark/{p-7723e966.entry.js → p-2eaa3a9f.entry.js} +1 -1
  234. package/dist/webquark/{p-e7384b6e.entry.js → p-3daafc56.entry.js} +1 -1
  235. package/dist/webquark/{p-220ec9cf.entry.js → p-44bbe12f.entry.js} +1 -1
  236. package/dist/webquark/{p-dee50f0a.entry.js → p-4609c362.entry.js} +1 -1
  237. package/dist/webquark/{p-0f04ceab.entry.js → p-5b584d3c.entry.js} +1 -1
  238. package/dist/webquark/p-65fe9cac.entry.js +1 -0
  239. package/dist/webquark/{p-1e8797d1.entry.js → p-846dc838.entry.js} +1 -1
  240. package/dist/webquark/{p-d2c4696f.entry.js → p-84b350a3.entry.js} +1 -1
  241. package/dist/webquark/p-85131314.entry.js +1 -0
  242. package/dist/webquark/{p-a87f0bde.entry.js → p-852e88ae.entry.js} +1 -1
  243. package/dist/webquark/{p-596737cc.entry.js → p-86c05afd.entry.js} +1 -1
  244. package/dist/webquark/p-8c5b2706.entry.js +1 -0
  245. package/dist/webquark/p-923527f0.entry.js +1 -0
  246. package/dist/webquark/{p-687be7d4.entry.js → p-9a76cd71.entry.js} +1 -1
  247. package/dist/webquark/p-CArIPzJU.js +1 -0
  248. package/dist/webquark/{p-BuctNczf.js → p-DDUED8LT.js} +1 -1
  249. package/dist/webquark/{p-Bk4FnOfb.js → p-Dnz3WmdX.js} +1 -1
  250. package/dist/webquark/{p-DaJmsCb7.js → p-DoGM9gsC.js} +1 -1
  251. package/dist/webquark/p-a0d97367.entry.js +1 -0
  252. package/dist/webquark/{p-3af50215.entry.js → p-a16bd8d5.entry.js} +2 -2
  253. package/dist/webquark/{p-6d2d016a.entry.js → p-a2334abe.entry.js} +1 -1
  254. package/dist/webquark/{p-5cccb6bc.entry.js → p-a2ff1b64.entry.js} +1 -1
  255. package/dist/webquark/{p-a199de7d.entry.js → p-a314bc21.entry.js} +1 -1
  256. package/dist/webquark/p-a3e1096d.entry.js +1 -0
  257. package/dist/webquark/{p-b9c8c081.entry.js → p-a66550da.entry.js} +1 -1
  258. package/dist/webquark/{p-b75ec829.entry.js → p-aa342e81.entry.js} +1 -1
  259. package/dist/webquark/{p-c662904e.entry.js → p-b1c771fb.entry.js} +1 -1
  260. package/dist/webquark/p-b21ad707.entry.js +1 -0
  261. package/dist/webquark/p-b45ca926.entry.js +1 -0
  262. package/dist/webquark/{p-e3c18c0e.entry.js → p-b8fdef4f.entry.js} +1 -1
  263. package/dist/webquark/{p-78c56cd3.entry.js → p-d4788321.entry.js} +1 -1
  264. package/dist/webquark/{p-191a7063.entry.js → p-d86bd51d.entry.js} +1 -1
  265. package/dist/webquark/{p-b82aaf4c.entry.js → p-dbcf7592.entry.js} +1 -1
  266. package/dist/webquark/p-e0943d41.entry.js +1 -0
  267. package/dist/webquark/{p-41deb44c.entry.js → p-e2721e77.entry.js} +1 -1
  268. package/dist/webquark/{p-ddeb2d4c.entry.js → p-e723a7ae.entry.js} +1 -1
  269. package/dist/webquark/p-eb800d1e.entry.js +1 -0
  270. package/dist/webquark/{p-fbd1cbbe.entry.js → p-f4d23ffe.entry.js} +1 -1
  271. package/dist/webquark/{p-cab898c2.entry.js → p-f51e1098.entry.js} +1 -1
  272. package/dist/webquark/{p-44eda084.entry.js → p-fe14f038.entry.js} +1 -1
  273. package/dist/webquark/webquark.esm.js +1 -1
  274. package/package.json +2 -2
  275. package/dist/components/p-ByfrUWx1.js +0 -1
  276. package/dist/components/p-cSh-5xis.js +0 -1
  277. package/dist/webquark/p-10dc5cce.entry.js +0 -1
  278. package/dist/webquark/p-2291095e.entry.js +0 -1
  279. package/dist/webquark/p-473a1810.entry.js +0 -1
  280. package/dist/webquark/p-4cf40080.entry.js +0 -1
  281. package/dist/webquark/p-6a5033da.entry.js +0 -1
  282. package/dist/webquark/p-70e3a23a.entry.js +0 -1
  283. package/dist/webquark/p-8a0733a1.entry.js +0 -1
  284. package/dist/webquark/p-ByfrUWx1.js +0 -1
  285. package/dist/webquark/p-bf568cda.entry.js +0 -1
  286. package/dist/webquark/p-f63fd66f.entry.js +0 -1
  287. package/dist/webquark/p-f95aeb8d.entry.js +0 -1
@@ -0,0 +1,120 @@
1
+ import { afterEach, expect, it } from "vitest";
2
+ import "../../../../../../packages/browser/components/dist/components/q-dropdown.js";
3
+ import "../../../../../../packages/browser/components/dist/components/q-control-group.js";
4
+ import "../../../../../../packages/browser/components/dist/components/q-input.js";
5
+ import tokens from "../../../../theme/tokens.css?raw";
6
+ const frame = async () => { await new Promise(requestAnimationFrame); await new Promise(requestAnimationFrame); };
7
+ const width = (element) => element.getBoundingClientRect().width;
8
+ async function fixture(attributes = '') {
9
+ document.body.innerHTML = `<style>${tokens}</style><div id="parent" style="width:600px"><q-dropdown id="dropdown" width="fit-options" label="Unit" label-hidden ${attributes}></q-dropdown></div>`;
10
+ const dropdown = document.getElementById('dropdown');
11
+ dropdown.options = ['Hours', 'Minutes', 'Seconds'];
12
+ dropdown.value = 'Hours';
13
+ await customElements.whenDefined('q-dropdown');
14
+ await frame();
15
+ return dropdown;
16
+ }
17
+ afterEach(() => document.body.replaceChildren());
18
+ it('keeps a content-sized interval group inside its layout space as text grows', async () => {
19
+ const dropdown = await fixture();
20
+ const parent = document.getElementById('parent');
21
+ parent.style.cssText = 'display:flex;flex-wrap:wrap;gap:16px;width:600px';
22
+ const group = document.createElement('q-control-group');
23
+ group.style.cssText = 'width:max-content;max-width:100%';
24
+ const number = document.createElement('q-input');
25
+ number.width = 'xs';
26
+ number.type = 'number';
27
+ number.labelHidden = true;
28
+ number.value = '10';
29
+ group.append(number, dropdown);
30
+ const sibling = document.createElement('span');
31
+ sibling.textContent = 'Enabled';
32
+ parent.append(group, sibling);
33
+ for (const fontSize of ['14px', '24px', '32px']) {
34
+ parent.style.setProperty('--q-control-font-md', fontSize);
35
+ parent.style.setProperty('--q-control-line-md', `${parseFloat(fontSize) + 6}px`);
36
+ parent.style.setProperty('--q-control-height-md', `${parseFloat(fontSize) + 16}px`);
37
+ await frame();
38
+ const groupBox = group.getBoundingClientRect();
39
+ const trigger = dropdown.shadowRoot.querySelector('button').getBoundingClientRect();
40
+ expect(trigger.right).toBeLessThanOrEqual(groupBox.right + 1);
41
+ expect(trigger.bottom).toBeLessThanOrEqual(groupBox.bottom + 1);
42
+ expect(sibling.getBoundingClientRect().left).toBeGreaterThanOrEqual(trigger.right);
43
+ }
44
+ parent.style.width = '140px';
45
+ await frame();
46
+ expect(dropdown.getBoundingClientRect().right).toBeLessThanOrEqual(group.getBoundingClientRect().right + 1);
47
+ expect(dropdown.shadowRoot.querySelector('button').getBoundingClientRect().right)
48
+ .toBeLessThanOrEqual(group.getBoundingClientRect().right + 1);
49
+ expect(width(number)).toBe(80);
50
+ });
51
+ it('fits the longest label with arrow spacing and keeps that width across selection', async () => {
52
+ const dropdown = await fixture();
53
+ const initial = width(dropdown);
54
+ expect(initial).toBeLessThan(200);
55
+ dropdown.value = 'Minutes';
56
+ await frame();
57
+ expect(width(dropdown)).toBe(initial);
58
+ const text = dropdown.shadowRoot.querySelector('.trigger-text');
59
+ const arrow = dropdown.shadowRoot.querySelector('button .chevron-icon');
60
+ expect(text.scrollWidth).toBeLessThanOrEqual(text.clientWidth);
61
+ expect(arrow.getBoundingClientRect().left - text.getBoundingClientRect().right).toBeGreaterThanOrEqual(9.5);
62
+ dropdown.options = ['Hours', 'A much longer interval option'];
63
+ await expect.poll(() => width(dropdown)).toBeGreaterThan(initial);
64
+ dropdown.removeAttribute('width');
65
+ await frame();
66
+ expect(width(dropdown)).toBe(600);
67
+ expect(dropdown.style.getPropertyValue('--_q-dropdown-options-width')).toBe('');
68
+ });
69
+ it('reflows after font, gap and size changes, and respects parent and explicit host widths', async () => {
70
+ const dropdown = await fixture();
71
+ const initial = width(dropdown);
72
+ dropdown.style.setProperty('--q-dropdown-font-size', '24px');
73
+ await expect.poll(() => width(dropdown)).toBeGreaterThan(initial);
74
+ const larger = width(dropdown);
75
+ dropdown.style.setProperty('--q-dropdown-icon-gap', '24px');
76
+ await expect.poll(() => width(dropdown)).toBeGreaterThan(larger + 13);
77
+ const withGap = width(dropdown);
78
+ dropdown.style.setProperty('--q-dropdown-padding', '0 40px');
79
+ await expect.poll(() => width(dropdown)).toBeGreaterThan(withGap + 40);
80
+ dropdown.style.removeProperty('--q-dropdown-padding');
81
+ dropdown.style.removeProperty('--q-dropdown-font-size');
82
+ dropdown.style.removeProperty('--q-dropdown-icon-gap');
83
+ document.getElementById('parent').style.width = '60px';
84
+ await frame();
85
+ expect(width(dropdown)).toBe(60);
86
+ expect(dropdown.scrollWidth).toBeLessThanOrEqual(60);
87
+ document.getElementById('parent').style.width = '600px';
88
+ dropdown.style.width = '150px';
89
+ await frame();
90
+ expect(width(dropdown)).toBe(150);
91
+ });
92
+ it.each(['sm', 'md', 'lg'])('fits searchable controls at size %s without crowding their arrow', async (size) => {
93
+ const dropdown = await fixture(`searchable size="${size}"`);
94
+ dropdown.value = 'Minutes';
95
+ await frame();
96
+ const input = dropdown.shadowRoot.querySelector('.dropdown-main-input');
97
+ const style = getComputedStyle(input);
98
+ const labels = dropdown.shadowRoot.querySelector('.fit-options-labels');
99
+ const available = input.clientWidth - parseFloat(style.paddingInlineStart) - parseFloat(style.paddingInlineEnd);
100
+ expect(available).toBeGreaterThanOrEqual(width(labels) - 1);
101
+ const arrow = dropdown.shadowRoot.querySelector('.editable-trigger > .chevron-icon');
102
+ expect(parseFloat(style.paddingInlineEnd) - 14 - width(arrow)).toBeGreaterThanOrEqual(9.5);
103
+ });
104
+ it('uses loaded options rather than filtered search results and supports group placement', async () => {
105
+ const dropdown = await fixture('searchable');
106
+ const group = document.createElement('q-control-group');
107
+ const number = document.createElement('q-input');
108
+ number.width = 'xs';
109
+ group.append(number, dropdown);
110
+ document.getElementById('parent').append(group);
111
+ await frame();
112
+ const initial = width(dropdown);
113
+ const input = dropdown.shadowRoot.querySelector('.dropdown-main-input');
114
+ input.value = 'Hours';
115
+ input.dispatchEvent(new InputEvent('input', { bubbles: true }));
116
+ await frame();
117
+ expect(width(dropdown)).toBe(initial);
118
+ expect(width(number)).toBe(80);
119
+ expect(width(dropdown)).toBeLessThan(200);
120
+ });
@@ -0,0 +1,124 @@
1
+ import { afterEach, describe, expect, it, vi } from "vitest";
2
+ import { page, userEvent } from "vitest/browser";
3
+ // @ts-ignore - exercise the freshly built distribution including composed q-chip styles.
4
+ import { defineCustomElements } from "../../../../../../packages/browser/components/dist/loader";
5
+ // @ts-ignore
6
+ import "../../../../../../packages/browser/components/dist/webquark/webquark.css";
7
+ defineCustomElements();
8
+ const frame = async () => { await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(() => resolve()))); };
9
+ const options = [{ label: 'Catalogue', value: 'catalogue' }, { label: 'Checkout', value: 'checkout' }, { label: 'Payments', value: 'payments' }];
10
+ async function create(props = {}, parent = document.body) {
11
+ const element = document.createElement('q-dropdown');
12
+ Object.assign(element, { label: 'Modules', multiple: true, searchable: true, options, ...props });
13
+ element.style.width = '380px';
14
+ parent.append(element);
15
+ await element.componentOnReady();
16
+ await frame();
17
+ return element;
18
+ }
19
+ afterEach(() => document.body.replaceChildren());
20
+ describe('q-dropdown multiple selection', () => {
21
+ it('keeps one line, hides selected choices, removes chips and emits only the array change', async () => {
22
+ const element = await create({ value: 'payments', searchable: false });
23
+ const values = vi.fn(), single = vi.fn();
24
+ element.addEventListener('qValuesChange', values);
25
+ element.addEventListener('qChange', single);
26
+ const input = page.getByRole('combobox', { name: 'Modules' });
27
+ const height = element.shadowRoot.querySelector('.multiple-trigger').getBoundingClientRect().height;
28
+ await userEvent.click(input);
29
+ await userEvent.click(page.getByRole('option', { name: 'Catalogue' }));
30
+ await frame();
31
+ expect(element.values).toEqual(['catalogue']);
32
+ expect(element.shadowRoot.querySelectorAll('[role=option]')).toHaveLength(2);
33
+ expect(element.shadowRoot.querySelector('[role=option][aria-selected="true"]')).toBeNull();
34
+ expect(values.mock.calls[0][0].detail).toEqual(['catalogue']);
35
+ expect(single).not.toHaveBeenCalled();
36
+ await userEvent.click(page.getByRole('button', { name: 'Remove Catalogue' }));
37
+ await frame();
38
+ expect(element.values).toEqual([]);
39
+ await userEvent.click(input);
40
+ expect(element.shadowRoot.querySelectorAll('[role=option]')).toHaveLength(3);
41
+ expect(element.shadowRoot.querySelector('.multiple-trigger').getBoundingClientRect().height).toBe(height);
42
+ });
43
+ it('keeps search usable and supports keyboard selection, Backspace and Escape', async () => {
44
+ const element = await create();
45
+ const input = page.getByRole('combobox', { name: 'Modules' });
46
+ await input.fill('Check');
47
+ await userEvent.keyboard('{ArrowDown}{Enter}');
48
+ await frame();
49
+ expect(element.values).toEqual(['checkout']);
50
+ expect(element.shadowRoot.querySelector('.multiple-input').value).toBe('');
51
+ await userEvent.keyboard('{Backspace}');
52
+ expect(element.values).toEqual([]);
53
+ await userEvent.keyboard('{Escape}');
54
+ await frame();
55
+ expect(element.shadowRoot.querySelector('.dropdown-menu')).toBeNull();
56
+ });
57
+ it('measures fitting chips and lets the overflow panel remove selections without growing the control', async () => {
58
+ const element = await create({ values: ['catalogue', 'checkout', 'payments'] });
59
+ element.style.width = '230px';
60
+ await frame();
61
+ await frame();
62
+ const field = element.shadowRoot.querySelector('.multiple-trigger');
63
+ const height = field.getBoundingClientRect().height;
64
+ const more = element.shadowRoot.querySelector('.multiple-trigger > .multiple-more');
65
+ expect(more).not.toBeNull();
66
+ expect(element.shadowRoot.querySelector('.multiple-input').getBoundingClientRect().width).toBeGreaterThanOrEqual(64);
67
+ more.click();
68
+ await frame();
69
+ const input = element.shadowRoot.querySelector('.multiple-input');
70
+ input.focus();
71
+ await userEvent.keyboard('{ArrowDown}');
72
+ await frame();
73
+ expect(element.shadowRoot.querySelector('[role=listbox]')).not.toBeNull();
74
+ more.click();
75
+ await frame();
76
+ await userEvent.click(page.getByRole('dialog', { name: 'Selected options' }).getByRole('button', { name: 'Remove Payments' }));
77
+ await frame();
78
+ expect(element.values).toEqual(['catalogue', 'checkout']);
79
+ await userEvent.keyboard('{Escape}');
80
+ element.style.width = '700px';
81
+ await frame();
82
+ await frame();
83
+ expect(element.shadowRoot.querySelector('.multiple-trigger > .multiple-more')).toBeNull();
84
+ expect(field.getBoundingClientRect().height).toBe(height);
85
+ });
86
+ it('submits repeated native form entries, validates required, resets and respects disabled fieldsets', async () => {
87
+ const form = document.createElement('form');
88
+ document.body.append(form);
89
+ const fieldset = document.createElement('fieldset');
90
+ form.append(fieldset);
91
+ const element = await create({ name: 'modules', required: true, values: ['catalogue'] }, fieldset);
92
+ expect(new FormData(form).getAll('modules')).toEqual(['catalogue']);
93
+ element.values = ['checkout', 'payments'];
94
+ await frame();
95
+ expect(new FormData(form).getAll('modules')).toEqual(['checkout', 'payments']);
96
+ element.values = [];
97
+ await frame();
98
+ expect(await element.checkValidity()).toBe(false);
99
+ fieldset.disabled = true;
100
+ await frame();
101
+ expect(await element.checkValidity()).toBe(true);
102
+ expect(new FormData(form).getAll('modules')).toEqual([]);
103
+ fieldset.disabled = false;
104
+ form.reset();
105
+ await frame();
106
+ expect(element.values).toEqual(['catalogue']);
107
+ });
108
+ it('round-trips q-form arrays and keeps external selections when the option page changes', async () => {
109
+ const form = document.createElement('q-form');
110
+ document.body.append(form);
111
+ await form.componentOnReady();
112
+ const element = await create({ name: 'modules', externalSearch: true, values: ['catalogue'] }, form);
113
+ await form.setValues({ modules: ['checkout', 'payments'] });
114
+ await frame();
115
+ expect(await form.getValues()).toEqual({ modules: ['checkout', 'payments'] });
116
+ element.options = [];
117
+ await frame();
118
+ expect(await form.getValues()).toEqual({ modules: ['checkout', 'payments'] });
119
+ expect(Array.from(element.shadowRoot.querySelectorAll('q-chip')).some(chip => chip.label === 'Checkout')).toBe(true);
120
+ await form.setValues({ modules: [] });
121
+ await frame();
122
+ expect(await form.getValues()).toEqual({ modules: [] });
123
+ });
124
+ });
@@ -294,11 +294,11 @@ export class QForm {
294
294
  const hasHeaderContent = Boolean(this.label) || this.hasHeaderSlot;
295
295
  const formLabelledBy = !this.ariaLabel && this.label && !this.hasHeaderSlot ? this.titleId : undefined;
296
296
  const formAriaLabel = this.ariaLabel?.trim() || (this.label && this.hasHeaderSlot ? this.label : undefined);
297
- return (h(Host, { key: '9eeca5dbe6783954ba5915ae2cbed2da36c23cb5', style: { ...controlScope(this.size), '--q-context-feedback-min': this.reserveFeedback === undefined ? '' : 'initial', '--_q-context-feedback-reserve': this.reserveFeedback === undefined ? '' : this.reserveFeedback ? '1' : '0' } }, h("div", { key: '2c80bf5712898a180d193a530beb6f208f0d2702', class: "form-shell" }, h("div", { key: 'a45188e5b3df0fa0b37400feacd95edfbe1110c4', class: { 'form-header': true, 'is-hidden': !hasHeaderContent, 'q-label-hidden': this.labelHidden }, part: "header" }, h("slot", { key: '4855d5fffa98f1f4dc39878f063f3323216c17d5', name: "header", ref: (el) => (this.headerSlot = el), onSlotchange: this.handleHeaderSlotChange }, this.label && h("h2", { key: '6482a98a6a0a99a7311a01f1b43b99b011d022d8', id: this.titleId, class: "form-title" }, this.label))), h("form", { key: '1f4b42eec4b633eaa3de7225c3b5bf918ad71079', ref: (el) => (this.formEl = el), action: this.action, method: this.method, autocomplete: this.autocomplete, enctype: this.enctype, target: this.target, noValidate: this.noValidate, "aria-labelledby": formLabelledBy, "aria-label": formAriaLabel, part: "form", onSubmit: this.handleSubmit, onClick: (ev) => {
297
+ return (h(Host, { key: '3c46f2d8047c1d56dda9f74fc23fff8b34cab500', style: { ...controlScope(this.size), '--q-context-feedback-min': this.reserveFeedback === undefined ? '' : 'initial', '--_q-context-feedback-reserve': this.reserveFeedback === undefined ? '' : this.reserveFeedback ? '1' : '0' } }, h("div", { key: '294ec3fd059ac12c6a87c8bef51497ea630fdd3f', class: "form-shell" }, h("div", { key: 'b5961aeba9b7fbf0b3f0a06c51ca66b1a3b332ce', class: { 'form-header': true, 'is-hidden': !hasHeaderContent, 'q-label-hidden': this.labelHidden }, part: "header" }, h("slot", { key: '36abbf859ef877111c02d9a82cbf2a8cb6b1d0b6', name: "header", ref: (el) => (this.headerSlot = el), onSlotchange: this.handleHeaderSlotChange }, this.label && h("h2", { key: 'b9d3404015cd624dad379337275f0508e1399da2', id: this.titleId, class: "form-title" }, this.label))), h("form", { key: '0337553285166e79efde0de5bcd0d532b6d9adaa', ref: (el) => (this.formEl = el), action: this.action, method: this.method, autocomplete: this.autocomplete, enctype: this.enctype, target: this.target, noValidate: this.noValidate, "aria-labelledby": formLabelledBy, "aria-label": formAriaLabel, part: "form", onSubmit: this.handleSubmit, onClick: (ev) => {
298
298
  const image = ev.target;
299
299
  if (image instanceof HTMLInputElement && image.type === 'image' && image.getRootNode() === this.formEl?.getRootNode())
300
300
  this.handleComposedClick(ev);
301
- }, onReset: this.handleReset }, h("div", { key: '347a28b99b61212aaa644aa3db1fbde51c93d819', class: "form-body", part: "body" }, h("slot", { key: '334454b4bfc0e2a51d745991bcdc73549e4ca5a4' })), h("div", { key: '1f45d5c6aa912456169d75a54598c141f5543952', class: { 'form-actions': true, 'is-hidden': !this.hasActionsSlot }, part: "actions" }, h("slot", { key: 'd6102796fdb4d53ef3c21f60fd595120ef403cc9', name: "actions", ref: (el) => (this.actionsSlot = el), onSlotchange: this.handleActionsSlotChange }))))));
301
+ }, onReset: this.handleReset }, h("div", { key: 'c4f398715c9eeab1c47edcb4b381c6f8bccf9009', class: "form-body", part: "body" }, h("slot", { key: '1bd4f97febdf88a0c67d814c03b83375beb13d89' })), h("div", { key: '4bd533486269c7e8639a816b01d4b2a758b68830', class: { 'form-actions': true, 'is-hidden': !this.hasActionsSlot }, part: "actions" }, h("slot", { key: '640e463fcbb0d50746fd1abc26d4640d6086f876', name: "actions", ref: (el) => (this.actionsSlot = el), onSlotchange: this.handleActionsSlotChange }))))));
302
302
  }
303
303
  static get is() { return "q-form"; }
304
304
  static get encapsulation() { return "shadow"; }
@@ -1,7 +1,7 @@
1
1
  import { awaitFormField, FORM_FIELD_READY_TIMEOUT_MS, readFormField } from "../../../../utils/form-field-adapter";
2
2
  import { isFieldDisabled } from "../../../../utils/form-field-state";
3
3
  const skippedInputTypes = new Set(['button', 'checkbox', 'color', 'file', 'hidden', 'image', 'radio', 'range', 'reset', 'submit']);
4
- const customFieldTags = new Set(['q-input', 'q-textarea', 'q-dropdown', 'q-radio-group', 'q-toggle', 'q-syntax-box']);
4
+ const customFieldTags = new Set(['q-slider', 'q-input', 'q-textarea', 'q-dropdown', 'q-radio-group', 'q-toggle', 'q-syntax-box']);
5
5
  const actionInputTypes = new Set(['button', 'image', 'reset', 'submit']);
6
6
  function supported(element) {
7
7
  const tag = element.tagName.toLowerCase();
@@ -69,7 +69,12 @@ export function snapshotField(control) {
69
69
  if (custom) {
70
70
  state.model = custom.value();
71
71
  if (name && active && !disabled && state.model !== null && (state.kind !== 'toggle' || state.model === true)) {
72
- state.entries.push([name, String(state.model)]);
72
+ if (state.kind === 'multiselect' && Array.isArray(state.model)) {
73
+ state.entries.push(...state.model.map(value => [name, value]));
74
+ }
75
+ else {
76
+ state.entries.push([name, String(state.model)]);
77
+ }
73
78
  }
74
79
  return state;
75
80
  }
@@ -160,6 +160,11 @@ function prepareGroup(name, fields, value) {
160
160
  if (fields.length !== 1)
161
161
  return fail(name, 'repeated multiselect containers have an ambiguous assignment shape');
162
162
  const selected = identities(value, name);
163
+ if (fields[0].custom)
164
+ return [() => {
165
+ fields[0].custom.assign(selected);
166
+ fields[0].custom.reconcile();
167
+ }];
163
168
  const select = fields[0].control;
164
169
  return [() => { Array.from(select.options).forEach(option => { option.selected = selected.includes(option.value); }); }];
165
170
  }
@@ -311,3 +311,25 @@ input.input-box[type="color"]::-moz-color-swatch {
311
311
  overflow-wrap: anywhere;
312
312
  }
313
313
 
314
+
315
+ /* Shared opt-in presentation; standalone surfaces retain their existing rules. */
316
+ :host([data-q-control-group]) :is(.input-control, .dropdown-trigger, .quantity-selector, .btn, .toggle-wrapper) {
317
+ border-start-start-radius: var(--_q-group-start-start, 0px);
318
+ border-start-end-radius: var(--_q-group-start-end, 0px);
319
+ border-end-start-radius: var(--_q-group-end-start, 0px);
320
+ border-end-end-radius: var(--_q-group-end-end, 0px);
321
+ }
322
+
323
+ :host([data-q-control-group]) .toggle-wrapper {
324
+ box-sizing: border-box;
325
+ min-height: var(--_q-control-height);
326
+ padding-inline: var(--_q-control-padding);
327
+ border: var(--q-border, 1px solid var(--q-border-color, #4b5563));
328
+ background: var(--q-bg-field, var(--q-bg-surface-3, #22304d));
329
+ }
330
+
331
+ :host([data-q-control-group]) :is(.btn, .toggle-wrapper, .quantity-selector) {
332
+ width: 100%;
333
+ }
334
+
335
+
@@ -300,16 +300,16 @@ export class QInput {
300
300
  const isMinDisabled = hasNumericValue && this.min !== undefined && this.min !== null && numericValue <= this.min;
301
301
  const isMaxDisabled = hasNumericValue && this.max !== undefined && this.max !== null && numericValue >= this.max;
302
302
  const ariaLabel = this.ariaLabel?.trim() || undefined;
303
- return (h("div", { key: '8b42ceb7344bcf7d7e612d25363a273ac8595d73', style: feedbackStyle(this.reserveFeedback), class: {
303
+ return (h("div", { key: 'b71bf01d50e267da7463549040d3158e2794abbd', style: feedbackStyle(this.reserveFeedback), class: {
304
304
  'input-wrapper': true,
305
305
  'is-disabled': this.isDisabled,
306
306
  'has-error': hasError,
307
307
  [`size-${this.size}`]: true
308
- } }, this.label && (h("label", { key: 'd4f0419f6acec43a62bd67b56eb8111da8e92694', class: { 'input-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), h("div", { key: '0776ffdbd55a4e83beeb86da353ef3f3275c19d5', class: "input-control", part: "control" }, h("span", { key: 'b6e56e21986c2b80b0e6b371e761dd3d1f70db5f', class: "prefix-container", style: { display: this.hasPrefix ? 'flex' : 'none' }, part: "prefix" }, h("slot", { key: '8158e89e4680516aaa430328256a928ac6d541c9', name: "prefix", onSlotchange: this.handlePrefixSlotChange })), h("input", { key: this.type, ref: (el) => (this.inputEl = el), id: "q-field", class: {
308
+ } }, this.label && (h("label", { key: 'b958e678ddb262d48f6e425a607419b2bf43f4d8', class: { 'input-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), h("div", { key: 'fb1a9bdcb5374e4248fb979f8b3d015a7073a28c', class: "input-control", part: "control" }, h("span", { key: 'd6a2a708b5725f2ad049a1d5237d222e3634faef', class: "prefix-container", style: { display: this.hasPrefix ? 'flex' : 'none' }, part: "prefix" }, h("slot", { key: '1c456d29bf3445f1642aa82ddcb97a598042e3f3', name: "prefix", onSlotchange: this.handlePrefixSlotChange })), h("input", { key: this.type, ref: (el) => (this.inputEl = el), id: "q-field", class: {
309
309
  'input-box': true,
310
310
  'has-prefix-padding': this.hasPrefix,
311
311
  'has-suffix-padding': showSuffixContainer
312
- }, type: inputType, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.isDisabled, required: this.required, min: this.min, max: this.max, step: this.step, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick, onKeyDown: this.handleKeyDown, role: this.type === 'number' ? 'spinbutton' : undefined, "aria-valuenow": hasNumericValue ? String(numericValue) : undefined, "aria-valuemin": this.type === 'number' && this.min !== undefined && this.min !== null ? String(this.min) : undefined, "aria-valuemax": this.type === 'number' && this.max !== undefined && this.max !== null ? String(this.max) : undefined, "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": hasError || this.description ? 'q-field-error' : undefined, "aria-label": ariaLabel }), this.type === 'number' && !this.isDisabled && (h("div", { key: 'f0f1937bc3ee7467f311f9c3037d5e9d6b067b35', class: "input-spinners", part: "spinners" }, h("button", { key: '2b6748cdf0d6b702593f01ab125e479192cec01f', class: "spinner-btn spinner-up", type: "button", onClick: this.handleIncrement, disabled: isMaxDisabled, "aria-label": "Increase value" }, h("svg", { key: '41ea7701ce869c76fa0c608464040cf402471506', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: '0d55f92912d4b965daf1ee703147c5794f998407', d: "M18 15l-6-6-6 6" }))), h("button", { key: '1fe024df336b0302d15696672a9806ea4dab523a', class: "spinner-btn spinner-down", type: "button", onClick: this.handleDecrement, disabled: isMinDisabled, "aria-label": "Decrease value" }, h("svg", { key: 'a893df82780770e5e14fc190c846c18605688a27', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: 'f9e9f18fb2205c39e52e2bc1eb8736c5d78ce683', d: "M6 9l6 6 6-6" }))))), h("span", { key: 'cf742d4de79337a7ed23f1e92526054db97e46e9', class: "suffix-container", style: { display: showSuffixContainer ? 'flex' : 'none' }, part: "suffix" }, showClearBtn && (h("button", { key: '18fb167f0cff4d38bc4d27a247494e8229534cec', class: "clear-btn", type: "button", onClick: this.handleClear, "aria-label": "Clear input" }, h("svg", { key: '129c1fa6c4bfb87cc108ed98b7293cb21b8e5bec', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: 'b21f70435ca270b45a60bddc97ea2780fe79c0f4', d: "M18 6L6 18M6 6l12 12" })))), showPasswordToggle && (h("button", { key: '6b8b9a7d77fc4dc4080981bebd6a4f0268bd94ab', class: "password-toggle-btn", type: "button", onClick: this.handlePasswordToggle, "aria-label": this.passwordVisible ? 'Hide password' : 'Show password', "aria-pressed": this.passwordVisible ? 'true' : 'false' }, this.passwordVisible ? (h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { d: "M3 3l18 18" }), h("path", { d: "M10.58 10.58A2 2 0 0 0 12 14a2 2 0 0 0 1.42-.58" }), h("path", { d: "M9.88 4.24A10.2 10.2 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-4.08 5.19" }), h("path", { d: "M6.61 6.61A18.5 18.5 0 0 0 2 12s3 8 10 8a10.7 10.7 0 0 0 5.39-1.61" }))) : (h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }), h("circle", { cx: "12", cy: "12", r: "3" }))))), h("span", { key: '94eaabb7303710ce3cf0ad753a5f46d77af27183', style: { display: !showClearBtn && this.hasSuffix ? 'block' : 'none' } }, h("slot", { key: '0a79e017573b9c992287f30a0372cb2e3e06e3c9', name: "suffix", onSlotchange: this.handleSuffixSlotChange })))), fieldFeedback('q-field-error', displayError, this.description)));
312
+ }, type: inputType, name: this.name, value: this.value, placeholder: this.placeholder, disabled: this.isDisabled, required: this.required, min: this.min, max: this.max, step: this.step, onInput: this.handleInput, onChange: this.handleChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.handleClick, onKeyDown: this.handleKeyDown, role: this.type === 'number' ? 'spinbutton' : undefined, "aria-valuenow": hasNumericValue ? String(numericValue) : undefined, "aria-valuemin": this.type === 'number' && this.min !== undefined && this.min !== null ? String(this.min) : undefined, "aria-valuemax": this.type === 'number' && this.max !== undefined && this.max !== null ? String(this.max) : undefined, "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": hasError || this.description ? 'q-field-error' : undefined, "aria-label": ariaLabel }), this.type === 'number' && !this.isDisabled && (h("div", { key: '0f1a9f35efb2cdd52f3524d1230f5790b2c9dde4', class: "input-spinners", part: "spinners" }, h("button", { key: '1c7655ae1ae057c9d3e5b54d209c26ff6b9add97', class: "spinner-btn spinner-up", type: "button", onClick: this.handleIncrement, disabled: isMaxDisabled, "aria-label": "Increase value" }, h("svg", { key: 'f341aabd6411329fc2688d15fcfd6bed963f2839', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: '168c85528a0784965cce64f1e646360cd62bc927', d: "M18 15l-6-6-6 6" }))), h("button", { key: '48cfd65993b4a56bc0eb319565656eb28f44997f', class: "spinner-btn spinner-down", type: "button", onClick: this.handleDecrement, disabled: isMinDisabled, "aria-label": "Decrease value" }, h("svg", { key: 'a1593bac780e54e3441cb1fe8c5f8bfaeafe038f', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: '8d899374a935ec843e4cc33846747af98a37878d', d: "M6 9l6 6 6-6" }))))), h("span", { key: 'f42635f7d63b90d957c008cafe777616d5523313', class: "suffix-container", style: { display: showSuffixContainer ? 'flex' : 'none' }, part: "suffix" }, showClearBtn && (h("button", { key: '4b5382c98c3ff4cf00ec32131ff7000feb55f39b', class: "clear-btn", type: "button", onClick: this.handleClear, "aria-label": "Clear input" }, h("svg", { key: 'aa79913aeb728e893da73a66a531b72f8ec0cbae', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: '62577d528db5bc4b5846a5f7276ed0addc22478a', d: "M18 6L6 18M6 6l12 12" })))), showPasswordToggle && (h("button", { key: 'c34bde830e34ed73aeba3a95c33010faac039d68', class: "password-toggle-btn", type: "button", onClick: this.handlePasswordToggle, "aria-label": this.passwordVisible ? 'Hide password' : 'Show password', "aria-pressed": this.passwordVisible ? 'true' : 'false' }, this.passwordVisible ? (h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { d: "M3 3l18 18" }), h("path", { d: "M10.58 10.58A2 2 0 0 0 12 14a2 2 0 0 0 1.42-.58" }), h("path", { d: "M9.88 4.24A10.2 10.2 0 0 1 12 4c7 0 10 8 10 8a18.5 18.5 0 0 1-4.08 5.19" }), h("path", { d: "M6.61 6.61A18.5 18.5 0 0 0 2 12s3 8 10 8a10.7 10.7 0 0 0 5.39-1.61" }))) : (h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }), h("circle", { cx: "12", cy: "12", r: "3" }))))), h("span", { key: '2acf49e398fdbedf792228f8c07a5118aba3ca65', style: { display: !showClearBtn && this.hasSuffix ? 'block' : 'none' } }, h("slot", { key: '5a7972e08af55587b17dbb67e1f32b6e9fbb5c60', name: "suffix", onSlotchange: this.handleSuffixSlotChange })))), fieldFeedback('q-field-error', displayError, this.description)));
313
313
  }
314
314
  static get is() { return "q-input"; }
315
315
  static get encapsulation() { return "shadow"; }
@@ -169,3 +169,25 @@
169
169
  .variant-horizontal .quantity-btn { width: var(--q-quantity-selector-height, var(--_q-control-height)); min-height: calc(var(--_q-control-height) - 2px); }
170
170
  .variant-vertical .quantity-btn { height: var(--q-quantity-selector-height, var(--_q-control-height)); }
171
171
  .btn-icon { width: var(--_q-control-icon); height: var(--_q-control-icon); }
172
+
173
+ /* Shared opt-in presentation; standalone surfaces retain their existing rules. */
174
+ :host([data-q-control-group]) :is(.input-control, .dropdown-trigger, .quantity-selector, .btn, .toggle-wrapper) {
175
+ border-start-start-radius: var(--_q-group-start-start, 0px);
176
+ border-start-end-radius: var(--_q-group-start-end, 0px);
177
+ border-end-start-radius: var(--_q-group-end-start, 0px);
178
+ border-end-end-radius: var(--_q-group-end-end, 0px);
179
+ }
180
+
181
+ :host([data-q-control-group]) .toggle-wrapper {
182
+ box-sizing: border-box;
183
+ min-height: var(--_q-control-height);
184
+ padding-inline: var(--_q-control-padding);
185
+ border: var(--q-border, 1px solid var(--q-border-color, #4b5563));
186
+ background: var(--q-bg-field, var(--q-bg-surface-3, #22304d));
187
+ }
188
+
189
+ :host([data-q-control-group]) :is(.btn, .toggle-wrapper, .quantity-selector) {
190
+ width: 100%;
191
+ }
192
+
193
+
@@ -111,15 +111,15 @@ export class QQuantitySelector {
111
111
  const hasFiniteValue = Number.isFinite(this.value);
112
112
  const isMinDisabled = hasFiniteValue && hasQuantityBound(this.min) && finiteValue <= this.min;
113
113
  const isMaxDisabled = hasFiniteValue && hasQuantityBound(this.max) && finiteValue >= this.max;
114
- const decBtn = (h("button", { key: 'ec0597ccef7335f6eb6915e6e606e7dfd82a6877', type: "button", class: "quantity-btn quantity-btn-decrement", onClick: this.decrement, disabled: isMinDisabled, "aria-label": "Decrement quantity" }, h("svg", { key: 'f08f4647d713929d7bcfd3f2cd2f38e887251d04', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: 'ce57365bc6c891c9e8aa3ec9558d67d82011031d', x1: "5", y1: "12", x2: "19", y2: "12" }))));
115
- const incBtn = (h("button", { key: '0fe3c85711b2403b234f9ccd93cb69fb84727d11', type: "button", class: "quantity-btn quantity-btn-increment", onClick: this.increment, disabled: isMaxDisabled, "aria-label": "Increment quantity" }, h("svg", { key: '72e2f169ebbb2dbb5a5b208517c9cd7833866de5', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: '78184e34c8d5a2b55ba9b641ebb1873653c12265', x1: "12", y1: "5", x2: "12", y2: "19" }), h("line", { key: '9d7039973b4f3ac60cf316640f6ce4b658ddef32', x1: "5", y1: "12", x2: "19", y2: "12" }))));
114
+ const decBtn = (h("button", { key: 'cbbda2b87d557156333f6eac8a569fe66d462a84', type: "button", class: "quantity-btn quantity-btn-decrement", onClick: this.decrement, disabled: isMinDisabled, "aria-label": "Decrement quantity" }, h("svg", { key: 'b7180042b807332f9f608384a3dae7d8d6d46d61', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: 'cfeb1fc1bd4ef174f5175c826427e52d86824f24', x1: "5", y1: "12", x2: "19", y2: "12" }))));
115
+ const incBtn = (h("button", { key: '1c5ef6890bd91c8d35f79c90a5934c0cd614d631', type: "button", class: "quantity-btn quantity-btn-increment", onClick: this.increment, disabled: isMaxDisabled, "aria-label": "Increment quantity" }, h("svg", { key: '0b8b9db431141e89faa8185f2b1ff4d23ce9916d', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "btn-icon", "aria-hidden": "true" }, h("line", { key: 'cb831f315150171913a9c016c2a3ac2092e73d82', x1: "12", y1: "5", x2: "12", y2: "19" }), h("line", { key: 'd0c5093d484ee49facd448a02f54f0adabf5c35e', x1: "5", y1: "12", x2: "19", y2: "12" }))));
116
116
  const calculatedWidth = orientation === 'horizontal' ? this.getCalculatedWidth() : '100%';
117
- return (h("div", { key: '264f7f182e7871533d15ee3625cb8e75d233f3d6', class: {
117
+ return (h("div", { key: 'c1780e7303cfc38f06211661d470ae4529656084', class: {
118
118
  'quantity-selector': true,
119
119
  [`size-${this.size}`]: true,
120
120
  [`orientation-${orientation}`]: true,
121
121
  [`variant-${orientation}`]: true,
122
- }, onClick: this.handleClick }, orientation === 'vertical' ? incBtn : decBtn, h("input", { key: '2102dd8d9544fbe35de6e0da5705ed29bc391a4a', type: "text", class: "quantity-input", value: this.inputValue, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange, onKeyDown: this.handleKeyDown, role: "spinbutton", "aria-valuenow": hasFiniteValue ? String(this.value) : undefined, "aria-valuemin": hasQuantityBound(this.min) ? String(this.min) : undefined, "aria-valuemax": hasQuantityBound(this.max) ? String(this.max) : undefined, "aria-label": "Quantity", style: { width: calculatedWidth }, part: "input" }), orientation === 'vertical' ? decBtn : incBtn));
122
+ }, onClick: this.handleClick }, orientation === 'vertical' ? incBtn : decBtn, h("input", { key: 'c5877e6e3caf9c348234884707a84044c71872d2', type: "text", class: "quantity-input", value: this.inputValue, onInput: this.handleInput, onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange, onKeyDown: this.handleKeyDown, role: "spinbutton", "aria-valuenow": hasFiniteValue ? String(this.value) : undefined, "aria-valuemin": hasQuantityBound(this.min) ? String(this.min) : undefined, "aria-valuemax": hasQuantityBound(this.max) ? String(this.max) : undefined, "aria-label": "Quantity", style: { width: calculatedWidth }, part: "input" }), orientation === 'vertical' ? decBtn : incBtn));
123
123
  }
124
124
  static get is() { return "q-quantity-selector"; }
125
125
  static get encapsulation() { return "shadow"; }
@@ -193,13 +193,13 @@ export class QRadioGroup {
193
193
  const hasError = !!displayError;
194
194
  const ariaLabel = this.ariaLabel?.trim() || undefined;
195
195
  const radioName = this.name || this.internalName;
196
- return (h("div", { key: 'ca721052881ef003c67a6c137d1ece018e66db95', style: feedbackStyle(this.reserveFeedback), class: {
196
+ return (h("div", { key: '2348b3c0574a2d94074fe103242b4b83bb77c5b3', style: feedbackStyle(this.reserveFeedback), class: {
197
197
  'radio-group': true,
198
198
  'is-disabled': this.isDisabled,
199
199
  'has-error': hasError,
200
200
  [`size-${this.size}`]: true,
201
201
  [`orientation-${this.orientation}`]: true,
202
- } }, h("fieldset", { key: '1b95846df14f3ac209a821d96875d0fbf1c7f4c3', ref: element => (this.fieldsetEl = element), class: "group-fieldset", part: "group", disabled: this.isDisabled, role: "radiogroup", "aria-label": !this.label ? ariaLabel : undefined, "aria-required": this.required ? 'true' : 'false', "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": hasError || this.description ? 'q-radio-group-error' : undefined }, this.label && h("legend", { key: 'c449725ee7ea6e8ca7e97c57e44cc7d95468025e', part: "label", class: { 'q-label-hidden': this.labelHidden } }, this.label), h("div", { key: 'b648e3db6f3984b2f778b8ccc2fc9120faa12f7a', class: "options", part: "options", style: { '--q-radio-group-option-count': String(Math.max(identifiedOptions.length, 1)) } }, identifiedOptions.map(({ item: option, key }) => (h("label", { key: key, class: {
202
+ } }, h("fieldset", { key: '7b9412fb0fecb18fb2fa52fda90758768cd85d19', ref: element => (this.fieldsetEl = element), class: "group-fieldset", part: "group", disabled: this.isDisabled, role: "radiogroup", "aria-label": !this.label ? ariaLabel : undefined, "aria-required": this.required ? 'true' : 'false', "aria-invalid": hasError ? 'true' : 'false', "aria-describedby": hasError || this.description ? 'q-radio-group-error' : undefined }, this.label && h("legend", { key: '3fd75f8eaa62aa4fcbbb150aa06679160c5eac44', part: "label", class: { 'q-label-hidden': this.labelHidden } }, this.label), h("div", { key: '4987b1b9caacae6865d8c8ca1c9db30292f68c60', class: "options", part: "options", style: { '--q-radio-group-option-count': String(Math.max(identifiedOptions.length, 1)) } }, identifiedOptions.map(({ item: option, key }) => (h("label", { key: key, class: {
203
203
  option: true,
204
204
  'is-selected': option.value === this.value,
205
205
  'is-disabled': this.isDisabled || option.disabled === true,
@@ -0,0 +1,44 @@
1
+ :host {
2
+ display: block;
3
+ width: 100%;
4
+ font-family: var(--q-font-family, inherit);
5
+ --_primary: var(--q-slider-thumb-color, var(--q-color-primary, #6365f4));
6
+ --_hover: var(--q-slider-thumb-hover-color, color-mix(in srgb, var(--_primary) 80%, white));
7
+ --_track: var(--q-slider-track-color, color-mix(in srgb, var(--q-fg-base, #e2e8f0) 8%, transparent));
8
+ }
9
+ .field { display: flex; flex-direction: column; gap: 8px; }
10
+ .label-row { display: flex; justify-content: space-between; align-items: center; color: var(--q-fg-base, #e2e8f0); font-size: .85rem; }
11
+ .badge {
12
+ margin-inline-start: auto;
13
+ background: color-mix(in srgb, var(--_primary) 15%, transparent);
14
+ color: var(--_hover);
15
+ border: 1px solid color-mix(in srgb, var(--_primary) 30%, transparent);
16
+ padding: .1rem .4rem;
17
+ border-radius: 4px;
18
+ font-family: monospace;
19
+ font-size: .75rem;
20
+ }
21
+ input {
22
+ appearance: none; width: 100%; box-sizing: border-box; margin: 2px;
23
+ height: 6px; border-radius: 3px; background: var(--_track); outline: none;
24
+ }
25
+ input::-webkit-slider-thumb {
26
+ appearance: none; width: 16px; height: 16px; border-radius: 50%; border: none;
27
+ background: var(--_primary);
28
+ box-shadow: 0 0 8px color-mix(in srgb, var(--_primary) 80%, transparent); cursor: pointer;
29
+ }
30
+ input::-moz-range-thumb {
31
+ width: 16px; height: 16px; border-radius: 50%; border: none;
32
+ background: var(--_primary);
33
+ box-shadow: 0 0 8px color-mix(in srgb, var(--_primary) 80%, transparent); cursor: pointer;
34
+ }
35
+ input::-moz-range-track { height: 6px; background: transparent; border: none; }
36
+ input:enabled::-webkit-slider-thumb:hover { transform: scale(1.2); background: var(--_hover); }
37
+ input:enabled::-moz-range-thumb:hover { transform: scale(1.2); background: var(--_hover); }
38
+ input:focus-visible { outline: 2px solid var(--_primary); outline-offset: 4px; }
39
+ input:disabled { opacity: var(--q-disabled-opacity, .5); cursor: not-allowed; }
40
+ input:disabled::-webkit-slider-thumb { cursor: not-allowed; }
41
+ input:disabled::-moz-range-thumb { cursor: not-allowed; }
42
+ @media (forced-colors: active) {
43
+ input { appearance: auto; }
44
+ }