@mhmo91/schmancy 0.10.35 → 0.10.36

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 (413) hide show
  1. package/custom-elements.json +1155 -1083
  2. package/dist/SchmancyElement-BBzRWB1w.cjs +2 -0
  3. package/dist/SchmancyElement-BBzRWB1w.cjs.map +1 -0
  4. package/dist/SchmancyElement-C3CpdNsi.js +284 -0
  5. package/dist/SchmancyElement-C3CpdNsi.js.map +1 -0
  6. package/dist/agent/schmancy.agent.js +3387 -3228
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +333 -255
  9. package/dist/{area-DviXdbDx.js → area-BA96mwFY.js} +2 -2
  10. package/dist/{area-DviXdbDx.js.map → area-BA96mwFY.js.map} +1 -1
  11. package/dist/{area-CTSTgjlx.cjs → area-DtyQDdOF.cjs} +1 -1
  12. package/dist/{area-CTSTgjlx.cjs.map → area-DtyQDdOF.cjs.map} +1 -1
  13. package/dist/area.cjs +1 -1
  14. package/dist/area.js +1 -1
  15. package/dist/{audio-Q9oB_cQR.cjs → audio-B_jT9Xr7.cjs} +1 -1
  16. package/dist/{audio-Q9oB_cQR.cjs.map → audio-B_jT9Xr7.cjs.map} +1 -1
  17. package/dist/{audio-DFYoaw0M.js → audio-D52h1jAT.js} +1 -1
  18. package/dist/{audio-DFYoaw0M.js.map → audio-D52h1jAT.js.map} +1 -1
  19. package/dist/audio.cjs +1 -1
  20. package/dist/audio.js +2 -2
  21. package/dist/{autocomplete-DmLXJr7C.cjs → autocomplete-Bts5Jwwr.cjs} +1 -1
  22. package/dist/{autocomplete-DmLXJr7C.cjs.map → autocomplete-Bts5Jwwr.cjs.map} +1 -1
  23. package/dist/{autocomplete-BDvuma6D.js → autocomplete-CI4QJXAN.js} +3 -3
  24. package/dist/{autocomplete-BDvuma6D.js.map → autocomplete-CI4QJXAN.js.map} +1 -1
  25. package/dist/autocomplete.cjs +1 -1
  26. package/dist/autocomplete.js +1 -1
  27. package/dist/avatar.cjs +1 -1
  28. package/dist/avatar.js +3 -3
  29. package/dist/badge.cjs +1 -1
  30. package/dist/badge.js +1 -1
  31. package/dist/boat-I4B1UNMc.cjs +34 -0
  32. package/dist/boat-I4B1UNMc.cjs.map +1 -0
  33. package/dist/{boat-lr7MPZ7H.js → boat-_N1x5U_3.js} +67 -83
  34. package/dist/boat-_N1x5U_3.js.map +1 -0
  35. package/dist/boat.cjs +1 -1
  36. package/dist/boat.js +1 -1
  37. package/dist/breadcrumb.cjs +1 -1
  38. package/dist/breadcrumb.js +2 -2
  39. package/dist/{busy-CgzZbGfx.cjs → busy-BIUonyPk.cjs} +1 -1
  40. package/dist/{busy-CgzZbGfx.cjs.map → busy-BIUonyPk.cjs.map} +1 -1
  41. package/dist/{busy-DgQ4ux5N.js → busy-CCB3qKnh.js} +2 -2
  42. package/dist/{busy-DgQ4ux5N.js.map → busy-CCB3qKnh.js.map} +1 -1
  43. package/dist/busy.cjs +1 -1
  44. package/dist/busy.js +1 -1
  45. package/dist/{button-qbN1muQ0.js → button-C89bPnHt.js} +2 -2
  46. package/dist/{button-qbN1muQ0.js.map → button-C89bPnHt.js.map} +1 -1
  47. package/dist/{button-DFvR1iXX.cjs → button-CkwQH-g3.cjs} +1 -1
  48. package/dist/{button-DFvR1iXX.cjs.map → button-CkwQH-g3.cjs.map} +1 -1
  49. package/dist/button.cjs +4 -4
  50. package/dist/button.cjs.map +1 -1
  51. package/dist/button.js +16 -22
  52. package/dist/button.js.map +1 -1
  53. package/dist/{card-D_GlwZ5q.cjs → card-BO93_oxQ.cjs} +1 -1
  54. package/dist/{card-D_GlwZ5q.cjs.map → card-BO93_oxQ.cjs.map} +1 -1
  55. package/dist/{card-DAbr-7Vy.js → card-CFsCgJKZ.js} +2 -2
  56. package/dist/{card-DAbr-7Vy.js.map → card-CFsCgJKZ.js.map} +1 -1
  57. package/dist/card.cjs +1 -1
  58. package/dist/card.js +1 -1
  59. package/dist/{checkbox-BNORaxMF.js → checkbox-Bh7q0djq.js} +2 -2
  60. package/dist/{checkbox-BNORaxMF.js.map → checkbox-Bh7q0djq.js.map} +1 -1
  61. package/dist/{checkbox-BUY_uc_r.cjs → checkbox-CFUBUFtW.cjs} +1 -1
  62. package/dist/{checkbox-BUY_uc_r.cjs.map → checkbox-CFUBUFtW.cjs.map} +1 -1
  63. package/dist/checkbox.cjs +1 -1
  64. package/dist/checkbox.js +1 -1
  65. package/dist/{chips-Dg6Lk6BT.js → chips-6YaoRmeG.js} +145 -122
  66. package/dist/chips-6YaoRmeG.js.map +1 -0
  67. package/dist/{chips-CXZ4dJCK.cjs → chips-BfzpsyV1.cjs} +44 -33
  68. package/dist/chips-BfzpsyV1.cjs.map +1 -0
  69. package/dist/chips.cjs +1 -1
  70. package/dist/chips.js +2 -2
  71. package/dist/connectivity.cjs +1 -1
  72. package/dist/connectivity.js +3 -3
  73. package/dist/content-drawer.cjs +1 -1
  74. package/dist/content-drawer.js +1 -1
  75. package/dist/{date-range-BU6WX7d5.js → date-range-CEo_Kjqw.js} +129 -137
  76. package/dist/date-range-CEo_Kjqw.js.map +1 -0
  77. package/dist/{date-range-C-_be3_E.cjs → date-range-N-A249O9.cjs} +25 -19
  78. package/dist/date-range-N-A249O9.cjs.map +1 -0
  79. package/dist/{date-range-inline-7o7xtVIu.js → date-range-inline-BwialV9j.js} +2 -2
  80. package/dist/{date-range-inline-7o7xtVIu.js.map → date-range-inline-BwialV9j.js.map} +1 -1
  81. package/dist/{date-range-inline-DJtUmHKF.cjs → date-range-inline-DFopysWF.cjs} +1 -1
  82. package/dist/{date-range-inline-DJtUmHKF.cjs.map → date-range-inline-DFopysWF.cjs.map} +1 -1
  83. package/dist/date-range-inline.cjs +1 -1
  84. package/dist/date-range-inline.js +1 -1
  85. package/dist/date-range.cjs +1 -1
  86. package/dist/date-range.js +1 -1
  87. package/dist/delay.cjs +1 -1
  88. package/dist/delay.js +2 -2
  89. package/dist/{details-Bs0MyyvF.cjs → details-BLRPV8sY.cjs} +1 -1
  90. package/dist/{details-Bs0MyyvF.cjs.map → details-BLRPV8sY.cjs.map} +1 -1
  91. package/dist/{details-EfbDPVEo.js → details-GtpfI2hA.js} +2 -2
  92. package/dist/{details-EfbDPVEo.js.map → details-GtpfI2hA.js.map} +1 -1
  93. package/dist/details.cjs +1 -1
  94. package/dist/details.js +1 -1
  95. package/dist/{directives-zi1Mm2er.js → directives-C2dXgpCY.js} +13 -6
  96. package/dist/directives-C2dXgpCY.js.map +1 -0
  97. package/dist/{directives-fLwDj6b0.cjs → directives-CvYGSW_a.cjs} +2 -2
  98. package/dist/directives-CvYGSW_a.cjs.map +1 -0
  99. package/dist/directives.cjs +1 -1
  100. package/dist/directives.js +2 -2
  101. package/dist/{divider-CEPfrIwe.js → divider-D0pGX2VB.js} +2 -2
  102. package/dist/{divider-CEPfrIwe.js.map → divider-D0pGX2VB.js.map} +1 -1
  103. package/dist/{divider-CdIsWZrM.cjs → divider-rNsWCvMi.cjs} +1 -1
  104. package/dist/{divider-CdIsWZrM.cjs.map → divider-rNsWCvMi.cjs.map} +1 -1
  105. package/dist/divider.cjs +1 -1
  106. package/dist/divider.js +1 -1
  107. package/dist/dropdown.cjs +1 -1
  108. package/dist/dropdown.js +2 -2
  109. package/dist/{expand-g1vqqUp1.js → expand-FcKAzJta.js} +3 -3
  110. package/dist/{expand-g1vqqUp1.js.map → expand-FcKAzJta.js.map} +1 -1
  111. package/dist/{expand--at1k3qo.cjs → expand-tffQHGbZ.cjs} +1 -1
  112. package/dist/{expand--at1k3qo.cjs.map → expand-tffQHGbZ.cjs.map} +1 -1
  113. package/dist/expand.cjs +1 -1
  114. package/dist/expand.js +1 -1
  115. package/dist/fab.cjs +77 -0
  116. package/dist/fab.cjs.map +1 -0
  117. package/dist/fab.js +151 -0
  118. package/dist/fab.js.map +1 -0
  119. package/dist/{float-P9HukAm-.cjs → float-CDjgxWyy.cjs} +1 -1
  120. package/dist/{float-P9HukAm-.cjs.map → float-CDjgxWyy.cjs.map} +1 -1
  121. package/dist/{float-DxVzgI9o.js → float-CQ1WEp3M.js} +2 -2
  122. package/dist/{float-DxVzgI9o.js.map → float-CQ1WEp3M.js.map} +1 -1
  123. package/dist/float.cjs +1 -1
  124. package/dist/float.js +1 -1
  125. package/dist/{form-CqLaozHp.js → form-H24puioV.js} +3 -3
  126. package/dist/{form-CqLaozHp.js.map → form-H24puioV.js.map} +1 -1
  127. package/dist/{form-ByYhXe1p.cjs → form-VYhbbir3.cjs} +1 -1
  128. package/dist/{form-ByYhXe1p.cjs.map → form-VYhbbir3.cjs.map} +1 -1
  129. package/dist/form.cjs +6 -6
  130. package/dist/form.cjs.map +1 -1
  131. package/dist/form.js +25 -23
  132. package/dist/form.js.map +1 -1
  133. package/dist/handover/agent-runtime-followups.md +1 -1
  134. package/dist/handover/agent-runtime-v1.md +3 -3
  135. package/dist/{icons-DYtiRU5V.cjs → icons-B_a1HStW.cjs} +1 -1
  136. package/dist/{icons-DYtiRU5V.cjs.map → icons-B_a1HStW.cjs.map} +1 -1
  137. package/dist/{icons-CkphcMp6.js → icons-DBxfN91B.js} +2 -2
  138. package/dist/{icons-CkphcMp6.js.map → icons-DBxfN91B.js.map} +1 -1
  139. package/dist/icons.cjs +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/{iframe-CjqJksl8.js → iframe-BDVElN8z.js} +2 -2
  142. package/dist/{iframe-CjqJksl8.js.map → iframe-BDVElN8z.js.map} +1 -1
  143. package/dist/{iframe-C3trkP8q.cjs → iframe-CG-z9qev.cjs} +1 -1
  144. package/dist/{iframe-C3trkP8q.cjs.map → iframe-CG-z9qev.cjs.map} +1 -1
  145. package/dist/iframe.cjs +1 -1
  146. package/dist/iframe.js +1 -1
  147. package/dist/index.cjs +1 -1
  148. package/dist/index.js +57 -56
  149. package/dist/{input-DuavpwNL.cjs → input-B14Nn6xD.cjs} +1 -1
  150. package/dist/{input-DuavpwNL.cjs.map → input-B14Nn6xD.cjs.map} +1 -1
  151. package/dist/{input-CG51zDVh.js → input-Bt_o4sYo.js} +2 -2
  152. package/dist/{input-CG51zDVh.js.map → input-Bt_o4sYo.js.map} +1 -1
  153. package/dist/{input-chip-C6Lq1927.js → input-chip-DEqO0DXc.js} +2 -2
  154. package/dist/input-chip-DEqO0DXc.js.map +1 -0
  155. package/dist/{input-chip-57tgNXKT.cjs → input-chip-ugYu9Fn9.cjs} +1 -1
  156. package/dist/input-chip-ugYu9Fn9.cjs.map +1 -0
  157. package/dist/input.cjs +1 -1
  158. package/dist/input.js +1 -1
  159. package/dist/json.cjs +1 -1
  160. package/dist/json.js +3 -3
  161. package/dist/kbd.cjs +1 -1
  162. package/dist/kbd.js +2 -2
  163. package/dist/{layout-D4IOwx7p.js → layout-BJ_43VrH.js} +1 -1
  164. package/dist/{layout-D4IOwx7p.js.map → layout-BJ_43VrH.js.map} +1 -1
  165. package/dist/{layout-6ipbiWTl.cjs → layout-DF9ZaQ-b.cjs} +1 -1
  166. package/dist/{layout-6ipbiWTl.cjs.map → layout-DF9ZaQ-b.cjs.map} +1 -1
  167. package/dist/layout.cjs +1 -1
  168. package/dist/layout.js +2 -2
  169. package/dist/{lightbox-H8pVWGMX.cjs → lightbox-B47Zoqv-.cjs} +1 -1
  170. package/dist/{lightbox-H8pVWGMX.cjs.map → lightbox-B47Zoqv-.cjs.map} +1 -1
  171. package/dist/{lightbox-CsyO2XSr.js → lightbox-ZmuoBBFT.js} +2 -2
  172. package/dist/{lightbox-CsyO2XSr.js.map → lightbox-ZmuoBBFT.js.map} +1 -1
  173. package/dist/lightbox.cjs +1 -1
  174. package/dist/lightbox.js +1 -1
  175. package/dist/{list-BAwH0pQW.js → list-C47xzld_.js} +2 -2
  176. package/dist/{list-BAwH0pQW.js.map → list-C47xzld_.js.map} +1 -1
  177. package/dist/{list-Bs9m8kw7.cjs → list-CaSWrlG2.cjs} +1 -1
  178. package/dist/{list-Bs9m8kw7.cjs.map → list-CaSWrlG2.cjs.map} +1 -1
  179. package/dist/list.cjs +1 -1
  180. package/dist/list.js +1 -1
  181. package/dist/{menu-tQVARVaC.js → menu-8RObM6Ie.js} +3 -3
  182. package/dist/{menu-tQVARVaC.js.map → menu-8RObM6Ie.js.map} +1 -1
  183. package/dist/{menu-BMcGzj1h.cjs → menu-Jpsy85SX.cjs} +1 -1
  184. package/dist/{menu-BMcGzj1h.cjs.map → menu-Jpsy85SX.cjs.map} +1 -1
  185. package/dist/menu.cjs +1 -1
  186. package/dist/menu.js +1 -1
  187. package/dist/{mixins-CGXSzZc7.cjs → mixins-DPdzC9ZH.cjs} +1 -1
  188. package/dist/{mixins-CGXSzZc7.cjs.map → mixins-DPdzC9ZH.cjs.map} +1 -1
  189. package/dist/{mixins-Bp0wIHg2.js → mixins-DTzfFVyv.js} +1 -1
  190. package/dist/{mixins-Bp0wIHg2.js.map → mixins-DTzfFVyv.js.map} +1 -1
  191. package/dist/mixins.cjs +1 -1
  192. package/dist/mixins.js +2 -2
  193. package/dist/nav-drawer.cjs +1 -1
  194. package/dist/nav-drawer.js +1 -1
  195. package/dist/navigation-bar.cjs +1 -1
  196. package/dist/navigation-bar.js +1 -1
  197. package/dist/navigation-rail.cjs +1 -1
  198. package/dist/navigation-rail.js +2 -2
  199. package/dist/{notification-D1tX2nx5.js → notification-Ccktcj9H.js} +4 -4
  200. package/dist/{notification-D1tX2nx5.js.map → notification-Ccktcj9H.js.map} +1 -1
  201. package/dist/{notification-Bz00zdpV.cjs → notification-DSkB-sn0.cjs} +1 -1
  202. package/dist/{notification-Bz00zdpV.cjs.map → notification-DSkB-sn0.cjs.map} +1 -1
  203. package/dist/notification.cjs +1 -1
  204. package/dist/notification.js +1 -1
  205. package/dist/{option-BnybLEDO.cjs → option-0aNiVB3Q.cjs} +1 -1
  206. package/dist/{option-BnybLEDO.cjs.map → option-0aNiVB3Q.cjs.map} +1 -1
  207. package/dist/{option-BpGV8Apj.js → option-CkMxwBqU.js} +2 -2
  208. package/dist/{option-BpGV8Apj.js.map → option-CkMxwBqU.js.map} +1 -1
  209. package/dist/option.cjs +1 -1
  210. package/dist/option.js +1 -1
  211. package/dist/{overlay-UQR2Dy3u.cjs → overlay-BS-ta-zq.cjs} +5 -5
  212. package/dist/overlay-BS-ta-zq.cjs.map +1 -0
  213. package/dist/{overlay-BpNhd74N.js → overlay-H3Wt_dgQ.js} +108 -108
  214. package/dist/overlay-H3Wt_dgQ.js.map +1 -0
  215. package/dist/overlay.cjs +1 -1
  216. package/dist/{overlay.confirm-body-CVDtVk5X.cjs → overlay.confirm-body-CR9xaqOE.cjs} +1 -1
  217. package/dist/{overlay.confirm-body-CVDtVk5X.cjs.map → overlay.confirm-body-CR9xaqOE.cjs.map} +1 -1
  218. package/dist/{overlay.confirm-body-BHcXu5Wk.js → overlay.confirm-body-Dxn_wNm3.js} +6 -6
  219. package/dist/{overlay.confirm-body-BHcXu5Wk.js.map → overlay.confirm-body-Dxn_wNm3.js.map} +1 -1
  220. package/dist/overlay.js +3 -3
  221. package/dist/{overlay.service-DTE6NwIM.js → overlay.service-C46kOtUi.js} +2 -2
  222. package/dist/{overlay.service-DTE6NwIM.js.map → overlay.service-C46kOtUi.js.map} +1 -1
  223. package/dist/{overlay.service-C8RsQzgM.cjs → overlay.service-DEj3rfRr.cjs} +1 -1
  224. package/dist/{overlay.service-C8RsQzgM.cjs.map → overlay.service-DEj3rfRr.cjs.map} +1 -1
  225. package/dist/{progress-CAKsxp29.js → progress-BK7gSq8j.js} +2 -2
  226. package/dist/{progress-CAKsxp29.js.map → progress-BK7gSq8j.js.map} +1 -1
  227. package/dist/{progress-gbIALDRs.cjs → progress-zs18GR6C.cjs} +1 -1
  228. package/dist/{progress-gbIALDRs.cjs.map → progress-zs18GR6C.cjs.map} +1 -1
  229. package/dist/progress.cjs +1 -1
  230. package/dist/progress.js +1 -1
  231. package/dist/{radio-group-otyvZvUk.js → radio-group-1HCpzRUB.js} +2 -2
  232. package/dist/{radio-group-otyvZvUk.js.map → radio-group-1HCpzRUB.js.map} +1 -1
  233. package/dist/{radio-group-CfJ5DtI4.cjs → radio-group-DbYlyPc-.cjs} +1 -1
  234. package/dist/{radio-group-CfJ5DtI4.cjs.map → radio-group-DbYlyPc-.cjs.map} +1 -1
  235. package/dist/radio-group.cjs +1 -1
  236. package/dist/radio-group.js +1 -1
  237. package/dist/range.cjs +1 -1
  238. package/dist/range.js +2 -2
  239. package/dist/{select-81jniVTs.cjs → select-B-SSmUDe.cjs} +1 -1
  240. package/dist/{select-81jniVTs.cjs.map → select-B-SSmUDe.cjs.map} +1 -1
  241. package/dist/{select-9vXx1fhr.js → select-CEyhNtZ2.js} +3 -3
  242. package/dist/{select-9vXx1fhr.js.map → select-CEyhNtZ2.js.map} +1 -1
  243. package/dist/select.cjs +1 -1
  244. package/dist/select.js +1 -1
  245. package/dist/skeleton.cjs +1 -1
  246. package/dist/skeleton.js +2 -2
  247. package/dist/skills/INDEX.md +1 -1
  248. package/dist/skills/SKILL.md +6 -7
  249. package/dist/skills/boat.md +21 -15
  250. package/dist/skills/fab.md +75 -0
  251. package/dist/skills/schmancy/INDEX.md +1 -1
  252. package/dist/skills/schmancy/SKILL.md +6 -7
  253. package/dist/skills/schmancy/boat.md +21 -15
  254. package/dist/skills/schmancy/fab.md +75 -0
  255. package/dist/skills/schmancy/theme.md +1 -1
  256. package/dist/skills/theme.md +1 -1
  257. package/dist/slider.cjs +1 -1
  258. package/dist/slider.js +2 -2
  259. package/dist/{sound.service-D3ZSq1Kj.js → sound.service-DO4SmUUT.js} +1 -1
  260. package/dist/{sound.service-D3ZSq1Kj.js.map → sound.service-DO4SmUUT.js.map} +1 -1
  261. package/dist/{sound.service-CmIw63aM.cjs → sound.service-G_8GV_6L.cjs} +1 -1
  262. package/dist/{sound.service-CmIw63aM.cjs.map → sound.service-G_8GV_6L.cjs.map} +1 -1
  263. package/dist/{splash-screen-BOjrmGLk.js → splash-screen-B1mM4_xz.js} +2 -2
  264. package/dist/{splash-screen-BOjrmGLk.js.map → splash-screen-B1mM4_xz.js.map} +1 -1
  265. package/dist/{splash-screen-C5KAWXvA.cjs → splash-screen-cbz4bxjB.cjs} +1 -1
  266. package/dist/{splash-screen-C5KAWXvA.cjs.map → splash-screen-cbz4bxjB.cjs.map} +1 -1
  267. package/dist/splash-screen.cjs +1 -1
  268. package/dist/splash-screen.js +1 -1
  269. package/dist/{src-qzUpLbje.cjs → src-czeiuT1m.cjs} +1 -1
  270. package/dist/{src-qzUpLbje.cjs.map → src-czeiuT1m.cjs.map} +1 -1
  271. package/dist/{src-C5g3p1J5.js → src-tncsWsTY.js} +36 -35
  272. package/dist/{src-C5g3p1J5.js.map → src-tncsWsTY.js.map} +1 -1
  273. package/dist/{state-Cex3rmx2.cjs → state-Cx0aoL5e.cjs} +1 -1
  274. package/dist/{state-Cex3rmx2.cjs.map → state-Cx0aoL5e.cjs.map} +1 -1
  275. package/dist/{state-CWBRTSvE.js → state-DJDp3N7J.js} +1 -1
  276. package/dist/{state-CWBRTSvE.js.map → state-DJDp3N7J.js.map} +1 -1
  277. package/dist/state.cjs +1 -1
  278. package/dist/state.js +2 -2
  279. package/dist/steps.cjs +1 -1
  280. package/dist/steps.js +2 -2
  281. package/dist/{surface-PfiejLuw.cjs → surface-C3cxTcJD.cjs} +1 -1
  282. package/dist/{surface-PfiejLuw.cjs.map → surface-C3cxTcJD.cjs.map} +1 -1
  283. package/dist/{surface-9S5scTsD.js → surface-CYBl8_a3.js} +2 -2
  284. package/dist/{surface-9S5scTsD.js.map → surface-CYBl8_a3.js.map} +1 -1
  285. package/dist/surface.cjs +1 -1
  286. package/dist/surface.js +1 -1
  287. package/dist/switch.cjs +1 -1
  288. package/dist/switch.js +2 -2
  289. package/dist/table.cjs +1 -1
  290. package/dist/table.js +2 -2
  291. package/dist/{tabs-BBOjAmgG.js → tabs-DHy93Q3N.js} +2 -2
  292. package/dist/{tabs-BBOjAmgG.js.map → tabs-DHy93Q3N.js.map} +1 -1
  293. package/dist/{tabs-uYvb1P06.cjs → tabs-ORQ_Zd43.cjs} +1 -1
  294. package/dist/{tabs-uYvb1P06.cjs.map → tabs-ORQ_Zd43.cjs.map} +1 -1
  295. package/dist/tabs.cjs +1 -1
  296. package/dist/tabs.js +1 -1
  297. package/dist/teleport.cjs +1 -1
  298. package/dist/teleport.js +1 -1
  299. package/dist/{textarea-YPHX4g7Y.cjs → textarea-CEUaDURR.cjs} +1 -1
  300. package/dist/{textarea-YPHX4g7Y.cjs.map → textarea-CEUaDURR.cjs.map} +1 -1
  301. package/dist/{textarea-QzSj8Dkl.js → textarea-DHIMt-ly.js} +2 -2
  302. package/dist/{textarea-QzSj8Dkl.js.map → textarea-DHIMt-ly.js.map} +1 -1
  303. package/dist/textarea.cjs +1 -1
  304. package/dist/textarea.js +1 -1
  305. package/dist/theme-CJpjkqHr.cjs +181 -0
  306. package/dist/{theme-iKUaS9JB.cjs.map → theme-CJpjkqHr.cjs.map} +1 -1
  307. package/dist/{theme-C2Mp-VGt.js → theme-CgI9PRco.js} +6 -5
  308. package/dist/{theme-C2Mp-VGt.js.map → theme-CgI9PRco.js.map} +1 -1
  309. package/dist/{theme-button-CJmhxfMe.cjs → theme-button--FuBkuVr.cjs} +1 -1
  310. package/dist/{theme-button-CJmhxfMe.cjs.map → theme-button--FuBkuVr.cjs.map} +1 -1
  311. package/dist/{theme-button-DGWAXhzd.js → theme-button-D-FXb3oO.js} +2 -2
  312. package/dist/{theme-button-DGWAXhzd.js.map → theme-button-D-FXb3oO.js.map} +1 -1
  313. package/dist/theme-button.cjs +1 -1
  314. package/dist/theme-button.js +1 -1
  315. package/dist/theme.cjs +1 -1
  316. package/dist/theme.js +3 -3
  317. package/dist/{theme.service-hc4N-1Oz.js → theme.service-BfTK1Wtl.js} +1 -1
  318. package/dist/{theme.service-hc4N-1Oz.js.map → theme.service-BfTK1Wtl.js.map} +1 -1
  319. package/dist/{theme.service-p61RsJBF.cjs → theme.service-Dg7LO0Qz.cjs} +1 -1
  320. package/dist/{theme.service-p61RsJBF.cjs.map → theme.service-Dg7LO0Qz.cjs.map} +1 -1
  321. package/dist/tree.cjs +1 -1
  322. package/dist/tree.js +2 -2
  323. package/dist/{typography-DwV0sqht.js → typography-BEGLfHwz.js} +2 -2
  324. package/dist/{typography-DwV0sqht.js.map → typography-BEGLfHwz.js.map} +1 -1
  325. package/dist/{typography-Bdt8RlX2.cjs → typography-CxA3sx9B.cjs} +1 -1
  326. package/dist/{typography-Bdt8RlX2.cjs.map → typography-CxA3sx9B.cjs.map} +1 -1
  327. package/dist/typography.cjs +1 -1
  328. package/dist/typography.js +1 -1
  329. package/dist/visually-hidden.cjs +1 -1
  330. package/dist/visually-hidden.js +2 -2
  331. package/dist/{window-n4jN60B_.js → window-B_n4P9az.js} +3 -3
  332. package/dist/{window-n4jN60B_.js.map → window-B_n4P9az.js.map} +1 -1
  333. package/dist/{window-D2WfvNng.cjs → window-Vl1u1-EG.cjs} +1 -1
  334. package/dist/{window-D2WfvNng.cjs.map → window-Vl1u1-EG.cjs.map} +1 -1
  335. package/dist/window.cjs +1 -1
  336. package/dist/window.js +1 -1
  337. package/package.json +1 -1
  338. package/skills/schmancy/INDEX.md +1 -1
  339. package/skills/schmancy/SKILL.md +6 -7
  340. package/skills/schmancy/boat.md +21 -15
  341. package/skills/schmancy/fab.md +75 -0
  342. package/skills/schmancy/theme.md +1 -1
  343. package/src/CLAUDE.md +22 -16
  344. package/src/boat/boat.test.ts +130 -0
  345. package/src/boat/boat.ts +144 -121
  346. package/src/button/icon-button.ts +18 -30
  347. package/src/chips/assist-chip.ts +2 -263
  348. package/src/chips/chips.ts +2 -259
  349. package/src/chips/filter-chip.ts +2 -255
  350. package/src/chips/index.ts +2 -5
  351. package/src/chips/input-chip.ts +2 -413
  352. package/src/chips/suggestion-chip.ts +2 -266
  353. package/src/directives/fill.ts +28 -5
  354. package/src/fab/fab.test.ts +101 -0
  355. package/src/fab/fab.ts +226 -0
  356. package/src/fab/index.ts +1 -0
  357. package/src/form/fields/chips/assist-chip.ts +263 -0
  358. package/src/form/fields/chips/chips.ts +234 -0
  359. package/src/form/fields/chips/filter-chip.ts +255 -0
  360. package/src/form/fields/chips/index.ts +5 -0
  361. package/src/form/fields/chips/input-chip.ts +413 -0
  362. package/src/form/fields/chips/suggestion-chip.ts +266 -0
  363. package/src/form/fields/date-range/date-range.test.ts +44 -0
  364. package/src/form/fields/date-range/date-range.ts +103 -97
  365. package/src/form/fields/index.ts +1 -0
  366. package/src/index.ts +2 -1
  367. package/src/overlay/overlay.animations.ts +2 -3
  368. package/src/overlay/overlay.component.ts +8 -4
  369. package/src/overlay/overlay.types.ts +14 -2
  370. package/src/theme/theme.component.ts +1 -0
  371. package/src/theme/theme.style.css +3 -0
  372. package/types/src/boat/boat.d.ts +27 -9
  373. package/types/src/boat/boat.test.d.ts +2 -0
  374. package/types/src/button/icon-button.d.ts +3 -2
  375. package/types/src/chips/assist-chip.d.ts +1 -47
  376. package/types/src/chips/chips.d.ts +1 -43
  377. package/types/src/chips/filter-chip.d.ts +1 -67
  378. package/types/src/chips/index.d.ts +1 -5
  379. package/types/src/chips/input-chip.d.ts +1 -82
  380. package/types/src/chips/suggestion-chip.d.ts +1 -52
  381. package/types/src/fab/fab.d.ts +80 -0
  382. package/types/src/fab/fab.test.d.ts +2 -0
  383. package/types/src/fab/index.d.ts +1 -0
  384. package/types/src/form/fields/chips/assist-chip.d.ts +47 -0
  385. package/types/src/form/fields/chips/chips.d.ts +35 -0
  386. package/types/src/form/fields/chips/filter-chip.d.ts +67 -0
  387. package/types/src/form/fields/chips/index.d.ts +5 -0
  388. package/types/src/form/fields/chips/input-chip.d.ts +82 -0
  389. package/types/src/form/fields/chips/suggestion-chip.d.ts +52 -0
  390. package/types/src/form/fields/date-range/date-range.d.ts +5 -10
  391. package/types/src/form/fields/index.d.ts +1 -0
  392. package/types/src/index.d.ts +2 -1
  393. package/types/src/overlay/overlay.component.d.ts +1 -0
  394. package/types/src/overlay/overlay.types.d.ts +12 -2
  395. package/types/src/theme/theme.component.d.ts +1 -0
  396. package/dist/SchmancyElement-CA0Wqt8m.js +0 -284
  397. package/dist/SchmancyElement-CA0Wqt8m.js.map +0 -1
  398. package/dist/SchmancyElement-CYIif26I.cjs +0 -2
  399. package/dist/SchmancyElement-CYIif26I.cjs.map +0 -1
  400. package/dist/boat-Vqjgo10B.cjs +0 -33
  401. package/dist/boat-Vqjgo10B.cjs.map +0 -1
  402. package/dist/boat-lr7MPZ7H.js.map +0 -1
  403. package/dist/chips-CXZ4dJCK.cjs.map +0 -1
  404. package/dist/chips-Dg6Lk6BT.js.map +0 -1
  405. package/dist/date-range-BU6WX7d5.js.map +0 -1
  406. package/dist/date-range-C-_be3_E.cjs.map +0 -1
  407. package/dist/directives-fLwDj6b0.cjs.map +0 -1
  408. package/dist/directives-zi1Mm2er.js.map +0 -1
  409. package/dist/input-chip-57tgNXKT.cjs.map +0 -1
  410. package/dist/input-chip-C6Lq1927.js.map +0 -1
  411. package/dist/overlay-BpNhd74N.js.map +0 -1
  412. package/dist/overlay-UQR2Dy3u.cjs.map +0 -1
  413. package/dist/theme-iKUaS9JB.cjs +0 -181
@@ -1 +1 @@
1
- {"version":3,"file":"select-9vXx1fhr.js","names":[],"sources":["../src/form/fields/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { SchmancyFormField } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { BehaviorSubject, combineLatest, fromEvent, Subject, takeUntil } from 'rxjs'\nimport { tap, withLatestFrom } from 'rxjs/operators'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n/**\n * Select dropdown component with single and multi-select support.\n *\n * @prop {string} name - Name attribute for form submission\n * @prop {string} label - Label text displayed above the select\n * @prop {string} placeholder - Placeholder text when no value is selected\n * @prop {boolean} required - Whether the field is required\n * @prop {boolean} multi - Enable multi-select mode\n * @prop {string} value - Selected value (single select mode)\n * @prop {string[]} values - Selected values (multi-select mode)\n */\n@customElement('schmancy-select')\nexport class SchmancySelect extends SchmancyFormField() {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`]\n\n\t// FACE wiring (formAssociated, internals, attachInternals) comes from\n\t// SchmancyFormField. Same for: name, required, disabled, validationMessage,\n\t// validateOn, touched/dirty/pristine/submitted, markTouched/markSubmitted,\n\t// formResetCallback, formDisabledCallback, FIELD_CONNECT_EVENT dispatch.\n\n\t@property({ type: String }) placeholder = ''\n\n\t// Override `value` with the narrowed select-specific type and a custom\n\t// getter/setter pair backed by reactive subjects.\n\t@property({ type: String, reflect: true })\n\toverride get value(): string | string[] {\n\t\treturn this.multi\n\t\t\t? (this._selectedValues$?.value ?? [])\n\t\t\t: (this._selectedValue$?.value ?? '')\n\t}\n\toverride set value(val: string | string[]) {\n\t\tif (!this._selectedValue$ || !this._selectedValues$) return\n\t\tif (this.multi) {\n\t\t\tconst values = Array.isArray(val)\n\t\t\t\t? val\n\t\t\t\t: val ? String(val).split(',').map(v => v.trim()).filter(Boolean) : []\n\t\t\tthis._selectedValues$.next(values)\n\t\t} else {\n\t\t\tthis._selectedValue$.next(val == null ? '' : String(val))\n\t\t}\n\t}\n\n\t// Values property for multi-select mode\n\t@property({ type: Array })\n\tget values() {\n\t\treturn [...this._selectedValues$.value]\n\t}\n\tset values(vals: string[]) {\n\t\tthis._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n\t}\n\n\t@property({ type: Boolean }) multi = false\n\t// `label` and `hint` come from the mixin.\n\t// M3 aligned sizes: 24dp (xxs) → 32dp (xs) → 40dp (sm) → 48dp (md) → 56dp (lg)\n\t@property({ type: String }) size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' = 'md'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\n\t// Store the initial/default value for reset behavior. Distinct from the\n\t// mixin's `_defaultValue` (which is `string` only); select needs the wider\n\t// shape so resetForm can restore arrays for multi-select.\n\t@state() private selectDefaultValue: string | string[] = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\n\t// Reactive state management\n\tprivate _options$ = new BehaviorSubject<SchmancyOption[]>([])\n\tprivate _selectedValue$ = new BehaviorSubject<string>('')\n\tprivate _selectedValues$ = new BehaviorSubject<string[]>([])\n\tprivate _optionSelect$ = new Subject<SchmancyOption>()\n\n\t/**\n\t * Tracks whether the user has actively interacted (clicked/typed/keyed\n\t * inside the dropdown). Distinct from the mixin's `touched` (which fires on\n\t * blur). Used to gate dropdown-positioning side-effects on user-driven\n\t * actions versus programmatic state changes.\n\t */\n\t@state() _userInteracted = false\n\n\t// Reference to current focused option (for keyboard navigation)\n\t@state() private _focusedOptionId = ''\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// Store initial value for reset\n\t\tthis.selectDefaultValue = this.value\n\n\t\t// Add keyboard handling to host element\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(takeUntil(this.disconnecting)).subscribe(this.handleKeyDown)\n\n\t\t// Setup reactive pipelines\n\t\tthis._setupReactivePipelines()\n\t}\n\n\toverride disconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanupPositioner?.()\n\t\t// Form event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\n\t\t// Initially hide any validation errors until user interacts\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t}\n\t}\n\n\toverride updated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Multi-select serializes to a comma-joined scalar on FormData; the\n\t\t\t// mixin's willUpdate already called setFormValue with the raw\n\t\t\t// value, override here for the joined-string shape.\n\t\t\tconst formValue = this.multi\n\t\t\t\t? this._selectedValues$.value.join(',')\n\t\t\t\t: this._selectedValue$.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// `dirty` is a mixin getter (value !== _defaultValue); no manual flag.\n\t\t\t// Mixin's willUpdate already calls checkValidity when _shouldShowError().\n\t\t}\n\n\t\t// When open state changes, setup or cleanup the dropdown positioner\n\t\tif (changedProps.has('isOpen')) {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.positionDropdown()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\t\t\t}\n\t\t}\n\t}\n\n\t// `shouldShowValidation` removed — replaced by mixin's `_shouldShowError()`.\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\t// Read directly from the BehaviorSubject to avoid string conversion issues\n\t\t\tconst selectedValues = this._selectedValues$.value\n\t\t\tthis.options?.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t?.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t.join(', ') || this.placeholder\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\t// Single select - read from BehaviorSubject\n\t\t\tconst currentValue = this._selectedValue$.value\n\t\t\tthis.options?.forEach(o => {\n\t\t\t\t// Set selected property on each option based on matching value\n\t\t\t\to.selected = o.value === currentValue\n\t\t\t})\n\t\t\tconst selectedOption = this.options?.find(o => o.value === currentValue)\n\t\t\tthis.valueLabel = selectedOption ? (selectedOption.label || selectedOption.textContent || '') : this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options?.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\n\t\t\t// Set tabindex to -1 so they're focusable programmatically but not in the tab order\n\t\t\toption.tabIndex = -1\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? this._selectedValues$.value.includes(option.value) : option.value === this._selectedValue$.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\t// Get viewport dimensions\n\t\t\tconst viewportHeight = window.innerHeight\n\t\t\tconst triggerRect = reference.getBoundingClientRect()\n\n\t\t\t// Calculate available space below and above\n\t\t\tconst spaceBelow = viewportHeight - triggerRect.bottom\n\t\t\tconst spaceAbove = triggerRect.top\n\n\t\t\t// Calculate max height - use 75% of the largest available space, but at least 150px\n\t\t\tconst maxHeight = Math.max(Math.max(spaceBelow, spaceAbove) * 0.75, 150)\n\n\t\t\t// Determine if we should flip\n\t\t\tconst shouldFlip = spaceBelow < 200 && spaceAbove > spaceBelow\n\n\t\t\t// Apply max height\n\t\t\tthis.ul.style.maxHeight = `${maxHeight}px`\n\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: shouldFlip ? 'top-start' : 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t\twidth: `${reference.offsetWidth}px`, // Match the width of the trigger\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Don't handle keyboard events when disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Find current focused option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst current = options.findIndex(o => o.id === this._focusedOptionId) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(current + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (this._focusedOptionId) {\n\t\t\t\t\tconst focusedOption = options.find(opt => opt.id === this._focusedOptionId)\n\t\t\t\t\tif (focusedOption) {\n\t\t\t\t\t\tthis.handleOptionSelect(focusedOption.value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: SchmancyOption[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tthis._focusedOptionId = option.id\n\n\t\t\t// Update aria-activedescendant on the combobox\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tif (combobox) {\n\t\t\t\tcombobox.setAttribute('aria-activedescendant', option.id)\n\t\t\t}\n\n\t\t\t// Ensure option is visible in the scrollable area\n\t\t\tif (this.ul && option.offsetTop !== undefined) {\n\t\t\t\t// Get position info\n\t\t\t\tconst optionTop = option.offsetTop\n\t\t\t\tconst optionHeight = option.offsetHeight\n\t\t\t\tconst scrollTop = this.ul.scrollTop\n\t\t\t\tconst ulHeight = this.ul.clientHeight\n\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tif (optionTop < scrollTop) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop\n\t\t\t\t} else if (optionTop + optionHeight > scrollTop + ulHeight) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop + optionHeight - ulHeight\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\t// Don't open if disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\t// Don't mark as touched on opening - we'll do that on closing\n\t\t// so errors only show after interaction is complete\n\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\t// Focus first or selected option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.value === this._selectedValue$.value)\n\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\t// Don't automatically validate when opening\n\t\t// Only validate if explicitly requested (like from a form submission)\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\t// Only mark as touched if the user actually interacted with the component\n\t\t// and made a selection or explicitly closed it without selecting\n\t\tif (this._userInteracted) {\n\t\t\tthis.touched = true\n\t\t}\n\n\t\tthis.isOpen = false\n\t\tthis._focusedOptionId = ''\n\n\t\t// Update combobox to remove aria-activedescendant\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tif (combobox) {\n\t\t\tcombobox.removeAttribute('aria-activedescendant')\n\t\t\tcombobox?.focus()\n\t\t}\n\n\t\t// Only check validity when closing if the user has actually interacted\n\t\t// with the component and validation should be shown\n\t\tif (this._userInteracted && this._shouldShowError()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate _setupReactivePipelines() {\n\t\t// Listen for option-select events from child options\n\t\tfromEvent<CustomEvent>(this, 'option-select')\n\t\t\t.pipe(\n\t\t\t\ttap((e) => {\n\t\t\t\t\te.stopPropagation() // Prevent event from bubbling further\n\t\t\t\t\tconst option = this.options.find(o => o.value === e.detail.value)\n\t\t\t\t\tif (option) {\n\t\t\t\t\t\tthis._optionSelect$.next(option)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Handle option selection through reactive pipeline\n\t\tthis._optionSelect$\n\t\t\t.pipe(\n\t\t\t\twithLatestFrom(this._selectedValue$, this._selectedValues$),\n\t\t\t\ttap(([option, _, currentValues]) => {\n\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\tthis.markTouched()\n\t\t\t\t\t// `dirty` is a mixin getter; setting `value` below triggers it\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst index = currentValues.indexOf(option.value)\n\t\t\t\t\t\tconst newValues = index > -1\n\t\t\t\t\t\t\t? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n\t\t\t\t\t\t\t: [...currentValues, option.value]\n\t\t\t\t\t\tthis._selectedValues$.next(newValues)\n\n\t\t\t\t\t\t// Update form value\n\t\t\t\t\t\tthis.internals?.setFormValue(newValues.join(','))\n\n\t\t\t\t\t\t// Update display label\n\t\t\t\t\t\tthis.valueLabel = newValues.length > 0\n\t\t\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t\t\t.filter(o => newValues.includes(o.value))\n\t\t\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t\t\t: this.placeholder\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Single select\n\t\t\t\t\t\tthis._selectedValue$.next(option.value)\n\n\t\t\t\t\t\t// Update form value\n\t\t\t\t\t\tthis.internals?.setFormValue(option.value)\n\n\t\t\t\t\t\tthis.valueLabel = option.label || option.textContent || this.placeholder\n\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the option's accessibility state\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\t// Dispatch change event\n\t\t\t\t\tthis._fireChangeEvent()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Options management pipeline - bind pointerdown events exactly like autocomplete\n\t\tthis._options$\n\t\t\t.pipe(\n\t\t\t\ttap((options) => {\n\t\t\t\t\toptions.forEach((option, index) => {\n\t\t\t\t\t\toption.setAttribute('role', 'option')\n\t\t\t\t\t\toption.tabIndex = -1\n\t\t\t\t\t\tif (!option.id) {\n\t\t\t\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Use data-event-bound to prevent duplicate bindings\n\t\t\t\t\t\tif (!option.hasAttribute('data-event-bound')) {\n\t\t\t\t\t\t\t// Use click event instead of pointerdown for better mobile UX\n\t\t\t\t\t\t\t// This allows users to scroll through options without immediately selecting\n\t\t\t\t\t\t\tfromEvent(option, 'click').pipe(\n\t\t\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t\t\t\t\t).subscribe(() => this._optionSelect$.next(option))\n\t\t\t\t\t\t\toption.setAttribute('data-event-bound', 'true')\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Selection sync pipeline - sync selected states with value changes\n\t\tcombineLatest([this._selectedValue$, this._selectedValues$, this._options$])\n\t\t\t.pipe(\n\t\t\t\ttap(([singleValue, multiValues, options]) => {\n\t\t\t\t\tif (options.length === 0) return\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = multiValues.includes(option.value)\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = option.value === singleValue\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\t// This method is now called from keyboard navigation only\n\t\tconst option = this.options.find(o => o.value === value)\n\t\tif (option) {\n\t\t\tthis._optionSelect$.next(option)\n\t\t}\n\t}\n\n\tprivate _fireChangeEvent() {\n\t\t// Get the current value based on multi/single mode\n\t\tconst value = this.multi ? this._selectedValues$.value : this._selectedValue$.value\n\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Disabled fields are always valid\n\t\tif (this.disabled) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi\n\t\t\t? this._selectedValues$.value.length === 0\n\t\t\t: !this._selectedValue$.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this._shouldShowError()\n\t\t\tthis.inputRef.error = showError\n\t\t\tthis.inputRef.hint = showError ? this.validationMessage : this.hint\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// If invalid and not already open, automatically open the dropdown to show options\n\t\t\tif (!valid && !this.isOpen) {\n\t\t\t\t// Open the dropdown but don't mark as user interaction yet\n\t\t\t\t// This helps users immediately see available options when validation fails\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\t// `markTouched`, `markSubmitted`, `touched`, `dirty`, `pristine`, `submitted`,\n\t// `error` (storage) — all from the mixin. Select's `error` semantics\n\t// (errors-while-open suppression) live in render() via _shouldShowError() +\n\t// !isOpen, not as a separate getter.\n\n\t/**\n\t * Multi-value-aware `toFormEntries`. Single-select emits one `[name,value]`;\n\t * multi-select emits N entries with the same name (canonical FormData shape\n\t * for repeated fields).\n\t */\n\toverride toFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\tif (!this.name || this.disabled) return []\n\t\tconst v = this.value\n\t\tif (v === undefined || v === null || v === '') return []\n\t\tif (Array.isArray(v))\n\t\t\treturn v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\treturn [[this.name, String(v)]]\n\t}\n\n\toverride setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this._shouldShowError()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\t/**\n\t * Reset to the snapshot captured at connect time. Mixin's `resetForm`\n\t * handles touched/submitted/error/validationMessage; the override layers on\n\t * select-specific cleanup (value subjects, label, validity).\n\t */\n\toverride resetForm(): void {\n\t\t// Restore value (multi-aware) before super so the mixin's _defaultValue\n\t\t// reset doesn't clobber the array-shape we need.\n\t\tthis.value = this.selectDefaultValue\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\t\tsuper.resetForm()\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\t/** Back-compat alias for callers that used the previous public API. */\n\tpublic reset(): void {\n\t\tthis.resetForm()\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy and interaction\n\t\t// Never show errors on initial render or if the dropdown is open\n\t\tconst showErrors = !this.isValid && this._shouldShowError() && !this.isOpen\n\n\t\t// Add caret icon based on open state\n\t\tconst caretIcon = this.isOpen\n\t\t\t? html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▲</span>`\n\t\t\t: html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▼</span>`\n\n\t\treturn html`\n\t\t\t<div class=\"relative ${this.disabled ? 'opacity-60 cursor-not-allowed' : ''}\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name ?? ''}\n\t\t\t\t\ttabIndex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\taria-activedescendant=${ifDefined(this._focusedOptionId || undefined)}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.disabled=${this.disabled}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\t.size=${this.size}\n\t\t\t\t\t.readonly=${true}\n\t\t\t\t\tclickable\n\t\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\t\t// Don't process clicks if disabled\n\t\t\t\t\t\tif (this.disabled) {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// On first click, don't count this as user interaction yet\n\t\t\t\t\t\tif (!this.isOpen) {\n\t\t\t\t\t\t\t// Open without triggering validation - we'll validate when they close\n\t\t\t\t\t\t\tthis.openDropdown(false)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Mark as interacted when they close the dropdown\n\t\t\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t${caretIcon}\n\t\t\t\t</sch-input>\n\n\t\t\t\t<!-- Overlay for capturing clicks outside when dropdown is open -->\n\t\t\t\t${this.isOpen\n\t\t\t\t\t? html` <div class=\"fixed inset-0 z-10\" @click=${this.closeDropdown} tabindex=\"-1\" aria-hidden=\"true\"></div> `\n\t\t\t\t\t: ''}\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute min-w-full w-full z-20 mt-1 rounded-md shadow-lg': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({\n\t\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.low,\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis._options$.next(this.options)\n\t\t\t\t\t\t\t// Sync selection state when options re-render\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n// Don't export 'select' here as it conflicts with the store's select decorator\n// export const select = SchmancySelect\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"mappings":";;;;;;;;;;;AA6BO,IAAA,IAAA,cAA6B,EAAA,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,CAAA,GAAA,KAAA,cAkBO,IAAA,KAAA,QAAA,CA+BL,GA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AA,KAAA,CAAA,GAAA,EAAA,CACjB,EAAsB,EAAE,SAAA,CAAS,EAAA,CAAA,CAAA,GAAM,EAAA,WAAA,WAAA,KAAA,CAAA,GAAA,EAAA,CAevC,EAAA,CAAA,GAAM,EAAA,WAAA,mBAAA,KAAA,CAAA,GAAA,EAAA,CAGN,EAAA,CAAA,GAAM,EAAA,WAAA,oBAAA,KAAA,CAAA,GAAA,IAAA,EAAA,CArFP,EAAc,iBAAA,CAAA,GAAiB,CAAA;AAAA,SAAA,KAAA"}
1
+ {"version":3,"file":"select-CEyhNtZ2.js","names":[],"sources":["../src/form/fields/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { SchmancyFormField } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { BehaviorSubject, combineLatest, fromEvent, Subject, takeUntil } from 'rxjs'\nimport { tap, withLatestFrom } from 'rxjs/operators'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n/**\n * Select dropdown component with single and multi-select support.\n *\n * @prop {string} name - Name attribute for form submission\n * @prop {string} label - Label text displayed above the select\n * @prop {string} placeholder - Placeholder text when no value is selected\n * @prop {boolean} required - Whether the field is required\n * @prop {boolean} multi - Enable multi-select mode\n * @prop {string} value - Selected value (single select mode)\n * @prop {string[]} values - Selected values (multi-select mode)\n */\n@customElement('schmancy-select')\nexport class SchmancySelect extends SchmancyFormField() {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`]\n\n\t// FACE wiring (formAssociated, internals, attachInternals) comes from\n\t// SchmancyFormField. Same for: name, required, disabled, validationMessage,\n\t// validateOn, touched/dirty/pristine/submitted, markTouched/markSubmitted,\n\t// formResetCallback, formDisabledCallback, FIELD_CONNECT_EVENT dispatch.\n\n\t@property({ type: String }) placeholder = ''\n\n\t// Override `value` with the narrowed select-specific type and a custom\n\t// getter/setter pair backed by reactive subjects.\n\t@property({ type: String, reflect: true })\n\toverride get value(): string | string[] {\n\t\treturn this.multi\n\t\t\t? (this._selectedValues$?.value ?? [])\n\t\t\t: (this._selectedValue$?.value ?? '')\n\t}\n\toverride set value(val: string | string[]) {\n\t\tif (!this._selectedValue$ || !this._selectedValues$) return\n\t\tif (this.multi) {\n\t\t\tconst values = Array.isArray(val)\n\t\t\t\t? val\n\t\t\t\t: val ? String(val).split(',').map(v => v.trim()).filter(Boolean) : []\n\t\t\tthis._selectedValues$.next(values)\n\t\t} else {\n\t\t\tthis._selectedValue$.next(val == null ? '' : String(val))\n\t\t}\n\t}\n\n\t// Values property for multi-select mode\n\t@property({ type: Array })\n\tget values() {\n\t\treturn [...this._selectedValues$.value]\n\t}\n\tset values(vals: string[]) {\n\t\tthis._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n\t}\n\n\t@property({ type: Boolean }) multi = false\n\t// `label` and `hint` come from the mixin.\n\t// M3 aligned sizes: 24dp (xxs) → 32dp (xs) → 40dp (sm) → 48dp (md) → 56dp (lg)\n\t@property({ type: String }) size: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' = 'md'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\n\t// Store the initial/default value for reset behavior. Distinct from the\n\t// mixin's `_defaultValue` (which is `string` only); select needs the wider\n\t// shape so resetForm can restore arrays for multi-select.\n\t@state() private selectDefaultValue: string | string[] = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\n\t// Reactive state management\n\tprivate _options$ = new BehaviorSubject<SchmancyOption[]>([])\n\tprivate _selectedValue$ = new BehaviorSubject<string>('')\n\tprivate _selectedValues$ = new BehaviorSubject<string[]>([])\n\tprivate _optionSelect$ = new Subject<SchmancyOption>()\n\n\t/**\n\t * Tracks whether the user has actively interacted (clicked/typed/keyed\n\t * inside the dropdown). Distinct from the mixin's `touched` (which fires on\n\t * blur). Used to gate dropdown-positioning side-effects on user-driven\n\t * actions versus programmatic state changes.\n\t */\n\t@state() _userInteracted = false\n\n\t// Reference to current focused option (for keyboard navigation)\n\t@state() private _focusedOptionId = ''\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substring(2, 9)}`\n\t\t}\n\n\t\t// Store initial value for reset\n\t\tthis.selectDefaultValue = this.value\n\n\t\t// Add keyboard handling to host element\n\t\tfromEvent<KeyboardEvent>(this, 'keydown').pipe(takeUntil(this.disconnecting)).subscribe(this.handleKeyDown)\n\n\t\t// Setup reactive pipelines\n\t\tthis._setupReactivePipelines()\n\t}\n\n\toverride disconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.cleanupPositioner?.()\n\t\t// Form event listeners are automatically cleaned up via takeUntil(this.disconnecting)\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\n\t\t// Initially hide any validation errors until user interacts\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t}\n\t}\n\n\toverride updated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Multi-select serializes to a comma-joined scalar on FormData; the\n\t\t\t// mixin's willUpdate already called setFormValue with the raw\n\t\t\t// value, override here for the joined-string shape.\n\t\t\tconst formValue = this.multi\n\t\t\t\t? this._selectedValues$.value.join(',')\n\t\t\t\t: this._selectedValue$.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// `dirty` is a mixin getter (value !== _defaultValue); no manual flag.\n\t\t\t// Mixin's willUpdate already calls checkValidity when _shouldShowError().\n\t\t}\n\n\t\t// When open state changes, setup or cleanup the dropdown positioner\n\t\tif (changedProps.has('isOpen')) {\n\t\t\tif (this.isOpen) {\n\t\t\t\tthis.positionDropdown()\n\t\t\t} else {\n\t\t\t\tthis.cleanupPositioner?.()\n\t\t\t}\n\t\t}\n\t}\n\n\t// `shouldShowValidation` removed — replaced by mixin's `_shouldShowError()`.\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\t// Read directly from the BehaviorSubject to avoid string conversion issues\n\t\t\tconst selectedValues = this._selectedValues$.value\n\t\t\tthis.options?.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t?.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t.join(', ') || this.placeholder\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\t// Single select - read from BehaviorSubject\n\t\t\tconst currentValue = this._selectedValue$.value\n\t\t\tthis.options?.forEach(o => {\n\t\t\t\t// Set selected property on each option based on matching value\n\t\t\t\to.selected = o.value === currentValue\n\t\t\t})\n\t\t\tconst selectedOption = this.options?.find(o => o.value === currentValue)\n\t\t\tthis.valueLabel = selectedOption ? (selectedOption.label || selectedOption.textContent || '') : this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options?.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\n\t\t\t// Set tabindex to -1 so they're focusable programmatically but not in the tab order\n\t\t\toption.tabIndex = -1\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? this._selectedValues$.value.includes(option.value) : option.value === this._selectedValue$.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\t// Get viewport dimensions\n\t\t\tconst viewportHeight = window.innerHeight\n\t\t\tconst triggerRect = reference.getBoundingClientRect()\n\n\t\t\t// Calculate available space below and above\n\t\t\tconst spaceBelow = viewportHeight - triggerRect.bottom\n\t\t\tconst spaceAbove = triggerRect.top\n\n\t\t\t// Calculate max height - use 75% of the largest available space, but at least 150px\n\t\t\tconst maxHeight = Math.max(Math.max(spaceBelow, spaceAbove) * 0.75, 150)\n\n\t\t\t// Determine if we should flip\n\t\t\tconst shouldFlip = spaceBelow < 200 && spaceAbove > spaceBelow\n\n\t\t\t// Apply max height\n\t\t\tthis.ul.style.maxHeight = `${maxHeight}px`\n\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: shouldFlip ? 'top-start' : 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t\twidth: `${reference.offsetWidth}px`, // Match the width of the trigger\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\t// Don't handle keyboard events when disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// Find current focused option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst current = options.findIndex(o => o.id === this._focusedOptionId) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(current + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, 0)\n\t\t\t\tbreak\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, options.length - 1)\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (this._focusedOptionId) {\n\t\t\t\t\tconst focusedOption = options.find(opt => opt.id === this._focusedOptionId)\n\t\t\t\t\tif (focusedOption) {\n\t\t\t\t\t\tthis.handleOptionSelect(focusedOption.value)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: SchmancyOption[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tthis._focusedOptionId = option.id\n\n\t\t\t// Update aria-activedescendant on the combobox\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tif (combobox) {\n\t\t\t\tcombobox.setAttribute('aria-activedescendant', option.id)\n\t\t\t}\n\n\t\t\t// Ensure option is visible in the scrollable area\n\t\t\tif (this.ul && option.offsetTop !== undefined) {\n\t\t\t\t// Get position info\n\t\t\t\tconst optionTop = option.offsetTop\n\t\t\t\tconst optionHeight = option.offsetHeight\n\t\t\t\tconst scrollTop = this.ul.scrollTop\n\t\t\t\tconst ulHeight = this.ul.clientHeight\n\n\t\t\t\t// Scroll into view if needed\n\t\t\t\tif (optionTop < scrollTop) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop\n\t\t\t\t} else if (optionTop + optionHeight > scrollTop + ulHeight) {\n\t\t\t\t\tthis.ul.scrollTop = optionTop + optionHeight - ulHeight\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\t// Don't open if disabled\n\t\tif (this.disabled) {\n\t\t\treturn\n\t\t}\n\n\t\t// Don't mark as touched on opening - we'll do that on closing\n\t\t// so errors only show after interaction is complete\n\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\t// Focus first or selected option\n\t\tconst options = Array.from(this.options || [])\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.value === this._selectedValue$.value)\n\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\t// Don't automatically validate when opening\n\t\t// Only validate if explicitly requested (like from a form submission)\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\t// Only mark as touched if the user actually interacted with the component\n\t\t// and made a selection or explicitly closed it without selecting\n\t\tif (this._userInteracted) {\n\t\t\tthis.touched = true\n\t\t}\n\n\t\tthis.isOpen = false\n\t\tthis._focusedOptionId = ''\n\n\t\t// Update combobox to remove aria-activedescendant\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tif (combobox) {\n\t\t\tcombobox.removeAttribute('aria-activedescendant')\n\t\t\tcombobox?.focus()\n\t\t}\n\n\t\t// Only check validity when closing if the user has actually interacted\n\t\t// with the component and validation should be shown\n\t\tif (this._userInteracted && this._shouldShowError()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate _setupReactivePipelines() {\n\t\t// Listen for option-select events from child options\n\t\tfromEvent<CustomEvent>(this, 'option-select')\n\t\t\t.pipe(\n\t\t\t\ttap((e) => {\n\t\t\t\t\te.stopPropagation() // Prevent event from bubbling further\n\t\t\t\t\tconst option = this.options.find(o => o.value === e.detail.value)\n\t\t\t\t\tif (option) {\n\t\t\t\t\t\tthis._optionSelect$.next(option)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Handle option selection through reactive pipeline\n\t\tthis._optionSelect$\n\t\t\t.pipe(\n\t\t\t\twithLatestFrom(this._selectedValue$, this._selectedValues$),\n\t\t\t\ttap(([option, _, currentValues]) => {\n\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\tthis.markTouched()\n\t\t\t\t\t// `dirty` is a mixin getter; setting `value` below triggers it\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\tconst index = currentValues.indexOf(option.value)\n\t\t\t\t\t\tconst newValues = index > -1\n\t\t\t\t\t\t\t? [...currentValues.slice(0, index), ...currentValues.slice(index + 1)]\n\t\t\t\t\t\t\t: [...currentValues, option.value]\n\t\t\t\t\t\tthis._selectedValues$.next(newValues)\n\n\t\t\t\t\t\t// Update form value\n\t\t\t\t\t\tthis.internals?.setFormValue(newValues.join(','))\n\n\t\t\t\t\t\t// Update display label\n\t\t\t\t\t\tthis.valueLabel = newValues.length > 0\n\t\t\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t\t\t.filter(o => newValues.includes(o.value))\n\t\t\t\t\t\t\t\t\t.map(o => o.label || o.textContent || '')\n\t\t\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t\t\t: this.placeholder\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Single select\n\t\t\t\t\t\tthis._selectedValue$.next(option.value)\n\n\t\t\t\t\t\t// Update form value\n\t\t\t\t\t\tthis.internals?.setFormValue(option.value)\n\n\t\t\t\t\t\tthis.valueLabel = option.label || option.textContent || this.placeholder\n\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t}\n\n\t\t\t\t\t// Update the option's accessibility state\n\t\t\t\t\tthis.setupOptionsAccessibility()\n\n\t\t\t\t\t// Dispatch change event\n\t\t\t\t\tthis._fireChangeEvent()\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Options management pipeline - bind pointerdown events exactly like autocomplete\n\t\tthis._options$\n\t\t\t.pipe(\n\t\t\t\ttap((options) => {\n\t\t\t\t\toptions.forEach((option, index) => {\n\t\t\t\t\t\toption.setAttribute('role', 'option')\n\t\t\t\t\t\toption.tabIndex = -1\n\t\t\t\t\t\tif (!option.id) {\n\t\t\t\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Use data-event-bound to prevent duplicate bindings\n\t\t\t\t\t\tif (!option.hasAttribute('data-event-bound')) {\n\t\t\t\t\t\t\t// Use click event instead of pointerdown for better mobile UX\n\t\t\t\t\t\t\t// This allows users to scroll through options without immediately selecting\n\t\t\t\t\t\t\tfromEvent(option, 'click').pipe(\n\t\t\t\t\t\t\t\ttap(e => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t\t\t\t\t).subscribe(() => this._optionSelect$.next(option))\n\t\t\t\t\t\t\toption.setAttribute('data-event-bound', 'true')\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\t// Selection sync pipeline - sync selected states with value changes\n\t\tcombineLatest([this._selectedValue$, this._selectedValues$, this._options$])\n\t\t\t.pipe(\n\t\t\t\ttap(([singleValue, multiValues, options]) => {\n\t\t\t\t\tif (options.length === 0) return\n\n\t\t\t\t\tif (this.multi) {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = multiValues.includes(option.value)\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\toptions.forEach(option => {\n\t\t\t\t\t\t\toption.selected = option.value === singleValue\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting)\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\t// This method is now called from keyboard navigation only\n\t\tconst option = this.options.find(o => o.value === value)\n\t\tif (option) {\n\t\t\tthis._optionSelect$.next(option)\n\t\t}\n\t}\n\n\tprivate _fireChangeEvent() {\n\t\t// Get the current value based on multi/single mode\n\t\tconst value = this.multi ? this._selectedValues$.value : this._selectedValue$.value\n\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Disabled fields are always valid\n\t\tif (this.disabled) {\n\t\t\treturn true\n\t\t}\n\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi\n\t\t\t? this._selectedValues$.value.length === 0\n\t\t\t: !this._selectedValue$.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this._shouldShowError()\n\t\t\tthis.inputRef.error = showError\n\t\t\tthis.inputRef.hint = showError ? this.validationMessage : this.hint\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// If invalid and not already open, automatically open the dropdown to show options\n\t\t\tif (!valid && !this.isOpen) {\n\t\t\t\t// Open the dropdown but don't mark as user interaction yet\n\t\t\t\t// This helps users immediately see available options when validation fails\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\t// `markTouched`, `markSubmitted`, `touched`, `dirty`, `pristine`, `submitted`,\n\t// `error` (storage) — all from the mixin. Select's `error` semantics\n\t// (errors-while-open suppression) live in render() via _shouldShowError() +\n\t// !isOpen, not as a separate getter.\n\n\t/**\n\t * Multi-value-aware `toFormEntries`. Single-select emits one `[name,value]`;\n\t * multi-select emits N entries with the same name (canonical FormData shape\n\t * for repeated fields).\n\t */\n\toverride toFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\tif (!this.name || this.disabled) return []\n\t\tconst v = this.value\n\t\tif (v === undefined || v === null || v === '') return []\n\t\tif (Array.isArray(v))\n\t\t\treturn v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\treturn [[this.name, String(v)]]\n\t}\n\n\toverride setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this._shouldShowError()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\t/**\n\t * Reset to the snapshot captured at connect time. Mixin's `resetForm`\n\t * handles touched/submitted/error/validationMessage; the override layers on\n\t * select-specific cleanup (value subjects, label, validity).\n\t */\n\toverride resetForm(): void {\n\t\t// Restore value (multi-aware) before super so the mixin's _defaultValue\n\t\t// reset doesn't clobber the array-shape we need.\n\t\tthis.value = this.selectDefaultValue\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\t\tsuper.resetForm()\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\t/** Back-compat alias for callers that used the previous public API. */\n\tpublic reset(): void {\n\t\tthis.resetForm()\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy and interaction\n\t\t// Never show errors on initial render or if the dropdown is open\n\t\tconst showErrors = !this.isValid && this._shouldShowError() && !this.isOpen\n\n\t\t// Add caret icon based on open state\n\t\tconst caretIcon = this.isOpen\n\t\t\t? html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▲</span>`\n\t\t\t: html`<span class=\"absolute right-3 top-1/2 transform -translate-y-1/2\">▼</span>`\n\n\t\treturn html`\n\t\t\t<div class=\"relative ${this.disabled ? 'opacity-60 cursor-not-allowed' : ''}\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name ?? ''}\n\t\t\t\t\ttabIndex=${this.disabled ? '-1' : '0'}\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\taria-activedescendant=${ifDefined(this._focusedOptionId || undefined)}\n\t\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.disabled=${this.disabled}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\t.size=${this.size}\n\t\t\t\t\t.readonly=${true}\n\t\t\t\t\tclickable\n\t\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\t\t// Don't process clicks if disabled\n\t\t\t\t\t\tif (this.disabled) {\n\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// On first click, don't count this as user interaction yet\n\t\t\t\t\t\tif (!this.isOpen) {\n\t\t\t\t\t\t\t// Open without triggering validation - we'll validate when they close\n\t\t\t\t\t\t\tthis.openDropdown(false)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Mark as interacted when they close the dropdown\n\t\t\t\t\t\t\tthis._userInteracted = true\n\t\t\t\t\t\t\tthis.closeDropdown()\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t${caretIcon}\n\t\t\t\t</sch-input>\n\n\t\t\t\t<!-- Overlay for capturing clicks outside when dropdown is open -->\n\t\t\t\t${this.isOpen\n\t\t\t\t\t? html` <div class=\"fixed inset-0 z-10\" @click=${this.closeDropdown} tabindex=\"-1\" aria-hidden=\"true\"></div> `\n\t\t\t\t\t: ''}\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute min-w-full w-full z-20 mt-1 rounded-md shadow-lg': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({\n\t\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.low,\n\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis._options$.next(this.options)\n\t\t\t\t\t\t\t// Sync selection state when options re-render\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\n// Don't export 'select' here as it conflicts with the store's select decorator\n// export const select = SchmancySelect\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"mappings":";;;;;;;;;;;AA6BO,IAAA,IAAA,cAA6B,EAAA,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,CAAA,GAAA,KAAA,cAkBO,IAAA,KAAA,QAAA,CA+BL,GAAA,KAAA,OAGiC,MAAA,KAAA,SAAA,CAG5C,GAAA,KAAA,aACI,IAAA,KAAA,UAAA,CACH,GAAA,KAAA,qBAK8B,IAAA,KAAA,YAQrC,IAAI,EAAkC,CAAA,CAAA,GAAA,KAAA,kBAChC,IAAI,EAAwB,EAAA,GAAA,KAAA,mBAC3B,IAAI,EAA0B,CAAA,CAAA,GAAA,KAAA,iBAChC,IAAI,KAAA,KAAA,kBAAA,CAQF,GAAA,KAAA,mBAGS,IAAA,KAAA,iBA2IX,MAAA;GAExB,IAAI,KAA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
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./select-81jniVTs.cjs`);Object.defineProperty(exports,`SchmancySelect`,{enumerable:!0,get:function(){return e.t}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./select-B-SSmUDe.cjs`);Object.defineProperty(exports,`SchmancySelect`,{enumerable:!0,get:function(){return e.t}});
package/dist/select.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as e } from "./select-9vXx1fhr.js";
1
+ import { t as e } from "./select-CEyhNtZ2.js";
2
2
  export { e as SchmancySelect };
package/dist/skeleton.cjs CHANGED
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-CYIif26I.cjs`);require(`./mixins-CGXSzZc7.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=class extends e.t{constructor(...e){super(...e),this.shape=`rect`,this.width=``,this.height=``,this.radius=``}static{this.styles=[n.css`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-BBzRWB1w.cjs`);require(`./mixins-DPdzC9ZH.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=class extends e.t{constructor(...e){super(...e),this.shape=`rect`,this.width=``,this.height=``,this.radius=``}static{this.styles=[n.css`
2
2
  :host {
3
3
  display: block;
4
4
  width: var(--_sw, 100%);
package/dist/skeleton.js CHANGED
@@ -1,5 +1,5 @@
1
- import { t as e, u as t } from "./SchmancyElement-CA0Wqt8m.js";
2
- import "./mixins-Bp0wIHg2.js";
1
+ import { t as e, u as t } from "./SchmancyElement-C3CpdNsi.js";
2
+ import "./mixins-DTzfFVyv.js";
3
3
  import { customElement as n, property as r } from "lit/decorators.js";
4
4
  import { css as i, html as a } from "lit";
5
5
  var o = class extends e {
@@ -36,7 +36,7 @@ The framework pieces — touch before components.
36
36
  [Overlay](./overlay.md) · [Notification](./notification.md) · [Menu](./menu.md) · [Dropdown](./dropdown.md) · [Tooltip (directive)](./tooltip.md) · [Lightbox](./lightbox.md) · [Expand](./expand.md)
37
37
 
38
38
  ### Interactive
39
- [Button](./button.md) · [List](./list.md) · [Details](./details.md) · [Table](./table.md) · [Tree](./tree.md) · [Slider](./slider.md)
39
+ [Button](./button.md) · [FAB](./fab.md) · [List](./list.md) · [Details](./details.md) · [Table](./table.md) · [Tree](./tree.md) · [Slider](./slider.md)
40
40
 
41
41
  > Lab: [QR Scanner](../../lab/skills/qr-scanner.md) — install `@mhmo91/schmancy-lab`
42
42
 
@@ -56,9 +56,9 @@ Use component tags (`<schmancy-menu>`, `<schmancy-dropdown>`, `<schmancy-tooltip
56
56
 
57
57
  ## Composition
58
58
 
59
- - **Audit by grep** (`AUDIT_BY_GREP`). An agent's compliance report on a file under a rule is the list of file:line citations of the rule's forbidden patterns; an empty list is compliance. The rule applies to every other rule in this skill (`PRIMITIVE_FIRST`, `TOKEN_FIRST_NO_ARBITRARY`, `NO_LOCAL_CLASS_CSS`, `NO_TERNARY_NOTHING_DISPATCH`): a claim that a file complies is a claim about what the file does NOT contain, and that claim is verified by enumerating the rule's forbidden patterns and grepping each one.
60
- Sources: each rule above names its forbidden patterns explicitly — `TOKEN_FIRST_NO_ARBITRARY` forbids `[...]` arbitrary-value Tailwind utilities; `PRIMITIVE_FIRST` forbids raw HTML elements whose class attribute carries design-system styling (typography/color/surface/spacing-as-design); `NO_LOCAL_CLASS_CSS` forbids class/id/attribute selectors inside the `css` template; `NO_TERNARY_NOTHING_DISPATCH` forbids `${cond ? html\`...\` : nothing}` and `${cond && html\`...\`}` patterns.
61
- Remediation: before reporting any file compliant, run a grep against each forbidden pattern named by the rule under audit (e.g. `grep -nE '\[(?:[^]]+)\]' <file>` for `TOKEN_FIRST_NO_ARBITRARY`; `grep -nE 'class="[^"]*\b(text-|bg-|border-|rounded-|shadow-|tracking-|leading-|p[xy]?-)' <file>` plus a manual scan for raw `<div>`/`<span>` carrying those classes for `PRIMITIVE_FIRST`). The compliance report's body is the concatenation of those grep outputs annotated with their rule name; an empty body across every pattern under every rule is the only form of "compliant". A claim of compliance unaccompanied by the grep evidence is not a compliance report and is treated as an unverified assertion that the audit loop rejects.
59
+ - **Audit by grep** (`AUDIT_BY_GREP`). An agent's compliance report on a file under a rule is the list of file:line citations of the rule's forbidden patterns; an empty list is compliance. The rule applies to every other rule in this skill (`PRIMITIVE_FIRST`, `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`, `NO_LOCAL_CLASS_CSS`, `NO_TERNARY_NOTHING_DISPATCH`): a claim that a file complies is a claim about what the file does NOT contain, and that claim is verified by enumerating the rule's forbidden patterns and grepping each one.
60
+ Sources: each rule above names its forbidden patterns explicitly — `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE` forbids a single-value `--<namespace>-x` `@theme` alias (the portable `[...]` arbitrary value is canonical, not forbidden); `PRIMITIVE_FIRST` forbids raw HTML elements whose class attribute carries design-system styling (typography/color/surface/spacing-as-design); `NO_LOCAL_CLASS_CSS` forbids class/id/attribute selectors inside the `css` template; `NO_TERNARY_NOTHING_DISPATCH` forbids `${cond ? html\`...\` : nothing}` and `${cond && html\`...\`}` patterns.
61
+ Remediation: before reporting any file compliant, run a grep against each forbidden pattern named by the rule under audit (e.g. `grep -nE '^\s*--[a-z-]+:' web/src/styles.css owl/src/**/styles.css` for single-value `@theme` aliases under `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`; `grep -nE 'class="[^"]*\b(text-|bg-|border-|rounded-|shadow-|tracking-|leading-|p[xy]?-)' <file>` plus a manual scan for raw `<div>`/`<span>` carrying those classes for `PRIMITIVE_FIRST`). The compliance report's body is the concatenation of those grep outputs annotated with their rule name; an empty body across every pattern under every rule is the only form of "compliant". A claim of compliance unaccompanied by the grep evidence is not a compliance report and is treated as an unverified assertion that the audit loop rejects.
62
62
  - **Schmancy primitive first** (`PRIMITIVE_FIRST`). Within `web/**`, every visible UI element is a custom element exported from `packages/schmancy/src/**`, and an element absent from that export set is added there before being imported into `web/**`. The rule sits above the styling rules: a `<div class="text-xs text-surface-on-variant">…</div>` whose role is typography is a violation even when every utility resolves to a registered token, because `<schmancy-typography>` already covers that role; the styling rules apply only to whatever class strings remain after the right primitive has been selected.
63
63
  Sources: [packages/schmancy/skills/schmancy/INDEX.md](../INDEX.md) catalogues the export set by job (foundations / atoms / forms / navigation / overlays / interaction / feedback / display); each role's reference file (`typography.md`, `surface.md`, `button.md`, `overlay.md`, …) names the props, slots, and events that displace the equivalent `<div>` + utility-class pattern. The export set is the single source — a primitive that is not exported from `packages/schmancy/src/**` does not satisfy this rule even if it lives in a private file inside the schmancy tree.
64
64
  Remediation: walk every `.ts` and `.html` file under `web/**` and list every raw HTML element whose class string carries design-system styling (typography, color, spacing-as-design-decision, surface, layout-as-design-decision, motion, overlay) — those are the violations. For each, look up the matching schmancy primitive in `INDEX.md` and rewrite the element through that primitive (`<schmancy-typography type=… token=…>` for type-scale text, `<schmancy-surface type=…>` for elevated/bounded surfaces (size with Tailwind utilities), `<schmancy-grid>`/`<schmancy-flex>` for layout primitives with design intent, the imperative `show`/`$notify`/`schmancyContentDrawer.push` services for overlays, `<schmancy-scroll>` for scroll containers). When a needed primitive is absent from the export set, design and implement it as a new component under `packages/schmancy/src/<role>/` — extending `SchmancyElement` with `static styles = [css\`...\`]`, registered in `HTMLElementTagNameMap`, exported through the package barrel, and documented with a sibling `.md` in the skill's reference set — and only then introduce the first call site in `web/**`. The audit subagent iterates the whole `web/**` tree, surfaces the violation list, applies the rewrites, runs `yarn workspace @momo/web tsc --noEmit` plus the colocated `*-view.test.ts` suites, and reports pre-existing violations that require a new schmancy primitive as a separate punch list for designer/architect approval before the implementation lands. The loop exits when every `web/**` file's visible UI elements are schmancy primitives and the typecheck plus the test suites pass.
@@ -113,10 +113,9 @@ When two components genuinely cannot share a signal (e.g., a generic reusable co
113
113
  **Styling**
114
114
  - Styling uses Tailwind and schmancy tokens. The `css` block in `static styles` contains only `:host` rules, `@keyframes`, and selectors targeting vendor pseudo-elements (`::-webkit-*`, `::-moz-*`). Other styling is set through Tailwind utility classes and schmancy theme tokens on the `class=` attribute. The `style=` attribute holds per-instance dynamic values only (e.g. `style="--tide: ${value}"`).
115
115
  Remediation: move declarations to Tailwind on the `class=` attribute (`backdrop-filter: blur(20px)` → `backdrop-blur-xl`; `color-mix(in oklch, Canvas 72%, transparent)` → `bg-surface/70`; `border-radius: 14px` → `rounded-2xl`; `transition: opacity 80ms linear` → `transition-opacity duration-75 ease-linear`). When a visual pattern seems to want its own class (like `.glass`), check `INDEX.md` — schmancy likely ships the component.
116
- - Colors: Tailwind utility classes (`bg-surface-on`, `text-primary-default`, `border-outline-variant`) are the preferred surface — every `--schmancy-sys-color-*` token is auto-aliased to `--color-*`, which Tailwind v4 turns into the full `bg-X` / `text-X` / `border-X` / `ring-X` / `fill-X` / `stroke-X` namespace. Reach for raw `var(--schmancy-sys-color-*)` only inside the `css` template literal (where Tailwind doesn't apply) or for custom tokens you've registered yourself. Never hardcoded hex.
117
- - **No arbitrary-value escape** (`TOKEN_FIRST_NO_ARBITRARY`). Within `web/src/**` and `packages/schmancy/src/**`, no Tailwind arbitrary-value utility (`[...]`) appears; a value not yet covered by `packages/schmancy/src/theme/theme.style.css` or the Tailwind default theme is added as a token to that file before being used. This rule supersedes the prior `TOKEN_FIRST_LITERALS_COMPLETION` annotation form: an inline `// token-gap: <namespace>` comment is no longer a valid resolution, since color and size namespaces are exhaustively covered by schmancy and Tailwind, and any uncovered namespace (aspect ratio, motion curve, custom breakpoint) is itself a token-registry extension waiting to be made.
118
- Sources: `theme.md` enumerates the schmancy color tokens (every `--schmancy-sys-color-*` auto-aliases to a Tailwind class); `typography.md` enumerates the type scale; `theme.style.css` declares the spacing, radius, shadow, font, text, tracking, leading, aspect, breakpoint, container, ease, and animate namespaces, every entry of which Tailwind v4 lifts into a named utility. A bracket-syntax utility in either glob is by construction either a value the registry already covers (rule violation, replace with the token) or a value the registry does not yet cover (rule violation, extend the registry first).
119
- Remediation: list every `[...]` arbitrary-value utility in the changeset; for each whose value matches a `--<namespace>-*` variable, replace with the named utility (`bg-[#faf7f2]` → `bg-surface-containerLowest`, `max-w-[720px]` → `max-w-3xl`); for each whose value has no matching variable, register the variable in `packages/schmancy/src/theme/theme.style.css` first, then mirror the same `--<namespace>-x: …` declaration inside an `@theme {}` block in the consumer's stylesheet (e.g. `web/src/styles.css`) — schmancy ships the variable to its own shadow-DOM TailwindMixin, the consumer mirror lets Tailwind v4 generate the named utility for document-scope code. When the variable lives in both places but the utility class still does not apply inside a shadow-DOM component (the mixin's utility subset is frozen at schmancy build time, so consumer-introduced class names can't be added), bind the registered variable through an inline `style="<property>: var(--<namespace>-x);"` attribute on the element — the bracket-syntax rule is satisfied because no Tailwind arbitrary-value utility appears in the markup, and the `style=` attribute consuming a registered CSS custom property fits the per-instance dynamic-value clause of `NO_LOCAL_CLASS_CSS`. When the value's design rationale is one-off (a vendor-dictated pixel width, a single-use marketing graphic) the rule still requires a registered token — the alternative is to drop the value as a design violation.
116
+ - **Color is a theme token** (`COLOR_IS_A_THEME_TOKEN`). Every color a `web/src/**` element renders is the schmancy theme namespace surfaced as a Tailwind utility on `class=` (`text-error-default`, `bg-surface-container`, `border-outline-variant` — every `--schmancy-sys-color-*` auto-aliases to `--color-*`, which Tailwind v4 lifts into the full `bg-/text-/border-/ring-/fill-/stroke-` namespace) or a schmancy component that already carries the token (`<schmancy-surface type=…>`, `<schmancy-typography>`). A raw `#hex` / `rgb()` / `rgba()` / `hsl()` literal and an inline `var(--schmancy-sys-color-*)` inside a `style=` attribute name a color the theme already names — including inside `@keyframes` and animated backgrounds, where the animated property still references the token utility, not a hand-written value. Raw `var(--schmancy-sys-color-*)` lives only inside a component's own `static styles` `css` template (where Tailwind does not reach); a color literal in markup is admissible only with a written rationale for why no token in `theme.md` can express it. `theme.md` is the authoritative token catalog.
117
+ - **Arbitrary value is canonical; a token is earned by semantic reuse** (`ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`). Within `web/src/**`, `owl/src/**`, and `packages/schmancy/src/**`, a trivial or one-off layout/size value is its portable Tailwind arbitrary utility (`grid-rows-[auto_1fr]`, `max-w-[720px]`) and stays there; a `--<namespace>-x` `@theme` alias of a single such value is the violation and is reverted to the portable form. A `--<namespace>-*` token earns existence only as a named design concept reused across call sites the schmancy semantic color, type-scale, spacing, and motion namespaces (`COLOR_IS_A_THEME_TOKEN` owns the color half) never as a one-value alias. An `@theme` token is visible only to the Tailwind build that compiles its stylesheet, so a `web/src/styles.css` token emits zero CSS in `owl/`; a `suggestCanonicalClasses`-style arbitrary-value→named-utility rewrite not backed by an `@theme` declaration in the edited workspace's own build is dead CSS, and the portable arbitrary form is kept.
118
+ - **Schmancy elements need no import in `web/src/**`** (`SCHMANCY_PLUGIN_REGISTERS`). The Vite plugin globally registers every schmancy custom element for the `web/` app; side-effect imports of individual subpaths (`import "@mhmo91/schmancy/badge"`, `import "@mhmo91/schmancy/icon"`, etc.) inside `web/src/**` are redundant and fail with TS2882. Use the tag directly in templates.
120
119
  - No `setTimeout` / `setInterval` / `addEventListener` — use RxJS (`timer`, `interval`, `fromEvent`).
121
120
 
122
121
  **Accessibility (combobox forms)**
@@ -1,16 +1,19 @@
1
1
  # schmancy-boat
2
2
 
3
- > Material-3 extended FAB that opens its panel via the `show()` overlay service. Great for persistent assistant/telemetry panels.
3
+ > Corner-anchored launcher that opens its panel via the `show()` overlay service. Three slots, three non-overlapping intents — **no element-type sniffing**. The collapsed launcher's size, padding, radius and spacing are the consumer's; the boat owns drag, corner-snapping, position persistence and the glass surface.
4
4
 
5
- > **Note:** `schmancy-window` is the evolved successor with more capabilities (resize, maximize, multi-window registry). Prefer `schmancy-window` for new code unless you want the simpler FAB-to-overlay model.
5
+ > **Note:** `schmancy-window` is the evolved successor with more capabilities (resize, maximize, multi-window registry). Prefer `schmancy-window` for new code unless you want the simpler launcher-to-overlay model.
6
6
 
7
7
  ## Usage
8
8
  ```html
9
- <schmancy-boat id="assistant" icon="smart_toy" label="Assistant" ?open=${isOpen}>
10
- <schmancy-icon slot="header">smart_toy</schmancy-icon>
11
- <span slot="summary">3</span>
9
+ <schmancy-boat id="assistant" ?open=${isOpen}>
10
+ <!-- optional: slot a handle to make the boat draggable -->
11
+ <schmancy-icon slot="drag-handle">drag_indicator</schmancy-icon>
12
12
 
13
- <!-- default slot: blooms into the show() overlay from the FAB on open -->
13
+ <!-- trigger slot: the collapsed launcher a plain click opens the panel -->
14
+ <div slot="trigger" class="px-4 py-2 rounded-full">Assistant · 3</div>
15
+
16
+ <!-- default slot: blooms into the show() overlay on open -->
14
17
  <div class="p-4">Panel body content</div>
15
18
  </schmancy-boat>
16
19
  ```
@@ -19,11 +22,8 @@
19
22
  | Property | Type | Default | Description |
20
23
  |----------|------|---------|-------------|
21
24
  | `id` | string | `'default'` | Unique identifier (persists drag position in localStorage) |
22
- | `icon` | string | — | Material icon for the FAB (overridden by the `header` slot) |
23
- | `label` | string | — | FAB label text. **Omit → circular icon-only FAB** |
24
25
  | `open` | boolean | `false` | Open state, reflected. Bind `?open=${…}` to drive it |
25
26
  | `corner` | `'bottom-right' \| 'bottom-left' \| 'top-right' \| 'top-left'` | `'bottom-right'` | Initial anchor corner |
26
- | `lowered` | boolean | `false` | Lower the FAB elevation |
27
27
 
28
28
  ## Methods & event
29
29
  ```typescript
@@ -36,19 +36,25 @@ boat.addEventListener('toggle', e => e.detail) // 'open' | 'closed'
36
36
  ## Slots
37
37
  | Slot | Renders | Behavior |
38
38
  |------|---------|----------|
39
+ | `trigger` | the collapsed launcher — everything visible while closed | A native **click** (or Enter/Space) anywhere on it opens the panel. The boat does **not** `preventDefault` / `stopPropagation` / `setPointerCapture` here, so any interactive child (button, FAB, input) works natively. A child that should *not* also open the boat calls `stopPropagation()` on its own handler. |
40
+ | `drag-handle` | the drag affordance (a grip icon, a title bar — your choice) | **Opt-in.** Pointer-drag is wired only to this slot's boat-owned wrapper. Slot something here → draggable; omit it → the boat is static at its corner. A no-move tap on the handle also opens, so the grip doubles as a launcher. |
39
41
  | _(default)_ | the expanded panel body | relocated into the `show()` overlay on open, restored on close |
40
- | `summary` | trailing content on the FAB pill | live count / badge — stays on the FAB |
41
- | `header` | leading icon on the FAB pill | overrides the `icon` property |
42
42
 
43
43
  ## Behavior
44
- - Drag to reposition. Releases snap to the nearest corner (FLIP + `SPRING_SMOOTH`).
45
- - Activation delegates to `show()`: blooms from the FAB, backdrop / Esc / back-button / focus, and sheet-on-narrow are handled by the overlay primitive.
46
- - Position persists in `localStorage` under `schmancy-boat-{id}`.
44
+ - **Drag is opt-in and unambiguous.** No `<schmancy-boat>` is draggable unless the consumer slots `drag-handle`. Drag listens on a dedicated boat-owned region wrapping only that slot — every pointerdown there is a drag intent, so there is no interactive-element denylist and new interactive components never need registering.
45
+ - **The trigger is pure content.** Opening is a normal click that bubbles; nesting a `<schmancy-button>`, `<schmancy-fab>`, etc. in the trigger Just Works — the long-standing "interactive control swallowed by the drag/tap heuristic" bug class is gone (see ADR 0031).
46
+ - The collapsed shape is **not** imposed by the boat: no fixed height, padding, radius or gap. Style the `trigger` slot content for any shape.
47
+ - Drag to reposition (from the handle). Releases snap to the nearest corner (FLIP + `SPRING_SMOOTH`). Position persists in `localStorage` under `schmancy-boat-{id}`.
48
+ - Activation delegates to `show()`: blooms from the launcher, backdrop / Esc / back-button / sheet-on-narrow handled by the overlay primitive.
47
49
  - Respects `prefers-reduced-motion`.
48
50
 
49
51
  ## Example
50
52
  ```html
51
- <schmancy-boat id="chat" icon="chat" label="Chat" corner="bottom-right">
53
+ <schmancy-boat id="chat" corner="bottom-right">
54
+ <schmancy-icon slot="drag-handle" class="px-1 opacity-40">drag_indicator</schmancy-icon>
55
+ <schmancy-fab slot="trigger" variant="tertiary" .label=${`Chat · ${count}`}>
56
+ <schmancy-icon>chat</schmancy-icon>
57
+ </schmancy-fab>
52
58
  <schmancy-list class="p-2">
53
59
  <!-- messages -->
54
60
  </schmancy-list>
@@ -0,0 +1,75 @@
1
+ # schmancy-fab
2
+
3
+ > Material 3 Floating Action Button. Faithful to the M3 spec
4
+ > (m3.material.io/components/floating-action-button) and the `md-fab`
5
+ > reference implementation (github.com/material-components/material-web):
6
+ > four colour variants, three sizes, an extended form, and a lowered
7
+ > elevation register. Adds schmancy's house `magnetic` pull + spring press.
8
+
9
+ ## Usage
10
+ ```html
11
+ <!-- Regular FAB (icon-only) -->
12
+ <schmancy-fab aria-label="Compose"><schmancy-icon>edit</schmancy-icon></schmancy-fab>
13
+
14
+ <!-- Extended FAB -->
15
+ <schmancy-fab label="Compose" variant="primary">
16
+ <schmancy-icon>edit</schmancy-icon>
17
+ </schmancy-fab>
18
+ ```
19
+
20
+ ## Properties
21
+ | Property | Type | Default | Description |
22
+ |----------|------|---------|-------------|
23
+ | `variant` | `'surface' \| 'primary' \| 'secondary' \| 'tertiary'` | `'surface'` | M3 colour role. `surface` = `surface-containerHigh` container + `primary` icon; the others use the matching `*-container` / `*-onContainer` pair |
24
+ | `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Container size: 40 / 56 / 96 dp. Ignored while extended |
25
+ | `label` | `string` | `''` | A non-empty value switches the FAB to its **extended** form (icon + text), exactly as `md-fab` derives extended from a truthy label |
26
+ | `extended` | `boolean` | `false` | Reflected mirror of "`label` is non-empty"; drives the extended geometry. Set automatically from `label` — read it, don't set it |
27
+ | `lowered` | `boolean` | `false` | M3 lowered FAB: elevation drops to level 1 (resting) / level 2 (hover) |
28
+
29
+ Per M3 guidance a FAB is **never disabled** — there is no `disabled`
30
+ property, matching `md-fab`.
31
+
32
+ ## Slots
33
+ | Slot | Description |
34
+ |------|-------------|
35
+ | (default) | The icon, typically `<schmancy-icon>`. Auto-sized per FAB size (24dp; 36dp for `large`) and given `aria-hidden` when an accessible name is present |
36
+
37
+ ## M3 tokens (exact)
38
+ | | small | medium | large | extended |
39
+ |--|--|--|--|--|
40
+ | container | 40×40 | 56×56 | 96×96 | 56 tall, content wide |
41
+ | shape (radius) | 12dp | 16dp | 28dp | 16dp |
42
+ | icon | 24dp | 24dp | 36dp | 24dp |
43
+
44
+ Extended paddings: `padding-inline-start: 16px`, `padding-inline-end: 20px`,
45
+ icon-to-label gap `12px` — verbatim from `md-fab`'s shared styles. Label is
46
+ the `label-large` type scale.
47
+
48
+ Elevation maps to schmancy's M3 elevation tokens
49
+ (`--schmancy-sys-elevation-*`): resting **level 3**, hover **level 4**;
50
+ lowered → resting **level 1**, hover **level 2**. Pressed elevation equals
51
+ resting per M3 (the press read is the state layer + spring scale).
52
+
53
+ State layer: hover `0.08`, focus/pressed `0.10`, tinted with the variant's
54
+ on-colour.
55
+
56
+ ## Physics (schmancy house style)
57
+ - **magnetic** directive embedded (strength 3, radius 60px) — same pull as `schmancy-button`.
58
+ - Hover raises elevation per M3; active applies a spring `scale(0.96)`.
59
+ - `prefers-reduced-motion` removes the transition and the press scale.
60
+
61
+ ## Examples
62
+ ```html
63
+ <!-- Small surface FAB -->
64
+ <schmancy-fab size="small" aria-label="Add"><schmancy-icon>add</schmancy-icon></schmancy-fab>
65
+
66
+ <!-- Large tertiary FAB -->
67
+ <schmancy-fab size="large" variant="tertiary" aria-label="Create">
68
+ <schmancy-icon>add</schmancy-icon>
69
+ </schmancy-fab>
70
+
71
+ <!-- Lowered extended secondary FAB -->
72
+ <schmancy-fab lowered label="New message" variant="secondary">
73
+ <schmancy-icon>edit</schmancy-icon>
74
+ </schmancy-fab>
75
+ ```
@@ -36,7 +36,7 @@ The framework pieces — touch before components.
36
36
  [Overlay](./overlay.md) · [Notification](./notification.md) · [Menu](./menu.md) · [Dropdown](./dropdown.md) · [Tooltip (directive)](./tooltip.md) · [Lightbox](./lightbox.md) · [Expand](./expand.md)
37
37
 
38
38
  ### Interactive
39
- [Button](./button.md) · [List](./list.md) · [Details](./details.md) · [Table](./table.md) · [Tree](./tree.md) · [Slider](./slider.md)
39
+ [Button](./button.md) · [FAB](./fab.md) · [List](./list.md) · [Details](./details.md) · [Table](./table.md) · [Tree](./tree.md) · [Slider](./slider.md)
40
40
 
41
41
  > Lab: [QR Scanner](../../lab/skills/qr-scanner.md) — install `@mhmo91/schmancy-lab`
42
42
 
@@ -56,9 +56,9 @@ Use component tags (`<schmancy-menu>`, `<schmancy-dropdown>`, `<schmancy-tooltip
56
56
 
57
57
  ## Composition
58
58
 
59
- - **Audit by grep** (`AUDIT_BY_GREP`). An agent's compliance report on a file under a rule is the list of file:line citations of the rule's forbidden patterns; an empty list is compliance. The rule applies to every other rule in this skill (`PRIMITIVE_FIRST`, `TOKEN_FIRST_NO_ARBITRARY`, `NO_LOCAL_CLASS_CSS`, `NO_TERNARY_NOTHING_DISPATCH`): a claim that a file complies is a claim about what the file does NOT contain, and that claim is verified by enumerating the rule's forbidden patterns and grepping each one.
60
- Sources: each rule above names its forbidden patterns explicitly — `TOKEN_FIRST_NO_ARBITRARY` forbids `[...]` arbitrary-value Tailwind utilities; `PRIMITIVE_FIRST` forbids raw HTML elements whose class attribute carries design-system styling (typography/color/surface/spacing-as-design); `NO_LOCAL_CLASS_CSS` forbids class/id/attribute selectors inside the `css` template; `NO_TERNARY_NOTHING_DISPATCH` forbids `${cond ? html\`...\` : nothing}` and `${cond && html\`...\`}` patterns.
61
- Remediation: before reporting any file compliant, run a grep against each forbidden pattern named by the rule under audit (e.g. `grep -nE '\[(?:[^]]+)\]' <file>` for `TOKEN_FIRST_NO_ARBITRARY`; `grep -nE 'class="[^"]*\b(text-|bg-|border-|rounded-|shadow-|tracking-|leading-|p[xy]?-)' <file>` plus a manual scan for raw `<div>`/`<span>` carrying those classes for `PRIMITIVE_FIRST`). The compliance report's body is the concatenation of those grep outputs annotated with their rule name; an empty body across every pattern under every rule is the only form of "compliant". A claim of compliance unaccompanied by the grep evidence is not a compliance report and is treated as an unverified assertion that the audit loop rejects.
59
+ - **Audit by grep** (`AUDIT_BY_GREP`). An agent's compliance report on a file under a rule is the list of file:line citations of the rule's forbidden patterns; an empty list is compliance. The rule applies to every other rule in this skill (`PRIMITIVE_FIRST`, `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`, `NO_LOCAL_CLASS_CSS`, `NO_TERNARY_NOTHING_DISPATCH`): a claim that a file complies is a claim about what the file does NOT contain, and that claim is verified by enumerating the rule's forbidden patterns and grepping each one.
60
+ Sources: each rule above names its forbidden patterns explicitly — `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE` forbids a single-value `--<namespace>-x` `@theme` alias (the portable `[...]` arbitrary value is canonical, not forbidden); `PRIMITIVE_FIRST` forbids raw HTML elements whose class attribute carries design-system styling (typography/color/surface/spacing-as-design); `NO_LOCAL_CLASS_CSS` forbids class/id/attribute selectors inside the `css` template; `NO_TERNARY_NOTHING_DISPATCH` forbids `${cond ? html\`...\` : nothing}` and `${cond && html\`...\`}` patterns.
61
+ Remediation: before reporting any file compliant, run a grep against each forbidden pattern named by the rule under audit (e.g. `grep -nE '^\s*--[a-z-]+:' web/src/styles.css owl/src/**/styles.css` for single-value `@theme` aliases under `ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`; `grep -nE 'class="[^"]*\b(text-|bg-|border-|rounded-|shadow-|tracking-|leading-|p[xy]?-)' <file>` plus a manual scan for raw `<div>`/`<span>` carrying those classes for `PRIMITIVE_FIRST`). The compliance report's body is the concatenation of those grep outputs annotated with their rule name; an empty body across every pattern under every rule is the only form of "compliant". A claim of compliance unaccompanied by the grep evidence is not a compliance report and is treated as an unverified assertion that the audit loop rejects.
62
62
  - **Schmancy primitive first** (`PRIMITIVE_FIRST`). Within `web/**`, every visible UI element is a custom element exported from `packages/schmancy/src/**`, and an element absent from that export set is added there before being imported into `web/**`. The rule sits above the styling rules: a `<div class="text-xs text-surface-on-variant">…</div>` whose role is typography is a violation even when every utility resolves to a registered token, because `<schmancy-typography>` already covers that role; the styling rules apply only to whatever class strings remain after the right primitive has been selected.
63
63
  Sources: [packages/schmancy/skills/schmancy/INDEX.md](../INDEX.md) catalogues the export set by job (foundations / atoms / forms / navigation / overlays / interaction / feedback / display); each role's reference file (`typography.md`, `surface.md`, `button.md`, `overlay.md`, …) names the props, slots, and events that displace the equivalent `<div>` + utility-class pattern. The export set is the single source — a primitive that is not exported from `packages/schmancy/src/**` does not satisfy this rule even if it lives in a private file inside the schmancy tree.
64
64
  Remediation: walk every `.ts` and `.html` file under `web/**` and list every raw HTML element whose class string carries design-system styling (typography, color, spacing-as-design-decision, surface, layout-as-design-decision, motion, overlay) — those are the violations. For each, look up the matching schmancy primitive in `INDEX.md` and rewrite the element through that primitive (`<schmancy-typography type=… token=…>` for type-scale text, `<schmancy-surface type=…>` for elevated/bounded surfaces (size with Tailwind utilities), `<schmancy-grid>`/`<schmancy-flex>` for layout primitives with design intent, the imperative `show`/`$notify`/`schmancyContentDrawer.push` services for overlays, `<schmancy-scroll>` for scroll containers). When a needed primitive is absent from the export set, design and implement it as a new component under `packages/schmancy/src/<role>/` — extending `SchmancyElement` with `static styles = [css\`...\`]`, registered in `HTMLElementTagNameMap`, exported through the package barrel, and documented with a sibling `.md` in the skill's reference set — and only then introduce the first call site in `web/**`. The audit subagent iterates the whole `web/**` tree, surfaces the violation list, applies the rewrites, runs `yarn workspace @momo/web tsc --noEmit` plus the colocated `*-view.test.ts` suites, and reports pre-existing violations that require a new schmancy primitive as a separate punch list for designer/architect approval before the implementation lands. The loop exits when every `web/**` file's visible UI elements are schmancy primitives and the typecheck plus the test suites pass.
@@ -113,10 +113,9 @@ When two components genuinely cannot share a signal (e.g., a generic reusable co
113
113
  **Styling**
114
114
  - Styling uses Tailwind and schmancy tokens. The `css` block in `static styles` contains only `:host` rules, `@keyframes`, and selectors targeting vendor pseudo-elements (`::-webkit-*`, `::-moz-*`). Other styling is set through Tailwind utility classes and schmancy theme tokens on the `class=` attribute. The `style=` attribute holds per-instance dynamic values only (e.g. `style="--tide: ${value}"`).
115
115
  Remediation: move declarations to Tailwind on the `class=` attribute (`backdrop-filter: blur(20px)` → `backdrop-blur-xl`; `color-mix(in oklch, Canvas 72%, transparent)` → `bg-surface/70`; `border-radius: 14px` → `rounded-2xl`; `transition: opacity 80ms linear` → `transition-opacity duration-75 ease-linear`). When a visual pattern seems to want its own class (like `.glass`), check `INDEX.md` — schmancy likely ships the component.
116
- - Colors: Tailwind utility classes (`bg-surface-on`, `text-primary-default`, `border-outline-variant`) are the preferred surface — every `--schmancy-sys-color-*` token is auto-aliased to `--color-*`, which Tailwind v4 turns into the full `bg-X` / `text-X` / `border-X` / `ring-X` / `fill-X` / `stroke-X` namespace. Reach for raw `var(--schmancy-sys-color-*)` only inside the `css` template literal (where Tailwind doesn't apply) or for custom tokens you've registered yourself. Never hardcoded hex.
117
- - **No arbitrary-value escape** (`TOKEN_FIRST_NO_ARBITRARY`). Within `web/src/**` and `packages/schmancy/src/**`, no Tailwind arbitrary-value utility (`[...]`) appears; a value not yet covered by `packages/schmancy/src/theme/theme.style.css` or the Tailwind default theme is added as a token to that file before being used. This rule supersedes the prior `TOKEN_FIRST_LITERALS_COMPLETION` annotation form: an inline `// token-gap: <namespace>` comment is no longer a valid resolution, since color and size namespaces are exhaustively covered by schmancy and Tailwind, and any uncovered namespace (aspect ratio, motion curve, custom breakpoint) is itself a token-registry extension waiting to be made.
118
- Sources: `theme.md` enumerates the schmancy color tokens (every `--schmancy-sys-color-*` auto-aliases to a Tailwind class); `typography.md` enumerates the type scale; `theme.style.css` declares the spacing, radius, shadow, font, text, tracking, leading, aspect, breakpoint, container, ease, and animate namespaces, every entry of which Tailwind v4 lifts into a named utility. A bracket-syntax utility in either glob is by construction either a value the registry already covers (rule violation, replace with the token) or a value the registry does not yet cover (rule violation, extend the registry first).
119
- Remediation: list every `[...]` arbitrary-value utility in the changeset; for each whose value matches a `--<namespace>-*` variable, replace with the named utility (`bg-[#faf7f2]` → `bg-surface-containerLowest`, `max-w-[720px]` → `max-w-3xl`); for each whose value has no matching variable, register the variable in `packages/schmancy/src/theme/theme.style.css` first, then mirror the same `--<namespace>-x: …` declaration inside an `@theme {}` block in the consumer's stylesheet (e.g. `web/src/styles.css`) — schmancy ships the variable to its own shadow-DOM TailwindMixin, the consumer mirror lets Tailwind v4 generate the named utility for document-scope code. When the variable lives in both places but the utility class still does not apply inside a shadow-DOM component (the mixin's utility subset is frozen at schmancy build time, so consumer-introduced class names can't be added), bind the registered variable through an inline `style="<property>: var(--<namespace>-x);"` attribute on the element — the bracket-syntax rule is satisfied because no Tailwind arbitrary-value utility appears in the markup, and the `style=` attribute consuming a registered CSS custom property fits the per-instance dynamic-value clause of `NO_LOCAL_CLASS_CSS`. When the value's design rationale is one-off (a vendor-dictated pixel width, a single-use marketing graphic) the rule still requires a registered token — the alternative is to drop the value as a design violation.
116
+ - **Color is a theme token** (`COLOR_IS_A_THEME_TOKEN`). Every color a `web/src/**` element renders is the schmancy theme namespace surfaced as a Tailwind utility on `class=` (`text-error-default`, `bg-surface-container`, `border-outline-variant` — every `--schmancy-sys-color-*` auto-aliases to `--color-*`, which Tailwind v4 lifts into the full `bg-/text-/border-/ring-/fill-/stroke-` namespace) or a schmancy component that already carries the token (`<schmancy-surface type=…>`, `<schmancy-typography>`). A raw `#hex` / `rgb()` / `rgba()` / `hsl()` literal and an inline `var(--schmancy-sys-color-*)` inside a `style=` attribute name a color the theme already names — including inside `@keyframes` and animated backgrounds, where the animated property still references the token utility, not a hand-written value. Raw `var(--schmancy-sys-color-*)` lives only inside a component's own `static styles` `css` template (where Tailwind does not reach); a color literal in markup is admissible only with a written rationale for why no token in `theme.md` can express it. `theme.md` is the authoritative token catalog.
117
+ - **Arbitrary value is canonical; a token is earned by semantic reuse** (`ARBITRARY_VALUE_CANONICAL_TOKEN_ON_REUSE`). Within `web/src/**`, `owl/src/**`, and `packages/schmancy/src/**`, a trivial or one-off layout/size value is its portable Tailwind arbitrary utility (`grid-rows-[auto_1fr]`, `max-w-[720px]`) and stays there; a `--<namespace>-x` `@theme` alias of a single such value is the violation and is reverted to the portable form. A `--<namespace>-*` token earns existence only as a named design concept reused across call sites the schmancy semantic color, type-scale, spacing, and motion namespaces (`COLOR_IS_A_THEME_TOKEN` owns the color half) never as a one-value alias. An `@theme` token is visible only to the Tailwind build that compiles its stylesheet, so a `web/src/styles.css` token emits zero CSS in `owl/`; a `suggestCanonicalClasses`-style arbitrary-value→named-utility rewrite not backed by an `@theme` declaration in the edited workspace's own build is dead CSS, and the portable arbitrary form is kept.
118
+ - **Schmancy elements need no import in `web/src/**`** (`SCHMANCY_PLUGIN_REGISTERS`). The Vite plugin globally registers every schmancy custom element for the `web/` app; side-effect imports of individual subpaths (`import "@mhmo91/schmancy/badge"`, `import "@mhmo91/schmancy/icon"`, etc.) inside `web/src/**` are redundant and fail with TS2882. Use the tag directly in templates.
120
119
  - No `setTimeout` / `setInterval` / `addEventListener` — use RxJS (`timer`, `interval`, `fromEvent`).
121
120
 
122
121
  **Accessibility (combobox forms)**
@@ -1,16 +1,19 @@
1
1
  # schmancy-boat
2
2
 
3
- > Material-3 extended FAB that opens its panel via the `show()` overlay service. Great for persistent assistant/telemetry panels.
3
+ > Corner-anchored launcher that opens its panel via the `show()` overlay service. Three slots, three non-overlapping intents — **no element-type sniffing**. The collapsed launcher's size, padding, radius and spacing are the consumer's; the boat owns drag, corner-snapping, position persistence and the glass surface.
4
4
 
5
- > **Note:** `schmancy-window` is the evolved successor with more capabilities (resize, maximize, multi-window registry). Prefer `schmancy-window` for new code unless you want the simpler FAB-to-overlay model.
5
+ > **Note:** `schmancy-window` is the evolved successor with more capabilities (resize, maximize, multi-window registry). Prefer `schmancy-window` for new code unless you want the simpler launcher-to-overlay model.
6
6
 
7
7
  ## Usage
8
8
  ```html
9
- <schmancy-boat id="assistant" icon="smart_toy" label="Assistant" ?open=${isOpen}>
10
- <schmancy-icon slot="header">smart_toy</schmancy-icon>
11
- <span slot="summary">3</span>
9
+ <schmancy-boat id="assistant" ?open=${isOpen}>
10
+ <!-- optional: slot a handle to make the boat draggable -->
11
+ <schmancy-icon slot="drag-handle">drag_indicator</schmancy-icon>
12
12
 
13
- <!-- default slot: blooms into the show() overlay from the FAB on open -->
13
+ <!-- trigger slot: the collapsed launcher a plain click opens the panel -->
14
+ <div slot="trigger" class="px-4 py-2 rounded-full">Assistant · 3</div>
15
+
16
+ <!-- default slot: blooms into the show() overlay on open -->
14
17
  <div class="p-4">Panel body content</div>
15
18
  </schmancy-boat>
16
19
  ```
@@ -19,11 +22,8 @@
19
22
  | Property | Type | Default | Description |
20
23
  |----------|------|---------|-------------|
21
24
  | `id` | string | `'default'` | Unique identifier (persists drag position in localStorage) |
22
- | `icon` | string | — | Material icon for the FAB (overridden by the `header` slot) |
23
- | `label` | string | — | FAB label text. **Omit → circular icon-only FAB** |
24
25
  | `open` | boolean | `false` | Open state, reflected. Bind `?open=${…}` to drive it |
25
26
  | `corner` | `'bottom-right' \| 'bottom-left' \| 'top-right' \| 'top-left'` | `'bottom-right'` | Initial anchor corner |
26
- | `lowered` | boolean | `false` | Lower the FAB elevation |
27
27
 
28
28
  ## Methods & event
29
29
  ```typescript
@@ -36,19 +36,25 @@ boat.addEventListener('toggle', e => e.detail) // 'open' | 'closed'
36
36
  ## Slots
37
37
  | Slot | Renders | Behavior |
38
38
  |------|---------|----------|
39
+ | `trigger` | the collapsed launcher — everything visible while closed | A native **click** (or Enter/Space) anywhere on it opens the panel. The boat does **not** `preventDefault` / `stopPropagation` / `setPointerCapture` here, so any interactive child (button, FAB, input) works natively. A child that should *not* also open the boat calls `stopPropagation()` on its own handler. |
40
+ | `drag-handle` | the drag affordance (a grip icon, a title bar — your choice) | **Opt-in.** Pointer-drag is wired only to this slot's boat-owned wrapper. Slot something here → draggable; omit it → the boat is static at its corner. A no-move tap on the handle also opens, so the grip doubles as a launcher. |
39
41
  | _(default)_ | the expanded panel body | relocated into the `show()` overlay on open, restored on close |
40
- | `summary` | trailing content on the FAB pill | live count / badge — stays on the FAB |
41
- | `header` | leading icon on the FAB pill | overrides the `icon` property |
42
42
 
43
43
  ## Behavior
44
- - Drag to reposition. Releases snap to the nearest corner (FLIP + `SPRING_SMOOTH`).
45
- - Activation delegates to `show()`: blooms from the FAB, backdrop / Esc / back-button / focus, and sheet-on-narrow are handled by the overlay primitive.
46
- - Position persists in `localStorage` under `schmancy-boat-{id}`.
44
+ - **Drag is opt-in and unambiguous.** No `<schmancy-boat>` is draggable unless the consumer slots `drag-handle`. Drag listens on a dedicated boat-owned region wrapping only that slot — every pointerdown there is a drag intent, so there is no interactive-element denylist and new interactive components never need registering.
45
+ - **The trigger is pure content.** Opening is a normal click that bubbles; nesting a `<schmancy-button>`, `<schmancy-fab>`, etc. in the trigger Just Works — the long-standing "interactive control swallowed by the drag/tap heuristic" bug class is gone (see ADR 0031).
46
+ - The collapsed shape is **not** imposed by the boat: no fixed height, padding, radius or gap. Style the `trigger` slot content for any shape.
47
+ - Drag to reposition (from the handle). Releases snap to the nearest corner (FLIP + `SPRING_SMOOTH`). Position persists in `localStorage` under `schmancy-boat-{id}`.
48
+ - Activation delegates to `show()`: blooms from the launcher, backdrop / Esc / back-button / sheet-on-narrow handled by the overlay primitive.
47
49
  - Respects `prefers-reduced-motion`.
48
50
 
49
51
  ## Example
50
52
  ```html
51
- <schmancy-boat id="chat" icon="chat" label="Chat" corner="bottom-right">
53
+ <schmancy-boat id="chat" corner="bottom-right">
54
+ <schmancy-icon slot="drag-handle" class="px-1 opacity-40">drag_indicator</schmancy-icon>
55
+ <schmancy-fab slot="trigger" variant="tertiary" .label=${`Chat · ${count}`}>
56
+ <schmancy-icon>chat</schmancy-icon>
57
+ </schmancy-fab>
52
58
  <schmancy-list class="p-2">
53
59
  <!-- messages -->
54
60
  </schmancy-list>