@webquark/browser 1.1.0-dev.9 → 1.1.0

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 (344) hide show
  1. package/dist/cjs/{action.props-N0urQtdP.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-CsrQGhG-.js → field-B5nxD8Kc.js} +1 -1
  4. package/dist/cjs/{index-DWXhKHCB.js → index-BD6Jjssb.js} +5 -1
  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 +3 -3
  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 +26 -0
  19. package/dist/cjs/q-dropdown.cjs.entry.js +320 -104
  20. package/dist/cjs/q-form.cjs.entry.js +16 -6
  21. package/dist/cjs/q-grid.cjs.entry.js +3 -3
  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 +3 -3
  25. package/dist/cjs/q-input_2.cjs.entry.js +9 -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 +7 -7
  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 +3 -3
  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 +7 -5
  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 +4 -4
  49. package/dist/cjs/{tokens-RMRaIOqv.js → tokens-Cd7g-VMz.js} +3 -0
  50. package/dist/cjs/webquark.cjs.js +2 -2
  51. package/dist/collection/collection-manifest.json +3 -0
  52. package/dist/collection/components/actions/button/button.css +22 -0
  53. package/dist/collection/components/actions/button/{button.utils.unit.test.js → test/button.utils.unit.test.js} +1 -1
  54. package/dist/collection/components/content/carousel/carousel.css +7 -0
  55. package/dist/collection/components/content/carousel/carousel.js +256 -10
  56. package/dist/collection/components/content/carousel/internals/autoplay.js +31 -6
  57. package/dist/collection/components/content/carousel/test/transitions.cmp.test.js +122 -0
  58. package/dist/collection/components/data-display/accordion/accordion.js +1 -1
  59. package/dist/collection/components/data-display/data-table/data-table.js +3 -3
  60. package/dist/collection/components/data-display/map/map.js +1 -1
  61. package/dist/collection/components/data-display/map/test/map.cmp.test.js +1 -1
  62. package/dist/collection/components/data-display/pagination/pagination.js +1 -1
  63. package/dist/collection/{utils → components/data-display/syntax-box/internals}/formatter.unit.test.js +1 -1
  64. package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.unit.test.js +1 -1
  65. package/dist/collection/components/data-display/syntax-box/syntax-box.js +2 -2
  66. package/dist/collection/components/data-display/syntax-box/test/syntax-box.cmp.test.js +1 -1
  67. package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +1 -1
  68. package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
  69. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
  70. package/dist/collection/components/inputs/dropdown/dropdown.css +148 -0
  71. package/dist/collection/components/inputs/dropdown/dropdown.js +422 -104
  72. package/dist/collection/components/inputs/dropdown/test/dropdown.cmp.test.js +28 -0
  73. package/dist/collection/components/inputs/dropdown/test/fit-options.cmp.test.js +120 -0
  74. package/dist/collection/components/inputs/dropdown/test/multiple.cmp.test.js +124 -0
  75. package/dist/collection/components/inputs/dropdown/test/search-mode.cmp.test.js +186 -0
  76. package/dist/collection/components/inputs/form/form.js +2 -2
  77. package/dist/collection/components/inputs/form/internals/controls.js +1 -1
  78. package/dist/collection/components/inputs/form/internals/field-state.js +6 -1
  79. package/dist/collection/components/inputs/form/internals/values.js +5 -0
  80. package/dist/collection/components/inputs/form/test/form-submit.cmp.test.js +14 -8
  81. package/dist/collection/components/inputs/input/input.css +42 -0
  82. package/dist/collection/components/inputs/input/input.js +31 -3
  83. package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +22 -0
  84. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
  85. package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
  86. package/dist/collection/components/inputs/slider/slider.css +44 -0
  87. package/dist/collection/components/inputs/slider/slider.js +383 -0
  88. package/dist/collection/components/inputs/slider/test/slider.cmp.test.js +45 -0
  89. package/dist/collection/components/inputs/textarea/textarea.css +20 -0
  90. package/dist/collection/components/inputs/textarea/textarea.js +30 -2
  91. package/dist/collection/components/inputs/toggle/test/toggle-layout.cmp.test.js +69 -0
  92. package/dist/collection/components/inputs/toggle/toggle.css +27 -0
  93. package/dist/collection/components/inputs/toggle/toggle.js +3 -3
  94. package/dist/collection/components/layout/control-group/control-group.css +108 -0
  95. package/dist/collection/components/layout/control-group/control-group.js +142 -0
  96. package/dist/collection/components/layout/control-group/test/control-group.cmp.test.js +163 -0
  97. package/dist/collection/components/layout/divider/divider.css +40 -0
  98. package/dist/collection/components/layout/divider/divider.js +121 -0
  99. package/dist/collection/components/layout/divider/test/divider.cmp.test.js +105 -0
  100. package/dist/collection/components/layout/grid/grid.js +1 -1
  101. package/dist/collection/components/layout/inline/inline.js +1 -1
  102. package/dist/collection/components/layout/navbar/navbar.js +2 -2
  103. package/dist/collection/components/layout/panel/panel.js +4 -4
  104. package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
  105. package/dist/collection/components/layout/section/section.js +1 -1
  106. package/dist/collection/components/layout/stack/stack.js +1 -1
  107. package/dist/collection/components/layout/tabs/tabs.js +1 -1
  108. package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
  109. package/dist/collection/components/media/avatar/avatar.js +1 -1
  110. package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
  111. package/dist/collection/components/media/media/media.js +1 -1
  112. package/dist/collection/components/media/reel/reel.js +2 -2
  113. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  114. package/dist/collection/components/overlays/dialog/dialog.js +2 -2
  115. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  116. package/dist/collection/theme/test/input-width.cmp.test.js +117 -0
  117. package/dist/collection/theme/test/presets.unit.test.js +58 -0
  118. package/dist/collection/theme/tokens.js +3 -0
  119. package/dist/collection/utils/dom.js +1 -1
  120. package/dist/components/index.js +1 -1
  121. package/dist/components/p-BDsIecIx.js +1 -0
  122. package/dist/components/{p-6PPZ2sIO.js → p-BGHNFaaC.js} +1 -1
  123. package/dist/components/{p-Dfp_If-_.js → p-BZXIeEKC.js} +1 -1
  124. package/dist/components/{p-DlIn_ZWk.js → p-Bc2_QcLn.js} +1 -1
  125. package/dist/components/{p-CKuPOxKN.js → p-Bp6Xr92S.js} +1 -1
  126. package/dist/{webquark/p-Dhsn99q4.js → components/p-BwPMm43W.js} +1 -1
  127. package/dist/components/p-CArIPzJU.js +1 -0
  128. package/dist/components/p-CpkX9YAW.js +1 -0
  129. package/dist/components/p-D2nxHd1b.js +1 -0
  130. package/dist/components/{p-DQhiqYeq.js → p-DkanItP3.js} +1 -1
  131. package/dist/components/p-IwIJb0Mc.js +1 -0
  132. package/dist/components/{p-Cg0Mv7Vb.js → p-kfrqZyfJ.js} +1 -1
  133. package/dist/components/{p-BH4gQWub.js → p-x3C-wjU9.js} +1 -1
  134. package/dist/components/q-accordion.js +1 -1
  135. package/dist/components/q-alert.js +1 -1
  136. package/dist/components/q-avatar.js +1 -1
  137. package/dist/components/q-banner.js +1 -1
  138. package/dist/components/q-button.js +1 -1
  139. package/dist/components/q-card.js +1 -1
  140. package/dist/components/q-carousel.js +1 -1
  141. package/dist/components/q-chip.js +1 -1
  142. package/dist/components/q-control-group.d.ts +11 -0
  143. package/dist/components/q-control-group.js +1 -0
  144. package/dist/components/q-conversation-bubble.js +1 -1
  145. package/dist/components/q-data-table.js +1 -1
  146. package/dist/components/q-dialog.js +1 -1
  147. package/dist/components/q-divider.d.ts +11 -0
  148. package/dist/components/q-divider.js +1 -0
  149. package/dist/components/q-dropdown.js +1 -1
  150. package/dist/components/q-form.js +1 -1
  151. package/dist/components/q-grid.js +1 -1
  152. package/dist/components/q-icon.js +1 -1
  153. package/dist/components/q-image-comparison.js +1 -1
  154. package/dist/components/q-inline.js +1 -1
  155. package/dist/components/q-input.js +1 -1
  156. package/dist/components/q-link.js +1 -1
  157. package/dist/components/q-map.js +1 -1
  158. package/dist/components/q-media.js +1 -1
  159. package/dist/components/q-navbar.js +1 -1
  160. package/dist/components/q-pagination.js +1 -1
  161. package/dist/components/q-panel.js +1 -1
  162. package/dist/components/q-progress.js +1 -1
  163. package/dist/components/q-quantity-selector.js +1 -1
  164. package/dist/components/q-radio-group.js +1 -1
  165. package/dist/components/q-reel.js +1 -1
  166. package/dist/components/q-scrollable.js +1 -1
  167. package/dist/components/q-section.js +1 -1
  168. package/dist/components/q-sidepanel.js +1 -1
  169. package/dist/components/q-slider.d.ts +11 -0
  170. package/dist/components/q-slider.js +1 -0
  171. package/dist/components/q-stack.js +1 -1
  172. package/dist/components/q-step-diagram-item.js +1 -1
  173. package/dist/components/q-step-diagram.js +1 -1
  174. package/dist/components/q-syntax-box.js +2 -2
  175. package/dist/components/q-tabs.js +1 -1
  176. package/dist/components/q-textarea.js +1 -1
  177. package/dist/components/q-thumbnail.js +1 -1
  178. package/dist/components/q-toast.js +1 -1
  179. package/dist/components/q-toggle.js +1 -1
  180. package/dist/components/q-toolbar.js +1 -1
  181. package/dist/components/q-tooltip.js +1 -1
  182. package/dist/esm/{action.props-CpnGza8z.js → action.props-Di_LpF5H.js} +1 -1
  183. package/dist/esm/{dom-ByfrUWx1.js → dom-CArIPzJU.js} +1 -1
  184. package/dist/esm/{field-zfD6OQ02.js → field-C4Iilew6.js} +1 -1
  185. package/dist/esm/{index-B5ElFlHv.js → index-DoGM9gsC.js} +5 -2
  186. package/dist/esm/loader.js +3 -3
  187. package/dist/esm/q-accordion.entry.js +2 -2
  188. package/dist/esm/q-alert.entry.js +1 -1
  189. package/dist/esm/q-avatar.entry.js +2 -2
  190. package/dist/esm/q-banner.entry.js +1 -1
  191. package/dist/esm/q-button_2.entry.js +5 -5
  192. package/dist/esm/q-card.entry.js +3 -3
  193. package/dist/esm/q-carousel.entry.js +120 -18
  194. package/dist/esm/q-chip.entry.js +2 -2
  195. package/dist/esm/q-control-group.entry.js +62 -0
  196. package/dist/esm/q-conversation-bubble.entry.js +1 -1
  197. package/dist/esm/q-data-table.entry.js +4 -4
  198. package/dist/esm/q-dialog.entry.js +4 -4
  199. package/dist/esm/q-divider.entry.js +24 -0
  200. package/dist/esm/q-dropdown.entry.js +320 -104
  201. package/dist/esm/q-form.entry.js +16 -6
  202. package/dist/esm/q-grid.entry.js +3 -3
  203. package/dist/esm/q-icon.entry.js +1 -1
  204. package/dist/esm/q-image-comparison.entry.js +2 -2
  205. package/dist/esm/q-inline.entry.js +3 -3
  206. package/dist/esm/q-input_2.entry.js +9 -7
  207. package/dist/esm/q-link.entry.js +2 -2
  208. package/dist/esm/q-map.entry.js +2 -2
  209. package/dist/esm/q-media.entry.js +2 -2
  210. package/dist/esm/q-navbar.entry.js +3 -3
  211. package/dist/esm/q-pagination.entry.js +2 -2
  212. package/dist/esm/q-panel.entry.js +7 -7
  213. package/dist/esm/q-quantity-selector.entry.js +6 -6
  214. package/dist/esm/q-radio-group.entry.js +4 -4
  215. package/dist/esm/q-reel.entry.js +4 -4
  216. package/dist/esm/q-scrollable.entry.js +4 -4
  217. package/dist/esm/q-section.entry.js +2 -2
  218. package/dist/esm/q-sidepanel.entry.js +2 -2
  219. package/dist/esm/q-slider.entry.js +120 -0
  220. package/dist/esm/q-stack.entry.js +3 -3
  221. package/dist/esm/q-step-diagram-item.entry.js +2 -2
  222. package/dist/esm/q-step-diagram.entry.js +4 -4
  223. package/dist/esm/q-syntax-box.entry.js +1 -1
  224. package/dist/esm/q-tabs.entry.js +2 -2
  225. package/dist/esm/q-textarea.entry.js +7 -5
  226. package/dist/esm/q-thumbnail.entry.js +3 -3
  227. package/dist/esm/q-toast.entry.js +1 -1
  228. package/dist/esm/q-toggle.entry.js +6 -6
  229. package/dist/esm/q-toolbar.entry.js +4 -4
  230. package/dist/esm/{tokens-B4Mg1xEw.js → tokens-BDsIecIx.js} +3 -0
  231. package/dist/esm/webquark.js +3 -3
  232. package/dist/playground/components/theme-designer/dimension-tokens.js +9 -0
  233. package/dist/playground/components/theme-designer/token-row.js +89 -0
  234. package/dist/playground/dom-factory.js +76 -0
  235. package/dist/playground/utils/color.js +26 -0
  236. package/dist/playground/utils/dom.js +38 -0
  237. package/dist/playground/utils/index.js +2 -0
  238. package/dist/types/components/content/carousel/carousel.d.ts +23 -2
  239. package/dist/types/components/content/carousel/carousel.types.d.ts +6 -0
  240. package/dist/types/components/content/carousel/internals/autoplay.d.ts +5 -0
  241. package/dist/types/components/inputs/dropdown/dropdown.d.ts +45 -1
  242. package/dist/types/components/inputs/dropdown/test/fit-options.cmp.test.d.ts +3 -0
  243. package/dist/types/components/inputs/dropdown/test/multiple.cmp.test.d.ts +1 -0
  244. package/dist/types/components/inputs/dropdown/test/search-mode.cmp.test.d.ts +1 -0
  245. package/dist/types/components/inputs/form/internals/field-state.d.ts +1 -1
  246. package/dist/types/components/inputs/input/input.d.ts +3 -0
  247. package/dist/types/components/inputs/slider/slider.d.ts +45 -0
  248. package/dist/types/components/inputs/slider/test/slider.cmp.test.d.ts +1 -0
  249. package/dist/types/components/inputs/textarea/textarea.d.ts +3 -1
  250. package/dist/types/components/inputs/toggle/test/toggle-layout.cmp.test.d.ts +1 -0
  251. package/dist/types/components/layout/control-group/control-group.d.ts +20 -0
  252. package/dist/types/components/layout/control-group/test/control-group.cmp.test.d.ts +7 -0
  253. package/dist/types/components/layout/divider/divider.d.ts +15 -0
  254. package/dist/types/components/layout/divider/test/divider.cmp.test.d.ts +1 -0
  255. package/dist/types/components.d.ts +390 -6
  256. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/dimension-tokens.d.ts +3 -0
  257. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +14 -0
  258. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +12 -0
  259. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +8 -0
  260. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/dom.d.ts +15 -0
  261. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/index.d.ts +2 -0
  262. package/dist/types/index.d.ts +2 -2
  263. package/dist/types/theme/test/input-width.cmp.test.d.ts +3 -0
  264. package/dist/types/theme/test/presets.unit.test.d.ts +1 -0
  265. package/dist/types/theme/tokens.d.ts +9 -0
  266. package/dist/types/utils/form-field-adapter.d.ts +3 -3
  267. package/dist/webquark/p-0182e114.entry.js +1 -0
  268. package/dist/webquark/{p-f98f9439.entry.js → p-048103e0.entry.js} +1 -1
  269. package/dist/webquark/{p-fe8c634a.entry.js → p-0a2c52de.entry.js} +1 -1
  270. package/dist/webquark/p-0baf478a.entry.js +1 -0
  271. package/dist/webquark/{p-9e78b796.entry.js → p-15bad9ef.entry.js} +1 -1
  272. package/dist/webquark/p-17b9713f.entry.js +1 -0
  273. package/dist/webquark/{p-fec6fe0a.entry.js → p-222405b8.entry.js} +1 -1
  274. package/dist/webquark/p-2eaa3a9f.entry.js +1 -0
  275. package/dist/webquark/{p-90b0858c.entry.js → p-3daafc56.entry.js} +1 -1
  276. package/dist/webquark/{p-09cca7b9.entry.js → p-44bbe12f.entry.js} +1 -1
  277. package/dist/webquark/{p-888e46a8.entry.js → p-4609c362.entry.js} +1 -1
  278. package/dist/webquark/{p-023f8437.entry.js → p-5b584d3c.entry.js} +1 -1
  279. package/dist/webquark/p-65fe9cac.entry.js +1 -0
  280. package/dist/webquark/p-846dc838.entry.js +1 -0
  281. package/dist/webquark/{p-030ecde3.entry.js → p-84b350a3.entry.js} +1 -1
  282. package/dist/webquark/p-85131314.entry.js +1 -0
  283. package/dist/webquark/{p-f1bac94c.entry.js → p-852e88ae.entry.js} +1 -1
  284. package/dist/webquark/{p-0aa74ad6.entry.js → p-86c05afd.entry.js} +1 -1
  285. package/dist/webquark/p-8c5b2706.entry.js +1 -0
  286. package/dist/webquark/p-923527f0.entry.js +1 -0
  287. package/dist/webquark/{p-f4f97e74.entry.js → p-9a76cd71.entry.js} +1 -1
  288. package/dist/webquark/p-BDsIecIx.js +1 -0
  289. package/dist/webquark/p-CArIPzJU.js +1 -0
  290. package/dist/{components/p-BofcK-7Z.js → webquark/p-DDUED8LT.js} +1 -1
  291. package/dist/webquark/{p-DWO-pleQ.js → p-Dnz3WmdX.js} +1 -1
  292. package/dist/webquark/p-DoGM9gsC.js +3 -0
  293. package/dist/webquark/p-a0d97367.entry.js +1 -0
  294. package/dist/webquark/{p-5f232b44.entry.js → p-a16bd8d5.entry.js} +1 -1
  295. package/dist/webquark/{p-059daa8a.entry.js → p-a2334abe.entry.js} +1 -1
  296. package/dist/webquark/{p-36118d90.entry.js → p-a2ff1b64.entry.js} +1 -1
  297. package/dist/webquark/{p-dd115868.entry.js → p-a314bc21.entry.js} +1 -1
  298. package/dist/webquark/p-a3e1096d.entry.js +1 -0
  299. package/dist/webquark/{p-f63b7214.entry.js → p-a66550da.entry.js} +1 -1
  300. package/dist/webquark/{p-f9ad63ff.entry.js → p-aa342e81.entry.js} +1 -1
  301. package/dist/webquark/{p-6e28cfe2.entry.js → p-b1c771fb.entry.js} +1 -1
  302. package/dist/webquark/p-b21ad707.entry.js +1 -0
  303. package/dist/webquark/p-b45ca926.entry.js +1 -0
  304. package/dist/webquark/{p-8ece2c62.entry.js → p-b8fdef4f.entry.js} +1 -1
  305. package/dist/webquark/{p-64096386.entry.js → p-d4788321.entry.js} +1 -1
  306. package/dist/webquark/p-d86bd51d.entry.js +1 -0
  307. package/dist/webquark/{p-48fb5228.entry.js → p-dbcf7592.entry.js} +1 -1
  308. package/dist/webquark/p-e0943d41.entry.js +1 -0
  309. package/dist/webquark/{p-6bfffa79.entry.js → p-e2721e77.entry.js} +1 -1
  310. package/dist/webquark/{p-3bc4629c.entry.js → p-e723a7ae.entry.js} +1 -1
  311. package/dist/webquark/p-eb800d1e.entry.js +1 -0
  312. package/dist/webquark/{p-99d785ca.entry.js → p-f4d23ffe.entry.js} +1 -1
  313. package/dist/webquark/{p-4d61b70d.entry.js → p-f51e1098.entry.js} +1 -1
  314. package/dist/webquark/{p-9ff7e5a4.entry.js → p-fe14f038.entry.js} +1 -1
  315. package/dist/webquark/webquark.css +1 -1
  316. package/dist/webquark/webquark.esm.js +1 -1
  317. package/package.json +2 -2
  318. package/dist/components/p-B4Mg1xEw.js +0 -1
  319. package/dist/components/p-ByfrUWx1.js +0 -1
  320. package/dist/components/p-CN1ut2Lb.js +0 -1
  321. package/dist/components/p-ye27qtRo.js +0 -1
  322. package/dist/webquark/p-04c8cb9e.entry.js +0 -1
  323. package/dist/webquark/p-0ae43d6c.entry.js +0 -1
  324. package/dist/webquark/p-0c3aac3f.entry.js +0 -1
  325. package/dist/webquark/p-144ef339.entry.js +0 -1
  326. package/dist/webquark/p-296fbdb1.entry.js +0 -1
  327. package/dist/webquark/p-70d9ffde.entry.js +0 -1
  328. package/dist/webquark/p-91fff6b6.entry.js +0 -1
  329. package/dist/webquark/p-923dac41.entry.js +0 -1
  330. package/dist/webquark/p-97a89cae.entry.js +0 -1
  331. package/dist/webquark/p-B4Mg1xEw.js +0 -1
  332. package/dist/webquark/p-B5ElFlHv.js +0 -3
  333. package/dist/webquark/p-ByfrUWx1.js +0 -1
  334. package/dist/webquark/p-c523ec6f.entry.js +0 -1
  335. package/dist/webquark/p-d0253d64.entry.js +0 -1
  336. package/dist/webquark/p-d0fbd2b1.entry.js +0 -1
  337. package/dist/webquark/p-fe200f68.entry.js +0 -1
  338. /package/dist/collection/{utils → components/data-display/syntax-box/internals}/formatter.js +0 -0
  339. /package/dist/collection/{utils → components/data-display/syntax-box/internals}/syntax.js +0 -0
  340. /package/dist/types/components/actions/button/{button.utils.unit.test.d.ts → test/button.utils.unit.test.d.ts} +0 -0
  341. /package/dist/types/{utils → components/data-display/syntax-box/internals}/formatter.d.ts +0 -0
  342. /package/dist/types/{utils → components/data-display/syntax-box/internals}/formatter.unit.test.d.ts +0 -0
  343. /package/dist/types/{utils → components/data-display/syntax-box/internals}/syntax.d.ts +0 -0
  344. /package/dist/types/{utils → components/data-display/syntax-box/internals}/syntax.unit.test.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { isFieldDisabled, syncFieldHost } from "../../../utils/form-field-state";
2
2
  import { registerFormField } from "../../../utils/form-field-adapter";
3
3
  import { fieldFeedback, feedbackStyle } from "../../shared/field";
4
- import { h } from "@stencil/core";
4
+ import { Fragment, h } from "@stencil/core";
5
5
  import { identifyItems } from "../../../utils/collection-identity";
6
6
  import { getDropdownOptions, getFilteredOptions, getOptionLabel, getSelectedOption, getVisibleOptions } from "./internals/options";
7
7
  import { computeDropdownPosition } from "./internals/position";
@@ -11,7 +11,7 @@ const MENU_OFFSET = 4;
11
11
  * and externally loaded option pages.
12
12
  * @slot icon-left - Optional leading content rendered inside the trigger.
13
13
  * @part label - Optional field label.
14
- * @part trigger - Button that opens the option menu.
14
+ * @part trigger - Active input or button that opens the option menu.
15
15
  * @part menu - Floating option menu.
16
16
  */
17
17
  export class QDropdown {
@@ -25,12 +25,20 @@ export class QDropdown {
25
25
  /** Options to render; strings use the same text for label and value, while objects allow separate values. */
26
26
  options = [];
27
27
  value = '';
28
+ /** Select several options. Uses values/qValuesChange instead of value/qChange. */
29
+ multiple = false;
30
+ /** Selected identities in multiple mode. Replace the array to update selections. */
31
+ values = [];
28
32
  /** Keep the label accessible without displaying it. */
29
33
  labelHidden = false;
30
34
  /** Omitted inherits the enclosing form; false cancels reservation. */
31
35
  reserveFeedback;
32
36
  size = 'inherit';
37
+ /** Opt-in horizontal width; fit-options sizes to loaded option labels. Omitted keeps the full-width layout. */
38
+ width;
33
39
  searchable = false;
40
+ /** Search in the main editable control (default) or a separate menu field. Applies only when searchable. */
41
+ searchMode = 'default';
34
42
  /** Delegates filtering and pagination to the consumer. */
35
43
  externalSearch = false;
36
44
  /** Indicates another externally loaded option page is available. */
@@ -54,6 +62,8 @@ export class QDropdown {
54
62
  internals;
55
63
  /** Emitted with the selected option value when selection changes. */
56
64
  qChange;
65
+ /** Complete selected identities after an add or removal in multiple mode. */
66
+ qValuesChange;
57
67
  /** Emitted with the selected option object when selection changes. */
58
68
  qSelect;
59
69
  /** Emitted with the current search term when a searchable dropdown uses external search. */
@@ -78,21 +88,78 @@ export class QDropdown {
78
88
  positionFrame = null;
79
89
  floatingCleanup;
80
90
  floatingResizeObserver;
91
+ fitOptionsMeasure;
92
+ fitOptionsObserver;
93
+ draftEdited = false;
94
+ selectedLabelCache;
95
+ composing = false;
96
+ lastSearchValue;
97
+ initialValues = [];
98
+ multipleLabels = new Map();
99
+ multipleFrame;
100
+ chipMeasure;
101
+ multipleObserver;
102
+ visibleChips = 0;
103
+ selectedPanel = false;
104
+ get editableSearch() { return this.multiple || this.searchable && this.searchMode !== 'menu'; }
105
+ get selectedValues() {
106
+ return Array.isArray(this.values) ? [...new Set(this.values.filter(value => typeof value === 'string'))] : [];
107
+ }
108
+ reconcileSelectedLabel() {
109
+ const selected = this.getSelectedOption();
110
+ if (selected)
111
+ this.selectedLabelCache = { value: this.value, label: this.getOptionLabel(selected) };
112
+ else if (!this.value || !this.externalSearch || this.selectedLabelCache?.value !== this.value)
113
+ this.selectedLabelCache = undefined;
114
+ }
115
+ closeMenu() {
116
+ this.isOpen = false;
117
+ this.selectedPanel = false;
118
+ this.focusedIndex = -1;
119
+ this.searchTerm = '';
120
+ this.lastSearchValue = undefined;
121
+ this.draftEdited = false;
122
+ this.composing = false;
123
+ this.visibleCount = 20;
124
+ this.clearScrollLoading();
125
+ if (this.triggerEl?.tagName === 'INPUT') {
126
+ const selected = this.getSelectedOption();
127
+ this.triggerEl.value = this.multiple ? '' : this.getOptionLabel(selected) || (this.externalSearch && this.selectedLabelCache?.value === this.value ? this.selectedLabelCache.label : '');
128
+ }
129
+ }
130
+ watchSearchMode() {
131
+ const hadFocus = Boolean(this.el.shadowRoot?.activeElement);
132
+ this.closeMenu();
133
+ this.searchInputEl = undefined;
134
+ if (hadFocus)
135
+ requestAnimationFrame(() => focusWithoutScroll(this.triggerEl));
136
+ }
81
137
  // ========================= [3] LIFECYCLE & WATCHERS ==========================
138
+ connectedCallback() {
139
+ this.observeFitOptions();
140
+ }
82
141
  disconnectedCallback() {
83
142
  this.clearScrollLoading();
84
143
  this.stopFloatingUpdates();
144
+ this.fitOptionsObserver?.disconnect();
145
+ this.multipleObserver?.disconnect();
85
146
  }
86
147
  formDisabledCallback() {
87
148
  this.syncValidity();
88
149
  }
89
150
  componentDidLoad() {
151
+ const dropdown = this;
90
152
  registerFormField(this.el, {
91
- kind: 'selection',
153
+ get kind() { return dropdown.multiple ? 'multiselect' : 'selection'; },
92
154
  owner: () => this.internals?.form ?? null,
93
155
  active: () => true,
94
- value: () => this.getFormSelection(),
95
- assign: value => { this.value = value; },
156
+ value: () => this.multiple ? this.getMultipleFormSelection() : this.getFormSelection(),
157
+ assign: value => {
158
+ if (this.multiple)
159
+ this.values = Array.isArray(value) ? [...value] : [];
160
+ else
161
+ this.value = value;
162
+ },
96
163
  reconcile: () => {
97
164
  this.syncValidity();
98
165
  },
@@ -102,18 +169,66 @@ export class QDropdown {
102
169
  }
103
170
  componentDidRender() {
104
171
  this.syncValidity();
172
+ this.observeFitOptions();
173
+ this.observeMultipleLayout();
105
174
  if (this.isOpen) {
106
175
  this.openFloatingMenu();
107
176
  return;
108
177
  }
109
178
  this.stopFloatingUpdates();
110
179
  }
180
+ observeFitOptions = () => {
181
+ this.fitOptionsObserver?.disconnect();
182
+ if (this.width !== 'fit-options' || !this.fitOptionsMeasure) {
183
+ this.el.style.removeProperty('--_q-dropdown-options-width');
184
+ return;
185
+ }
186
+ this.fitOptionsObserver ??= new ResizeObserver(this.updateFitOptionsWidth);
187
+ this.fitOptionsObserver.observe(this.fitOptionsMeasure, { box: 'border-box' });
188
+ for (const icon of Array.from(this.el.querySelectorAll('[slot="icon-left"]'))) {
189
+ this.fitOptionsObserver.observe(icon);
190
+ }
191
+ this.updateFitOptionsWidth();
192
+ };
193
+ updateFitOptionsWidth = () => {
194
+ if (this.width !== 'fit-options' || !this.fitOptionsMeasure || !this.triggerEl)
195
+ return;
196
+ const icons = Array.from(this.el.querySelectorAll('[slot="icon-left"]'));
197
+ const triggerStyle = getComputedStyle(this.triggerEl);
198
+ const gap = parseFloat(triggerStyle.columnGap) || 0;
199
+ const leadingWidth = icons.reduce((total, icon) => {
200
+ const style = getComputedStyle(icon);
201
+ return total + icon.getBoundingClientRect().width + (parseFloat(style.marginInlineStart) || 0) + (parseFloat(style.marginInlineEnd) || 0);
202
+ }, 0);
203
+ const labelWidth = this.fitOptionsMeasure.querySelector('.fit-options-labels').getBoundingClientRect().width;
204
+ const arrowWidth = this.fitOptionsMeasure.querySelector('.chevron-icon').getBoundingClientRect().width;
205
+ const frameWidth = ['paddingInlineStart', 'paddingInlineEnd', 'borderInlineStartWidth', 'borderInlineEndWidth']
206
+ .reduce((total, property) => total + (parseFloat(triggerStyle[property]) || 0), 0);
207
+ const adornmentWidth = this.editableSearch ? 0 : arrowWidth + gap + leadingWidth + (leadingWidth ? gap : 0);
208
+ const width = `${Math.ceil(labelWidth + frameWidth + adornmentWidth)}px`;
209
+ if (this.el.style.getPropertyValue('--_q-dropdown-options-width') !== width) {
210
+ this.el.style.setProperty('--_q-dropdown-options-width', width);
211
+ }
212
+ };
111
213
  watchValue(newValue) {
214
+ if (this.multiple)
215
+ return;
216
+ this.reconcileSelectedLabel();
217
+ this.closeMenu();
112
218
  if (this.internals && typeof this.internals.setFormValue === 'function') {
113
219
  this.internals.setFormValue(newValue);
114
220
  }
115
221
  this.syncValidity();
116
222
  }
223
+ watchValues() {
224
+ this.reconcileMultipleLabels();
225
+ this.focusedIndex = -1;
226
+ this.syncValidity();
227
+ }
228
+ watchMultiple() {
229
+ this.closeMenu();
230
+ this.syncValidity();
231
+ }
117
232
  syncValidity() {
118
233
  const disabled = syncFieldHost(this.el, this.disabled, this.name, this.required);
119
234
  if (this.disabledState !== disabled)
@@ -123,19 +238,26 @@ export class QDropdown {
123
238
  if (this.searchInputEl)
124
239
  this.searchInputEl.disabled = disabled;
125
240
  if (disabled && this.isOpen) {
126
- this.isOpen = false;
241
+ this.closeMenu();
127
242
  this.stopFloatingUpdates();
128
243
  }
129
244
  const selected = this.getFormSelection();
130
- this.internals?.setFormValue?.(disabled ? null : selected);
245
+ const selectedValues = this.getMultipleFormSelection();
246
+ const data = new FormData();
247
+ if (this.name)
248
+ for (const value of selectedValues)
249
+ data.append(this.name, value);
250
+ this.internals?.setFormValue?.(disabled ? null : this.multiple ? data : selected);
131
251
  if (typeof this.internals?.setValidity !== 'function')
132
252
  return;
133
- const message = this.isDisabled ? '' : this.error?.trim() || (this.required && (!this.value || selected === null) ? 'Please select an option.' : '');
253
+ const missing = this.multiple ? !selectedValues.length : !this.value || selected === null;
254
+ const message = this.isDisabled ? '' : this.error?.trim() || (this.required && missing ? 'Please select an option.' : '');
134
255
  this.internals.setValidity(message ? this.error?.trim() ? { customError: true } : { valueMissing: true } : {}, message, this.triggerEl);
135
256
  }
136
257
  async checkValidity() {
137
258
  this.syncValidity();
138
- return this.isDisabled || !(this.error?.trim() || (this.required && (!this.value || this.getFormSelection() === null)));
259
+ const missing = this.multiple ? !this.getMultipleFormSelection().length : !this.value || this.getFormSelection() === null;
260
+ return this.isDisabled || !(this.error?.trim() || (this.required && missing));
139
261
  }
140
262
  async reportValidity() {
141
263
  const valid = await this.checkValidity();
@@ -149,6 +271,9 @@ export class QDropdown {
149
271
  this.triggerEl?.focus();
150
272
  }
151
273
  watchOptions() {
274
+ this.reconcileSelectedLabel();
275
+ this.reconcileMultipleLabels();
276
+ this.focusedIndex = -1;
152
277
  this.syncValidity();
153
278
  if (this.externalSearch) {
154
279
  this.isScrollingLoading = false;
@@ -160,7 +285,10 @@ export class QDropdown {
160
285
  }
161
286
  }
162
287
  componentWillLoad() {
288
+ this.reconcileSelectedLabel();
289
+ this.reconcileMultipleLabels();
163
290
  this.initialValue = this.value || '';
291
+ this.initialValues = [...this.selectedValues];
164
292
  if (this.internals && typeof this.internals.setFormValue === 'function') {
165
293
  this.internals.setFormValue(this.value);
166
294
  }
@@ -170,7 +298,9 @@ export class QDropdown {
170
298
  this.syncValidity();
171
299
  }
172
300
  formResetCallback() {
301
+ this.closeMenu();
173
302
  this.value = this.initialValue;
303
+ this.values = [...this.initialValues];
174
304
  if (this.internals && typeof this.internals.setFormValue === 'function') {
175
305
  this.internals.setFormValue(this.value);
176
306
  }
@@ -183,6 +313,77 @@ export class QDropdown {
183
313
  return selected.value;
184
314
  return this.externalSearch && !selected && this.value ? this.value : null;
185
315
  }
316
+ getMultipleFormSelection() {
317
+ const options = this.getAllOptions();
318
+ return this.selectedValues.filter(value => {
319
+ const option = getSelectedOption(options, value);
320
+ return option ? option.disabled !== true : this.externalSearch;
321
+ });
322
+ }
323
+ reconcileMultipleLabels() {
324
+ const next = new Map();
325
+ for (const value of this.selectedValues) {
326
+ const option = getSelectedOption(this.getAllOptions(), value);
327
+ next.set(value, option ? this.getOptionLabel(option) : this.multipleLabels.get(value) ?? value);
328
+ }
329
+ this.multipleLabels = next;
330
+ }
331
+ removeValue = (value, event) => {
332
+ event?.stopPropagation();
333
+ if (this.isDisabled)
334
+ return;
335
+ this.values = this.selectedValues.filter(selected => selected !== value);
336
+ this.qValuesChange.emit([...this.values]);
337
+ if (!this.values.length)
338
+ this.closeMenu();
339
+ requestAnimationFrame(() => focusWithoutScroll(this.selectedPanel
340
+ ? this.menuEl?.querySelector('q-chip')?.shadowRoot?.querySelector('button') ?? this.triggerEl
341
+ : this.triggerEl));
342
+ };
343
+ observeMultipleLayout() {
344
+ this.multipleObserver?.disconnect();
345
+ if (!this.multiple || !this.multipleFrame || !this.chipMeasure)
346
+ return;
347
+ this.multipleObserver ??= new ResizeObserver(this.measureMultipleLayout);
348
+ this.multipleObserver.observe(this.multipleFrame);
349
+ this.multipleObserver.observe(this.chipMeasure);
350
+ this.measureMultipleLayout();
351
+ }
352
+ measureMultipleLayout = () => {
353
+ if (!this.multipleFrame || !this.chipMeasure)
354
+ return;
355
+ const style = getComputedStyle(this.multipleFrame);
356
+ const gap = parseFloat(style.columnGap) || 0;
357
+ const frame = ['paddingLeft', 'paddingRight', 'borderLeftWidth', 'borderRightWidth']
358
+ .reduce((sum, key) => sum + (parseFloat(style.getPropertyValue(key.replace(/[A-Z]/g, letter => '-' + letter.toLowerCase()))) || 0), 0);
359
+ const searchWidth = parseFloat(getComputedStyle(this.triggerEl).minWidth) || 64;
360
+ const iconWidth = this.multipleFrame.querySelector('.chevron-icon')?.getBoundingClientRect().width ?? 16;
361
+ const leadingWidth = Array.from(this.el.querySelectorAll('[slot="icon-left"]')).reduce((sum, node) => sum + node.getBoundingClientRect().width + gap, 0);
362
+ const available = this.multipleFrame.getBoundingClientRect().width - frame - searchWidth - iconWidth - leadingWidth - gap * 2;
363
+ const chips = Array.from(this.chipMeasure.querySelectorAll('q-chip'));
364
+ const widths = chips.map(chip => chip.getBoundingClientRect().width + gap);
365
+ const overflowWidth = this.chipMeasure.querySelector('.multiple-more').getBoundingClientRect().width + gap;
366
+ const allFit = widths.reduce((sum, width) => sum + width, 0) <= available;
367
+ let remaining = available - (allFit ? 0 : overflowWidth);
368
+ let count = 0;
369
+ for (const width of widths) {
370
+ if (width > remaining)
371
+ break;
372
+ count++;
373
+ remaining -= width;
374
+ }
375
+ if (count !== this.visibleChips)
376
+ this.visibleChips = count;
377
+ };
378
+ openSelectedPanel = (event) => {
379
+ event.stopPropagation();
380
+ if (this.isDisabled)
381
+ return;
382
+ this.closeMenu();
383
+ this.selectedPanel = true;
384
+ this.isOpen = true;
385
+ requestAnimationFrame(() => focusWithoutScroll(this.menuEl?.querySelector('q-chip')?.shadowRoot?.querySelector('button')));
386
+ };
186
387
  clearScrollLoading() {
187
388
  this.isScrollingLoading = false;
188
389
  if (this.scrollTimeout !== null) {
@@ -200,10 +401,11 @@ export class QDropdown {
200
401
  return getSelectedOption(options, this.value);
201
402
  }
202
403
  getFilteredOptions() {
404
+ const available = this.multiple ? this.getAllOptions().filter(option => !this.selectedValues.includes(option.value)) : this.getAllOptions();
203
405
  if (this.externalSearch) {
204
- return this.getAllOptions();
406
+ return available;
205
407
  }
206
- return getFilteredOptions(this.getAllOptions(), this.searchTerm, this.searchable);
408
+ return getFilteredOptions(available, this.searchTerm, this.multiple || this.searchable);
207
409
  }
208
410
  get parsedOptions() {
209
411
  if (this.externalSearch) {
@@ -219,9 +421,9 @@ export class QDropdown {
219
421
  if (this.isOpen) {
220
422
  this.searchTerm = '';
221
423
  this.visibleCount = 20;
222
- if (this.searchable) {
424
+ if (this.multiple || this.searchable) {
223
425
  this.focusedIndex = -1;
224
- requestAnimationFrame(() => focusWithoutScroll(this.searchInputEl));
426
+ requestAnimationFrame(() => focusWithoutScroll(this.editableSearch ? this.triggerEl : this.searchInputEl));
225
427
  }
226
428
  else {
227
429
  const activeIdx = this.parsedOptions.findIndex(opt => opt.value === this.value);
@@ -230,20 +432,35 @@ export class QDropdown {
230
432
  }
231
433
  }
232
434
  else {
233
- this.focusedIndex = -1;
234
- this.searchTerm = '';
235
- this.visibleCount = 20;
435
+ this.closeMenu();
236
436
  requestAnimationFrame(() => focusWithoutScroll(this.triggerEl));
237
437
  }
238
438
  };
239
439
  handleSelect = (option) => {
240
440
  if (this.isDisabled)
241
441
  return;
442
+ if (this.multiple) {
443
+ if (this.selectedValues.includes(option.value))
444
+ return;
445
+ this.values = [...this.selectedValues, option.value];
446
+ this.multipleLabels.set(option.value, this.getOptionLabel(option));
447
+ this.searchTerm = '';
448
+ if (this.triggerEl instanceof HTMLInputElement) {
449
+ this.triggerEl.value = '';
450
+ }
451
+ this.draftEdited = false;
452
+ this.focusedIndex = -1;
453
+ this.qValuesChange.emit([...this.values]);
454
+ this.qSelect.emit(option);
455
+ if (this.externalSearch && this.lastSearchValue)
456
+ this.qSearch.emit('');
457
+ this.lastSearchValue = '';
458
+ requestAnimationFrame(() => focusWithoutScroll(this.triggerEl));
459
+ return;
460
+ }
242
461
  this.value = option.value;
243
- this.isOpen = false;
244
- this.focusedIndex = -1;
245
- this.searchTerm = '';
246
- this.clearScrollLoading();
462
+ this.selectedLabelCache = { value: option.value, label: this.getOptionLabel(option) };
463
+ this.closeMenu();
247
464
  this.qChange.emit(option.value);
248
465
  this.qSelect.emit(option);
249
466
  requestAnimationFrame(() => focusWithoutScroll(this.triggerEl));
@@ -254,6 +471,25 @@ export class QDropdown {
254
471
  handleBlur = (ev) => {
255
472
  this.qBlur.emit(ev);
256
473
  };
474
+ handleFocusOut = (ev) => {
475
+ const next = ev.relatedTarget;
476
+ if (!next || (!this.el.contains(next) && !this.el.shadowRoot?.contains(next)))
477
+ this.closeMenu();
478
+ };
479
+ handleEditableClick = (ev) => {
480
+ if (this.isDisabled)
481
+ return;
482
+ this.qClick.emit(ev);
483
+ if (this.selectedPanel)
484
+ this.closeMenu();
485
+ if (!this.isOpen)
486
+ this.toggleMenu();
487
+ };
488
+ handleCompositionStart = () => { this.composing = true; };
489
+ handleCompositionEnd = (ev) => {
490
+ this.composing = false;
491
+ this.handleSearchInput(ev);
492
+ };
257
493
  handleTriggerClick = (ev) => {
258
494
  if (this.isDisabled)
259
495
  return;
@@ -264,11 +500,17 @@ export class QDropdown {
264
500
  if (this.isDisabled)
265
501
  return;
266
502
  const target = ev.target;
503
+ if (this.composing || ev.isComposing)
504
+ return;
505
+ this.draftEdited = true;
506
+ this.selectedPanel = false;
267
507
  this.searchTerm = target.value || '';
508
+ this.isOpen = true;
268
509
  this.focusedIndex = -1;
269
510
  this.visibleCount = 20;
270
511
  this.clearScrollLoading();
271
- if (this.externalSearch) {
512
+ if (this.externalSearch && this.searchTerm !== this.lastSearchValue) {
513
+ this.lastSearchValue = this.searchTerm;
272
514
  this.qSearch.emit(this.searchTerm);
273
515
  }
274
516
  };
@@ -341,7 +583,7 @@ export class QDropdown {
341
583
  window.addEventListener('scroll', update, true);
342
584
  if (typeof ResizeObserver !== 'undefined') {
343
585
  this.floatingResizeObserver = new ResizeObserver(update);
344
- this.floatingResizeObserver.observe(this.triggerEl);
586
+ this.floatingResizeObserver.observe(this.multiple ? this.multipleFrame : this.triggerEl);
345
587
  this.floatingResizeObserver.observe(this.menuEl);
346
588
  }
347
589
  this.floatingCleanup = () => {
@@ -374,7 +616,7 @@ export class QDropdown {
374
616
  });
375
617
  }
376
618
  positionFloatingMenu() {
377
- const trigger = this.triggerEl;
619
+ const trigger = this.multiple ? this.multipleFrame : this.triggerEl;
378
620
  const menu = this.menuEl;
379
621
  if (!this.isOpen || !trigger || !menu) {
380
622
  return;
@@ -404,114 +646,79 @@ export class QDropdown {
404
646
  menu.style.visibility = 'visible';
405
647
  }
406
648
  handleKeyDown = (ev) => {
407
- if (this.isDisabled)
649
+ if (this.isDisabled || this.composing || ev.isComposing || ev.keyCode === 229)
408
650
  return;
409
- const target = ev.target;
410
- const isInput = target && target.tagName && target.tagName.toLowerCase() === 'input';
651
+ const source = ev.composedPath()[0];
652
+ if (this.multiple && source !== this.triggerEl && ev.key !== 'Escape')
653
+ return;
654
+ if (this.multiple && ev.key === 'Backspace' && !this.searchTerm && this.selectedValues.length && source === this.triggerEl) {
655
+ ev.preventDefault();
656
+ this.removeValue(this.selectedValues[this.selectedValues.length - 1]);
657
+ return;
658
+ }
659
+ const isInput = ev.target?.tagName?.toLowerCase() === 'input';
411
660
  const maxIndex = this.parsedOptions.length - 1;
412
661
  switch (ev.key) {
413
662
  case 'ArrowDown':
663
+ case 'ArrowUp': {
414
664
  ev.preventDefault();
415
- if (!this.isOpen) {
416
- this.isOpen = true;
417
- if (this.searchable) {
418
- this.focusedIndex = -1;
419
- requestAnimationFrame(() => focusWithoutScroll(this.searchInputEl));
420
- }
421
- else {
422
- const activeIdx = this.parsedOptions.findIndex(opt => opt.value === this.value);
423
- const nextIdx = activeIdx >= 0 ? activeIdx : 0;
424
- this.updateFocusedIndex(nextIdx);
425
- }
426
- }
427
- else {
428
- if (isInput) {
429
- if (maxIndex >= 0) {
430
- this.updateFocusedIndex(0);
431
- }
432
- }
433
- else {
434
- const nextIdx = Math.min(this.focusedIndex + 1, maxIndex);
435
- this.updateFocusedIndex(nextIdx);
436
- }
665
+ this.selectedPanel = false;
666
+ const opening = !this.isOpen;
667
+ this.isOpen = true;
668
+ if (opening && this.searchable && !this.editableSearch) {
669
+ this.focusedIndex = -1;
670
+ requestAnimationFrame(() => focusWithoutScroll(this.searchInputEl));
437
671
  }
438
- break;
439
- case 'ArrowUp':
440
- ev.preventDefault();
441
- if (!this.isOpen) {
442
- this.isOpen = true;
443
- const activeIdx = this.parsedOptions.findIndex(opt => opt.value === this.value);
444
- const nextIdx = activeIdx >= 0 ? activeIdx : maxIndex;
445
- this.updateFocusedIndex(nextIdx);
672
+ else if (ev.key === 'ArrowDown') {
673
+ const selected = opening && !isInput ? this.parsedOptions.findIndex(option => option.value === this.value) : -1;
674
+ this.updateFocusedIndex(selected >= 0 ? selected : Math.min(this.focusedIndex + 1, maxIndex));
446
675
  }
447
676
  else {
448
- if (this.focusedIndex === 0 && this.searchable) {
449
- this.focusedIndex = -1;
450
- requestAnimationFrame(() => focusWithoutScroll(this.searchInputEl));
451
- }
452
- else if (this.focusedIndex > 0) {
453
- const nextIdx = this.focusedIndex - 1;
454
- this.updateFocusedIndex(nextIdx);
455
- }
677
+ this.updateFocusedIndex(this.focusedIndex < 0 ? maxIndex : Math.max(-1, this.focusedIndex - 1));
456
678
  }
457
679
  break;
680
+ }
458
681
  case 'Home':
459
- if (this.isOpen && !isInput) {
460
- ev.preventDefault();
461
- this.updateFocusedIndex(0);
462
- }
463
- break;
464
682
  case 'End':
465
683
  if (this.isOpen && !isInput) {
466
684
  ev.preventDefault();
467
- this.updateFocusedIndex(maxIndex);
685
+ this.updateFocusedIndex(ev.key === 'Home' ? 0 : maxIndex);
468
686
  }
469
687
  break;
470
688
  case 'Enter':
471
689
  if (isInput) {
472
- if (this.parsedOptions.length > 0) {
690
+ if (this.isOpen) {
473
691
  ev.preventDefault();
474
- this.handleSelect(this.parsedOptions[0]);
692
+ if (this.focusedIndex >= 0 && this.focusedIndex <= maxIndex)
693
+ this.handleSelect(this.parsedOptions[this.focusedIndex]);
475
694
  }
476
695
  }
477
696
  else {
478
697
  ev.preventDefault();
479
- if (this.isOpen && this.focusedIndex >= 0 && this.focusedIndex < this.parsedOptions.length) {
698
+ if (this.isOpen && this.focusedIndex >= 0 && this.focusedIndex <= maxIndex)
480
699
  this.handleSelect(this.parsedOptions[this.focusedIndex]);
481
- }
482
- else {
700
+ else
483
701
  this.toggleMenu();
484
- }
485
702
  }
486
703
  break;
487
704
  case ' ':
488
705
  if (!isInput) {
489
706
  ev.preventDefault();
490
- if (this.isOpen && this.focusedIndex >= 0 && this.focusedIndex < this.parsedOptions.length) {
707
+ if (this.isOpen && this.focusedIndex >= 0 && this.focusedIndex <= maxIndex)
491
708
  this.handleSelect(this.parsedOptions[this.focusedIndex]);
492
- }
493
- else {
709
+ else
494
710
  this.toggleMenu();
495
- }
496
711
  }
497
712
  break;
498
713
  case 'Escape':
499
- if (this.isOpen) {
714
+ if (this.isOpen || this.draftEdited) {
500
715
  ev.preventDefault();
501
- this.isOpen = false;
502
- this.focusedIndex = -1;
503
- this.searchTerm = '';
504
- this.clearScrollLoading();
716
+ this.closeMenu();
505
717
  requestAnimationFrame(() => focusWithoutScroll(this.triggerEl));
506
718
  }
507
719
  break;
508
720
  case 'Tab':
509
- if (this.isOpen) {
510
- this.isOpen = false;
511
- this.focusedIndex = -1;
512
- this.searchTerm = '';
513
- this.clearScrollLoading();
514
- }
721
+ this.closeMenu();
515
722
  break;
516
723
  }
517
724
  };
@@ -519,11 +726,7 @@ export class QDropdown {
519
726
  handleClickOutside(ev) {
520
727
  const path = ev.composedPath();
521
728
  if (this.el && !path.includes(this.el)) {
522
- this.isOpen = false;
523
- this.focusedIndex = -1;
524
- this.searchTerm = '';
525
- this.visibleCount = 20;
526
- this.clearScrollLoading();
729
+ this.closeMenu();
527
730
  }
528
731
  }
529
732
  // ===================== [6] RENDER (Visual Template Only) =====================
@@ -534,20 +737,20 @@ export class QDropdown {
534
737
  warningContext: 'q-dropdown options',
535
738
  });
536
739
  const selectedOption = this.getSelectedOption(allOptions);
537
- const selectedLabel = this.getOptionLabel(selectedOption);
538
- const displayLabel = selectedOption && selectedLabel ? selectedLabel : this.placeholder;
539
- const hasSelection = selectedOption !== undefined;
740
+ const selectedLabel = this.getOptionLabel(selectedOption) || (this.externalSearch && this.selectedLabelCache?.value === this.value ? this.selectedLabelCache.label : '');
741
+ const displayLabel = selectedLabel || this.placeholder;
742
+ const hasSelection = selectedOption !== undefined || Boolean(this.externalSearch && this.selectedLabelCache?.value === this.value);
540
743
  const ariaLabel = this.ariaLabel?.trim() || undefined;
541
- return (h("div", { key: '1294d517bf3a3094421034b04c22ee248cfd0730', style: feedbackStyle(this.reserveFeedback), class: {
744
+ return (h("div", { key: '5b133f37727c1ec3f4dfe3b4ab3d6ea245befd70', style: feedbackStyle(this.reserveFeedback), class: {
542
745
  'dropdown-wrapper': true,
543
746
  'is-open': this.isOpen,
544
747
  'is-disabled': this.isDisabled,
545
748
  [`size-${this.size}`]: true
546
- }, onKeyDown: this.handleKeyDown }, this.label && (h("label", { key: '6e9b7ea8d8272669c307d3f00975cd2fb3a91db1', class: { 'dropdown-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), h("button", { key: 'ece6703623acdfc325f01a068e5dd0e85a85263e', ref: (el) => (this.triggerEl = el), id: "q-field", class: "dropdown-trigger", part: "trigger", type: "button", disabled: this.isDisabled, onClick: this.handleTriggerClick, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-haspopup": "listbox", "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error || (this.required && !this.value) ? 'true' : 'false', "aria-describedby": this.error || this.description ? 'q-field-error' : undefined, "aria-label": ariaLabel, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-controls": this.isOpen ? 'q-field-menu' : undefined, "aria-activedescendant": this.isOpen && this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }, h("span", { key: 'a3c6a847dc3f04cdcc57c5222b70b0fe18d4d91b', class: "trigger-content" }, h("slot", { key: 'dce0925e5e0c11579e8e8e6a0c8b12555949ce06', name: "icon-left" }), h("span", { key: '60af77209db71dcc5fa49552ea098754e1c56699', class: { 'trigger-text': true, 'is-placeholder': !hasSelection } }, displayLabel)), h("svg", { key: '083f67294926fe7e9cac6f061015b0f99187a14c', class: "chevron-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { key: 'fc000f99b853cec98b05baf545d7d9deb58f903c', points: "6 9 12 15 18 9" }))), fieldFeedback('q-field-error', this.error, this.description), this.isOpen && (h("div", { key: '3fcf4fa46a7192bd5102218b86622ff68cfcf21e', ref: (el) => (this.menuEl = el), id: "q-field-menu", class: "dropdown-menu", part: "menu", role: "listbox", popover: "manual", "aria-label": ariaLabel || this.label || 'Options' }, this.searchable && (h("div", { key: '6da89836381e1fd4fdaa51567ef76efd115d82ab', class: "dropdown-search-container" }, h("input", { key: '65b9ddc1dd4a3d431e7550cba6c1cdebdbb2481a', ref: (el) => (this.searchInputEl = el), type: "text", class: "dropdown-search-input", placeholder: "Search...", value: this.searchTerm, onInput: this.handleSearchInput, role: "combobox", "aria-autocomplete": "list", "aria-controls": "q-field-menu", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-activedescendant": this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }))), h("ul", { key: '6a0f2ed2711cbfd82ed61fd20ff9e19fc8563c3f', ref: (el) => (this.itemsListEl = el), class: "dropdown-items-list", onScroll: this.handleScroll }, opts.length === 0 && !this.loading ? (h("li", { class: "menu-item is-empty" }, "No matches found")) : (identifiedOptions.map(({ item: option, index, key }) => (h("li", { key: key, id: `q-field-item-${index}`, class: {
749
+ }, onKeyDown: this.handleKeyDown, onFocusout: this.handleFocusOut }, this.label && (h("label", { key: 'af6610e93e291d5cad7773292dc5f79828f75e81', class: { 'dropdown-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), this.width === 'fit-options' && (h("span", { key: 'ad2cd29a9cfb8219c141aefc2aa9b182e99fcc53', class: "fit-options-clip", "aria-hidden": "true" }, h("span", { key: '87f24485e0b55c4d155fca10b27b6ea5699be25e', class: "dropdown-trigger fit-options-measure", ref: el => (this.fitOptionsMeasure = el) }, h("span", { key: 'f869add381f98a4a404aea2570ecd61be29207c8', class: "fit-options-labels" }, (allOptions.length ? allOptions.map(option => this.getOptionLabel(option)) : [selectedLabel || this.placeholder]).map(text => h("span", null, text))), h("span", { key: '7493679916bd1b75f8053dc064ecc067cf693e9c', class: "chevron-icon" })))), this.multiple ? h("div", { class: "dropdown-trigger multiple-trigger", part: "trigger", ref: el => this.multipleFrame = el }, h("slot", { name: "icon-left", onSlotchange: this.measureMultipleLayout }), this.selectedValues.slice(0, this.visibleChips).map(value => h("q-chip", { key: value, size: "sm", removable: true, label: this.multipleLabels.get(value) ?? value, value: value, disabled: this.isDisabled, onQRemove: event => this.removeValue(value, event) })), this.visibleChips < this.selectedValues.length && h("button", { type: "button", class: "multiple-more", disabled: this.isDisabled, "aria-haspopup": "dialog", "aria-expanded": this.selectedPanel && this.isOpen ? 'true' : 'false', "aria-controls": this.selectedPanel && this.isOpen ? 'q-field-menu' : undefined, "aria-label": `${this.selectedValues.length - this.visibleChips} more selected options`, onClick: this.openSelectedPanel }, "+", this.selectedValues.length - this.visibleChips, " more"), h("input", { ref: el => this.triggerEl = el, id: "q-field", class: "multiple-input", type: "text", role: "combobox", autocomplete: "off", disabled: this.isDisabled, value: this.searchTerm, placeholder: this.selectedValues.length ? 'Search…' : this.placeholder, onClick: this.handleEditableClick, onInput: this.handleSearchInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, "aria-label": ariaLabel, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error || this.required && !this.getMultipleFormSelection().length ? 'true' : 'false', "aria-describedby": this.error || this.description ? 'q-field-error' : undefined, "aria-expanded": this.isOpen && !this.selectedPanel ? 'true' : 'false', "aria-controls": this.isOpen && !this.selectedPanel ? 'q-field-menu' : undefined, "aria-activedescendant": this.isOpen && !this.selectedPanel && this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }), h("svg", { class: "chevron-icon", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "6 9 12 15 18 9" })), h("span", { class: "multiple-measure", "aria-hidden": "true", inert: true, ref: el => this.chipMeasure = el }, this.selectedValues.map(value => h("q-chip", { key: value, size: "sm", removable: true, label: this.multipleLabels.get(value) ?? value })), h("button", { type: "button", class: "multiple-more", tabindex: -1 }, "+", this.selectedValues.length, " more"))) : this.editableSearch ? h("div", { class: { 'editable-trigger': true, 'has-leading-icon': Boolean(this.el.querySelector('[slot="icon-left"]')) } }, h("span", { class: "editable-leading" }, h("slot", { name: "icon-left", onSlotchange: this.observeFitOptions })), h("input", { ref: el => (this.triggerEl = el), id: "q-field", class: "dropdown-trigger dropdown-main-input", part: "trigger", type: "text", role: "combobox", autocomplete: "off", disabled: this.isDisabled, value: this.composing ? this.triggerEl?.value ?? selectedLabel : this.draftEdited ? this.searchTerm : selectedLabel, placeholder: this.placeholder, onClick: this.handleEditableClick, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleSearchInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error || (this.required && !this.value) ? 'true' : 'false', "aria-describedby": this.error || this.description ? 'q-field-error' : undefined, "aria-label": ariaLabel, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-controls": this.isOpen ? 'q-field-menu' : undefined, "aria-activedescendant": this.isOpen && this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }), h("svg", { class: "chevron-icon", "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "6 9 12 15 18 9" }))) : h("button", { ref: (el) => (this.triggerEl = el), id: "q-field", class: "dropdown-trigger", part: "trigger", type: "button", disabled: this.isDisabled, onClick: this.handleTriggerClick, onFocus: this.handleFocus, onBlur: this.handleBlur, "aria-haspopup": "listbox", "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error || (this.required && !this.value) ? 'true' : 'false', "aria-describedby": this.error || this.description ? 'q-field-error' : undefined, "aria-label": ariaLabel, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-controls": this.isOpen ? 'q-field-menu' : undefined, "aria-activedescendant": this.isOpen && this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }, h("span", { class: "trigger-content" }, h("slot", { name: "icon-left", onSlotchange: this.observeFitOptions }), h("span", { class: { 'trigger-text': true, 'is-placeholder': !hasSelection } }, displayLabel)), h("svg", { class: "chevron-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("polyline", { points: "6 9 12 15 18 9" }))), fieldFeedback('q-field-error', this.error, this.description), this.isOpen && (h("div", { key: 'd6b784f85c73a05415b417dfad92befff2f383ec', ref: (el) => (this.menuEl = el), id: "q-field-menu", class: "dropdown-menu", part: "menu", role: this.selectedPanel ? 'dialog' : 'listbox', popover: "manual", "aria-label": this.selectedPanel ? 'Selected options' : ariaLabel || this.label || 'Options', "aria-multiselectable": this.multiple && !this.selectedPanel ? 'true' : undefined }, this.selectedPanel ? h("div", { class: "selected-options" }, h("strong", null, "Selected options"), this.selectedValues.map(value => h("q-chip", { key: value, size: "sm", removable: true, label: this.multipleLabels.get(value) ?? value, value: value, disabled: this.isDisabled, onQRemove: event => this.removeValue(value, event) })), h("button", { type: "button", class: "multiple-more", onClick: () => { this.closeMenu(); focusWithoutScroll(this.triggerEl); } }, "Done")) : h(Fragment, null, this.searchable && !this.editableSearch && (h("div", { class: "dropdown-search-container" }, h("input", { ref: (el) => (this.searchInputEl = el), type: "text", class: "dropdown-search-input", placeholder: "Search...", value: this.searchTerm, onInput: this.handleSearchInput, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, "aria-label": ariaLabel || this.label || 'Search options', role: "combobox", "aria-autocomplete": "list", "aria-controls": "q-field-menu", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-activedescendant": this.focusedIndex >= 0 ? `q-field-item-${this.focusedIndex}` : undefined }))), h("ul", { ref: (el) => (this.itemsListEl = el), class: "dropdown-items-list", onScroll: this.handleScroll }, opts.length === 0 && !this.loading ? (h("li", { class: "menu-item is-empty" }, "No matches found")) : (identifiedOptions.map(({ item: option, index, key }) => (h("li", { key: key, id: `q-field-item-${index}`, class: {
547
750
  'menu-item': true,
548
- 'is-selected': option.value === this.value,
751
+ 'is-selected': !this.multiple && option.value === this.value,
549
752
  'is-focused': index === this.focusedIndex
550
- }, tabindex: -1, part: `item ${option.value === this.value ? 'selected-item' : ''} ${index === this.focusedIndex ? 'focused-item' : ''}`, role: "option", "aria-selected": option.value === this.value ? 'true' : 'false', onClick: () => this.handleSelect(option) }, this.getOptionLabel(option))))), (this.loading || this.isScrollingLoading) && (h("li", { key: 'd79cc4772b8d99a809627de29ccd6da3fbbf2f01', class: "menu-item is-loading-more" }, h("span", { key: '2eea8fb3a471c7aeea5a7cb9e1d7c0be62b4ff5b', class: "spinner-circle" }), h("span", { key: '364f7e446f1f7b6ddad5087480f2ce4e88843ed6' }, "Loading..."))))))));
753
+ }, tabindex: -1, part: `item ${!this.multiple && option.value === this.value ? 'selected-item' : ''} ${index === this.focusedIndex ? 'focused-item' : ''}`, role: "option", "aria-selected": !this.multiple && option.value === this.value ? 'true' : 'false', onClick: () => this.handleSelect(option), onMouseDown: ev => ev.preventDefault() }, this.getOptionLabel(option))))), (this.loading || this.isScrollingLoading) && (h("li", { class: "menu-item is-loading-more" }, h("span", { class: "spinner-circle" }), h("span", null, "Loading...")))))))));
551
754
  }
552
755
  static get is() { return "q-dropdown"; }
553
756
  static get encapsulation() { return "shadow"; }
@@ -690,6 +893,44 @@ export class QDropdown {
690
893
  "attribute": "value",
691
894
  "defaultValue": "''"
692
895
  },
896
+ "multiple": {
897
+ "type": "boolean",
898
+ "mutable": false,
899
+ "complexType": {
900
+ "original": "boolean",
901
+ "resolved": "boolean",
902
+ "references": {}
903
+ },
904
+ "required": false,
905
+ "optional": false,
906
+ "docs": {
907
+ "tags": [],
908
+ "text": "Select several options. Uses values/qValuesChange instead of value/qChange."
909
+ },
910
+ "getter": false,
911
+ "setter": false,
912
+ "reflect": true,
913
+ "attribute": "multiple",
914
+ "defaultValue": "false"
915
+ },
916
+ "values": {
917
+ "type": "unknown",
918
+ "mutable": true,
919
+ "complexType": {
920
+ "original": "string[]",
921
+ "resolved": "string[]",
922
+ "references": {}
923
+ },
924
+ "required": false,
925
+ "optional": false,
926
+ "docs": {
927
+ "tags": [],
928
+ "text": "Selected identities in multiple mode. Replace the array to update selections."
929
+ },
930
+ "getter": false,
931
+ "setter": false,
932
+ "defaultValue": "[]"
933
+ },
693
934
  "labelHidden": {
694
935
  "type": "boolean",
695
936
  "mutable": false,
@@ -756,6 +997,32 @@ export class QDropdown {
756
997
  "attribute": "size",
757
998
  "defaultValue": "'inherit'"
758
999
  },
1000
+ "width": {
1001
+ "type": "string",
1002
+ "mutable": false,
1003
+ "complexType": {
1004
+ "original": "QInputWidth | 'fit-options'",
1005
+ "resolved": "\"fit-options\" | \"full\" | \"lg\" | \"md\" | \"sm\" | \"xl\" | \"xs\" | \"xxl\"",
1006
+ "references": {
1007
+ "QInputWidth": {
1008
+ "location": "import",
1009
+ "path": "../../../theme/tokens",
1010
+ "id": "../../../src/browser/theme/tokens.ts::QInputWidth",
1011
+ "referenceLocation": "QInputWidth"
1012
+ }
1013
+ }
1014
+ },
1015
+ "required": false,
1016
+ "optional": true,
1017
+ "docs": {
1018
+ "tags": [],
1019
+ "text": "Opt-in horizontal width; fit-options sizes to loaded option labels. Omitted keeps the full-width layout."
1020
+ },
1021
+ "getter": false,
1022
+ "setter": false,
1023
+ "reflect": true,
1024
+ "attribute": "width"
1025
+ },
759
1026
  "searchable": {
760
1027
  "type": "boolean",
761
1028
  "mutable": false,
@@ -776,6 +1043,26 @@ export class QDropdown {
776
1043
  "attribute": "searchable",
777
1044
  "defaultValue": "false"
778
1045
  },
1046
+ "searchMode": {
1047
+ "type": "string",
1048
+ "mutable": false,
1049
+ "complexType": {
1050
+ "original": "'default' | 'menu'",
1051
+ "resolved": "\"default\" | \"menu\"",
1052
+ "references": {}
1053
+ },
1054
+ "required": false,
1055
+ "optional": false,
1056
+ "docs": {
1057
+ "tags": [],
1058
+ "text": "Search in the main editable control (default) or a separate menu field. Applies only when searchable."
1059
+ },
1060
+ "getter": false,
1061
+ "setter": false,
1062
+ "reflect": false,
1063
+ "attribute": "search-mode",
1064
+ "defaultValue": "'default'"
1065
+ },
779
1066
  "externalSearch": {
780
1067
  "type": "boolean",
781
1068
  "mutable": false,
@@ -970,7 +1257,11 @@ export class QDropdown {
970
1257
  "searchTerm": {},
971
1258
  "visibleCount": {},
972
1259
  "isScrollingLoading": {},
973
- "disabledState": {}
1260
+ "disabledState": {},
1261
+ "draftEdited": {},
1262
+ "selectedLabelCache": {},
1263
+ "visibleChips": {},
1264
+ "selectedPanel": {}
974
1265
  };
975
1266
  }
976
1267
  static get events() {
@@ -989,6 +1280,21 @@ export class QDropdown {
989
1280
  "resolved": "string",
990
1281
  "references": {}
991
1282
  }
1283
+ }, {
1284
+ "method": "qValuesChange",
1285
+ "name": "qValuesChange",
1286
+ "bubbles": true,
1287
+ "cancelable": true,
1288
+ "composed": true,
1289
+ "docs": {
1290
+ "tags": [],
1291
+ "text": "Complete selected identities after an add or removal in multiple mode."
1292
+ },
1293
+ "complexType": {
1294
+ "original": "string[]",
1295
+ "resolved": "string[]",
1296
+ "references": {}
1297
+ }
992
1298
  }, {
993
1299
  "method": "qSelect",
994
1300
  "name": "qSelect",
@@ -1161,8 +1467,20 @@ export class QDropdown {
1161
1467
  static get elementRef() { return "el"; }
1162
1468
  static get watchers() {
1163
1469
  return [{
1470
+ "propName": "searchMode",
1471
+ "methodName": "watchSearchMode"
1472
+ }, {
1473
+ "propName": "searchable",
1474
+ "methodName": "watchSearchMode"
1475
+ }, {
1164
1476
  "propName": "value",
1165
1477
  "methodName": "watchValue"
1478
+ }, {
1479
+ "propName": "values",
1480
+ "methodName": "watchValues"
1481
+ }, {
1482
+ "propName": "multiple",
1483
+ "methodName": "watchMultiple"
1166
1484
  }, {
1167
1485
  "propName": "name",
1168
1486
  "methodName": "syncValidity"