@webquark/core 1.1.0-dev.4 → 1.1.0-dev.6

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 (485) hide show
  1. package/README.md +41 -9
  2. package/dist/cjs/{action.props-CkEZpMY6.js → action.props-CtwTiyf6.js} +1 -1
  3. package/dist/cjs/field-CiEtk37y.js +14 -0
  4. package/dist/cjs/{index-B7ex88C2.js → index-BLlc_shC.js} +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/q-accordion.cjs.entry.js +18 -0
  7. package/dist/cjs/q-alert.cjs.entry.js +1 -1
  8. package/dist/cjs/q-avatar.cjs.entry.js +6 -6
  9. package/dist/cjs/q-banner.cjs.entry.js +19 -0
  10. package/dist/cjs/q-button_2.cjs.entry.js +7 -7
  11. package/dist/cjs/q-card.cjs.entry.js +17 -6
  12. package/dist/cjs/q-carousel.cjs.entry.js +3 -3
  13. package/dist/cjs/q-chip.cjs.entry.js +2 -2
  14. package/dist/cjs/q-conversation-bubble.cjs.entry.js +6 -6
  15. package/dist/cjs/q-data-table.cjs.entry.js +4 -4
  16. package/dist/cjs/q-dialog.cjs.entry.js +22 -8
  17. package/dist/cjs/q-dropdown.cjs.entry.js +50 -6
  18. package/dist/cjs/q-form.cjs.entry.js +11 -5
  19. package/dist/cjs/q-grid.cjs.entry.js +24 -0
  20. package/dist/cjs/q-icon.cjs.entry.js +16 -6
  21. package/dist/cjs/q-inline.cjs.entry.js +22 -0
  22. package/dist/cjs/q-input_2.cjs.entry.js +14 -7
  23. package/dist/cjs/q-link.cjs.entry.js +5 -5
  24. package/dist/cjs/q-map.cjs.entry.js +2 -2
  25. package/dist/cjs/q-media.cjs.entry.js +21 -0
  26. package/dist/cjs/q-navbar.cjs.entry.js +229 -8
  27. package/dist/cjs/q-pagination.cjs.entry.js +2 -2
  28. package/dist/cjs/q-panel.cjs.entry.js +17 -8
  29. package/dist/cjs/q-quantity-selector.cjs.entry.js +15 -8
  30. package/dist/cjs/q-radio-group.cjs.entry.js +14 -7
  31. package/dist/cjs/q-reel.cjs.entry.js +3 -3
  32. package/dist/cjs/q-scrollable.cjs.entry.js +4 -4
  33. package/dist/cjs/q-section.cjs.entry.js +20 -0
  34. package/dist/cjs/q-sidepanel.cjs.entry.js +14 -7
  35. package/dist/cjs/q-stack.cjs.entry.js +20 -0
  36. package/dist/cjs/q-step-diagram-item.cjs.entry.js +7 -4
  37. package/dist/cjs/q-step-diagram.cjs.entry.js +21 -11
  38. package/dist/cjs/q-syntax-box.cjs.entry.js +1 -1
  39. package/dist/cjs/q-tabs.cjs.entry.js +3 -3
  40. package/dist/cjs/q-textarea.cjs.entry.js +61 -7
  41. package/dist/cjs/q-thumbnail.cjs.entry.js +3 -3
  42. package/dist/cjs/q-toast.cjs.entry.js +3 -3
  43. package/dist/cjs/q-toggle.cjs.entry.js +14 -6
  44. package/dist/cjs/q-toolbar.cjs.entry.js +8 -4
  45. package/dist/cjs/tokens-DGECOqpA.js +42 -0
  46. package/dist/cjs/webquark.cjs.js +2 -2
  47. package/dist/collection/collection-manifest.json +16 -9
  48. package/dist/collection/components/actions/button/button.css +55 -4
  49. package/dist/collection/components/actions/button/button.js +4 -4
  50. package/dist/collection/components/actions/link/link.js +8 -5
  51. package/dist/collection/components/{data-display → communication}/alert/alert.js +2 -2
  52. package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.js +40 -40
  53. package/dist/collection/components/{overlays → communication}/toast/test/toast.cmp.test.js +1 -1
  54. package/dist/collection/components/{overlays → communication}/toast/toast.js +14 -14
  55. package/dist/collection/components/content/banner/banner.css +1 -0
  56. package/dist/collection/components/content/banner/banner.js +84 -0
  57. package/dist/collection/components/{layout → content}/card/card.css +12 -0
  58. package/dist/collection/components/content/card/card.js +308 -0
  59. package/dist/collection/components/{layout → content}/carousel/carousel.js +4 -4
  60. package/dist/collection/components/data-display/accordion/accordion.css +1 -0
  61. package/dist/collection/components/data-display/accordion/accordion.js +54 -0
  62. package/dist/collection/components/{actions → data-display}/chip/chip.js +5 -5
  63. package/dist/collection/components/data-display/data-table/data-table.js +3 -3
  64. package/dist/collection/components/data-display/map/map.js +1 -1
  65. package/dist/collection/components/data-display/pagination/pagination.js +1 -1
  66. package/dist/collection/components/indicators/step-diagram/step-diagram.js +50 -11
  67. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.css +7 -7
  68. package/dist/collection/components/indicators/step-diagram-item/step-diagram-item.js +36 -4
  69. package/dist/collection/components/inputs/dropdown/dropdown.css +77 -34
  70. package/dist/collection/components/inputs/dropdown/dropdown.js +202 -6
  71. package/dist/collection/components/inputs/form/form.css +85 -0
  72. package/dist/collection/components/{layout → inputs}/form/form.js +105 -13
  73. package/dist/collection/components/inputs/form/form.types.js +1 -0
  74. package/dist/collection/components/inputs/input/input.css +78 -62
  75. package/dist/collection/components/inputs/input/input.js +77 -9
  76. package/dist/collection/components/inputs/quantity-selector/quantity-selector.css +43 -3
  77. package/dist/collection/components/inputs/quantity-selector/quantity-selector.js +70 -7
  78. package/dist/collection/components/inputs/radio-group/radio-group.css +77 -30
  79. package/dist/collection/components/inputs/radio-group/radio-group.js +77 -9
  80. package/dist/collection/components/inputs/textarea/textarea.css +85 -1
  81. package/dist/collection/components/inputs/textarea/textarea.js +149 -7
  82. package/dist/collection/components/inputs/toggle/toggle.css +80 -48
  83. package/dist/collection/components/inputs/toggle/toggle.js +72 -6
  84. package/dist/collection/components/layout/grid/grid.css +11 -0
  85. package/dist/collection/components/layout/grid/grid.js +152 -0
  86. package/dist/collection/components/layout/inline/inline.css +4 -0
  87. package/dist/collection/components/layout/inline/inline.js +118 -0
  88. package/dist/collection/components/layout/navbar/navbar.css +119 -0
  89. package/dist/collection/components/layout/navbar/navbar.js +310 -9
  90. package/dist/collection/components/layout/navbar/test/navbar.cmp.test.js +317 -1
  91. package/dist/collection/components/layout/panel/panel.css +13 -12
  92. package/dist/collection/components/layout/panel/panel.js +139 -10
  93. package/dist/collection/components/layout/scrollable/scrollable.js +3 -3
  94. package/dist/collection/components/layout/section/section.css +1 -0
  95. package/dist/collection/components/layout/section/section.js +98 -0
  96. package/dist/collection/components/layout/section/section.types.js +1 -0
  97. package/dist/collection/components/layout/sidepanel/internals/nav-items.js +1 -1
  98. package/dist/collection/components/layout/sidepanel/sidepanel.js +90 -10
  99. package/dist/collection/components/layout/stack/stack.css +4 -0
  100. package/dist/collection/components/layout/stack/stack.js +76 -0
  101. package/dist/collection/components/layout/tabs/tabs.js +2 -2
  102. package/dist/collection/components/layout/toolbar/toolbar.css +24 -1
  103. package/dist/collection/components/layout/toolbar/toolbar.js +81 -3
  104. package/dist/collection/components/media/avatar/avatar.js +43 -43
  105. package/dist/collection/components/media/icon/icon.js +79 -18
  106. package/dist/collection/components/media/media/media.css +1 -0
  107. package/dist/collection/components/media/media/media.js +125 -0
  108. package/dist/collection/components/media/media/media.types.js +1 -0
  109. package/dist/collection/components/media/reel/reel.js +2 -2
  110. package/dist/collection/components/media/thumbnail/thumbnail.js +2 -2
  111. package/dist/collection/components/overlays/dialog/dialog.css +16 -0
  112. package/dist/collection/components/overlays/dialog/dialog.js +144 -14
  113. package/dist/collection/components/overlays/tooltip/tooltip.js +2 -2
  114. package/dist/collection/components/shared/field.js +8 -0
  115. package/dist/collection/components/shared/test/orientation.cmp.test.js +36 -0
  116. package/dist/collection/index.js +1 -1
  117. package/dist/collection/playground/components/playground-event-log/playground-event-log.js +1 -1
  118. package/dist/collection/playground/components/playground-sidebar/playground-sidebar.js +5 -3
  119. package/dist/collection/playground/components/theme-designer/theme-designer.js +13 -35
  120. package/dist/collection/playground/components/theme-designer/token-row.js +26 -7
  121. package/dist/collection/playground/playground.bundled.js +846 -34
  122. package/dist/collection/theme/test/foundation.cmp.test.js +347 -0
  123. package/dist/collection/theme/tokens.js +828 -0
  124. package/dist/components/index.js +1 -1
  125. package/dist/components/p-0PieXMX9.js +1 -0
  126. package/dist/components/p-BOYjkCNa.js +1 -0
  127. package/dist/components/p-Bw4TVbfm.js +1 -0
  128. package/dist/components/{p-7oXL29Gu.js → p-BxFGkrUe.js} +1 -1
  129. package/dist/components/{p-CQofbR9q.js → p-CK7avZdv.js} +1 -1
  130. package/dist/components/p-Cx1vCuMp.js +1 -0
  131. package/dist/components/{p-Czf3kP0S.js → p-D0Q2vrt5.js} +1 -1
  132. package/dist/components/p-GU98U1DJ.js +1 -0
  133. package/dist/components/{p-C8fq-feq.js → p-NEolaUak.js} +1 -1
  134. package/dist/components/p-f95uguY1.js +1 -0
  135. package/dist/components/q-accordion.d.ts +11 -0
  136. package/dist/components/q-accordion.js +1 -0
  137. package/dist/components/q-alert.js +1 -1
  138. package/dist/components/q-avatar.js +1 -1
  139. package/dist/components/q-banner.d.ts +11 -0
  140. package/dist/components/q-banner.js +1 -0
  141. package/dist/components/q-button.js +1 -1
  142. package/dist/components/q-card.js +1 -1
  143. package/dist/components/q-carousel.js +1 -1
  144. package/dist/components/q-chip.js +1 -1
  145. package/dist/components/q-conversation-bubble.js +1 -1
  146. package/dist/components/q-data-table.js +1 -1
  147. package/dist/components/q-dialog.js +1 -1
  148. package/dist/components/q-dropdown.js +1 -1
  149. package/dist/components/q-form.js +1 -1
  150. package/dist/components/q-grid.d.ts +11 -0
  151. package/dist/components/q-grid.js +1 -0
  152. package/dist/components/q-icon.js +1 -1
  153. package/dist/components/q-inline.d.ts +11 -0
  154. package/dist/components/q-inline.js +1 -0
  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.d.ts +11 -0
  159. package/dist/components/q-media.js +1 -0
  160. package/dist/components/q-navbar.js +1 -1
  161. package/dist/components/q-pagination.js +1 -1
  162. package/dist/components/q-panel.js +1 -1
  163. package/dist/components/q-progress.js +1 -1
  164. package/dist/components/q-quantity-selector.js +1 -1
  165. package/dist/components/q-radio-group.js +1 -1
  166. package/dist/components/q-reel.js +1 -1
  167. package/dist/components/q-scrollable.js +1 -1
  168. package/dist/components/q-section.d.ts +11 -0
  169. package/dist/components/q-section.js +1 -0
  170. package/dist/components/q-sidepanel.js +3 -3
  171. package/dist/components/q-stack.d.ts +11 -0
  172. package/dist/components/q-stack.js +1 -0
  173. package/dist/components/q-step-diagram-item.js +1 -1
  174. package/dist/components/q-step-diagram.js +1 -1
  175. package/dist/components/q-syntax-box.js +2 -2
  176. package/dist/components/q-tabs.js +1 -1
  177. package/dist/components/q-textarea.js +1 -1
  178. package/dist/components/q-thumbnail.js +1 -1
  179. package/dist/components/q-toast.js +1 -1
  180. package/dist/components/q-toggle.js +1 -1
  181. package/dist/components/q-toolbar.js +1 -1
  182. package/dist/components/q-tooltip.js +1 -1
  183. package/dist/esm/{action.props-CJoxGHR7.js → action.props-GP1ameE3.js} +1 -1
  184. package/dist/esm/field-DkpyvZiX.js +11 -0
  185. package/dist/esm/{index-VFWyFa-_.js → index-DbGG9Q40.js} +1 -1
  186. package/dist/esm/loader.js +3 -3
  187. package/dist/esm/q-accordion.entry.js +16 -0
  188. package/dist/esm/q-alert.entry.js +1 -1
  189. package/dist/esm/q-avatar.entry.js +6 -6
  190. package/dist/esm/q-banner.entry.js +17 -0
  191. package/dist/esm/q-button_2.entry.js +7 -7
  192. package/dist/esm/q-card.entry.js +17 -6
  193. package/dist/esm/q-carousel.entry.js +3 -3
  194. package/dist/esm/q-chip.entry.js +2 -2
  195. package/dist/esm/q-conversation-bubble.entry.js +6 -6
  196. package/dist/esm/q-data-table.entry.js +4 -4
  197. package/dist/esm/q-dialog.entry.js +22 -8
  198. package/dist/esm/q-dropdown.entry.js +50 -6
  199. package/dist/esm/q-form.entry.js +11 -5
  200. package/dist/esm/q-grid.entry.js +22 -0
  201. package/dist/esm/q-icon.entry.js +16 -6
  202. package/dist/esm/q-inline.entry.js +20 -0
  203. package/dist/esm/q-input_2.entry.js +14 -7
  204. package/dist/esm/q-link.entry.js +5 -5
  205. package/dist/esm/q-map.entry.js +2 -2
  206. package/dist/esm/q-media.entry.js +19 -0
  207. package/dist/esm/q-navbar.entry.js +229 -8
  208. package/dist/esm/q-pagination.entry.js +2 -2
  209. package/dist/esm/q-panel.entry.js +17 -8
  210. package/dist/esm/q-quantity-selector.entry.js +15 -8
  211. package/dist/esm/q-radio-group.entry.js +14 -7
  212. package/dist/esm/q-reel.entry.js +3 -3
  213. package/dist/esm/q-scrollable.entry.js +4 -4
  214. package/dist/esm/q-section.entry.js +18 -0
  215. package/dist/esm/q-sidepanel.entry.js +14 -7
  216. package/dist/esm/q-stack.entry.js +18 -0
  217. package/dist/esm/q-step-diagram-item.entry.js +7 -4
  218. package/dist/esm/q-step-diagram.entry.js +21 -11
  219. package/dist/esm/q-syntax-box.entry.js +1 -1
  220. package/dist/esm/q-tabs.entry.js +3 -3
  221. package/dist/esm/q-textarea.entry.js +61 -7
  222. package/dist/esm/q-thumbnail.entry.js +3 -3
  223. package/dist/esm/q-toast.entry.js +3 -3
  224. package/dist/esm/q-toggle.entry.js +14 -6
  225. package/dist/esm/q-toolbar.entry.js +8 -4
  226. package/dist/esm/tokens-f95uguY1.js +38 -0
  227. package/dist/esm/webquark.js +3 -3
  228. package/dist/playground/build/p-0aea8464.entry.js +1 -0
  229. package/dist/playground/build/p-0aecd9b1.entry.js +1 -0
  230. package/dist/playground/build/p-0d98e500.entry.js +1 -0
  231. package/dist/playground/build/p-139fec38.entry.js +1 -0
  232. package/dist/{webquark/p-0053ec76.entry.js → playground/build/p-15502232.entry.js} +1 -1
  233. package/dist/playground/build/p-17340abf.entry.js +1 -0
  234. package/dist/playground/build/p-303dcac8.entry.js +1 -0
  235. package/dist/playground/build/p-408bf48a.entry.js +1 -0
  236. package/dist/playground/build/p-47253466.entry.js +1 -0
  237. package/dist/playground/build/p-5f6860f2.entry.js +13 -0
  238. package/dist/playground/build/p-6b619655.entry.js +1 -0
  239. package/dist/playground/build/p-6b63922b.entry.js +1 -0
  240. package/dist/playground/build/p-71e3d582.entry.js +1 -0
  241. package/dist/playground/build/p-737ca99e.entry.js +1 -0
  242. package/dist/playground/build/{p-41421759.entry.js → p-742e39f1.entry.js} +1 -1
  243. package/dist/playground/build/p-8115ec23.entry.js +1 -0
  244. package/dist/playground/build/{p-8ada8fc6.entry.js → p-8ad43d7f.entry.js} +1 -1
  245. package/dist/playground/build/{p-885572ee.entry.js → p-8bdababd.entry.js} +1 -1
  246. package/dist/playground/build/p-9418caa0.entry.js +1 -0
  247. package/dist/playground/build/p-96ef2b54.entry.js +1 -0
  248. package/dist/playground/build/p-97dae970.entry.js +1 -0
  249. package/dist/{webquark/p-b5066051.entry.js → playground/build/p-989bdc1a.entry.js} +1 -1
  250. package/dist/playground/build/{p-DoS2fiWw.js → p-BqvCR2U8.js} +1 -1
  251. package/dist/playground/build/p-DbGG9Q40.js +3 -0
  252. package/dist/playground/build/p-JgeOdXyP.js +1 -0
  253. package/dist/playground/build/p-a4b36120.entry.js +1 -0
  254. package/dist/playground/build/p-abf54361.entry.js +1 -0
  255. package/dist/playground/build/p-aed4b219.entry.js +1 -0
  256. package/dist/playground/build/p-b3a07d94.entry.js +1 -0
  257. package/dist/{webquark/p-8077aa3f.entry.js → playground/build/p-b465aebd.entry.js} +1 -1
  258. package/dist/playground/build/p-c1f3dca6.entry.js +1 -0
  259. package/dist/playground/build/p-c4899c2b.entry.js +1 -0
  260. package/dist/{webquark/p-1c9a82b8.entry.js → playground/build/p-c4fd89b8.entry.js} +1 -1
  261. package/dist/playground/build/p-cf8f7f2a.entry.js +1 -0
  262. package/dist/playground/build/{p-2e2b3ca9.entry.js → p-d4a915e5.entry.js} +1 -1
  263. package/dist/{webquark/p-6c0bc4b9.entry.js → playground/build/p-d7d436c5.entry.js} +1 -1
  264. package/dist/playground/build/{p-316a92e2.entry.js → p-de8813be.entry.js} +1 -1
  265. package/dist/{webquark/p-8ec7d250.entry.js → playground/build/p-eb71e335.entry.js} +1 -1
  266. package/dist/playground/build/p-ecbc0fee.entry.js +1 -0
  267. package/dist/{webquark/p-d837603c.entry.js → playground/build/p-ed327679.entry.js} +1 -1
  268. package/dist/{webquark/p-e0e6b68f.entry.js → playground/build/p-f911c90f.entry.js} +1 -1
  269. package/dist/playground/build/p-f95uguY1.js +1 -0
  270. package/dist/{webquark/p-13329777.entry.js → playground/build/p-ff1e2363.entry.js} +1 -1
  271. package/dist/playground/build/webquark.css +1 -1
  272. package/dist/playground/build/webquark.esm.js +1 -1
  273. package/dist/playground/playground/components.manifest.json +40 -35
  274. package/dist/playground/playground/specs/q-button.sandbox.json +3 -2
  275. package/dist/playground/playground/specs/q-card.sandbox.json +37 -3
  276. package/dist/playground/playground/specs/q-dialog.sandbox.json +16 -6
  277. package/dist/playground/playground/specs/q-dropdown.sandbox.json +12 -2
  278. package/dist/playground/playground/specs/q-form.sandbox.json +88 -10
  279. package/dist/playground/playground/specs/q-grid.sandbox.json +56 -0
  280. package/dist/playground/playground/specs/q-icon.sandbox.json +11 -11
  281. package/dist/playground/playground/specs/q-inline.sandbox.json +60 -0
  282. package/dist/playground/playground/specs/q-input.sandbox.json +12 -2
  283. package/dist/playground/playground/specs/q-navbar.sandbox.json +11 -3
  284. package/dist/playground/playground/specs/q-panel.sandbox.json +138 -17
  285. package/dist/playground/playground/specs/q-quantity-selector.sandbox.json +13 -2
  286. package/dist/playground/playground/specs/q-radio-group.sandbox.json +46 -10
  287. package/dist/playground/playground/specs/q-sidepanel.sandbox.json +7 -7
  288. package/dist/playground/playground/specs/q-stack.sandbox.json +56 -0
  289. package/dist/playground/playground/specs/q-step-diagram.sandbox.json +5 -5
  290. package/dist/playground/playground/specs/q-textarea.sandbox.json +20 -0
  291. package/dist/playground/playground/specs/q-toggle.sandbox.json +12 -2
  292. package/dist/playground/playground/specs/q-toolbar.sandbox.json +99 -14
  293. package/dist/playground/playground.js +846 -34
  294. package/dist/types/components/actions/button/button.types.d.ts +2 -1
  295. package/dist/types/components/actions/link/link.d.ts +1 -1
  296. package/dist/types/components/communication/toast/test/toast.cmp.test.d.ts +2 -0
  297. package/dist/types/components/communication/toast/test/toast.unit.test.d.ts +1 -0
  298. package/dist/types/components/content/banner/banner.d.ts +12 -0
  299. package/dist/types/components/content/banner/banner.types.d.ts +2 -0
  300. package/dist/types/components/{layout → content}/card/card.d.ts +11 -0
  301. package/dist/types/components/content/card/card.types.d.ts +1 -0
  302. package/dist/types/components/{layout → content}/card/card.utils.d.ts +1 -1
  303. package/dist/types/components/data-display/accordion/accordion.d.ts +9 -0
  304. package/dist/types/components/data-display/accordion/accordion.types.d.ts +1 -0
  305. package/dist/types/components/indicators/step-diagram/step-diagram.d.ts +6 -3
  306. package/dist/types/components/indicators/step-diagram/step-diagram.types.d.ts +3 -1
  307. package/dist/types/components/indicators/step-diagram-item/step-diagram-item.d.ts +4 -2
  308. package/dist/types/components/indicators/step-diagram-item/step-diagram-item.types.d.ts +3 -1
  309. package/dist/types/components/inputs/dropdown/dropdown.d.ts +13 -0
  310. package/dist/types/components/inputs/dropdown/dropdown.types.d.ts +2 -1
  311. package/dist/types/components/{layout → inputs}/form/form.d.ts +6 -0
  312. package/dist/types/components/inputs/input/input.d.ts +7 -1
  313. package/dist/types/components/inputs/input/input.types.d.ts +2 -1
  314. package/dist/types/components/inputs/quantity-selector/quantity-selector.d.ts +6 -1
  315. package/dist/types/components/inputs/quantity-selector/quantity-selector.types.d.ts +3 -1
  316. package/dist/types/components/inputs/radio-group/radio-group.d.ts +7 -1
  317. package/dist/types/components/inputs/radio-group/radio-group.types.d.ts +2 -1
  318. package/dist/types/components/inputs/textarea/textarea.d.ts +16 -1
  319. package/dist/types/components/inputs/toggle/toggle.d.ts +6 -0
  320. package/dist/types/components/inputs/toggle/toggle.types.d.ts +2 -1
  321. package/dist/types/components/layout/grid/grid.d.ts +13 -0
  322. package/dist/types/components/layout/inline/inline.d.ts +12 -0
  323. package/dist/types/components/layout/navbar/navbar.d.ts +29 -1
  324. package/dist/types/components/layout/navbar/navbar.types.d.ts +2 -0
  325. package/dist/types/components/layout/panel/panel.d.ts +8 -0
  326. package/dist/types/components/layout/panel/panel.types.d.ts +2 -1
  327. package/dist/types/components/layout/section/section.d.ts +13 -0
  328. package/dist/types/components/layout/section/section.types.d.ts +1 -0
  329. package/dist/types/components/layout/sidepanel/sidepanel.d.ts +7 -0
  330. package/dist/types/components/layout/stack/stack.d.ts +10 -0
  331. package/dist/types/components/layout/toolbar/toolbar.d.ts +4 -0
  332. package/dist/types/components/media/avatar/avatar.d.ts +4 -4
  333. package/dist/types/components/media/icon/icon.d.ts +7 -3
  334. package/dist/types/components/media/media/media.d.ts +13 -0
  335. package/dist/types/components/media/media/media.types.d.ts +2 -0
  336. package/dist/types/components/overlays/dialog/dialog.d.ts +14 -2
  337. package/dist/types/components/shared/field.d.ts +3 -0
  338. package/dist/types/components/shared/test/orientation.cmp.test.d.ts +1 -0
  339. package/dist/types/components.d.ts +911 -68
  340. package/dist/types/index.d.ts +8 -3
  341. package/dist/types/playground/components/theme-designer/token-row.d.ts +2 -1
  342. package/dist/types/theme/test/assets.d.ts +4 -0
  343. package/dist/types/theme/test/foundation.cmp.test.d.ts +16 -0
  344. package/dist/types/theme/tokens.d.ts +63 -0
  345. package/dist/webquark/p-0aea8464.entry.js +1 -0
  346. package/dist/webquark/p-0aecd9b1.entry.js +1 -0
  347. package/dist/webquark/p-0d98e500.entry.js +1 -0
  348. package/dist/webquark/p-139fec38.entry.js +1 -0
  349. package/dist/{playground/build/p-0053ec76.entry.js → webquark/p-15502232.entry.js} +1 -1
  350. package/dist/webquark/p-17340abf.entry.js +1 -0
  351. package/dist/webquark/p-303dcac8.entry.js +1 -0
  352. package/dist/webquark/p-408bf48a.entry.js +1 -0
  353. package/dist/webquark/p-47253466.entry.js +1 -0
  354. package/dist/webquark/p-5f6860f2.entry.js +13 -0
  355. package/dist/webquark/p-6b619655.entry.js +1 -0
  356. package/dist/webquark/p-6b63922b.entry.js +1 -0
  357. package/dist/webquark/p-71e3d582.entry.js +1 -0
  358. package/dist/webquark/p-737ca99e.entry.js +1 -0
  359. package/dist/webquark/{p-41421759.entry.js → p-742e39f1.entry.js} +1 -1
  360. package/dist/webquark/p-8115ec23.entry.js +1 -0
  361. package/dist/webquark/{p-8ada8fc6.entry.js → p-8ad43d7f.entry.js} +1 -1
  362. package/dist/webquark/{p-885572ee.entry.js → p-8bdababd.entry.js} +1 -1
  363. package/dist/webquark/p-9418caa0.entry.js +1 -0
  364. package/dist/webquark/p-96ef2b54.entry.js +1 -0
  365. package/dist/webquark/p-97dae970.entry.js +1 -0
  366. package/dist/{playground/build/p-b5066051.entry.js → webquark/p-989bdc1a.entry.js} +1 -1
  367. package/dist/webquark/{p-DoS2fiWw.js → p-BqvCR2U8.js} +1 -1
  368. package/dist/webquark/p-DbGG9Q40.js +3 -0
  369. package/dist/webquark/p-JgeOdXyP.js +1 -0
  370. package/dist/webquark/p-a4b36120.entry.js +1 -0
  371. package/dist/webquark/p-abf54361.entry.js +1 -0
  372. package/dist/webquark/p-aed4b219.entry.js +1 -0
  373. package/dist/webquark/p-b3a07d94.entry.js +1 -0
  374. package/dist/{playground/build/p-8077aa3f.entry.js → webquark/p-b465aebd.entry.js} +1 -1
  375. package/dist/webquark/p-c1f3dca6.entry.js +1 -0
  376. package/dist/webquark/p-c4899c2b.entry.js +1 -0
  377. package/dist/{playground/build/p-1c9a82b8.entry.js → webquark/p-c4fd89b8.entry.js} +1 -1
  378. package/dist/webquark/p-cf8f7f2a.entry.js +1 -0
  379. package/dist/webquark/{p-2e2b3ca9.entry.js → p-d4a915e5.entry.js} +1 -1
  380. package/dist/{playground/build/p-6c0bc4b9.entry.js → webquark/p-d7d436c5.entry.js} +1 -1
  381. package/dist/webquark/{p-316a92e2.entry.js → p-de8813be.entry.js} +1 -1
  382. package/dist/{playground/build/p-8ec7d250.entry.js → webquark/p-eb71e335.entry.js} +1 -1
  383. package/dist/webquark/p-ecbc0fee.entry.js +1 -0
  384. package/dist/{playground/build/p-d837603c.entry.js → webquark/p-ed327679.entry.js} +1 -1
  385. package/dist/{playground/build/p-e0e6b68f.entry.js → webquark/p-f911c90f.entry.js} +1 -1
  386. package/dist/webquark/p-f95uguY1.js +1 -0
  387. package/dist/{playground/build/p-13329777.entry.js → webquark/p-ff1e2363.entry.js} +1 -1
  388. package/dist/webquark/webquark.css +1 -1
  389. package/dist/webquark/webquark.esm.js +1 -1
  390. package/package.json +68 -5
  391. package/scripts/wq-switch/README.md +141 -0
  392. package/scripts/wq-switch/dist/index.js +543 -0
  393. package/scripts/wq-switch/dist/setup.js +349 -0
  394. package/dist/collection/components/layout/card/card.js +0 -168
  395. package/dist/collection/components/layout/form/form.css +0 -49
  396. package/dist/components/p-BygmcFxM.js +0 -1
  397. package/dist/components/p-CVtof65h.js +0 -1
  398. package/dist/components/p-I81wUKud.js +0 -1
  399. package/dist/components/p-vv3X99Ji.js +0 -1
  400. package/dist/playground/build/p-0363c0e6.entry.js +0 -1
  401. package/dist/playground/build/p-0e3dbe01.entry.js +0 -1
  402. package/dist/playground/build/p-226c2f79.entry.js +0 -13
  403. package/dist/playground/build/p-38b92be6.entry.js +0 -1
  404. package/dist/playground/build/p-42831108.entry.js +0 -1
  405. package/dist/playground/build/p-50ca27f7.entry.js +0 -1
  406. package/dist/playground/build/p-5c08aa94.entry.js +0 -1
  407. package/dist/playground/build/p-611ef3e0.entry.js +0 -1
  408. package/dist/playground/build/p-684292dd.entry.js +0 -1
  409. package/dist/playground/build/p-7081c96b.entry.js +0 -1
  410. package/dist/playground/build/p-789eb3c9.entry.js +0 -1
  411. package/dist/playground/build/p-8d0aa5a7.entry.js +0 -1
  412. package/dist/playground/build/p-9978ae38.entry.js +0 -1
  413. package/dist/playground/build/p-VFWyFa-_.js +0 -3
  414. package/dist/playground/build/p-b99541cd.entry.js +0 -1
  415. package/dist/playground/build/p-ca1a1d25.entry.js +0 -1
  416. package/dist/playground/build/p-e15e6d76.entry.js +0 -1
  417. package/dist/playground/build/p-e272dd45.entry.js +0 -1
  418. package/dist/playground/build/p-e8003179.entry.js +0 -1
  419. package/dist/types/components/layout/card/card.types.d.ts +0 -1
  420. package/dist/types/components/overlays/toast/test/toast.cmp.test.d.ts +0 -2
  421. package/dist/webquark/p-0363c0e6.entry.js +0 -1
  422. package/dist/webquark/p-0e3dbe01.entry.js +0 -1
  423. package/dist/webquark/p-226c2f79.entry.js +0 -13
  424. package/dist/webquark/p-38b92be6.entry.js +0 -1
  425. package/dist/webquark/p-42831108.entry.js +0 -1
  426. package/dist/webquark/p-50ca27f7.entry.js +0 -1
  427. package/dist/webquark/p-5c08aa94.entry.js +0 -1
  428. package/dist/webquark/p-611ef3e0.entry.js +0 -1
  429. package/dist/webquark/p-684292dd.entry.js +0 -1
  430. package/dist/webquark/p-7081c96b.entry.js +0 -1
  431. package/dist/webquark/p-789eb3c9.entry.js +0 -1
  432. package/dist/webquark/p-8d0aa5a7.entry.js +0 -1
  433. package/dist/webquark/p-9978ae38.entry.js +0 -1
  434. package/dist/webquark/p-VFWyFa-_.js +0 -3
  435. package/dist/webquark/p-b99541cd.entry.js +0 -1
  436. package/dist/webquark/p-ca1a1d25.entry.js +0 -1
  437. package/dist/webquark/p-e15e6d76.entry.js +0 -1
  438. package/dist/webquark/p-e272dd45.entry.js +0 -1
  439. package/dist/webquark/p-e8003179.entry.js +0 -1
  440. package/dist/collection/components/{data-display → communication}/alert/alert.css +0 -0
  441. package/dist/collection/components/{data-display → communication}/alert/alert.types.js +0 -0
  442. package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.css +0 -0
  443. package/dist/collection/components/{data-display → communication}/conversation-bubble/conversation-bubble.types.js +0 -0
  444. package/dist/collection/components/{overlays → communication}/toast/internals/icons.js +0 -0
  445. package/dist/collection/components/{overlays → communication}/toast/internals/queue.js +0 -0
  446. package/dist/collection/components/{overlays → communication}/toast/internals/timers.js +0 -0
  447. package/dist/collection/components/{overlays → communication}/toast/test/toast.unit.test.js +0 -0
  448. package/dist/collection/components/{overlays → communication}/toast/toast-controller.js +0 -0
  449. package/dist/collection/components/{overlays → communication}/toast/toast.css +0 -0
  450. package/dist/collection/components/{overlays → communication}/toast/toast.types.js +0 -0
  451. package/dist/collection/components/{actions/chip/chip.types.js → content/banner/banner.types.js} +0 -0
  452. package/dist/collection/components/{layout → content}/card/card.types.js +0 -0
  453. package/dist/collection/components/{layout → content}/card/card.utils.js +0 -0
  454. package/dist/collection/components/{layout → content}/carousel/carousel.css +0 -0
  455. package/dist/collection/components/{layout → content}/carousel/carousel.types.js +0 -0
  456. package/dist/collection/components/{layout → content}/carousel/carousel.utils.js +0 -0
  457. package/dist/collection/components/{layout → content}/carousel/internals/metrics.js +0 -0
  458. package/dist/collection/components/{layout/form/form.types.js → data-display/accordion/accordion.types.js} +0 -0
  459. package/dist/collection/components/{actions → data-display}/chip/chip.css +0 -0
  460. package/dist/{types/components/overlays/toast/test/toast.unit.test.d.ts → collection/components/data-display/chip/chip.types.js} +0 -0
  461. package/dist/collection/components/{layout → inputs}/form/internals/controls.js +0 -0
  462. package/dist/collection/components/{layout → inputs}/form/internals/enter-behavior.js +0 -0
  463. package/dist/collection/components/{layout → inputs}/form/internals/values.js +0 -0
  464. package/dist/collection/components/{layout → inputs}/form/test/form.cmp.test.js +0 -0
  465. package/dist/types/components/{data-display → communication}/alert/alert.d.ts +0 -0
  466. package/dist/types/components/{data-display → communication}/alert/alert.types.d.ts +0 -0
  467. package/dist/types/components/{data-display → communication}/conversation-bubble/conversation-bubble.d.ts +3 -3
  468. /package/dist/types/components/{data-display → communication}/conversation-bubble/conversation-bubble.types.d.ts +0 -0
  469. /package/dist/types/components/{overlays → communication}/toast/internals/icons.d.ts +0 -0
  470. /package/dist/types/components/{overlays → communication}/toast/internals/queue.d.ts +0 -0
  471. /package/dist/types/components/{overlays → communication}/toast/internals/timers.d.ts +0 -0
  472. /package/dist/types/components/{overlays → communication}/toast/toast-controller.d.ts +0 -0
  473. /package/dist/types/components/{overlays → communication}/toast/toast.d.ts +0 -0
  474. /package/dist/types/components/{overlays → communication}/toast/toast.types.d.ts +0 -0
  475. /package/dist/types/components/{layout → content}/carousel/carousel.d.ts +0 -0
  476. /package/dist/types/components/{layout → content}/carousel/carousel.types.d.ts +0 -0
  477. /package/dist/types/components/{layout → content}/carousel/carousel.utils.d.ts +0 -0
  478. /package/dist/types/components/{layout → content}/carousel/internals/metrics.d.ts +0 -0
  479. /package/dist/types/components/{actions → data-display}/chip/chip.d.ts +0 -0
  480. /package/dist/types/components/{actions → data-display}/chip/chip.types.d.ts +0 -0
  481. /package/dist/types/components/{layout → inputs}/form/form.types.d.ts +0 -0
  482. /package/dist/types/components/{layout → inputs}/form/internals/controls.d.ts +0 -0
  483. /package/dist/types/components/{layout → inputs}/form/internals/enter-behavior.d.ts +0 -0
  484. /package/dist/types/components/{layout → inputs}/form/internals/values.d.ts +0 -0
  485. /package/dist/types/components/{layout → inputs}/form/test/form.cmp.test.d.ts +0 -0
@@ -1,9 +1,325 @@
1
- import { afterEach, describe, expect, it } from "vitest";
1
+ import { afterEach, beforeEach, describe, expect, it } from "vitest";
2
+ import { page } from "vitest/browser";
2
3
  import "../navbar";
3
4
  import navbarCss from "../navbar.css?inline";
5
+ // Exercise focus through a real shadow root without depending on build output.
6
+ // No delegated focus: the navbar must find and focus the inner control itself.
7
+ if (!customElements.get('navbar-test-control')) {
8
+ customElements.define('navbar-test-control', class extends HTMLElement {
9
+ connectedCallback() {
10
+ if (this.shadowRoot)
11
+ return;
12
+ const button = document.createElement('button');
13
+ button.disabled = this.hasAttribute('disabled');
14
+ button.append(document.createElement('slot'));
15
+ this.attachShadow({ mode: 'open' }).append(button);
16
+ }
17
+ });
18
+ }
4
19
  async function nextFrame() {
5
20
  await new Promise(resolve => requestAnimationFrame(() => resolve()));
6
21
  }
22
+ async function settle() {
23
+ for (let i = 0; i < 6; i++)
24
+ await nextFrame();
25
+ }
26
+ async function aligned(width = 900, html = '<span slot="brand" style="display:block;width:180px">Brand</span><button slot="actions" style="width:70px">Account</button>') {
27
+ const el = document.createElement('q-navbar');
28
+ el.navAlign = 'center';
29
+ el.navCenterWithin = 'container';
30
+ el.items = ['Home', 'Products', 'Contact'];
31
+ el.style.width = `${width}px`;
32
+ el.innerHTML = html;
33
+ document.body.append(el);
34
+ await nextFrame();
35
+ const sheet = new CSSStyleSheet();
36
+ await sheet.replace(navbarCss);
37
+ el.shadowRoot.adoptedStyleSheets = [...el.shadowRoot.adoptedStyleSheets, sheet];
38
+ await settle();
39
+ return el;
40
+ }
41
+ function part(el, selector) {
42
+ return el.shadowRoot.querySelector(selector);
43
+ }
44
+ function collapsed(el) { return part(el, '.navbar').classList.contains('is-collapsed'); }
45
+ function center(el) { const r = el.getBoundingClientRect(); return (r.left + r.right) / 2; }
46
+ describe('q-navbar alignment and collision geometry', () => {
47
+ beforeEach(async () => { await page.viewport(1280, 800); });
48
+ afterEach(() => { document.body.replaceChildren(); });
49
+ it('centres the actual group with unequal, missing and changing sides', async () => {
50
+ const el = await aligned();
51
+ expect(collapsed(el)).toBe(false);
52
+ expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
53
+ el.querySelector('[slot="brand"]').remove();
54
+ await settle();
55
+ expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
56
+ el.querySelector('[slot="actions"]').style.width = '240px';
57
+ await settle();
58
+ expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el), 0);
59
+ el.navCenterWithin = 'available';
60
+ await settle();
61
+ const brand = part(el, '.brand-link').getBoundingClientRect();
62
+ const actions = part(el, '.desktop-actions').getBoundingClientRect();
63
+ const items = el.shadowRoot.querySelectorAll('.nav-item-shell');
64
+ expect((items[0].getBoundingClientRect().left + items[2].getBoundingClientRect().right) / 2).toBeCloseTo((brand.right + actions.left) / 2, 0);
65
+ });
66
+ it('applies optical displacement only on desktop and reverses it in RTL', async () => {
67
+ const el = await aligned();
68
+ el.style.setProperty('--q-navbar-nav-offset-inline', '13px');
69
+ await settle();
70
+ expect(center(part(el, '.desktop-nav')) - center(el)).toBeCloseTo(13, 0);
71
+ el.dir = 'rtl';
72
+ await settle();
73
+ expect(center(part(el, '.desktop-nav')) - center(el)).toBeCloseTo(-13, 0);
74
+ el.style.width = '350px';
75
+ await settle();
76
+ expect(collapsed(el)).toBe(true);
77
+ part(el, '.menu-button').click();
78
+ await settle();
79
+ expect(getComputedStyle(part(el, '.desktop-nav')).insetInlineStart).toBe('auto');
80
+ });
81
+ it('uses stable intrinsic widths and an 8px recovery margin without oscillation', async () => {
82
+ const el = await aligned(900, '<span slot="brand" style="display:block;width:100px">Brand</span>');
83
+ const navWidth = part(el, '.desktop-nav').getBoundingClientRect().width;
84
+ const threshold = 48 + 40 + 200 + navWidth;
85
+ el.style.width = `${threshold - 1}px`;
86
+ await settle();
87
+ expect(collapsed(el)).toBe(true);
88
+ el.style.width = `${threshold + 7}px`;
89
+ await settle();
90
+ expect(collapsed(el)).toBe(true);
91
+ for (let i = 0; i < 12; i++) {
92
+ await nextFrame();
93
+ expect(collapsed(el)).toBe(true);
94
+ }
95
+ el.style.width = `${threshold + 9}px`;
96
+ await settle();
97
+ expect(collapsed(el)).toBe(false);
98
+ });
99
+ it('retains custom navigation, actions and add-ons without duplicating nodes', async () => {
100
+ const el = await aligned(350, '<span slot="brand">Brand</span><button slot="nav" style="width:220px">Custom</button><button slot="actions">Action</button><span slot="badge" style="display:block;width:260px">Badge</span>');
101
+ el.items = [{ label: 'Home', value: 'home', addonSlot: 'badge' }];
102
+ await settle();
103
+ expect(collapsed(el)).toBe(true);
104
+ part(el, '.menu-button').click();
105
+ await settle();
106
+ expect(el.querySelector('[slot="nav"]').checkVisibility()).toBe(true);
107
+ expect(el.querySelector('[slot="actions"]').checkVisibility()).toBe(true);
108
+ expect(el.querySelector('[slot="badge"]').checkVisibility()).toBe(true);
109
+ expect(el.querySelectorAll('[slot="nav"]')).toHaveLength(1);
110
+ el.insertAdjacentHTML('beforeend', '<button slot="mobile-nav">Mobile</button><button slot="mobile-actions">Mobile action</button>');
111
+ await settle();
112
+ expect(el.querySelector('[slot="nav"]').checkVisibility()).toBe(false);
113
+ expect(el.querySelector('[slot="actions"]').checkVisibility()).toBe(false);
114
+ expect(el.querySelector('[slot="mobile-nav"]').checkVisibility()).toBe(true);
115
+ });
116
+ it('protects focus and emits only real open-state changes', async () => {
117
+ const el = await aligned();
118
+ const events = [];
119
+ el.addEventListener('qMenuToggle', e => events.push(e.detail));
120
+ const item = part(el, '.nav-item');
121
+ item.focus();
122
+ el.style.width = '300px';
123
+ await settle();
124
+ expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
125
+ expect(events).toEqual([]);
126
+ part(el, '.menu-button').click();
127
+ await settle();
128
+ item.focus();
129
+ document.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
130
+ await settle();
131
+ expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
132
+ part(el, '.menu-button').click();
133
+ await settle();
134
+ el.style.width = '900px';
135
+ await settle();
136
+ expect(el.shadowRoot.activeElement).toBe(item);
137
+ expect(events).toEqual([true, false, true, false]);
138
+ });
139
+ it('wraps inline mode onto its own row and puts bottom menus above the brand', async () => {
140
+ const el = await aligned(350);
141
+ el.mobileMode = 'inline';
142
+ await settle();
143
+ expect(part(el, '.desktop-nav').getBoundingClientRect().top).toBeGreaterThanOrEqual(part(el, '.brand-link').getBoundingClientRect().bottom);
144
+ expect(part(el, '.menu-button').checkVisibility()).toBe(false);
145
+ el.mobileMode = 'menu';
146
+ el.edge = 'bottom';
147
+ await settle();
148
+ part(el, '.menu-button').click();
149
+ await settle();
150
+ expect(part(el, '.desktop-nav').getBoundingClientRect().bottom).toBeLessThanOrEqual(part(el, '.brand-link').getBoundingClientRect().top);
151
+ });
152
+ it('preserves the 720px breakpoint and default/vertical layouts', async () => {
153
+ const el = await aligned(900);
154
+ await page.viewport(720, 800);
155
+ await settle();
156
+ expect(collapsed(el)).toBe(false);
157
+ expect(part(el, '.menu-button').checkVisibility()).toBe(true);
158
+ await page.viewport(721, 800);
159
+ await settle();
160
+ expect(part(el, '.menu-button').checkVisibility()).toBe(false);
161
+ el.navAlign = 'start';
162
+ el.style.width = '200px';
163
+ await settle();
164
+ expect(collapsed(el)).toBe(false);
165
+ el.navAlign = 'center';
166
+ el.edge = 'left';
167
+ await settle();
168
+ expect(collapsed(el)).toBe(false);
169
+ expect(getComputedStyle(part(el, '.navbar-row')).flexDirection).toBe('column');
170
+ });
171
+ it('remeasures late images, changing item text and completed fonts', async () => {
172
+ const el = await aligned(700, '<img slot="brand" alt="Brand"><button slot="actions">Action</button>');
173
+ expect(collapsed(el)).toBe(false);
174
+ const img = el.querySelector('img');
175
+ img.src = 'data:image/svg+xml,' + encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="300" height="30"/>');
176
+ await img.decode();
177
+ await settle();
178
+ expect(collapsed(el)).toBe(true);
179
+ img.remove();
180
+ await settle();
181
+ expect(collapsed(el)).toBe(false);
182
+ el.items = ['A very long navigation entry repeated to consume the row', 'Another very long navigation entry'];
183
+ await settle();
184
+ expect(collapsed(el)).toBe(true);
185
+ el.items = ['Home'];
186
+ const face = new FontFace('NavbarTest', 'local("Arial"), local("Liberation Sans"), local("DejaVu Sans")');
187
+ el.style.fontFamily = 'NavbarTest, monospace';
188
+ const fonts = document.fonts;
189
+ fonts.add(face);
190
+ await face.load();
191
+ await document.fonts.ready;
192
+ await settle();
193
+ expect(collapsed(el)).toBe(false);
194
+ fonts.delete(face);
195
+ });
196
+ it('keeps sticky positioning during scrolling', async () => {
197
+ const el = await aligned();
198
+ const scroller = document.createElement('div');
199
+ scroller.style.cssText = 'height:180px;overflow:auto';
200
+ el.sticky = true;
201
+ document.body.append(scroller);
202
+ scroller.append(el);
203
+ const spacer = document.createElement('div');
204
+ spacer.style.height = '1000px';
205
+ scroller.append(spacer);
206
+ await settle();
207
+ const top = el.getBoundingClientRect().top;
208
+ scroller.scrollTop = 160;
209
+ await settle();
210
+ expect(el.getBoundingClientRect().top).toBeCloseTo(top, 0);
211
+ expect(collapsed(el)).toBe(false);
212
+ });
213
+ it('includes visible add-on overhang in the collision requirement', async () => {
214
+ const el = await aligned(600, '<span slot="brand" style="display:block;width:100px">Brand</span><span slot="badge" style="display:block;width:400px">Badge</span>');
215
+ el.items = [{ label: 'Home', value: 'home' }];
216
+ await settle();
217
+ expect(collapsed(el)).toBe(false);
218
+ el.items = [{ label: 'Home', value: 'home', addonSlot: 'badge', addonPlacement: 'top-start' }];
219
+ await settle();
220
+ expect(collapsed(el)).toBe(true);
221
+ el.querySelector('[slot="badge"]').style.display = 'none';
222
+ await settle();
223
+ expect(collapsed(el)).toBe(false);
224
+ });
225
+ it('centres in the padded box and responds to a resizing parent', async () => {
226
+ const el = await aligned();
227
+ el.style.padding = '0';
228
+ el.style.setProperty('--q-navbar-padding', '0 70px 0 10px');
229
+ await settle();
230
+ expect(center(part(el, '.desktop-nav'))).toBeCloseTo(center(el) - 30, 0);
231
+ const parent = document.createElement('div');
232
+ parent.style.width = '900px';
233
+ document.body.append(parent);
234
+ parent.append(el);
235
+ el.style.width = '100%';
236
+ await settle();
237
+ parent.style.width = '350px';
238
+ await settle();
239
+ expect(collapsed(el)).toBe(true);
240
+ parent.style.width = '900px';
241
+ await settle();
242
+ expect(collapsed(el)).toBe(false);
243
+ const brand = part(el, '.brand-link').getBoundingClientRect();
244
+ const nav = part(el, '.desktop-nav').getBoundingClientRect();
245
+ const actions = part(el, '.desktop-actions').getBoundingClientRect();
246
+ expect(brand.right).toBeLessThan(nav.left);
247
+ expect(nav.right).toBeLessThan(actions.left);
248
+ });
249
+ it('restores custom-only focus from an explicit mobile slot', async () => {
250
+ const el = await aligned(300, '<span slot="brand" style="display:block;width:100px">Brand</span><button slot="nav" style="width:200px">Desktop</button><button slot="mobile-nav">Mobile</button>');
251
+ el.items = [];
252
+ await settle();
253
+ part(el, '.menu-button').click();
254
+ await settle();
255
+ el.querySelector('[slot="mobile-nav"]').focus();
256
+ el.style.width = '900px';
257
+ await settle();
258
+ expect(document.activeElement).toBe(el.querySelector('[slot="nav"]'));
259
+ });
260
+ it('keeps focus visible when switching a collapsed menu to inline mode', async () => {
261
+ const el = await aligned(300);
262
+ part(el, '.menu-button').focus();
263
+ el.mobileMode = 'inline';
264
+ await settle();
265
+ expect(el.shadowRoot.activeElement).toBe(part(el, '.nav-item'));
266
+ el.mobileMode = 'menu';
267
+ await settle();
268
+ expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
269
+ });
270
+ it('recovers focus inside custom controls, skipping hidden, disabled and inert choices', async () => {
271
+ const el = await aligned(300, `<span slot="brand" style="display:block;width:100px">Brand</span>
272
+ <div slot="nav" style="width:250px">
273
+ <button style="display:none">Hidden</button>
274
+ <button style="visibility:hidden">Invisible</button>
275
+ <navbar-test-control disabled>Disabled custom control</navbar-test-control>
276
+ <div inert><button>Inert control</button></div>
277
+ <navbar-test-control id="enabled-navigation">Desktop control</navbar-test-control>
278
+ </div>
279
+ <button slot="mobile-nav">Mobile control</button>`);
280
+ el.items = [];
281
+ await settle();
282
+ expect(collapsed(el)).toBe(true);
283
+ part(el, '.menu-button').click();
284
+ await settle();
285
+ el.querySelector('[slot="mobile-nav"]').focus();
286
+ el.style.width = '900px';
287
+ await settle();
288
+ const control = el.querySelector('#enabled-navigation');
289
+ expect(document.activeElement).toBe(control);
290
+ expect(control.shadowRoot.activeElement).toBe(control.shadowRoot.querySelector('button'));
291
+ });
292
+ it('recovers mobile-slot focus and preserves custom control focus across mode changes', async () => {
293
+ const el = await aligned(300, '<span slot="brand" style="width:100px">Brand</span><navbar-test-control slot="nav" style="width:250px">Desktop</navbar-test-control><button slot="mobile-nav">Mobile</button>');
294
+ el.items = [];
295
+ await settle();
296
+ part(el, '.menu-button').click();
297
+ await settle();
298
+ el.querySelector('[slot="mobile-nav"]').focus();
299
+ el.mobileMode = 'inline';
300
+ await settle();
301
+ const control = el.querySelector('navbar-test-control');
302
+ const button = control.shadowRoot.querySelector('button');
303
+ expect(control.shadowRoot.activeElement).toBe(button);
304
+ el.mobileMode = 'menu';
305
+ await settle();
306
+ expect(el.shadowRoot.activeElement).toBe(part(el, '.menu-button'));
307
+ el.mobileMode = 'inline';
308
+ await settle();
309
+ expect(control.shadowRoot.activeElement).toBe(button);
310
+ });
311
+ it('preserves brand focus when changing from inline to menu', async () => {
312
+ const el = await aligned(300);
313
+ el.mobileMode = 'inline';
314
+ await settle();
315
+ const brand = el.querySelector('[slot="brand"]');
316
+ brand.tabIndex = 0;
317
+ brand.focus();
318
+ el.mobileMode = 'menu';
319
+ await settle();
320
+ expect(document.activeElement).toBe(brand);
321
+ });
322
+ });
7
323
  describe('q-navbar item sizing in Chromium', () => {
8
324
  afterEach(() => {
9
325
  document.body.replaceChildren();
@@ -96,18 +96,19 @@
96
96
  overflow: auto;
97
97
  }
98
98
 
99
- .padding-none .panel-body {
100
- padding: 0;
101
- }
102
99
 
103
- .padding-sm .panel-body {
104
- padding: var(--q-panel-padding-sm, var(--q-padding-sm, 4px));
105
- }
106
100
 
107
- .padding-md .panel-body {
108
- padding: var(--q-panel-padding-md, var(--q-padding-md, 9px));
109
- }
101
+ .padding-sm .panel-body { padding: var(--q-panel-padding, var(--q-panel-padding-sm, var(--_q-body-padding))); }
110
102
 
111
- .padding-lg .panel-body {
112
- padding: var(--q-panel-padding-lg, var(--q-padding-lg, 16px));
113
- }
103
+ .padding-md .panel-body { padding: var(--q-panel-padding, var(--q-panel-padding-md, var(--_q-body-padding))); }
104
+
105
+ .padding-lg .panel-body { padding: var(--q-panel-padding, var(--q-panel-padding-lg, var(--_q-body-padding))); }
106
+
107
+ /* Region padding is local and cannot alter descendants' spacing tokens. */
108
+ .panel { background: var(--q-panel-bg, var(--_q-surface)); }
109
+ .panel-header { padding: var(--q-panel-header-padding, var(--_q-header-padding)); margin: 0; }
110
+ .panel-body { padding: var(--q-panel-padding, var(--_q-body-padding)); }
111
+ .panel-footer { padding: var(--q-panel-footer-padding, var(--_q-footer-padding)); }
112
+ .panel-footer.is-hidden { display: none; }
113
+ .has-dividers .panel-header { border-bottom: var(--q-panel-divider, var(--q-border, 1px solid #374151)); }
114
+ .has-dividers .panel-footer { border-top: var(--q-panel-divider, var(--q-border, 1px solid #374151)); }
@@ -1,3 +1,4 @@
1
+ import { spaceValue, surfaceValue } from "../../../theme/tokens";
1
2
  import { h } from "@stencil/core";
2
3
  import { getSlottedElements } from "../../../utils/dom";
3
4
  /**
@@ -14,10 +15,17 @@ import { getSlottedElements } from "../../../utils/dom";
14
15
  export class QPanel {
15
16
  // ======== [1] STENCIL API (Props, Events, AttachInternals, Elements) =========
16
17
  el;
18
+ /** Explicit surface; omitted preserves the variant's role. */
19
+ surface;
20
+ headerPadding;
21
+ footerPadding;
22
+ dividers = false;
17
23
  variant = 'bordered';
18
24
  /** Removes the panel border while preserving the selected variant's other styling. */
25
+ borderless;
26
+ /** @deprecated Use borderless. Used only when borderless is unset. */
19
27
  noBorders = false;
20
- padding = 'md';
28
+ padding = 'lg';
21
29
  fullHeight = false;
22
30
  scrollable = false;
23
31
  /** Keeps the header pinned when the panel itself is the scroll container. */
@@ -47,23 +55,24 @@ export class QPanel {
47
55
  }
48
56
  // ===================== [6] RENDER (Visual Template Only) =====================
49
57
  render() {
50
- return (h("section", { key: 'a59a7f97d1f36a536d4de1b46294ba8e4ba3dc4a', class: {
58
+ return (h("section", { key: '19d43c6fc4582a4d5c45ac740abdb3f9f7c1eee7', style: { '--_q-surface': surfaceValue(this.surface ?? (this.variant === 'plain' ? 'transparent' : 'panel')), '--_q-body-padding': spaceValue(this.padding), '--_q-header-padding': spaceValue(this.headerPadding ?? this.padding), '--_q-footer-padding': spaceValue(this.footerPadding ?? this.padding) }, class: {
51
59
  'panel': true,
60
+ 'has-dividers': this.dividers,
52
61
  [`variant-${this.variant}`]: true,
53
- 'has-no-borders': this.noBorders,
62
+ 'has-no-borders': this.borderless ?? this.noBorders,
54
63
  [`padding-${this.padding}`]: true,
55
64
  'is-scrollable': this.scrollable,
56
65
  'is-full-height': this.fullHeight,
57
66
  'has-sticky-header': this.stickyHeader,
58
67
  'has-sticky-footer': this.stickyFooter,
59
68
  'uses-sticky-scroll': this.scrollable && (this.stickyHeader || this.stickyFooter),
60
- }, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: '0223ff913d2c0822b7a3b4946c5850af1ba96c94', class: {
69
+ }, "aria-label": this.ariaLabel, part: "panel" }, h("div", { key: 'f6e294e08f93dee0d2f02e2b549caf7ded1e09cc', class: {
61
70
  'panel-header': true,
62
71
  'is-hidden': !this.hasHeader,
63
- }, part: "header" }, h("slot", { key: 'dd12673ef5a82cce5eae03cf425b404a43625d2e', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: '0d318be486ef22b43e5e03319f9adc71c82c4782', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: 'b64941e7f6c507370f6b595bbc0a178c5f2d14af' })), h("div", { key: 'd7d7fd0145eb99bd140afb12165d49a3c0a01cac', class: {
72
+ }, part: "header" }, h("slot", { key: 'cbc8ee69b0c1cb170a1e1231d04c7f2a699711a2', name: "header", onSlotchange: this.handleSlotChange })), h("div", { key: '9f4bf85cb23cccae683d8cac501419e32dcf32e4', class: "panel-body", part: "body", tabindex: this.scrollable ? 0 : undefined, role: this.scrollable ? 'region' : undefined, "aria-label": this.scrollRegionLabel }, h("slot", { key: 'a313ab4dd5e5c1f630c008d3e7e8d5b148835496' })), h("div", { key: '9c764bd306f25706dc2d9c5819e56f6dc17888bf', class: {
64
73
  'panel-footer': true,
65
74
  'is-hidden': !this.hasFooter,
66
- }, part: "footer" }, h("slot", { key: '2f343fe8f12d3ff1ad0980b77d9fd300795d95c5', name: "footer", onSlotchange: this.handleSlotChange }))));
75
+ }, part: "footer" }, h("slot", { key: '4aafeebc0dba589e0921fc01cdda33af7b9d497c', name: "footer", onSlotchange: this.handleSlotChange }))));
67
76
  }
68
77
  static get is() { return "q-panel"; }
69
78
  static get encapsulation() { return "shadow"; }
@@ -79,6 +88,104 @@ export class QPanel {
79
88
  }
80
89
  static get properties() {
81
90
  return {
91
+ "surface": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "QSurface",
96
+ "resolved": "\"canvas\" | \"card\" | \"field\" | \"floating\" | \"panel\" | \"transparent\"",
97
+ "references": {
98
+ "QSurface": {
99
+ "location": "import",
100
+ "path": "../../../theme/tokens",
101
+ "id": "src/theme/tokens.ts::QSurface",
102
+ "referenceLocation": "QSurface"
103
+ }
104
+ }
105
+ },
106
+ "required": false,
107
+ "optional": true,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": "Explicit surface; omitted preserves the variant's role."
111
+ },
112
+ "getter": false,
113
+ "setter": false,
114
+ "reflect": false,
115
+ "attribute": "surface"
116
+ },
117
+ "headerPadding": {
118
+ "type": "string",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "QSpace",
122
+ "resolved": "\"2xl\" | \"3xl\" | \"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\"",
123
+ "references": {
124
+ "QSpace": {
125
+ "location": "import",
126
+ "path": "../../../theme/tokens",
127
+ "id": "src/theme/tokens.ts::QSpace",
128
+ "referenceLocation": "QSpace"
129
+ }
130
+ }
131
+ },
132
+ "required": false,
133
+ "optional": true,
134
+ "docs": {
135
+ "tags": [],
136
+ "text": ""
137
+ },
138
+ "getter": false,
139
+ "setter": false,
140
+ "reflect": false,
141
+ "attribute": "header-padding"
142
+ },
143
+ "footerPadding": {
144
+ "type": "string",
145
+ "mutable": false,
146
+ "complexType": {
147
+ "original": "QSpace",
148
+ "resolved": "\"2xl\" | \"3xl\" | \"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\"",
149
+ "references": {
150
+ "QSpace": {
151
+ "location": "import",
152
+ "path": "../../../theme/tokens",
153
+ "id": "src/theme/tokens.ts::QSpace",
154
+ "referenceLocation": "QSpace"
155
+ }
156
+ }
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": ""
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": false,
167
+ "attribute": "footer-padding"
168
+ },
169
+ "dividers": {
170
+ "type": "boolean",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "boolean",
174
+ "resolved": "boolean",
175
+ "references": {}
176
+ },
177
+ "required": false,
178
+ "optional": false,
179
+ "docs": {
180
+ "tags": [],
181
+ "text": ""
182
+ },
183
+ "getter": false,
184
+ "setter": false,
185
+ "reflect": false,
186
+ "attribute": "dividers",
187
+ "defaultValue": "false"
188
+ },
82
189
  "variant": {
83
190
  "type": "string",
84
191
  "mutable": false,
@@ -106,7 +213,7 @@ export class QPanel {
106
213
  "attribute": "variant",
107
214
  "defaultValue": "'bordered'"
108
215
  },
109
- "noBorders": {
216
+ "borderless": {
110
217
  "type": "boolean",
111
218
  "mutable": false,
112
219
  "complexType": {
@@ -115,7 +222,7 @@ export class QPanel {
115
222
  "references": {}
116
223
  },
117
224
  "required": false,
118
- "optional": false,
225
+ "optional": true,
119
226
  "docs": {
120
227
  "tags": [],
121
228
  "text": "Removes the panel border while preserving the selected variant's other styling."
@@ -123,6 +230,28 @@ export class QPanel {
123
230
  "getter": false,
124
231
  "setter": false,
125
232
  "reflect": true,
233
+ "attribute": "borderless"
234
+ },
235
+ "noBorders": {
236
+ "type": "boolean",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "boolean",
240
+ "resolved": "boolean",
241
+ "references": {}
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [{
247
+ "name": "deprecated",
248
+ "text": "Use borderless. Used only when borderless is unset."
249
+ }],
250
+ "text": ""
251
+ },
252
+ "getter": false,
253
+ "setter": false,
254
+ "reflect": true,
126
255
  "attribute": "no-borders",
127
256
  "defaultValue": "false"
128
257
  },
@@ -131,7 +260,7 @@ export class QPanel {
131
260
  "mutable": false,
132
261
  "complexType": {
133
262
  "original": "QPanelPadding",
134
- "resolved": "\"lg\" | \"md\" | \"none\" | \"sm\"",
263
+ "resolved": "\"2xl\" | \"3xl\" | \"lg\" | \"md\" | \"none\" | \"sm\" | \"xl\" | \"xs\"",
135
264
  "references": {
136
265
  "QPanelPadding": {
137
266
  "location": "import",
@@ -151,7 +280,7 @@ export class QPanel {
151
280
  "setter": false,
152
281
  "reflect": true,
153
282
  "attribute": "padding",
154
- "defaultValue": "'md'"
283
+ "defaultValue": "'lg'"
155
284
  },
156
285
  "fullHeight": {
157
286
  "type": "boolean",
@@ -326,13 +326,13 @@ export class QScrollable {
326
326
  height: this.height,
327
327
  maxHeight: this.maxHeight || undefined,
328
328
  };
329
- return (h(Host, { key: '5055572526fcd0927cb67768bc47039bb7f9162c', class: {
329
+ return (h(Host, { key: '8f16a1a28d33bc7a0382d20f17a36879ae279720', class: {
330
330
  'is-scrolling': this.isScrolling,
331
331
  'is-dragging': this.isDragging,
332
- }, style: hostStyle }, h("div", { key: 'cb442332f008b569dd062837db4d8efdd2321086', class: "q-scrollable-host" }, h("div", { key: '2aae475dd88acc4a4f271c803aef43d264e4a17b', id: this.viewportId, class: "q-scrollable-viewport", ref: this.setViewportRef, onScroll: this.handleScroll, tabindex: 0, part: "viewport" }, h("div", { key: 'e04e07c2dab58c2d314712a4838dc2071a362b55', class: "q-scrollable-content", ref: this.setContentRef, part: "content" }, h("slot", { key: '4ec55800b21996b44f27302e07ce9c8cdb0ee8c6' }))), this.mode === 'custom' && (h("div", { key: '26fac2984849a988bf18fa9dbc97925d5c95b9b3', class: {
332
+ }, style: hostStyle }, h("div", { key: 'f76c3054d43ddff3657dc595f4825035a36601e7', class: "q-scrollable-host" }, h("div", { key: 'd4288bbb3b5933de2e9d2887e8756c4ca7a65f55', id: this.viewportId, class: "q-scrollable-viewport", ref: this.setViewportRef, onScroll: this.handleScroll, tabindex: 0, part: "viewport" }, h("div", { key: '1573bd03af8fb6d65802e9762f79ec5c29d1549b', class: "q-scrollable-content", ref: this.setContentRef, part: "content" }, h("slot", { key: 'fb362b94fbc5f00eaacb4a054efa78d8e323ce9b' }))), this.mode === 'custom' && (h("div", { key: '584eb99b88589487ad6d3c9c20799019ddafa1b1', class: {
333
333
  'q-scrollbar-track': true,
334
334
  'is-dragging': this.isDragging,
335
- }, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: 'a029558609abde7e50d40e94c86f0e284fda8f71', class: "q-scrollbar-thumb", ref: (el) => (this.thumbEl = el), onPointerDown: this.handlePointerDown, onKeyDown: this.handleThumbKeyDown, role: "scrollbar", "aria-controls": this.viewportId, "aria-orientation": "vertical", "aria-valuemin": "0", "aria-valuemax": this.scrollValueMax, "aria-valuenow": this.scrollValueNow, "aria-label": "Scroll content", tabindex: 0, part: "thumb" }))))));
335
+ }, ref: (el) => (this.trackEl = el), part: "track" }, h("div", { key: '9c230ebab5a13e45908446f6f1d2b82698b8e56a', class: "q-scrollbar-thumb", ref: (el) => (this.thumbEl = el), onPointerDown: this.handlePointerDown, onKeyDown: this.handleThumbKeyDown, role: "scrollbar", "aria-controls": this.viewportId, "aria-orientation": "vertical", "aria-valuemin": "0", "aria-valuemax": this.scrollValueMax, "aria-valuenow": this.scrollValueNow, "aria-label": "Scroll content", tabindex: 0, part: "thumb" }))))));
336
336
  }
337
337
  static get is() { return "q-scrollable"; }
338
338
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1 @@
1
+ :host { display: block; min-width: 0; }