@webquark/browser 1.1.0 → 1.1.1-dev.1

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 (411) hide show
  1. package/dist/cjs/{action.props-B6vl_1p5.js → action.props-CNe2JXR5.js} +1 -1
  2. package/dist/cjs/{field-B5nxD8Kc.js → field-BRAR56Ex.js} +1 -1
  3. package/dist/cjs/{form-control-validity-D1ukC0_e.js → form-control-validity-BkilGb3E.js} +3 -3
  4. package/dist/cjs/{index-BD6Jjssb.js → index-BN-WdOQM.js} +13 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/q-accordion.cjs.entry.js +1 -1
  7. package/dist/cjs/q-alert.cjs.entry.js +2 -2
  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_3.cjs.entry.js +907 -0
  11. package/dist/cjs/q-card.cjs.entry.js +2 -2
  12. package/dist/cjs/q-carousel.cjs.entry.js +1 -1
  13. package/dist/cjs/q-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/q-control-group.cjs.entry.js +3 -3
  15. package/dist/cjs/q-conversation-bubble.cjs.entry.js +1 -1
  16. package/dist/cjs/q-data-table.cjs.entry.js +1 -1
  17. package/dist/cjs/q-dialog.cjs.entry.js +3 -3
  18. package/dist/cjs/q-divider.cjs.entry.js +3 -3
  19. package/dist/cjs/q-dropdown.cjs.entry.js +4 -4
  20. package/dist/cjs/q-form.cjs.entry.js +6 -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 +6 -6
  26. package/dist/cjs/q-link.cjs.entry.js +2 -2
  27. package/dist/cjs/q-map.cjs.entry.js +1 -1
  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 +1 -1
  31. package/dist/cjs/q-panel.cjs.entry.js +6 -6
  32. package/dist/cjs/q-quantity-selector.cjs.entry.js +5 -5
  33. package/dist/cjs/q-radio-group.cjs.entry.js +4 -4
  34. package/dist/cjs/q-reel.cjs.entry.js +23 -23
  35. package/dist/cjs/q-section.cjs.entry.js +2 -2
  36. package/dist/cjs/q-sidepanel.cjs.entry.js +4 -3
  37. package/dist/cjs/q-slider.cjs.entry.js +2 -2
  38. package/dist/cjs/q-stack.cjs.entry.js +3 -3
  39. package/dist/cjs/q-step-diagram-item.cjs.entry.js +2 -2
  40. package/dist/cjs/q-step-diagram.cjs.entry.js +3 -3
  41. package/dist/cjs/q-syntax-box.cjs.entry.js +180 -719
  42. package/dist/cjs/q-syntax-view.cjs.entry.js +65 -0
  43. package/dist/cjs/q-tabs.cjs.entry.js +2 -2
  44. package/dist/cjs/q-textarea.cjs.entry.js +5 -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/syntax-content-BmSExDiW.js +910 -0
  50. package/dist/cjs/{tokens-Cd7g-VMz.js → tokens-BMrfol_M.js} +1 -1
  51. package/dist/cjs/webquark.cjs.js +2 -2
  52. package/dist/collection/collection-manifest.json +3 -1
  53. package/dist/collection/components/actions/button/button.css +27 -9
  54. package/dist/collection/components/communication/alert/alert.css +4 -1
  55. package/dist/collection/components/data-display/syntax-box/internals/formatters/css.js +4 -0
  56. package/dist/collection/components/data-display/syntax-box/internals/formatters/formatter.js +20 -0
  57. package/dist/collection/components/data-display/syntax-box/internals/{formatter.unit.test.js → formatters/formatter.unit.test.js} +38 -11
  58. package/dist/collection/components/data-display/syntax-box/internals/formatters/html.js +4 -0
  59. package/dist/collection/components/data-display/syntax-box/internals/formatters/javascript.js +4 -0
  60. package/dist/collection/components/data-display/syntax-box/internals/{formatter.js → formatters/json.js} +2 -20
  61. package/dist/collection/components/data-display/syntax-box/internals/formatters/languages.js +15 -0
  62. package/dist/collection/components/data-display/syntax-box/internals/formatters/util/prettier.js +17 -0
  63. package/dist/collection/components/data-display/syntax-box/internals/views.js +29 -0
  64. package/dist/collection/components/data-display/syntax-box/internals/views.unit.test.js +19 -0
  65. package/dist/collection/components/data-display/syntax-box/syntax-box.css +107 -36
  66. package/dist/collection/components/data-display/syntax-box/syntax-box.js +179 -637
  67. package/dist/collection/components/data-display/syntax-box/syntax-content.js +748 -0
  68. package/dist/collection/components/data-display/syntax-box/syntax-ui.js +8 -0
  69. package/dist/collection/components/data-display/syntax-box/test/format-fixtures.js +2 -2
  70. package/dist/collection/components/data-display/syntax-box/test/syntax-format.cmp.test.js +20 -20
  71. package/dist/collection/components/data-display/syntax-box/test/syntax-views.cmp.test.js +228 -0
  72. package/dist/collection/components/data-display/syntax-view/syntax-view.js +64 -0
  73. package/dist/collection/components/indicators/step-diagram/step-diagram.js +2 -2
  74. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +1 -1
  75. package/dist/collection/components/inputs/dropdown/dropdown.js +2 -2
  76. package/dist/collection/components/inputs/form/form.js +2 -2
  77. package/dist/collection/components/inputs/form/internals/controls.js +2 -2
  78. package/dist/collection/components/inputs/input/input.js +3 -3
  79. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +4 -4
  80. package/dist/collection/components/inputs/radio-group/radio-group.js +2 -2
  81. package/dist/collection/components/inputs/slider/slider.js +1 -1
  82. package/dist/collection/components/inputs/textarea/textarea.js +2 -2
  83. package/dist/collection/components/inputs/toggle/toggle.js +3 -3
  84. package/dist/collection/components/layout/control-group/control-group.js +1 -1
  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/sidepanel/internals/nav-items.js +2 -2
  93. package/dist/collection/components/layout/sidepanel/sidepanel.js +3 -0
  94. package/dist/collection/components/layout/stack/stack.js +1 -1
  95. package/dist/collection/components/layout/tabs/tabs.js +1 -1
  96. package/dist/collection/components/layout/toolbar/toolbar.js +2 -2
  97. package/dist/collection/components/media/avatar/avatar.js +1 -1
  98. package/dist/collection/components/media/image-comparison/image-comparison.js +1 -1
  99. package/dist/collection/components/media/media/media.js +1 -1
  100. package/dist/collection/components/media/reel/reel.js +23 -23
  101. package/dist/collection/components/media/reel/test/focus.cmp.test.js +33 -0
  102. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  103. package/dist/collection/components/overlays/dialog/dialog.js +2 -2
  104. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  105. package/dist/collection/theme/tokens.js +1 -1
  106. package/dist/collection/utils/form-control-validity.js +3 -3
  107. package/dist/components/index.js +1 -1
  108. package/dist/components/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
  109. package/dist/components/p-BGlbV43y.js +13 -0
  110. package/dist/components/{p-BZXIeEKC.js → p-BKWL9zOn.js} +1 -1
  111. package/dist/components/p-BxxU73QQ.js +1 -0
  112. package/dist/components/{p-kfrqZyfJ.js → p-CVEQfA-v.js} +1 -1
  113. package/dist/components/p-CpbWWDiY.js +1 -0
  114. package/dist/components/{p-BwPMm43W.js → p-D2fczi8m.js} +1 -1
  115. package/dist/components/{p-BGHNFaaC.js → p-D5vpGqZ9.js} +1 -1
  116. package/dist/components/p-DQIYo8zC.js +1 -0
  117. package/dist/components/{p-IwIJb0Mc.js → p-DX6PCIPS.js} +1 -1
  118. package/dist/components/{p-CpkX9YAW.js → p-DY9D4z7Z.js} +1 -1
  119. package/dist/{webquark/p-BDsIecIx.js → components/p-DbzjRzhu.js} +1 -1
  120. package/dist/components/{p-Bp6Xr92S.js → p-RX4DjgmV.js} +1 -1
  121. package/dist/components/{p-Bc2_QcLn.js → p-Ts5oOvg8.js} +1 -1
  122. package/dist/components/p-u1Qz6OcP.js +1 -0
  123. package/dist/components/q-accordion.js +1 -1
  124. package/dist/components/q-alert.js +1 -1
  125. package/dist/components/q-avatar.js +1 -1
  126. package/dist/components/q-banner.js +1 -1
  127. package/dist/components/q-button.js +1 -1
  128. package/dist/components/q-card.js +1 -1
  129. package/dist/components/q-carousel.js +1 -1
  130. package/dist/components/q-chip.js +1 -1
  131. package/dist/components/q-control-group.js +1 -1
  132. package/dist/components/q-conversation-bubble.js +1 -1
  133. package/dist/components/q-data-table.js +1 -1
  134. package/dist/components/q-dialog.js +1 -1
  135. package/dist/components/q-divider.js +1 -1
  136. package/dist/components/q-dropdown.js +1 -1
  137. package/dist/components/q-form.js +1 -1
  138. package/dist/components/q-grid.js +1 -1
  139. package/dist/components/q-icon.js +1 -1
  140. package/dist/components/q-image-comparison.js +1 -1
  141. package/dist/components/q-inline.js +1 -1
  142. package/dist/components/q-input.js +1 -1
  143. package/dist/components/q-link.js +1 -1
  144. package/dist/components/q-map.js +1 -1
  145. package/dist/components/q-media.js +1 -1
  146. package/dist/components/q-navbar.js +1 -1
  147. package/dist/components/q-pagination.js +1 -1
  148. package/dist/components/q-panel.js +1 -1
  149. package/dist/components/q-progress.js +1 -1
  150. package/dist/components/q-quantity-selector.js +1 -1
  151. package/dist/components/q-radio-group.js +1 -1
  152. package/dist/components/q-reel.js +1 -1
  153. package/dist/components/q-scrollable.js +1 -1
  154. package/dist/components/q-section.js +1 -1
  155. package/dist/components/q-sidepanel.js +2 -2
  156. package/dist/components/q-slider.js +1 -1
  157. package/dist/components/q-stack.js +1 -1
  158. package/dist/components/q-step-diagram-item.js +1 -1
  159. package/dist/components/q-step-diagram.js +1 -1
  160. package/dist/components/q-syntax-box.js +1 -13
  161. package/dist/components/q-syntax-view.d.ts +11 -0
  162. package/dist/components/q-syntax-view.js +1 -0
  163. package/dist/components/q-tabs.js +1 -1
  164. package/dist/components/q-textarea.js +1 -1
  165. package/dist/components/q-thumbnail.js +1 -1
  166. package/dist/components/q-toast.js +1 -1
  167. package/dist/components/q-toggle.js +1 -1
  168. package/dist/components/q-toolbar.js +1 -1
  169. package/dist/components/q-tooltip.js +1 -1
  170. package/dist/esm/{action.props-Di_LpF5H.js → action.props-CbSH7c-q.js} +1 -1
  171. package/dist/esm/{dom-CArIPzJU.js → dom-B610wOGe.js} +1 -1
  172. package/dist/esm/{field-C4Iilew6.js → field-D5xUxo11.js} +1 -1
  173. package/dist/esm/{form-control-validity-Bj2RJb2E.js → form-control-validity-BxxU73QQ.js} +3 -3
  174. package/dist/esm/{form-submit-action-CoEIvDqE.js → form-submit-action-BjjfVWyu.js} +1 -1
  175. package/dist/esm/{index-DoGM9gsC.js → index-CIMzZPQO.js} +13 -2
  176. package/dist/esm/loader.js +3 -3
  177. package/dist/esm/q-accordion.entry.js +1 -1
  178. package/dist/esm/q-alert.entry.js +2 -2
  179. package/dist/esm/q-avatar.entry.js +2 -2
  180. package/dist/esm/q-banner.entry.js +1 -1
  181. package/dist/esm/q-button_3.entry.js +903 -0
  182. package/dist/esm/q-card.entry.js +3 -3
  183. package/dist/esm/q-carousel.entry.js +2 -2
  184. package/dist/esm/q-chip.entry.js +2 -2
  185. package/dist/esm/q-control-group.entry.js +3 -3
  186. package/dist/esm/q-conversation-bubble.entry.js +1 -1
  187. package/dist/esm/q-data-table.entry.js +1 -1
  188. package/dist/esm/q-dialog.entry.js +4 -4
  189. package/dist/esm/q-divider.entry.js +3 -3
  190. package/dist/esm/q-dropdown.entry.js +4 -4
  191. package/dist/esm/q-form.entry.js +7 -7
  192. package/dist/esm/q-grid.entry.js +3 -3
  193. package/dist/esm/q-icon.entry.js +1 -1
  194. package/dist/esm/q-image-comparison.entry.js +2 -2
  195. package/dist/esm/q-inline.entry.js +3 -3
  196. package/dist/esm/q-input_2.entry.js +7 -7
  197. package/dist/esm/q-link.entry.js +2 -2
  198. package/dist/esm/q-map.entry.js +1 -1
  199. package/dist/esm/q-media.entry.js +2 -2
  200. package/dist/esm/q-navbar.entry.js +3 -3
  201. package/dist/esm/q-pagination.entry.js +1 -1
  202. package/dist/esm/q-panel.entry.js +7 -7
  203. package/dist/esm/q-quantity-selector.entry.js +5 -5
  204. package/dist/esm/q-radio-group.entry.js +4 -4
  205. package/dist/esm/q-reel.entry.js +24 -24
  206. package/dist/esm/q-section.entry.js +2 -2
  207. package/dist/esm/q-sidepanel.entry.js +5 -4
  208. package/dist/esm/q-slider.entry.js +2 -2
  209. package/dist/esm/q-stack.entry.js +3 -3
  210. package/dist/esm/q-step-diagram-item.entry.js +2 -2
  211. package/dist/esm/q-step-diagram.entry.js +4 -4
  212. package/dist/esm/q-syntax-box.entry.js +180 -719
  213. package/dist/esm/q-syntax-view.entry.js +63 -0
  214. package/dist/esm/q-tabs.entry.js +2 -2
  215. package/dist/esm/q-textarea.entry.js +5 -5
  216. package/dist/esm/q-thumbnail.entry.js +3 -3
  217. package/dist/esm/q-toast.entry.js +1 -1
  218. package/dist/esm/q-toggle.entry.js +6 -6
  219. package/dist/esm/q-toolbar.entry.js +4 -4
  220. package/dist/esm/syntax-content-Cr9kSbmA.js +903 -0
  221. package/dist/esm/{tokens-BDsIecIx.js → tokens-DbzjRzhu.js} +1 -1
  222. package/dist/esm/webquark.js +3 -3
  223. package/dist/formatters/prettier/LICENSE +7 -0
  224. package/dist/formatters/prettier/THIRD-PARTY-NOTICES.md +7941 -0
  225. package/dist/formatters/prettier/html-fragment.mjs +1 -0
  226. package/dist/formatters/prettier/html-fragment.mjs.gz +0 -0
  227. package/dist/formatters/prettier/languages/angular.mjs +1 -0
  228. package/dist/formatters/prettier/languages/angular.mjs.gz +0 -0
  229. package/dist/formatters/prettier/languages/css.mjs +1 -0
  230. package/dist/formatters/prettier/languages/css.mjs.gz +0 -0
  231. package/dist/formatters/prettier/languages/flow.mjs +1 -0
  232. package/dist/formatters/prettier/languages/flow.mjs.gz +0 -0
  233. package/dist/formatters/prettier/languages/graphql.mjs +1 -0
  234. package/dist/formatters/prettier/languages/graphql.mjs.gz +0 -0
  235. package/dist/formatters/prettier/languages/handlebars.mjs +1 -0
  236. package/dist/formatters/prettier/languages/handlebars.mjs.gz +0 -0
  237. package/dist/formatters/prettier/languages/html.mjs +1 -0
  238. package/dist/formatters/prettier/languages/html.mjs.gz +0 -0
  239. package/dist/formatters/prettier/languages/javascript.mjs +1 -0
  240. package/dist/formatters/prettier/languages/javascript.mjs.gz +0 -0
  241. package/dist/formatters/prettier/languages/json-stringify.mjs +1 -0
  242. package/dist/formatters/prettier/languages/json-stringify.mjs.gz +0 -0
  243. package/dist/formatters/prettier/languages/json.mjs +1 -0
  244. package/dist/formatters/prettier/languages/json.mjs.gz +0 -0
  245. package/dist/formatters/prettier/languages/json5.mjs +1 -0
  246. package/dist/formatters/prettier/languages/json5.mjs.gz +0 -0
  247. package/dist/formatters/prettier/languages/jsonc.mjs +1 -0
  248. package/dist/formatters/prettier/languages/jsonc.mjs.gz +0 -0
  249. package/dist/formatters/prettier/languages/jsx.mjs +1 -0
  250. package/dist/formatters/prettier/languages/jsx.mjs.gz +0 -0
  251. package/dist/formatters/prettier/languages/less.mjs +1 -0
  252. package/dist/formatters/prettier/languages/less.mjs.gz +0 -0
  253. package/dist/formatters/prettier/languages/lwc.mjs +1 -0
  254. package/dist/formatters/prettier/languages/lwc.mjs.gz +0 -0
  255. package/dist/formatters/prettier/languages/markdown.mjs +1 -0
  256. package/dist/formatters/prettier/languages/markdown.mjs.gz +0 -0
  257. package/dist/formatters/prettier/languages/mdx.mjs +1 -0
  258. package/dist/formatters/prettier/languages/mdx.mjs.gz +0 -0
  259. package/dist/formatters/prettier/languages/mjml.mjs +1 -0
  260. package/dist/formatters/prettier/languages/mjml.mjs.gz +0 -0
  261. package/dist/formatters/prettier/languages/postcss.mjs +1 -0
  262. package/dist/formatters/prettier/languages/postcss.mjs.gz +0 -0
  263. package/dist/formatters/prettier/languages/scss.mjs +1 -0
  264. package/dist/formatters/prettier/languages/scss.mjs.gz +0 -0
  265. package/dist/formatters/prettier/languages/tsx.mjs +1 -0
  266. package/dist/formatters/prettier/languages/tsx.mjs.gz +0 -0
  267. package/dist/formatters/prettier/languages/typescript.mjs +1 -0
  268. package/dist/formatters/prettier/languages/typescript.mjs.gz +0 -0
  269. package/dist/formatters/prettier/languages/vue.mjs +1 -0
  270. package/dist/formatters/prettier/languages/vue.mjs.gz +0 -0
  271. package/dist/formatters/prettier/languages/yaml.mjs +1 -0
  272. package/dist/formatters/prettier/languages/yaml.mjs.gz +0 -0
  273. package/dist/formatters/prettier/manifest.json +87 -0
  274. package/dist/formatters/prettier/plugins/acorn.mjs +17 -0
  275. package/dist/formatters/prettier/plugins/acorn.mjs.gz +0 -0
  276. package/dist/formatters/prettier/plugins/angular.mjs +7 -0
  277. package/dist/formatters/prettier/plugins/angular.mjs.gz +0 -0
  278. package/dist/formatters/prettier/plugins/babel.mjs +16 -0
  279. package/dist/formatters/prettier/plugins/babel.mjs.gz +0 -0
  280. package/dist/formatters/prettier/plugins/estree.mjs +44 -0
  281. package/dist/formatters/prettier/plugins/estree.mjs.gz +0 -0
  282. package/dist/formatters/prettier/plugins/flow.mjs +7 -0
  283. package/dist/formatters/prettier/plugins/flow.mjs.gz +0 -0
  284. package/dist/formatters/prettier/plugins/glimmer.mjs +37 -0
  285. package/dist/formatters/prettier/plugins/glimmer.mjs.gz +0 -0
  286. package/dist/formatters/prettier/plugins/graphql.mjs +17 -0
  287. package/dist/formatters/prettier/plugins/graphql.mjs.gz +0 -0
  288. package/dist/formatters/prettier/plugins/html.mjs +25 -0
  289. package/dist/formatters/prettier/plugins/html.mjs.gz +0 -0
  290. package/dist/formatters/prettier/plugins/markdown.mjs +70 -0
  291. package/dist/formatters/prettier/plugins/markdown.mjs.gz +0 -0
  292. package/dist/formatters/prettier/plugins/meriyah.mjs +9 -0
  293. package/dist/formatters/prettier/plugins/meriyah.mjs.gz +0 -0
  294. package/dist/formatters/prettier/plugins/postcss.mjs +62 -0
  295. package/dist/formatters/prettier/plugins/postcss.mjs.gz +0 -0
  296. package/dist/formatters/prettier/plugins/typescript.mjs +22 -0
  297. package/dist/formatters/prettier/plugins/typescript.mjs.gz +0 -0
  298. package/dist/formatters/prettier/plugins/yaml.mjs +150 -0
  299. package/dist/formatters/prettier/plugins/yaml.mjs.gz +0 -0
  300. package/dist/formatters/prettier/runtime.d.mts +2 -0
  301. package/dist/formatters/prettier/runtime.mjs +1 -0
  302. package/dist/formatters/prettier/runtime.mjs.gz +0 -0
  303. package/dist/formatters/prettier/standalone.mjs +29 -0
  304. package/dist/formatters/prettier/standalone.mjs.gz +0 -0
  305. package/dist/playground/components/theme-designer/token-row.js +45 -74
  306. package/dist/playground/utils/color.js +14 -25
  307. package/dist/types/components/data-display/syntax-box/internals/formatters/css.d.ts +1 -0
  308. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.d.ts +10 -0
  309. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.types.d.ts +4 -0
  310. package/dist/types/components/data-display/syntax-box/internals/formatters/formatter.unit.test.d.ts +1 -0
  311. package/dist/types/components/data-display/syntax-box/internals/formatters/html.d.ts +1 -0
  312. package/dist/types/components/data-display/syntax-box/internals/formatters/javascript.d.ts +1 -0
  313. package/dist/types/components/data-display/syntax-box/internals/formatters/json.d.ts +6 -0
  314. package/dist/types/components/data-display/syntax-box/internals/formatters/languages.d.ts +27 -0
  315. package/dist/types/components/data-display/syntax-box/internals/formatters/util/prettier.d.ts +3 -0
  316. package/dist/types/components/data-display/syntax-box/internals/syntax.d.ts +1 -1
  317. package/dist/types/components/data-display/syntax-box/internals/views.d.ts +11 -0
  318. package/dist/types/components/data-display/syntax-box/internals/views.unit.test.d.ts +1 -0
  319. package/dist/types/components/data-display/syntax-box/syntax-box.d.ts +66 -63
  320. package/dist/types/components/data-display/syntax-box/syntax-box.types.d.ts +1 -1
  321. package/dist/types/components/data-display/syntax-box/syntax-content.d.ts +41 -0
  322. package/dist/types/components/data-display/syntax-box/syntax-ui.d.ts +15 -0
  323. package/dist/types/components/data-display/syntax-box/test/format-fixtures.d.ts +1 -1
  324. package/dist/types/components/data-display/syntax-box/test/syntax-views.cmp.test.d.ts +1 -0
  325. package/dist/types/components/data-display/syntax-view/syntax-view.d.ts +48 -0
  326. package/dist/types/components/layout/sidepanel/sidepanel.d.ts +2 -0
  327. package/dist/types/components/layout/sidepanel/sidepanel.types.d.ts +1 -0
  328. package/dist/types/components/media/reel/reel.d.ts +3 -3
  329. package/dist/types/components/media/reel/test/focus.cmp.test.d.ts +1 -0
  330. package/dist/types/components.d.ts +201 -7
  331. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/components/theme-designer/token-row.d.ts +1 -1
  332. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/dom-factory.d.ts +1 -0
  333. package/dist/types/home/runner/work/WebQuark/WebQuark/.stencil/src/playground/utils/color.d.ts +2 -8
  334. package/dist/types/utils/form-control-validity.d.ts +2 -1
  335. package/dist/webquark/{p-846dc838.entry.js → p-014c2f4a.entry.js} +1 -1
  336. package/dist/webquark/{p-0182e114.entry.js → p-0389577c.entry.js} +1 -1
  337. package/dist/webquark/p-041e17c1.entry.js +1 -0
  338. package/dist/webquark/p-0479c571.entry.js +1 -0
  339. package/dist/webquark/{p-17b9713f.entry.js → p-0ebca9be.entry.js} +1 -1
  340. package/dist/webquark/{p-0a2c52de.entry.js → p-1bf375f7.entry.js} +2 -2
  341. package/dist/webquark/{p-e2721e77.entry.js → p-20dc3ab5.entry.js} +1 -1
  342. package/dist/webquark/p-28d3348f.entry.js +1 -0
  343. package/dist/webquark/p-35c177d3.entry.js +1 -0
  344. package/dist/webquark/{p-f4d23ffe.entry.js → p-3a60086d.entry.js} +1 -1
  345. package/dist/webquark/{p-e723a7ae.entry.js → p-3ab798aa.entry.js} +1 -1
  346. package/dist/webquark/{p-15bad9ef.entry.js → p-3b580baf.entry.js} +1 -1
  347. package/dist/webquark/{p-4609c362.entry.js → p-3b65f787.entry.js} +1 -1
  348. package/dist/webquark/p-4bf610f8.entry.js +1 -0
  349. package/dist/webquark/{p-f51e1098.entry.js → p-4d30227e.entry.js} +1 -1
  350. package/dist/webquark/p-4de536ae.entry.js +1 -0
  351. package/dist/webquark/{p-3daafc56.entry.js → p-4e4d70c9.entry.js} +1 -1
  352. package/dist/webquark/p-4efeb7c9.entry.js +1 -0
  353. package/dist/webquark/{p-a314bc21.entry.js → p-51b3d71b.entry.js} +1 -1
  354. package/dist/webquark/p-778b6bbb.entry.js +1 -0
  355. package/dist/webquark/{p-a66550da.entry.js → p-7da78b2f.entry.js} +1 -1
  356. package/dist/webquark/{p-fe14f038.entry.js → p-7f8f986b.entry.js} +1 -1
  357. package/dist/webquark/{p-e0943d41.entry.js → p-8253c742.entry.js} +1 -1
  358. package/dist/webquark/{p-a2334abe.entry.js → p-9a1ddeb7.entry.js} +1 -1
  359. package/dist/webquark/{p-CArIPzJU.js → p-B610wOGe.js} +1 -1
  360. package/dist/webquark/p-BxxU73QQ.js +1 -0
  361. package/dist/webquark/p-CIMzZPQO.js +3 -0
  362. package/dist/webquark/p-CfR85WgM.js +13 -0
  363. package/dist/webquark/{p-DDUED8LT.js → p-D8p28N9s.js} +1 -1
  364. package/dist/{components/p-BDsIecIx.js → webquark/p-DbzjRzhu.js} +1 -1
  365. package/dist/webquark/{p-BOdNg0jc.js → p-DeOEN0si.js} +1 -1
  366. package/dist/webquark/p-a2b1de23.entry.js +1 -0
  367. package/dist/webquark/{p-dbcf7592.entry.js → p-a55edc17.entry.js} +1 -1
  368. package/dist/webquark/p-a8808020.entry.js +1 -0
  369. package/dist/webquark/{p-9a76cd71.entry.js → p-b1084b3c.entry.js} +1 -1
  370. package/dist/webquark/{p-a2ff1b64.entry.js → p-b6c4dff4.entry.js} +1 -1
  371. package/dist/webquark/{p-b21ad707.entry.js → p-b962e950.entry.js} +1 -1
  372. package/dist/webquark/{p-5b584d3c.entry.js → p-bc369cd6.entry.js} +1 -1
  373. package/dist/webquark/p-c119a8ea.entry.js +1 -0
  374. package/dist/webquark/{p-85131314.entry.js → p-c6b77e9a.entry.js} +1 -1
  375. package/dist/webquark/{p-84b350a3.entry.js → p-ca1c03b4.entry.js} +1 -1
  376. package/dist/webquark/{p-b8fdef4f.entry.js → p-ce436162.entry.js} +1 -1
  377. package/dist/webquark/{p-86c05afd.entry.js → p-d0a47a7c.entry.js} +1 -1
  378. package/dist/webquark/{p-222405b8.entry.js → p-e1fbc8fc.entry.js} +1 -1
  379. package/dist/webquark/{p-44bbe12f.entry.js → p-e32833ce.entry.js} +1 -1
  380. package/dist/webquark/{p-d86bd51d.entry.js → p-e369a4aa.entry.js} +1 -1
  381. package/dist/webquark/p-e4430c61.entry.js +1 -0
  382. package/dist/webquark/{p-aa342e81.entry.js → p-e9c0052b.entry.js} +1 -1
  383. package/dist/webquark/{p-852e88ae.entry.js → p-f5c4ca18.entry.js} +1 -1
  384. package/dist/webquark/{p-d4788321.entry.js → p-f6683126.entry.js} +1 -1
  385. package/dist/webquark/{p-Dnz3WmdX.js → p-ojSDiptZ.js} +1 -1
  386. package/dist/webquark/webquark.css +1 -1
  387. package/dist/webquark/webquark.esm.js +1 -1
  388. package/package.json +5 -1
  389. package/dist/cjs/q-button_2.cjs.entry.js +0 -462
  390. package/dist/cjs/q-scrollable.cjs.entry.js +0 -449
  391. package/dist/components/p-Bj2RJb2E.js +0 -1
  392. package/dist/components/p-D2nxHd1b.js +0 -1
  393. package/dist/components/p-x3C-wjU9.js +0 -1
  394. package/dist/esm/q-button_2.entry.js +0 -459
  395. package/dist/esm/q-scrollable.entry.js +0 -447
  396. package/dist/types/components/data-display/syntax-box/internals/formatter.d.ts +0 -15
  397. package/dist/webquark/p-048103e0.entry.js +0 -1
  398. package/dist/webquark/p-0baf478a.entry.js +0 -1
  399. package/dist/webquark/p-2eaa3a9f.entry.js +0 -1
  400. package/dist/webquark/p-65fe9cac.entry.js +0 -1
  401. package/dist/webquark/p-8c5b2706.entry.js +0 -1
  402. package/dist/webquark/p-923527f0.entry.js +0 -1
  403. package/dist/webquark/p-Bj2RJb2E.js +0 -1
  404. package/dist/webquark/p-DoGM9gsC.js +0 -3
  405. package/dist/webquark/p-a0d97367.entry.js +0 -1
  406. package/dist/webquark/p-a16bd8d5.entry.js +0 -13
  407. package/dist/webquark/p-a3e1096d.entry.js +0 -1
  408. package/dist/webquark/p-b1c771fb.entry.js +0 -1
  409. package/dist/webquark/p-b45ca926.entry.js +0 -1
  410. package/dist/webquark/p-eb800d1e.entry.js +0 -1
  411. /package/dist/{types/components/data-display/syntax-box/internals/formatter.unit.test.d.ts → collection/components/data-display/syntax-box/internals/formatters/formatter.types.js} +0 -0
@@ -0,0 +1,8 @@
1
+ import { h } from "@stencil/core";
2
+ import { Braces, Check, Copy } from "@lucide/icons";
3
+ export function renderSyntaxActions(actions) {
4
+ return (h("div", { class: "panel-actions", ref: actions.ref }, h("slot", { name: "actions" }), actions.editable && actions.formatLabel && (h("q-button", { class: "format-btn", ariaLabel: actions.formatLabel, variant: "ghost", size: "sm", disabled: actions.disabled, onClick: actions.onFormat }, h("q-icon", { slot: "icon-left", definition: Braces, name: "braces", size: "sm" }), h("q-tooltip", { slot: "icon-left", position: "bottom", content: actions.formatLabel }))), actions.copyable && (h("q-button", { variant: "ghost", size: "sm", ariaLabel: actions.copyFeedback, disabled: actions.disabled, onClick: actions.onCopy }, h("q-icon", { slot: "icon-left", definition: actions.copied ? Check : Copy, name: actions.copied ? 'check' : 'copy', size: "sm" }), h("q-tooltip", { slot: "icon-left", position: "bottom", content: actions.copyFeedback })))));
5
+ }
6
+ export function renderSyntaxScroller(body, height, ref) {
7
+ return h("q-scrollable", { height: height, ref: ref }, body);
8
+ }
@@ -9,8 +9,8 @@ export const INVALID_JSON = [
9
9
  ['short Unicode escape', '"\\u123"'], ['raw string newline', '"keep\r\nline"'],
10
10
  ['BOM', '\ufeff{"a":1}'], ['whitespace only', ' \t\r\n '],
11
11
  ];
12
- export const UNSUPPORTED_SOURCE = [
13
- ['html', '<p>Hello <b>world</b> !</p>\r\n<pre> keep \t spaces\r\n</pre><!-- keep comment -->'],
12
+ export const NON_JSON_SOURCE = [
13
+ ['html', '<p class="message">Hello <b>world</b> !</p>\r\n<pre> keep \t spaces\r\n</pre><!-- keep comment -->'],
14
14
  ['javascript', '// keep\r\nfunction f(){return\n"x";} const t = ` a ${1}\r\n b;{} `; /[{};]/.test(t);'],
15
15
  ['css', '/* keep */\r\n.a { content: " x; { y } "; --text: a b; }\r\n'],
16
16
  ];
@@ -4,8 +4,8 @@ import { page } from "vitest/browser";
4
4
  import { defineCustomElements } from "../../../../../../packages/browser/components/dist/loader";
5
5
  // @ts-ignore - real guide previews use the production theme.
6
6
  import "../../../../../../packages/browser/components/dist/webquark/webquark.css";
7
- import { INVALID_JSON, JSON_EXPECTED, JSON_SOURCE, jsonTokens, UNSUPPORTED_SOURCE } from "./format-fixtures";
8
- import { MAX_JSON_FORMAT_DEPTH } from "../internals/formatter";
7
+ import { INVALID_JSON, JSON_EXPECTED, JSON_SOURCE, jsonTokens, NON_JSON_SOURCE } from "./format-fixtures";
8
+ import { MAX_JSON_FORMAT_DEPTH } from "../internals/formatters/json";
9
9
  import { normalizeDomNewlines } from "./syntax-fixtures";
10
10
  defineCustomElements();
11
11
  afterEach(() => { document.body.replaceChildren(); document.body.style.margin = ''; vi.restoreAllMocks(); });
@@ -82,21 +82,15 @@ describe('built syntax-box explicit safe formatting', () => {
82
82
  await exact(el, '{"valid":1}');
83
83
  expect(el.shadowRoot.querySelector('.format-feedback')).toBeNull();
84
84
  });
85
- it.each(UNSUPPORTED_SOURCE)('makes %s Format visibly unavailable without altering comments/literals/events', async (language, source) => {
85
+ it.each(NON_JSON_SOURCE)('offers an explicit %s Format action', async (language, source) => {
86
86
  const { el } = await create({ language, code: source });
87
87
  const observed = events(el);
88
88
  const button = await action(el);
89
- expect(button.disabled).toBe(true);
90
- expect(button.shadowRoot.querySelector('button').disabled).toBe(true);
91
- expect(el.shadowRoot.querySelector('.format-feedback').textContent).toBe('Formatting is available for JSON only.');
92
- button.click();
93
- await exact(el, source);
94
- expect(observed).toEqual([]);
95
- el.language = 'json';
96
- el.value = '{"next":1}';
97
- await exact(el, '{"next":1}');
98
- await vi.waitFor(() => expect(button.disabled).toBe(false));
89
+ expect(button.disabled).toBe(false);
99
90
  expect(el.shadowRoot.querySelector('.format-feedback')).toBeNull();
91
+ button.click();
92
+ await vi.waitFor(() => expect(observed.map(event => event.type)).toEqual(['qInput', 'qChange']));
93
+ expect(el.code).not.toBe(source);
100
94
  });
101
95
  it('keeps over-depth JSON intact with bounded-format feedback', async () => {
102
96
  const source = '['.repeat(MAX_JSON_FORMAT_DEPTH + 1) + '-0' + ']'.repeat(MAX_JSON_FORMAT_DEPTH + 1);
@@ -129,16 +123,22 @@ describe('built syntax-box explicit safe formatting', () => {
129
123
  await exact(el, '{\n "10": 9007199254740993,\n "2": -0,\n "same": 1,\n "same": 2\n}');
130
124
  await page.elementLocator(el).screenshot({ path: 'docs/components/assets/q-syntax-box-format-json.png' });
131
125
  });
132
- it('captures the runnable unsupported-format guide example', async () => {
126
+ it('formats a JavaScript template literal without losing its inner spaces', async () => {
133
127
  await page.viewport(800, 700);
134
128
  document.body.style.margin = '20px';
135
- const { el } = await create({ code: 'const message = `keep spaces; { braces }`;', language: 'javascript', heading: 'Literal JavaScript', height: '110px' });
129
+ const { el } = await create({
130
+ code: 'const message=`keep spaces; { braces }`',
131
+ language: 'javascript',
132
+ heading: 'Literal JavaScript',
133
+ ariaLabel: 'Literal JavaScript source',
134
+ height: '110px',
135
+ });
136
136
  el.style.width = '560px';
137
- expect((await action(el)).disabled).toBe(true);
138
- await exact(el, 'const message = `keep spaces; { braces }`;');
139
- await page.elementLocator(el).screenshot({ path: 'docs/components/assets/q-syntax-box-format-unsupported.png' });
137
+ (await action(el)).click();
138
+ await exact(el, 'const message = `keep spaces; { braces }`;\n');
139
+ await page.elementLocator(el).screenshot({ path: 'docs/components/assets/q-syntax-box-format-javascript.png' });
140
140
  });
141
- it('refreshes the submitted-code example with current unavailable JavaScript formatting', async () => {
141
+ it('submits the original JavaScript until Format is used', async () => {
142
142
  await page.viewport(800, 700);
143
143
  document.body.style.margin = '20px';
144
144
  const { el, form } = await create({ code: 'const ready = true;', language: 'javascript', height: '110px', name: 'template', required: true, ariaLabel: 'Template code' });
@@ -151,7 +151,7 @@ describe('built syntax-box explicit safe formatting', () => {
151
151
  form.addEventListener('submit', event => { event.preventDefault(); output.textContent = String(new FormData(form).get('template')); });
152
152
  submit.click();
153
153
  expect(output.textContent).toBe('const ready = true;');
154
- expect((await action(el)).disabled).toBe(true);
154
+ expect((await action(el)).disabled).toBe(false);
155
155
  await page.elementLocator(form).screenshot({ path: 'docs/components/assets/q-syntax-box-submit-code.png' });
156
156
  });
157
157
  });
@@ -0,0 +1,228 @@
1
+ import { afterEach, describe, expect, it, vi } from "vitest";
2
+ import { page, userEvent } from "vitest/browser";
3
+ // @ts-ignore - exercise the same generated component loader as an application.
4
+ import { defineCustomElements } from "../../../../../../packages/browser/components/dist/loader";
5
+ // @ts-ignore - visibility and focus need the component theme.
6
+ import "../../../../../../packages/browser/components/dist/webquark/webquark.css";
7
+ defineCustomElements();
8
+ afterEach(() => {
9
+ document.body.replaceChildren();
10
+ vi.restoreAllMocks();
11
+ });
12
+ async function mountBox(markup) {
13
+ document.body.innerHTML = markup;
14
+ const box = document.querySelector('q-syntax-box');
15
+ await box.componentOnReady();
16
+ await Promise.all(Array.from(box.querySelectorAll('q-syntax-view'), view => view.componentOnReady()));
17
+ return box;
18
+ }
19
+ const tab = (name, selected) => page.getByRole('tab', { name, exact: true, selected });
20
+ async function expectTabs(...labels) {
21
+ await vi.waitFor(() => {
22
+ expect(page.getByRole('tab').elements().map(element => element.textContent?.trim())).toEqual(labels);
23
+ });
24
+ }
25
+ describe('q-syntax-box composed views', () => {
26
+ it('renders standalone content and a single child directly, then adds tabs for a second child', async () => {
27
+ await mountBox('<q-syntax-box heading="Source" code="standalone"></q-syntax-box>');
28
+ await expect.element(page.getByText('standalone', { exact: true })).toBeVisible();
29
+ await expectTabs();
30
+ const box = await mountBox(`
31
+ <form>
32
+ <q-syntax-box heading="Output">
33
+ <q-button slot="actions">Box action</q-button>
34
+ <q-syntax-view heading="Example HTML" view-key="html" code="first"></q-syntax-view>
35
+ </q-syntax-box>
36
+ </form>
37
+ `);
38
+ await expect.element(page.getByText('first', { exact: true })).toBeVisible();
39
+ await expectTabs();
40
+ const events = document.createElement('q-syntax-view');
41
+ events.heading = 'Events';
42
+ box.append(events);
43
+ await expectTabs('Example HTML', 'Events');
44
+ await expect.element(tab('Example HTML', true)).toBeVisible();
45
+ await tab('Events').click();
46
+ box.closest('form').reset();
47
+ await expectTabs('Example HTML', 'Events');
48
+ await expect.element(tab('Events', true)).toBeVisible();
49
+ events.remove();
50
+ await expect.element(page.getByText('first', { exact: true })).toBeVisible();
51
+ await expectTabs();
52
+ });
53
+ it.each(['code=""', 'value=""', 'editable'])('counts the explicitly empty parent %s, with ordinary and empty child views', async (parentSource) => {
54
+ await mountBox(`
55
+ <q-syntax-box heading="Parent" ${parentSource}>
56
+ <q-syntax-view heading="First" code="sample"></q-syntax-view>
57
+ <q-syntax-view heading="Second"></q-syntax-view>
58
+ </q-syntax-box>
59
+ `);
60
+ await expectTabs('Parent', 'First', 'Second');
61
+ await expect.element(tab('Parent', true)).toBeVisible();
62
+ });
63
+ it('keeps the edited field, caret and committed value across keyboard tab changes', async () => {
64
+ const box = await mountBox(`
65
+ <q-syntax-box variant="plain">
66
+ <q-syntax-view heading="Draft" editable code="initial"></q-syntax-view>
67
+ <q-syntax-view heading="Events">Recorded</q-syntax-view>
68
+ </q-syntax-box>
69
+ `);
70
+ const changes = vi.fn();
71
+ box.addEventListener('qChange', changes);
72
+ const field = page.getByRole('textbox', { name: 'Draft' });
73
+ await field.fill('edited draft');
74
+ const textarea = field.element();
75
+ textarea.setSelectionRange(2, 5);
76
+ await tab('Draft').click();
77
+ await userEvent.keyboard('{ArrowRight}');
78
+ await expect.element(tab('Events', true)).toBeVisible();
79
+ await expect.element(page.getByText('Recorded', { exact: true })).toBeVisible();
80
+ expect(field.elements()).toHaveLength(0);
81
+ expect(textarea.isConnected).toBe(true);
82
+ await userEvent.keyboard('{Home}');
83
+ await vi.waitFor(() => expect(tab('Draft').element().matches(':focus')).toBe(true));
84
+ await expect.element(field).toHaveValue('edited draft');
85
+ expect(field.element()).toBe(textarea);
86
+ expect([textarea.selectionStart, textarea.selectionEnd]).toEqual([2, 5]);
87
+ expect(changes.mock.calls.map(([event]) => event.detail)).toEqual(['edited draft']);
88
+ expect(box.code).toBeUndefined();
89
+ });
90
+ it('preserves view identity through duplicate labels, renames, reordering and removal', async () => {
91
+ const box = await mountBox(`
92
+ <q-syntax-box>
93
+ <q-syntax-view heading="Same" view-key="one" code="first body"></q-syntax-view>
94
+ <q-syntax-view heading="Same" view-key="two" code="second body"></q-syntax-view>
95
+ <q-syntax-view heading="Last" code="third body"></q-syntax-view>
96
+ </q-syntax-box>
97
+ `);
98
+ await expectTabs('Same', 'Same', 'Last');
99
+ await tab('Same').nth(1).click();
100
+ const [first, second, third] = Array.from(box.querySelectorAll('q-syntax-view'));
101
+ second.heading = 'Renamed';
102
+ box.prepend(third);
103
+ await expectTabs('Last', 'Same', 'Renamed');
104
+ await expect.element(tab('Renamed', true)).toBeVisible();
105
+ await expect.element(page.getByText('second body', { exact: true })).toBeVisible();
106
+ second.remove();
107
+ await expect.element(tab('Same', true)).toBeVisible();
108
+ await expect.element(page.getByText('first body', { exact: true })).toBeVisible();
109
+ first.remove();
110
+ await expectTabs();
111
+ await expect.element(page.getByText('third body', { exact: true })).toBeVisible();
112
+ });
113
+ it('keeps nested tab sets independent and associates each active tab with its named panel', async () => {
114
+ await mountBox(`
115
+ <q-syntax-box>
116
+ <q-syntax-view heading="Code" view-key="code" code="outer"></q-syntax-view>
117
+ <q-syntax-view heading="Nested" view-key="nested">
118
+ <q-syntax-box>
119
+ <q-syntax-view heading="Inner code" view-key="code" code="inner"></q-syntax-view>
120
+ <q-syntax-view heading="Inner events" view-key="events"></q-syntax-view>
121
+ </q-syntax-box>
122
+ </q-syntax-view>
123
+ </q-syntax-box>
124
+ `);
125
+ await expectTabs('Code', 'Nested');
126
+ await tab('Nested').click();
127
+ await tab('Inner events').click();
128
+ for (const name of ['Nested', 'Inner events']) {
129
+ await expect.element(tab(name, true)).toBeVisible();
130
+ const panel = page.getByRole('tabpanel', { name, exact: true });
131
+ await expect.element(panel).toBeVisible();
132
+ await vi.waitFor(() => {
133
+ const selectedTab = tab(name).element();
134
+ expect(selectedTab.ariaControlsElements).toContain(panel.element());
135
+ });
136
+ }
137
+ await tab('Code').click();
138
+ await expectTabs('Code', 'Nested');
139
+ await tab('Nested').click();
140
+ await expect.element(tab('Inner events', true)).toBeVisible();
141
+ });
142
+ it('keeps Copy data and delayed feedback on the originating view', async () => {
143
+ const box = await mountBox('<q-syntax-box heading="Source" copyable>own text<q-button slot="actions">Unrelated action</q-button><q-syntax-view heading="Other" copyable code="second source"></q-syntax-view></q-syntax-box>');
144
+ await expectTabs('Source', 'Other');
145
+ let finishCopy;
146
+ const pending = new Promise(resolve => { finishCopy = resolve; });
147
+ const clipboard = vi.spyOn(navigator.clipboard, 'writeText').mockReturnValue(pending);
148
+ await page.getByRole('button', { name: 'Copy', exact: true }).click();
149
+ expect(clipboard).toHaveBeenCalledWith('own text');
150
+ await tab('Other').click();
151
+ finishCopy();
152
+ await expect.element(page.getByRole('button', { name: 'Copy', exact: true })).toBeVisible();
153
+ await tab('Source').click();
154
+ await expect.element(page.getByRole('button', { name: 'Copied!', exact: true })).toBeVisible();
155
+ expect(box.querySelector('q-syntax-view').code).toBe('second source');
156
+ });
157
+ it('submits each named native form field once and resets the inactive editor', async () => {
158
+ const box = await mountBox(`
159
+ <form><fieldset><q-syntax-box name="container">
160
+ <q-syntax-view heading="One" view-key="first-tab" editable name="source" code="a"></q-syntax-view>
161
+ <q-syntax-view heading="Two" view-key="second-tab" editable name="source" code="b"></q-syntax-view>
162
+ <q-syntax-view heading="Disabled" editable disabled name="disabled" code="omit"></q-syntax-view>
163
+ </q-syntax-box></fieldset></form>
164
+ `);
165
+ const form = box.closest('form');
166
+ const [first, second] = Array.from(box.querySelectorAll('q-syntax-view'));
167
+ await expectTabs('One', 'Two', 'Disabled');
168
+ await page.getByRole('textbox', { name: 'One' }).fill('edited');
169
+ await tab('Two').click();
170
+ await page.getByRole('textbox', { name: 'Two' }).fill('also edited');
171
+ const data = new FormData(form);
172
+ expect(data.getAll('source')).toEqual(['edited', 'also edited']);
173
+ expect(data.has('container')).toBe(false);
174
+ expect(data.has('disabled')).toBe(false);
175
+ const fieldset = form.querySelector('fieldset');
176
+ fieldset.disabled = true;
177
+ expect(new FormData(form).has('source')).toBe(false);
178
+ fieldset.disabled = false;
179
+ expect(new FormData(form).getAll('source')).toEqual(['edited', 'also edited']);
180
+ form.reset();
181
+ await vi.waitFor(() => expect([first.code, second.code]).toEqual(['a', 'b']));
182
+ await expectTabs('One', 'Two', 'Disabled');
183
+ await expect.element(tab('Two', true)).toBeVisible();
184
+ });
185
+ it('uses view fields in q-form and reveals an inactive invalid editor only when reporting', async () => {
186
+ await mountBox(`
187
+ <q-form><q-syntax-box name="output">
188
+ <q-syntax-view heading="Draft" editable name="draft" code="initial"></q-syntax-view>
189
+ <q-syntax-view heading="Required" editable required name="source"></q-syntax-view>
190
+ </q-syntax-box></q-form>
191
+ `);
192
+ const form = document.querySelector('q-form');
193
+ await form.componentOnReady();
194
+ await expectTabs('Draft', 'Required');
195
+ expect(await form.getValues()).toEqual({ draft: 'initial', source: '' });
196
+ expect(await form.checkValidity()).toBe(false);
197
+ await expect.element(tab('Draft', true)).toBeVisible();
198
+ expect(await form.reportValidity()).toBe(false);
199
+ await expect.element(tab('Required', true)).toBeVisible();
200
+ await page.getByRole('textbox', { name: 'Required' }).fill('ready');
201
+ expect(await form.checkValidity()).toBe(true);
202
+ await form.resetForm();
203
+ expect(await form.getValues()).toEqual({ draft: 'initial', source: '' });
204
+ await expectTabs('Draft', 'Required');
205
+ });
206
+ it.each(['reportValidity', 'requestSubmit'])('reveals the invalid view during native %s', async (action) => {
207
+ const box = await mountBox(`
208
+ <form><q-syntax-box>
209
+ <q-syntax-view heading="Preview" code="source"></q-syntax-view>
210
+ <q-syntax-view heading="Editor" editable required name="source"></q-syntax-view>
211
+ </q-syntax-box></form>
212
+ `);
213
+ const form = box.closest('form');
214
+ await expectTabs('Preview', 'Editor');
215
+ expect(form.checkValidity()).toBe(false);
216
+ await expect.element(tab('Preview', true)).toBeVisible();
217
+ const submit = vi.fn((event) => event.preventDefault());
218
+ form.addEventListener('submit', submit);
219
+ if (action === 'reportValidity')
220
+ expect(form.reportValidity()).toBe(false);
221
+ else
222
+ form.requestSubmit();
223
+ await expect.element(tab('Editor', true)).toBeVisible();
224
+ const editor = page.getByRole('textbox', { name: 'Editor' });
225
+ await vi.waitFor(() => expect(editor.element().matches(':focus')).toBe(true));
226
+ expect(submit).not.toHaveBeenCalled();
227
+ });
228
+ });
@@ -0,0 +1,64 @@
1
+ import { Host, Mixin, h } from "@stencil/core";
2
+ import { withSyntaxContent } from "../syntax-box/syntax-content";
3
+ import { syntaxOwner } from "../syntax-box/internals/views";
4
+ /**
5
+ * Displays one editable or read-only view, on its own or as a child of a Syntax Box.
6
+ * @slot - Read-only content when code is omitted.
7
+ * @slot actions - Actions for this view.
8
+ */
9
+ export class QSyntaxView extends Mixin(withSyntaxContent) {
10
+ constructor() {
11
+ super();
12
+ }
13
+ el;
14
+ internals;
15
+ /** Optional identity for preserving selection when replacing a view element. */
16
+ viewKey;
17
+ render() {
18
+ const owner = syntaxOwner(this.el);
19
+ const variant = owner?.variant ?? this.variant;
20
+ if (owner) {
21
+ return h(Host, { class: "embedded-view" }, variant === 'panel' && this.renderActions(), this.renderContent(variant));
22
+ }
23
+ return h(Host, null, h("div", { class: variant === 'panel' ? 'panel-container syntax-layout' : 'plain-container syntax-layout' }, variant === 'panel' && h("div", { class: "panel-header" }, h("span", null, this.heading)), variant === 'panel' && this.renderActions(), this.renderContent(variant)));
24
+ }
25
+ static get is() { return "q-syntax-view"; }
26
+ static get encapsulation() { return "shadow"; }
27
+ static get delegatesFocus() { return true; }
28
+ static get formAssociated() { return true; }
29
+ static get originalStyleUrls() {
30
+ return {
31
+ "$": ["../syntax-box/syntax-box.css"]
32
+ };
33
+ }
34
+ static get styleUrls() {
35
+ return {
36
+ "$": ["../syntax-box/syntax-box.css"]
37
+ };
38
+ }
39
+ static get properties() {
40
+ return {
41
+ "viewKey": {
42
+ "type": "string",
43
+ "mutable": false,
44
+ "complexType": {
45
+ "original": "string",
46
+ "resolved": "string",
47
+ "references": {}
48
+ },
49
+ "required": false,
50
+ "optional": true,
51
+ "docs": {
52
+ "tags": [],
53
+ "text": "Optional identity for preserving selection when replacing a view element."
54
+ },
55
+ "getter": false,
56
+ "setter": false,
57
+ "reflect": true,
58
+ "attribute": "view-key"
59
+ }
60
+ };
61
+ }
62
+ static get elementRef() { return "el"; }
63
+ static get attachInternalsMemberName() { return "internals"; }
64
+ }
@@ -32,11 +32,11 @@ export class QStepDiagram {
32
32
  // ===================== [6] RENDER (Visual Template Only) =====================
33
33
  render() {
34
34
  const orientation = this.orientation ?? this.layout;
35
- return (h("div", { key: 'ed8ff2e12833252ca10e86f3951288ede2d4ab48', class: {
35
+ return (h("div", { key: '16a7d86040c706fa80c81771fbf47c53efbedd7e', class: {
36
36
  'step-diagram': true,
37
37
  [`orientation-${orientation}`]: true,
38
38
  [`layout-${orientation}`]: true,
39
- }, role: "list", "aria-label": this.ariaLabel }, h("slot", { key: '55d8b87076e22eac2dc51bb45c916c8ba905f365', onSlotchange: this.handleSlotChange })));
39
+ }, role: "list", "aria-label": this.ariaLabel }, h("slot", { key: 'a5bae169f2613928be95ded5bef5644f3f382b6f', onSlotchange: this.handleSlotChange })));
40
40
  }
41
41
  static get is() { return "q-step-diagram"; }
42
42
  static get encapsulation() { return "shadow"; }
@@ -36,7 +36,7 @@ export class QStepDiagramItem {
36
36
  // ===================== [6] RENDER (Visual Template Only) =====================
37
37
  render() {
38
38
  const orientation = this.orientation ?? this.layout;
39
- return (h("div", { key: '2b47e76bd480e99492030741db96c8acb5f94912', class: { 'step-item': true, [`orientation-${orientation}`]: true } }, h("div", { key: '0cbb8c7289116b0acf467e7970bd21c1f17eae0c', class: "step-line-container" }, h("div", { key: 'af081c1b488179b59e191d0ca043ab3a1590cfb1', class: "step-badge", "aria-hidden": "true", part: "badge" }, h("slot", { key: '93cf7e4c34ffafe1c5ffbfdbab674a5876fa6900', name: "badge" }, h("div", { key: 'd3d8527c02f46b382e83978dc6cec17217922de4', class: "badge-dot" }))), h("div", { key: '141528bb721c9d8fd691c4b1e30e7a6519fc9635', class: "step-connector", part: "connector" })), h("div", { key: 'c0884a83703be384bdb734292df203aba0607ffe', class: "step-content", onClick: this.handleTrigger, onKeyDown: this.handleKeyDown, tabindex: "0", role: "button", part: "content", "aria-current": this.status === 'active' ? 'step' : undefined, "aria-disabled": this.status === 'pending' ? 'true' : undefined }, h("div", { key: '5c1a04b17525d98f6ced906227bb09a8e480e4a7', class: "step-title", part: "title" }, h("slot", { key: '1bf134c5341ecd854e9b70cc8ee4ce20c7c04e9d', name: "title" })), h("div", { key: 'a83d70db2662e4dd9552da512c962125ac9acb27', class: "step-body", part: "body" }, h("slot", { key: 'a74c8a4b0a6668ee5ab97ca28c478a3783228342' })))));
39
+ return (h("div", { key: 'd6812cba0645647a7bec4bdd645fe2702dbc9f3b', class: { 'step-item': true, [`orientation-${orientation}`]: true } }, h("div", { key: '21ba4a08e5f54511a57e2f197954a75b7ce99bdd', class: "step-line-container" }, h("div", { key: 'ceb41b031624ca88fb1dd3929aba178540f9b333', class: "step-badge", "aria-hidden": "true", part: "badge" }, h("slot", { key: '06ffa5adba0ece2374574ed9e570a48cba1f7609', name: "badge" }, h("div", { key: '5dc64cb8e275f601f620208af6b1ce077cfe0111', class: "badge-dot" }))), h("div", { key: '478699b043fdc4703c0ed8a4be134adfbbe400a4', class: "step-connector", part: "connector" })), h("div", { key: 'f7b639e73daf75240b5d9d842d388812b738f279', class: "step-content", onClick: this.handleTrigger, onKeyDown: this.handleKeyDown, tabindex: "0", role: "button", part: "content", "aria-current": this.status === 'active' ? 'step' : undefined, "aria-disabled": this.status === 'pending' ? 'true' : undefined }, h("div", { key: '19e05789e710e014d128f8916e794fdead46c2b4', class: "step-title", part: "title" }, h("slot", { key: '8db9ab2894647d3ea040d710c436c7e6cfbc5420', name: "title" })), h("div", { key: 'bfa7dfe730a4a5ddbccdc236fc46d0597aadfdfe', class: "step-body", part: "body" }, h("slot", { key: '064fb46dfdb558b8dbce9519fdb51886fff5d405' })))));
40
40
  }
41
41
  static get is() { return "q-step-diagram-item"; }
42
42
  static get encapsulation() { return "shadow"; }
@@ -741,12 +741,12 @@ export class QDropdown {
741
741
  const displayLabel = selectedLabel || this.placeholder;
742
742
  const hasSelection = selectedOption !== undefined || Boolean(this.externalSearch && this.selectedLabelCache?.value === this.value);
743
743
  const ariaLabel = this.ariaLabel?.trim() || undefined;
744
- return (h("div", { key: '5b133f37727c1ec3f4dfe3b4ab3d6ea245befd70', style: feedbackStyle(this.reserveFeedback), class: {
744
+ return (h("div", { key: 'e370fa24a234615e5ef77cb172709bfeb9d5e90d', style: feedbackStyle(this.reserveFeedback), class: {
745
745
  'dropdown-wrapper': true,
746
746
  'is-open': this.isOpen,
747
747
  'is-disabled': this.isDisabled,
748
748
  [`size-${this.size}`]: true
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: {
749
+ }, onKeyDown: this.handleKeyDown, onFocusout: this.handleFocusOut }, this.label && (h("label", { key: '4ada73143b430d0d9a2f854cd9c3c8e784753ff8', class: { 'dropdown-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), this.width === 'fit-options' && (h("span", { key: 'a409eeaa7ee55ea5ec01a138d9084f52930fc2fe', class: "fit-options-clip", "aria-hidden": "true" }, h("span", { key: '9e46b189537a80386e4bdf8dbf139239d364d859', class: "dropdown-trigger fit-options-measure", ref: el => (this.fitOptionsMeasure = el) }, h("span", { key: '48a1dea8e9a01b83faa0c90e8189e130f63080a5', class: "fit-options-labels" }, (allOptions.length ? allOptions.map(option => this.getOptionLabel(option)) : [selectedLabel || this.placeholder]).map(text => h("span", null, text))), h("span", { key: 'ed06556458c71d1669ad6d9c9ff2c5cbffdddb34', 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: '857a01352aa02d4699d344e22d1257f1759b3d8f', 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: {
750
750
  'menu-item': true,
751
751
  'is-selected': !this.multiple && option.value === this.value,
752
752
  'is-focused': index === this.focusedIndex
@@ -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: '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) => {
297
+ return (h(Host, { key: 'caa88a8ae18c7b99a1e84be7ac1bda6f95e367f3', 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: '1212c44b85f736017f148c012ff99187fd783577', class: "form-shell" }, h("div", { key: '5d75b2275a861b085b0c04aedbc770735a425c7f', class: { 'form-header': true, 'is-hidden': !hasHeaderContent, 'q-label-hidden': this.labelHidden }, part: "header" }, h("slot", { key: '3e6137b02e4ea8cd2a2aca93018e9d1c57cf61e8', name: "header", ref: (el) => (this.headerSlot = el), onSlotchange: this.handleHeaderSlotChange }, this.label && h("h2", { key: '6fe3cb07800b3f8be3dd4ab484450c14330ec23f', id: this.titleId, class: "form-title" }, this.label))), h("form", { key: 'ac15f87800972f62f6751d23bbc98919db96b798', 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: '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 }))))));
301
+ }, onReset: this.handleReset }, h("div", { key: '89d410306a5538cbcb36b5ccc71fac0c99037169', class: "form-body", part: "body" }, h("slot", { key: '102763dc5d8eda81ac07c07fb4c977936b9611fb' })), h("div", { key: '3058cf8c1dbc4042698658406ad7db5abda19da6', class: { 'form-actions': true, 'is-hidden': !this.hasActionsSlot }, part: "actions" }, h("slot", { key: '8f304bcac91ab7f376396eff945e641b7fe838c7', 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-slider', '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', 'q-syntax-view']);
5
5
  const actionInputTypes = new Set(['button', 'image', 'reset', 'submit']);
6
6
  function supported(element) {
7
7
  const tag = element.tagName.toLowerCase();
@@ -115,7 +115,7 @@ export function getNamedControls(formEl, hostEl) {
115
115
  return getFormControls(formEl, hostEl).filter(control => Boolean(control.getAttribute('name')));
116
116
  }
117
117
  export function shouldSkipControl(control, tagName = control.tagName.toLowerCase()) {
118
- return tagName === 'q-syntax-box' && !control.editable;
118
+ return (tagName === 'q-syntax-box' || tagName === 'q-syntax-view') && !control.editable;
119
119
  }
120
120
  export function getControlFromEvent(ev, formEl, hostEl) {
121
121
  const controls = getFocusableTextControls(formEl, hostEl);
@@ -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: 'b71bf01d50e267da7463549040d3158e2794abbd', style: feedbackStyle(this.reserveFeedback), class: {
303
+ return (h("div", { key: 'd7dd69ef5097648f591b91bc7111221d655c28e5', 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: '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: {
308
+ } }, this.label && (h("label", { key: '688e82d0a1c1dc5276b8aa83033fcaa2c4753dec', class: { 'input-label': true, 'q-label-hidden': this.labelHidden }, htmlFor: "q-field", part: "label" }, this.label)), h("div", { key: '04d6e3ef4715a0ab1688f92af3e6c52f0cf7bbdf', class: "input-control", part: "control" }, h("span", { key: '3a154ff6f6f35ab8613e08ed83c60bd726701bb9', class: "prefix-container", style: { display: this.hasPrefix ? 'flex' : 'none' }, part: "prefix" }, h("slot", { key: 'c2913eff9fabfe4da83feb6b0885a7702795da49', 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: '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)));
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: 'ad959e78f209e71220aa64d2abb00ec5222b73fe', class: "input-spinners", part: "spinners" }, h("button", { key: '28152f46138eda374cc3bad4604d37009d4885d3', class: "spinner-btn spinner-up", type: "button", onClick: this.handleIncrement, disabled: isMaxDisabled, "aria-label": "Increase value" }, h("svg", { key: '1c625744091c344371e50fa8aff7e899d8cd9ad4', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: 'd9cf0598907d33c6cc6da8fb4ebd3b807f7bf9df', d: "M18 15l-6-6-6 6" }))), h("button", { key: '38ef449f0f90c62829953cbe9d45172ec3b2c63c', class: "spinner-btn spinner-down", type: "button", onClick: this.handleDecrement, disabled: isMinDisabled, "aria-label": "Decrease value" }, h("svg", { key: '3b21a79096f52ea52ff3c2923b85428f55d594eb', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "aria-hidden": "true" }, h("path", { key: '4e168fb8c03baf45a8e03d6fc3a01f8c3b852d6d', d: "M6 9l6 6 6-6" }))))), h("span", { key: '7175a82cbf29704168baf007786040ccf61cdf5c', class: "suffix-container", style: { display: showSuffixContainer ? 'flex' : 'none' }, part: "suffix" }, showClearBtn && (h("button", { key: '85f4b3102f24b044b25c81cb8c1a0ea70febb9c9', class: "clear-btn", type: "button", onClick: this.handleClear, "aria-label": "Clear input" }, h("svg", { key: 'da9dfae9dfab998f855139c258588207ad9f18cc', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("path", { key: 'bdf2c620673dc36845b16755812ce02d76332c00', d: "M18 6L6 18M6 6l12 12" })))), showPasswordToggle && (h("button", { key: '31787093d6093385441be9f1a0779f99596798fd', 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: 'd318dd6f57197663bec5522110b63e4a36022d0d', style: { display: !showClearBtn && this.hasSuffix ? 'block' : 'none' } }, h("slot", { key: '4a9638be261e618a587f17f32318172e28d81d9e', 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"; }
@@ -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: '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" }))));
114
+ const decBtn = (h("button", { key: 'aa96b2c4f1aa661fabfdc6ab1002fc189866cc7e', type: "button", class: "quantity-btn quantity-btn-decrement", onClick: this.decrement, disabled: isMinDisabled, "aria-label": "Decrement quantity" }, h("svg", { key: '18369c8ef4efcb475d8dfa2b045cba092308263f', 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: '0fbe71a23983e9d6c3538ab0f41f691f796636ca', x1: "5", y1: "12", x2: "19", y2: "12" }))));
115
+ const incBtn = (h("button", { key: 'a042fd3c6b660466a8a6e2537423732519c3e1d9', type: "button", class: "quantity-btn quantity-btn-increment", onClick: this.increment, disabled: isMaxDisabled, "aria-label": "Increment quantity" }, h("svg", { key: '34755b811d4c2d8145adf548d4bcabc964bcbc56', 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: '4f834bd44b324733ab329b0da87c3c8d9385ed86', x1: "12", y1: "5", x2: "12", y2: "19" }), h("line", { key: 'de6fe27d9ded26c146686854ff16b30b8f9493c9', x1: "5", y1: "12", x2: "19", y2: "12" }))));
116
116
  const calculatedWidth = orientation === 'horizontal' ? this.getCalculatedWidth() : '100%';
117
- return (h("div", { key: 'c1780e7303cfc38f06211661d470ae4529656084', class: {
117
+ return (h("div", { key: 'e889c181210e3a74b46281cf1aa974a4a2a90b84', 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: '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));
122
+ }, onClick: this.handleClick }, orientation === 'vertical' ? incBtn : decBtn, h("input", { key: '56640ca6165e5d2cd2cc22b5e52ee38d450dc46e', 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"; }