@mhmo91/schmancy 0.10.35 → 0.10.37

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 (430) hide show
  1. package/custom-elements.json +1165 -1109
  2. package/dist/SchmancyElement-BHfQg3Tj.cjs +2 -0
  3. package/dist/SchmancyElement-BHfQg3Tj.cjs.map +1 -0
  4. package/dist/SchmancyElement-CDT2q1lA.js +284 -0
  5. package/dist/SchmancyElement-CDT2q1lA.js.map +1 -0
  6. package/dist/agent/schmancy.agent.js +3488 -3290
  7. package/dist/agent/schmancy.agent.js.map +1 -1
  8. package/dist/agent/schmancy.manifest.json +335 -275
  9. package/dist/{area-DviXdbDx.js → area-KtULlxuA.js} +2 -2
  10. package/dist/{area-DviXdbDx.js.map → area-KtULlxuA.js.map} +1 -1
  11. package/dist/{area-CTSTgjlx.cjs → area-fdKhYB6T.cjs} +1 -1
  12. package/dist/{area-CTSTgjlx.cjs.map → area-fdKhYB6T.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-CUMAv9D_.cjs} +1 -1
  16. package/dist/{audio-Q9oB_cQR.cjs.map → audio-CUMAv9D_.cjs.map} +1 -1
  17. package/dist/{audio-DFYoaw0M.js → audio-zIJVTo_V.js} +1 -1
  18. package/dist/{audio-DFYoaw0M.js.map → audio-zIJVTo_V.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-DEZk6wBD.cjs} +1 -1
  22. package/dist/{autocomplete-DmLXJr7C.cjs.map → autocomplete-DEZk6wBD.cjs.map} +1 -1
  23. package/dist/{autocomplete-BDvuma6D.js → autocomplete-DIScyo8Q.js} +3 -3
  24. package/dist/{autocomplete-BDvuma6D.js.map → autocomplete-DIScyo8Q.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-lr7MPZ7H.js → boat-BHPqSqJd.js} +67 -83
  32. package/dist/boat-BHPqSqJd.js.map +1 -0
  33. package/dist/boat-OBZ77exO.cjs +34 -0
  34. package/dist/boat-OBZ77exO.cjs.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-BJNsKSCM.cjs} +1 -1
  40. package/dist/{busy-CgzZbGfx.cjs.map → busy-BJNsKSCM.cjs.map} +1 -1
  41. package/dist/{busy-DgQ4ux5N.js → busy-Dut78y4L.js} +2 -2
  42. package/dist/{busy-DgQ4ux5N.js.map → busy-Dut78y4L.js.map} +1 -1
  43. package/dist/busy.cjs +1 -1
  44. package/dist/busy.js +1 -1
  45. package/dist/{button-DFvR1iXX.cjs → button-DzlHLjWO.cjs} +1 -1
  46. package/dist/{button-DFvR1iXX.cjs.map → button-DzlHLjWO.cjs.map} +1 -1
  47. package/dist/{button-qbN1muQ0.js → button-kcpPQavY.js} +2 -2
  48. package/dist/{button-qbN1muQ0.js.map → button-kcpPQavY.js.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-BLxPLqdQ.cjs} +1 -1
  54. package/dist/{card-D_GlwZ5q.cjs.map → card-BLxPLqdQ.cjs.map} +1 -1
  55. package/dist/{card-DAbr-7Vy.js → card-DxSKxCid.js} +2 -2
  56. package/dist/{card-DAbr-7Vy.js.map → card-DxSKxCid.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-B1wiM3Dv.js} +2 -2
  60. package/dist/{checkbox-BNORaxMF.js.map → checkbox-B1wiM3Dv.js.map} +1 -1
  61. package/dist/{checkbox-BUY_uc_r.cjs → checkbox-BCLkhp5G.cjs} +1 -1
  62. package/dist/{checkbox-BUY_uc_r.cjs.map → checkbox-BCLkhp5G.cjs.map} +1 -1
  63. package/dist/checkbox.cjs +1 -1
  64. package/dist/checkbox.js +1 -1
  65. package/dist/{chips-CXZ4dJCK.cjs → chips-C9dS1WKn.cjs} +44 -33
  66. package/dist/chips-C9dS1WKn.cjs.map +1 -0
  67. package/dist/{chips-Dg6Lk6BT.js → chips-vWmwqQed.js} +145 -122
  68. package/dist/chips-vWmwqQed.js.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-C-_be3_E.cjs → date-range-BV6HuvLw.cjs} +25 -19
  76. package/dist/date-range-BV6HuvLw.cjs.map +1 -0
  77. package/dist/{date-range-BU6WX7d5.js → date-range-D3ge1b4c.js} +129 -137
  78. package/dist/date-range-D3ge1b4c.js.map +1 -0
  79. package/dist/{date-range-inline-DJtUmHKF.cjs → date-range-inline-DpYgdLRv.cjs} +1 -1
  80. package/dist/{date-range-inline-DJtUmHKF.cjs.map → date-range-inline-DpYgdLRv.cjs.map} +1 -1
  81. package/dist/{date-range-inline-7o7xtVIu.js → date-range-inline-DuWQaWps.js} +2 -2
  82. package/dist/{date-range-inline-7o7xtVIu.js.map → date-range-inline-DuWQaWps.js.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-EfbDPVEo.js → details-C-GZaq3j.js} +2 -2
  90. package/dist/{details-EfbDPVEo.js.map → details-C-GZaq3j.js.map} +1 -1
  91. package/dist/{details-Bs0MyyvF.cjs → details-Dp5rLIWk.cjs} +1 -1
  92. package/dist/{details-Bs0MyyvF.cjs.map → details-Dp5rLIWk.cjs.map} +1 -1
  93. package/dist/details.cjs +1 -1
  94. package/dist/details.js +1 -1
  95. package/dist/{directives-fLwDj6b0.cjs → directives-D_l1E5H6.cjs} +3 -3
  96. package/dist/directives-D_l1E5H6.cjs.map +1 -0
  97. package/dist/{directives-zi1Mm2er.js → directives-DyS51FUh.js} +37 -21
  98. package/dist/directives-DyS51FUh.js.map +1 -0
  99. package/dist/directives.cjs +1 -1
  100. package/dist/directives.js +2 -2
  101. package/dist/{divider-CdIsWZrM.cjs → divider-CBnAmHMZ.cjs} +1 -1
  102. package/dist/{divider-CdIsWZrM.cjs.map → divider-CBnAmHMZ.cjs.map} +1 -1
  103. package/dist/{divider-CEPfrIwe.js → divider-nQffE0AD.js} +2 -2
  104. package/dist/{divider-CEPfrIwe.js.map → divider-nQffE0AD.js.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-DvTb-UPR.js} +3 -3
  110. package/dist/{expand-g1vqqUp1.js.map → expand-DvTb-UPR.js.map} +1 -1
  111. package/dist/{expand--at1k3qo.cjs → expand-mlP_3XWz.cjs} +1 -1
  112. package/dist/{expand--at1k3qo.cjs.map → expand-mlP_3XWz.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-DxVzgI9o.js → float-C-Ko0Le3.js} +2 -2
  120. package/dist/{float-DxVzgI9o.js.map → float-C-Ko0Le3.js.map} +1 -1
  121. package/dist/{float-P9HukAm-.cjs → float-C17xgMT1.cjs} +1 -1
  122. package/dist/{float-P9HukAm-.cjs.map → float-C17xgMT1.cjs.map} +1 -1
  123. package/dist/float.cjs +1 -1
  124. package/dist/float.js +1 -1
  125. package/dist/{form-ByYhXe1p.cjs → form-CwPHcQYB.cjs} +1 -1
  126. package/dist/{form-ByYhXe1p.cjs.map → form-CwPHcQYB.cjs.map} +1 -1
  127. package/dist/{form-CqLaozHp.js → form-DA0hUu2h.js} +3 -3
  128. package/dist/{form-CqLaozHp.js.map → form-DA0hUu2h.js.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-CkphcMp6.js → icons-C6UfxmHZ.js} +2 -2
  136. package/dist/{icons-CkphcMp6.js.map → icons-C6UfxmHZ.js.map} +1 -1
  137. package/dist/{icons-DYtiRU5V.cjs → icons-CW3-oMSb.cjs} +1 -1
  138. package/dist/{icons-DYtiRU5V.cjs.map → icons-CW3-oMSb.cjs.map} +1 -1
  139. package/dist/icons.cjs +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/{iframe-CjqJksl8.js → iframe-BTjZfYyh.js} +2 -2
  142. package/dist/{iframe-CjqJksl8.js.map → iframe-BTjZfYyh.js.map} +1 -1
  143. package/dist/{iframe-C3trkP8q.cjs → iframe-wuYT2xFz.cjs} +1 -1
  144. package/dist/{iframe-C3trkP8q.cjs.map → iframe-wuYT2xFz.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-CG51zDVh.js → input-B_4g2ulO.js} +2 -2
  150. package/dist/{input-CG51zDVh.js.map → input-B_4g2ulO.js.map} +1 -1
  151. package/dist/{input-DuavpwNL.cjs → input-BrDiIT60.cjs} +1 -1
  152. package/dist/{input-DuavpwNL.cjs.map → input-BrDiIT60.cjs.map} +1 -1
  153. package/dist/{input-chip-57tgNXKT.cjs → input-chip-B-XWh4aE.cjs} +1 -1
  154. package/dist/input-chip-B-XWh4aE.cjs.map +1 -0
  155. package/dist/{input-chip-C6Lq1927.js → input-chip-BlWhOruv.js} +2 -2
  156. package/dist/input-chip-BlWhOruv.js.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-6ipbiWTl.cjs → layout-BhyIcEVu.cjs} +1 -1
  164. package/dist/{layout-6ipbiWTl.cjs.map → layout-BhyIcEVu.cjs.map} +1 -1
  165. package/dist/{layout-D4IOwx7p.js → layout-Dxit9enO.js} +1 -1
  166. package/dist/{layout-D4IOwx7p.js.map → layout-Dxit9enO.js.map} +1 -1
  167. package/dist/layout.cjs +1 -1
  168. package/dist/layout.js +2 -2
  169. package/dist/{lightbox-H8pVWGMX.cjs → lightbox-CVBogswK.cjs} +1 -1
  170. package/dist/{lightbox-H8pVWGMX.cjs.map → lightbox-CVBogswK.cjs.map} +1 -1
  171. package/dist/{lightbox-CsyO2XSr.js → lightbox-D85XAAuC.js} +2 -2
  172. package/dist/{lightbox-CsyO2XSr.js.map → lightbox-D85XAAuC.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-DOF_yVn5.js} +2 -2
  176. package/dist/{list-BAwH0pQW.js.map → list-DOF_yVn5.js.map} +1 -1
  177. package/dist/{list-Bs9m8kw7.cjs → list-nVjLskgx.cjs} +1 -1
  178. package/dist/{list-Bs9m8kw7.cjs.map → list-nVjLskgx.cjs.map} +1 -1
  179. package/dist/list.cjs +1 -1
  180. package/dist/list.js +1 -1
  181. package/dist/{menu-BMcGzj1h.cjs → menu-DqmNjLgY.cjs} +1 -1
  182. package/dist/{menu-BMcGzj1h.cjs.map → menu-DqmNjLgY.cjs.map} +1 -1
  183. package/dist/{menu-tQVARVaC.js → menu-QrAK5Uu9.js} +3 -3
  184. package/dist/{menu-tQVARVaC.js.map → menu-QrAK5Uu9.js.map} +1 -1
  185. package/dist/menu.cjs +1 -1
  186. package/dist/menu.js +1 -1
  187. package/dist/{mixins-Bp0wIHg2.js → mixins-De1zjyhy.js} +1 -1
  188. package/dist/{mixins-Bp0wIHg2.js.map → mixins-De1zjyhy.js.map} +1 -1
  189. package/dist/{mixins-CGXSzZc7.cjs → mixins-DxHpyMHA.cjs} +1 -1
  190. package/dist/{mixins-CGXSzZc7.cjs.map → mixins-DxHpyMHA.cjs.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-BtAK7NK8.js} +4 -4
  200. package/dist/{notification-D1tX2nx5.js.map → notification-BtAK7NK8.js.map} +1 -1
  201. package/dist/{notification-Bz00zdpV.cjs → notification-DYzbUb5C.cjs} +1 -1
  202. package/dist/{notification-Bz00zdpV.cjs.map → notification-DYzbUb5C.cjs.map} +1 -1
  203. package/dist/notification.cjs +1 -1
  204. package/dist/notification.js +1 -1
  205. package/dist/{option-BpGV8Apj.js → option-DHwA0miA.js} +2 -2
  206. package/dist/{option-BpGV8Apj.js.map → option-DHwA0miA.js.map} +1 -1
  207. package/dist/{option-BnybLEDO.cjs → option-DnSPa8ro.cjs} +1 -1
  208. package/dist/{option-BnybLEDO.cjs.map → option-DnSPa8ro.cjs.map} +1 -1
  209. package/dist/option.cjs +1 -1
  210. package/dist/option.js +1 -1
  211. package/dist/{overlay-UQR2Dy3u.cjs → overlay-BVkqZmoS.cjs} +5 -5
  212. package/dist/overlay-BVkqZmoS.cjs.map +1 -0
  213. package/dist/{overlay-BpNhd74N.js → overlay-Del1sBEB.js} +108 -108
  214. package/dist/overlay-Del1sBEB.js.map +1 -0
  215. package/dist/overlay.cjs +1 -1
  216. package/dist/{overlay.confirm-body-CVDtVk5X.cjs → overlay.confirm-body-BV9umTAl.cjs} +1 -1
  217. package/dist/{overlay.confirm-body-CVDtVk5X.cjs.map → overlay.confirm-body-BV9umTAl.cjs.map} +1 -1
  218. package/dist/{overlay.confirm-body-BHcXu5Wk.js → overlay.confirm-body-DSONXUzl.js} +6 -6
  219. package/dist/{overlay.confirm-body-BHcXu5Wk.js.map → overlay.confirm-body-DSONXUzl.js.map} +1 -1
  220. package/dist/overlay.js +3 -3
  221. package/dist/{overlay.service-DTE6NwIM.js → overlay.service-BTp5Oq7f.js} +2 -2
  222. package/dist/{overlay.service-DTE6NwIM.js.map → overlay.service-BTp5Oq7f.js.map} +1 -1
  223. package/dist/{overlay.service-C8RsQzgM.cjs → overlay.service-XLlrsSdA.cjs} +1 -1
  224. package/dist/{overlay.service-C8RsQzgM.cjs.map → overlay.service-XLlrsSdA.cjs.map} +1 -1
  225. package/dist/{progress-gbIALDRs.cjs → progress-DUbTL9g9.cjs} +1 -1
  226. package/dist/{progress-gbIALDRs.cjs.map → progress-DUbTL9g9.cjs.map} +1 -1
  227. package/dist/{progress-CAKsxp29.js → progress-DYA83CFU.js} +2 -2
  228. package/dist/{progress-CAKsxp29.js.map → progress-DYA83CFU.js.map} +1 -1
  229. package/dist/progress.cjs +1 -1
  230. package/dist/progress.js +1 -1
  231. package/dist/{radio-group-CfJ5DtI4.cjs → radio-group-B-ORNtvR.cjs} +1 -1
  232. package/dist/{radio-group-CfJ5DtI4.cjs.map → radio-group-B-ORNtvR.cjs.map} +1 -1
  233. package/dist/{radio-group-otyvZvUk.js → radio-group-DxX0iJBo.js} +2 -2
  234. package/dist/{radio-group-otyvZvUk.js.map → radio-group-DxX0iJBo.js.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-B9uj_u-s.cjs} +1 -1
  240. package/dist/{select-81jniVTs.cjs.map → select-B9uj_u-s.cjs.map} +1 -1
  241. package/dist/{select-9vXx1fhr.js → select-C7gkA-ab.js} +3 -3
  242. package/dist/{select-9vXx1fhr.js.map → select-C7gkA-ab.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 +20 -18
  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 +20 -18
  253. package/dist/skills/schmancy/boat.md +21 -15
  254. package/dist/skills/schmancy/fab.md +75 -0
  255. package/dist/skills/schmancy/steps.md +68 -34
  256. package/dist/skills/schmancy/theme.md +1 -1
  257. package/dist/skills/steps.md +68 -34
  258. package/dist/skills/theme.md +1 -1
  259. package/dist/slider.cjs +1 -1
  260. package/dist/slider.js +2 -2
  261. package/dist/{sound.service-CmIw63aM.cjs → sound.service-C7FDY_yD.cjs} +1 -1
  262. package/dist/{sound.service-CmIw63aM.cjs.map → sound.service-C7FDY_yD.cjs.map} +1 -1
  263. package/dist/{sound.service-D3ZSq1Kj.js → sound.service-O0232os6.js} +1 -1
  264. package/dist/{sound.service-D3ZSq1Kj.js.map → sound.service-O0232os6.js.map} +1 -1
  265. package/dist/{splash-screen-C5KAWXvA.cjs → splash-screen-DIS4odDr.cjs} +1 -1
  266. package/dist/{splash-screen-C5KAWXvA.cjs.map → splash-screen-DIS4odDr.cjs.map} +1 -1
  267. package/dist/{splash-screen-BOjrmGLk.js → splash-screen-jfE47xl0.js} +2 -2
  268. package/dist/{splash-screen-BOjrmGLk.js.map → splash-screen-jfE47xl0.js.map} +1 -1
  269. package/dist/splash-screen.cjs +1 -1
  270. package/dist/splash-screen.js +1 -1
  271. package/dist/{src-C5g3p1J5.js → src-BP3h-9d9.js} +36 -35
  272. package/dist/{src-C5g3p1J5.js.map → src-BP3h-9d9.js.map} +1 -1
  273. package/dist/{src-qzUpLbje.cjs → src-Um_pzb-U.cjs} +1 -1
  274. package/dist/{src-qzUpLbje.cjs.map → src-Um_pzb-U.cjs.map} +1 -1
  275. package/dist/{state-Cex3rmx2.cjs → state-Bj0M9a6T.cjs} +1 -1
  276. package/dist/{state-Cex3rmx2.cjs.map → state-Bj0M9a6T.cjs.map} +1 -1
  277. package/dist/{state-CWBRTSvE.js → state-DscWQpoM.js} +1 -1
  278. package/dist/{state-CWBRTSvE.js.map → state-DscWQpoM.js.map} +1 -1
  279. package/dist/state.cjs +1 -1
  280. package/dist/state.js +2 -2
  281. package/dist/steps.cjs +35 -19
  282. package/dist/steps.cjs.map +1 -1
  283. package/dist/steps.js +96 -73
  284. package/dist/steps.js.map +1 -1
  285. package/dist/{surface-9S5scTsD.js → surface-B4Wn4SOO.js} +2 -2
  286. package/dist/{surface-9S5scTsD.js.map → surface-B4Wn4SOO.js.map} +1 -1
  287. package/dist/{surface-PfiejLuw.cjs → surface-DRq6cVW6.cjs} +1 -1
  288. package/dist/{surface-PfiejLuw.cjs.map → surface-DRq6cVW6.cjs.map} +1 -1
  289. package/dist/surface.cjs +1 -1
  290. package/dist/surface.js +1 -1
  291. package/dist/switch.cjs +1 -1
  292. package/dist/switch.js +2 -2
  293. package/dist/table.cjs +1 -1
  294. package/dist/table.js +2 -2
  295. package/dist/{tabs-uYvb1P06.cjs → tabs-Ca_fbHPW.cjs} +1 -1
  296. package/dist/{tabs-uYvb1P06.cjs.map → tabs-Ca_fbHPW.cjs.map} +1 -1
  297. package/dist/{tabs-BBOjAmgG.js → tabs-CnQPo-XS.js} +2 -2
  298. package/dist/{tabs-BBOjAmgG.js.map → tabs-CnQPo-XS.js.map} +1 -1
  299. package/dist/tabs.cjs +1 -1
  300. package/dist/tabs.js +1 -1
  301. package/dist/teleport.cjs +1 -1
  302. package/dist/teleport.js +1 -1
  303. package/dist/{textarea-QzSj8Dkl.js → textarea-BvqENhTW.js} +2 -2
  304. package/dist/{textarea-QzSj8Dkl.js.map → textarea-BvqENhTW.js.map} +1 -1
  305. package/dist/{textarea-YPHX4g7Y.cjs → textarea-qr7oL8oU.cjs} +1 -1
  306. package/dist/{textarea-YPHX4g7Y.cjs.map → textarea-qr7oL8oU.cjs.map} +1 -1
  307. package/dist/textarea.cjs +1 -1
  308. package/dist/textarea.js +1 -1
  309. package/dist/theme-BSwJ2YZo.cjs +181 -0
  310. package/dist/{theme-iKUaS9JB.cjs.map → theme-BSwJ2YZo.cjs.map} +1 -1
  311. package/dist/{theme-C2Mp-VGt.js → theme-BV0EzHQ1.js} +6 -5
  312. package/dist/{theme-C2Mp-VGt.js.map → theme-BV0EzHQ1.js.map} +1 -1
  313. package/dist/{theme-button-CJmhxfMe.cjs → theme-button-C6fpUzPM.cjs} +1 -1
  314. package/dist/{theme-button-CJmhxfMe.cjs.map → theme-button-C6fpUzPM.cjs.map} +1 -1
  315. package/dist/{theme-button-DGWAXhzd.js → theme-button-O_xNCgI7.js} +2 -2
  316. package/dist/{theme-button-DGWAXhzd.js.map → theme-button-O_xNCgI7.js.map} +1 -1
  317. package/dist/theme-button.cjs +1 -1
  318. package/dist/theme-button.js +1 -1
  319. package/dist/theme.cjs +1 -1
  320. package/dist/theme.js +3 -3
  321. package/dist/{theme.service-hc4N-1Oz.js → theme.service-DwLhhOmP.js} +1 -1
  322. package/dist/{theme.service-hc4N-1Oz.js.map → theme.service-DwLhhOmP.js.map} +1 -1
  323. package/dist/{theme.service-p61RsJBF.cjs → theme.service-kn9MC025.cjs} +1 -1
  324. package/dist/{theme.service-p61RsJBF.cjs.map → theme.service-kn9MC025.cjs.map} +1 -1
  325. package/dist/tree.cjs +1 -1
  326. package/dist/tree.js +2 -2
  327. package/dist/{typography-DwV0sqht.js → typography-Dtdooaic.js} +2 -2
  328. package/dist/{typography-DwV0sqht.js.map → typography-Dtdooaic.js.map} +1 -1
  329. package/dist/{typography-Bdt8RlX2.cjs → typography-opFYuUYS.cjs} +1 -1
  330. package/dist/{typography-Bdt8RlX2.cjs.map → typography-opFYuUYS.cjs.map} +1 -1
  331. package/dist/typography.cjs +1 -1
  332. package/dist/typography.js +1 -1
  333. package/dist/visually-hidden.cjs +1 -1
  334. package/dist/visually-hidden.js +2 -2
  335. package/dist/{window-D2WfvNng.cjs → window-BSAemI9J.cjs} +1 -1
  336. package/dist/{window-D2WfvNng.cjs.map → window-BSAemI9J.cjs.map} +1 -1
  337. package/dist/{window-n4jN60B_.js → window-ConcHirJ.js} +3 -3
  338. package/dist/{window-n4jN60B_.js.map → window-ConcHirJ.js.map} +1 -1
  339. package/dist/window.cjs +1 -1
  340. package/dist/window.js +1 -1
  341. package/package.json +1 -1
  342. package/skills/schmancy/INDEX.md +1 -1
  343. package/skills/schmancy/SKILL.md +20 -18
  344. package/skills/schmancy/boat.md +21 -15
  345. package/skills/schmancy/fab.md +75 -0
  346. package/skills/schmancy/steps.md +68 -34
  347. package/skills/schmancy/theme.md +1 -1
  348. package/src/CLAUDE.md +22 -16
  349. package/src/boat/boat.test.ts +130 -0
  350. package/src/boat/boat.ts +144 -121
  351. package/src/button/icon-button.ts +18 -30
  352. package/src/chips/assist-chip.ts +2 -263
  353. package/src/chips/chips.ts +2 -259
  354. package/src/chips/filter-chip.ts +2 -255
  355. package/src/chips/index.ts +2 -5
  356. package/src/chips/input-chip.ts +2 -413
  357. package/src/chips/suggestion-chip.ts +2 -266
  358. package/src/directives/fill.ts +28 -5
  359. package/src/directives/reveal.ts +192 -118
  360. package/src/fab/fab.test.ts +101 -0
  361. package/src/fab/fab.ts +226 -0
  362. package/src/fab/index.ts +1 -0
  363. package/src/form/fields/chips/assist-chip.ts +263 -0
  364. package/src/form/fields/chips/chips.ts +234 -0
  365. package/src/form/fields/chips/filter-chip.ts +255 -0
  366. package/src/form/fields/chips/index.ts +5 -0
  367. package/src/form/fields/chips/input-chip.ts +413 -0
  368. package/src/form/fields/chips/suggestion-chip.ts +266 -0
  369. package/src/form/fields/date-range/date-range.test.ts +44 -0
  370. package/src/form/fields/date-range/date-range.ts +103 -97
  371. package/src/form/fields/index.ts +1 -0
  372. package/src/index.ts +2 -1
  373. package/src/overlay/overlay.animations.ts +2 -3
  374. package/src/overlay/overlay.component.ts +8 -4
  375. package/src/overlay/overlay.types.ts +14 -2
  376. package/src/steps/index.ts +1 -1
  377. package/src/steps/schmancy-step.ts +91 -65
  378. package/src/steps/{schmancy-steps-container.ts → schmancy-steps.ts} +18 -38
  379. package/src/steps/steps.context.ts +5 -4
  380. package/src/steps/steps.test.ts +120 -0
  381. package/src/theme/theme.component.ts +1 -0
  382. package/src/theme/theme.style.css +3 -0
  383. package/types/src/boat/boat.d.ts +27 -9
  384. package/types/src/boat/boat.test.d.ts +2 -0
  385. package/types/src/button/icon-button.d.ts +3 -2
  386. package/types/src/chips/assist-chip.d.ts +1 -47
  387. package/types/src/chips/chips.d.ts +1 -43
  388. package/types/src/chips/filter-chip.d.ts +1 -67
  389. package/types/src/chips/index.d.ts +1 -5
  390. package/types/src/chips/input-chip.d.ts +1 -82
  391. package/types/src/chips/suggestion-chip.d.ts +1 -52
  392. package/types/src/directives/reveal.d.ts +15 -5
  393. package/types/src/fab/fab.d.ts +80 -0
  394. package/types/src/fab/fab.test.d.ts +2 -0
  395. package/types/src/fab/index.d.ts +1 -0
  396. package/types/src/form/fields/chips/assist-chip.d.ts +47 -0
  397. package/types/src/form/fields/chips/chips.d.ts +35 -0
  398. package/types/src/form/fields/chips/filter-chip.d.ts +67 -0
  399. package/types/src/form/fields/chips/index.d.ts +5 -0
  400. package/types/src/form/fields/chips/input-chip.d.ts +82 -0
  401. package/types/src/form/fields/chips/suggestion-chip.d.ts +52 -0
  402. package/types/src/form/fields/date-range/date-range.d.ts +5 -10
  403. package/types/src/form/fields/index.d.ts +1 -0
  404. package/types/src/index.d.ts +2 -1
  405. package/types/src/overlay/overlay.component.d.ts +1 -0
  406. package/types/src/overlay/overlay.types.d.ts +12 -2
  407. package/types/src/steps/index.d.ts +1 -1
  408. package/types/src/steps/schmancy-step.d.ts +8 -23
  409. package/types/src/steps/{schmancy-steps-container.d.ts → schmancy-steps.d.ts} +8 -9
  410. package/types/src/steps/steps.context.d.ts +2 -1
  411. package/types/src/steps/steps.test.d.ts +2 -0
  412. package/types/src/theme/theme.component.d.ts +1 -0
  413. package/dist/SchmancyElement-CA0Wqt8m.js +0 -284
  414. package/dist/SchmancyElement-CA0Wqt8m.js.map +0 -1
  415. package/dist/SchmancyElement-CYIif26I.cjs +0 -2
  416. package/dist/SchmancyElement-CYIif26I.cjs.map +0 -1
  417. package/dist/boat-Vqjgo10B.cjs +0 -33
  418. package/dist/boat-Vqjgo10B.cjs.map +0 -1
  419. package/dist/boat-lr7MPZ7H.js.map +0 -1
  420. package/dist/chips-CXZ4dJCK.cjs.map +0 -1
  421. package/dist/chips-Dg6Lk6BT.js.map +0 -1
  422. package/dist/date-range-BU6WX7d5.js.map +0 -1
  423. package/dist/date-range-C-_be3_E.cjs.map +0 -1
  424. package/dist/directives-fLwDj6b0.cjs.map +0 -1
  425. package/dist/directives-zi1Mm2er.js.map +0 -1
  426. package/dist/input-chip-57tgNXKT.cjs.map +0 -1
  427. package/dist/input-chip-C6Lq1927.js.map +0 -1
  428. package/dist/overlay-BpNhd74N.js.map +0 -1
  429. package/dist/overlay-UQR2Dy3u.cjs.map +0 -1
  430. package/dist/theme-iKUaS9JB.cjs +0 -181
@@ -1 +1 @@
1
- {"version":3,"file":"mixins-Bp0wIHg2.js","names":[],"sources":["../mixins/formField.mixin.ts","../mixins/litElement.mixin.ts","../src/surface/surface.styles.ts","../mixins/surface.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin } from './tailwind.mixin'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * Cross-realm brand used by `<schmancy-form>` to discover form fields by\n * inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in\n * the global registry so detection works across module realms/bundles.\n */\nexport const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')\n\n/**\n * Composed event a field dispatches in `connectedCallback`. `<schmancy-form>`\n * subscribes via `fromEvent(this, FIELD_CONNECT_EVENT)` and adds the field to\n * its registry. No matching disconnect event — composed events from a\n * disconnected node have an empty composed path; cleanup is via `isConnected`\n * filter at iteration time.\n */\nexport const FIELD_CONNECT_EVENT = 'schmancy:field:connect'\n\n/**\n * Validation modes.\n * - `dirty` (default per Revolute) — show errors only after value diverged.\n * - `touched` — show errors after first blur, even if value unchanged.\n * - `always` — show errors immediately (live search).\n * - `submitted` — hold all errors until submit (wizard step).\n * - `length` — fire validation only when `value.length` reaches `maxlength`\n * (Stripe pattern for predictable-length fields: ZIP, phone, card number).\n */\nexport type ValidateOn = 'always' | 'touched' | 'dirty' | 'submitted' | 'length'\n\n/**\n * Per-field error-message override map. Keys are `ValidityState` flag names;\n * values are the message to display when that flag is set. Unset flags fall\n * back to the mixin's hardcoded defaults (English).\n *\n * Use for i18n or domain-specific copy:\n * ```ts\n * <schmancy-input\n * .errorMessages=${{ valueMissing: 'Adresse e-mail requise', typeMismatch: 'Format e-mail invalide' }}\n * type=\"email\" required\n * ></schmancy-input>\n * ```\n */\nexport type ErrorMessages = Partial<Record<keyof ValidityState, string>>\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\tname: string\n\tvalue: string | string[] | boolean | number | undefined\n\tlabel: string\n\trequired: boolean\n\tdisabled: boolean\n\treadonly: boolean\n\terror: boolean\n\tvalidationMessage: string\n\thint?: string\n\tid: string\n\n\t/** Set to `true` once the user has blurred the field at least once. */\n\ttouched: boolean\n\t/** `true` when the current value differs from the captured default. */\n\tdirty: boolean\n\t/** Inverse of `dirty`. */\n\tpristine: boolean\n\t/** Set to `true` by `<schmancy-form>` on submit (forces error display). */\n\tsubmitted: boolean\n\t/** Validation mode — controls when errors display. Default `'dirty'`. */\n\tvalidateOn: ValidateOn\n\n\t/**\n\t * Per-field error-message override map (i18n hook). See `ErrorMessages`.\n\t * Unset keys fall back to the mixin's hardcoded English defaults.\n\t */\n\terrorMessages?: ErrorMessages\n\n\t/**\n\t * `ElementInternals` instance attached by the mixin. Exposed so subclasses\n\t * with non-standard validity semantics (date-range, multi-select) can\n\t * surface platform `ValidityStateFlags` directly via\n\t * `internals.setValidity({ valueMissing: true })` rather than rolling their\n\t * own `attachInternals` call.\n\t */\n\tinternals: ElementInternals | undefined\n\n\tform: HTMLFormElement | null\n\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t/** Mark the field as touched (component should call on blur). */\n\tmarkTouched(): void\n\t/** Mark the field as submitted (called by `<schmancy-form>` on submit). */\n\tmarkSubmitted(): void\n\t/**\n\t * Clear the `submitted` flag without resetting value/touched/error.\n\t * Used by wizards: stepping back from step N to step N-1 should not\n\t * leave step N-1's fields in aggressive \"show all errors\" mode.\n\t */\n\tclearSubmitted(): void\n\n\t/**\n\t * `true` while an async validator is in flight. Broadcast as\n\t * `:state(validating)`. `<schmancy-form>` blocks submit until every\n\t * registered field's `isValidating` is back to `false`.\n\t */\n\tisValidating: boolean\n\n\t/**\n\t * Run an async validator. While the promise is pending, `isValidating` is\n\t * `true` and `:state(validating)` is broadcast. On resolve, the returned\n\t * string is passed to `setCustomValidity` — empty string clears any\n\t * existing custom error; non-empty marks the field invalid with that\n\t * message.\n\t *\n\t * Submitting the form while a validator is pending is queued — the form\n\t * waits for `Promise.all(pending validators)` to settle before proceeding.\n\t */\n\trunAsyncValidator(fn: () => Promise<string>): Promise<void>\n\n\t/**\n\t * Whether the gate for showing validation errors is open right now. Exposed\n\t * so subclasses with custom error-display channels (e.g. select renders\n\t * errors on a child input) can keep their gate consistent with the mixin's.\n\t * Subclasses should not override this — extend the truth table by changing\n\t * `validateOn` instead.\n\t */\n\t_shouldShowError(): boolean\n\n\ttoFormEntries(): Array<[string, FormDataEntryValue]>\n\tresetForm(): void\n\n\temitChange(detail: any): void\n}\n\n/** Predicate used by `<schmancy-form>` to detect mixin descendants. */\nexport function isSchmancyFormField(el: unknown): el is IFormFieldMixin {\n\treturn !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * Components that extend this mixin are automatically discovered and\n * collected by `<schmancy-form>` — no tag-name registration needed.\n *\n * Subclasses may override `toFormEntries()` to contribute multiple\n * name/value pairs to FormData (e.g. date-range, tag-input).\n *\n * @example\n * ```ts\n * class MyInput extends FormFieldMixin(TailwindElement(css`...`)) {\n * // Your component code here\n * }\n * ```\n */\nexport function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T) {\n\tclass FormFieldMixinClass extends superClass {\n\t\tstatic formAssociated = true\n\n\t\t/** Brand for cross-realm detection by `<schmancy-form>`. */\n\t\tstatic readonly [SCHMANCY_FORM_FIELD] = true\n\n\t\t// Element internals for form association\n\t\tinternals: ElementInternals | undefined\n\n\t\t/** Value snapshot captured at first render, used by `resetForm()`. */\n\t\tprotected _defaultValue: string | string[] | boolean | number | undefined = undefined\n\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\n\n\t\t// ----- Validation UX state (Revolute contract) -----\n\n\t\t/** True after the user has blurred the field at least once. */\n\t\t@state() touched: boolean = false\n\n\t\t/** Set by `<schmancy-form>` on submit; persists until `resetForm()`. */\n\t\t@state() submitted: boolean = false\n\n\t\t/**\n\t\t * When errors display. Default `'dirty'` — the autofocus+cancel anti-pattern\n\t\t * is avoided because pristine fields never show errors until submit.\n\t\t */\n\t\t@property({ type: String, reflect: true })\n\t\tvalidateOn: ValidateOn = 'dirty'\n\n\t\t/**\n\t\t * Optional override for the validity-flag → message map. See\n\t\t * `ErrorMessages`. Unset keys fall back to the mixin's defaults.\n\t\t */\n\t\t@property({ attribute: false })\n\t\terrorMessages?: ErrorMessages\n\n\t\t/** True when value has been changed from the captured default. */\n\t\tget dirty(): boolean {\n\t\t\treturn this._defaultValue !== undefined && this.value !== this._defaultValue\n\t\t}\n\n\t\tget pristine(): boolean {\n\t\t\treturn !this.dirty\n\t\t}\n\n\t\tmarkTouched(): void {\n\t\t\tif (!this.touched) this.touched = true\n\t\t}\n\n\t\tmarkSubmitted(): void {\n\t\t\tif (!this.submitted) this.submitted = true\n\t\t}\n\n\t\tclearSubmitted(): void {\n\t\t\tif (this.submitted) this.submitted = false\n\t\t}\n\n\t\t/**\n\t\t * Reactive flag set while an async validator is in flight. Read by\n\t\t * `<schmancy-form>` to gate submit; broadcast as `:state(validating)`\n\t\t * for CSS spinner targeting.\n\t\t */\n\t\t@state() isValidating: boolean = false\n\n\t\tasync runAsyncValidator(fn: () => Promise<string>): Promise<void> {\n\t\t\tif (this.isValidating) {\n\t\t\t\t// Cancel-by-supersede semantics — a new call wins; the previous\n\t\t\t\t// is best-effort and its result is dropped if it resolves later.\n\t\t\t\tthis._asyncValidatorEpoch++\n\t\t\t}\n\t\t\tconst epoch = ++this._asyncValidatorEpoch\n\t\t\tthis.isValidating = true\n\t\t\ttry {\n\t\t\t\tconst message = await fn()\n\t\t\t\tif (epoch !== this._asyncValidatorEpoch) return // superseded\n\t\t\t\tthis.setCustomValidity(message)\n\t\t\t} finally {\n\t\t\t\tif (epoch === this._asyncValidatorEpoch) {\n\t\t\t\t\tthis.isValidating = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate _asyncValidatorEpoch: number = 0\n\n\t\t/**\n\t\t * Whether `checkValidity()` should display errors right now.\n\t\t * `submitted` overrides every mode — once a submit attempt happens, the\n\t\t * field stays in live-correction mode (Phase 3) for the rest of the\n\t\t * session, and `resetForm()` is the only way back. The leading\n\t\t * underscore marks this as an internal API: subclasses may call it but\n\t\t * should not override it (extend the truth table by changing\n\t\t * `validateOn` instead).\n\t\t */\n\t\t_shouldShowError(): boolean {\n\t\t\tif (this.submitted) return true\n\t\t\tswitch (this.validateOn) {\n\t\t\t\tcase 'always':\n\t\t\t\t\treturn true\n\t\t\t\tcase 'touched':\n\t\t\t\t\treturn this.touched\n\t\t\t\tcase 'dirty':\n\t\t\t\t\treturn this.dirty\n\t\t\t\tcase 'submitted':\n\t\t\t\t\treturn false\n\t\t\t\tcase 'length':\n\t\t\t\t\t// Predictable-length fields: validate once value reaches the\n\t\t\t\t\t// maxlength constraint. Stripe pattern. Falls back to dirty\n\t\t\t\t\t// if no maxlength is set.\n\t\t\t\t\tif (typeof this.value === 'string') {\n\t\t\t\t\t\tconst max = (this as unknown as { maxlength?: number }).maxlength\n\t\t\t\t\t\tif (typeof max === 'number' && max > 0) {\n\t\t\t\t\t\t\treturn this.value.length >= max\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.dirty\n\t\t\t}\n\t\t}\n\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\n\t\toverride connectedCallback(): void {\n\t\t\tsuper.connectedCallback()\n\t\t\t// Register with any ancestor <schmancy-form> via composed event.\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent(FIELD_CONNECT_EVENT, {\n\t\t\t\t\tdetail: this,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\n\t\t/** The form this element is associated with (native FACE behavior). */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\tprotected firstUpdated(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.firstUpdated?.(changedProps)\n\t\t\tif (this._defaultValue === undefined) this._defaultValue = this.value\n\t\t\t// Sync platform validity (`internals.setValidity`) once after first\n\t\t\t// render so `<form>.checkValidity()` and `:invalid` reflect truth\n\t\t\t// even when no property change has fired through `willUpdate` yet\n\t\t\t// (e.g. for required-empty fields with class-field-initialized\n\t\t\t// defaults that Lit doesn't see as \"changed\" on the first cycle).\n\t\t\tthis.checkValidity()\n\t\t}\n\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\tif (changedProps.has('value')) {\n\t\t\t\tthis.internals?.setFormValue(this.value as string | File | FormData | null)\n\t\t\t\t// :state(dirty) tracks value-vs-default; recompute on every value change.\n\t\t\t\tif (this.dirty) this.internals?.states.add('dirty')\n\t\t\t\telse this.internals?.states.delete('dirty')\n\t\t\t\t// Always sync platform validity (internals.setValidity) so\n\t\t\t\t// `<form>.checkValidity()` and `:invalid` reflect truth, even\n\t\t\t\t// while the visual `error` gate stays closed for pristine\n\t\t\t\t// fields under `validateOn: 'dirty'`. The visibility gate is\n\t\t\t\t// inside checkValidity() itself.\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('isValidating')) {\n\t\t\t\tif (this.isValidating) this.internals?.states.add('validating')\n\t\t\t\telse this.internals?.states.delete('validating')\n\t\t\t}\n\n\t\t\tif (changedProps.has('touched')) {\n\t\t\t\tif (this.touched) this.internals?.states.add('touched')\n\t\t\t\telse this.internals?.states.delete('touched')\n\t\t\t\t// Phase 2 — blur on a dirty field. Validate to surface the error.\n\t\t\t\tif (this.touched && this.dirty) this.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('submitted')) {\n\t\t\t\tif (this.submitted) {\n\t\t\t\t\tthis.internals?.states.add('submitted')\n\t\t\t\t\t// Phase 4 — submit forces error display regardless of dirty/touched.\n\t\t\t\t\tthis.checkValidity()\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.states.delete('submitted')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: we do not write to `internals.setValidity` from willUpdate\n\t\t\t// based on `error` / `validationMessage` changes. `checkValidity`\n\t\t\t// and `setCustomValidity` are the sole writers — overwriting the\n\t\t\t// validity flags from willUpdate would clobber structured flags\n\t\t\t// set by subclass overrides (e.g. input.ts surfaces typeMismatch /\n\t\t\t// patternMismatch / tooShort / etc.).\n\n\t\t\tif (changedProps.has('error')) {\n\t\t\t\tif (this.error) this.internals?.states.add('invalid')\n\t\t\t\telse this.internals?.states.delete('invalid')\n\t\t\t\t// ARIA reflection through ElementInternals reaches AT through shadow DOM.\n\t\t\t\tif (this.internals) this.internals.ariaInvalid = this.error ? 'true' : 'false'\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tif (this.required) this.internals?.states.add('required')\n\t\t\t\telse this.internals?.states.delete('required')\n\t\t\t\t// Suppress aria-required when disabled — disabled fields shouldn't\n\t\t\t\t// announce as required to assistive tech.\n\t\t\t\tif (this.internals) {\n\t\t\t\t\tthis.internals.ariaRequired = this.required && !this.disabled ? 'true' : 'false'\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changedProps.has('disabled')) {\n\t\t\t\tif (this.disabled) this.internals?.states.add('disabled')\n\t\t\t\telse this.internals?.states.delete('disabled')\n\t\t\t}\n\t\t\tif (changedProps.has('readonly')) {\n\t\t\t\tif (this.readonly) this.internals?.states.add('readonly')\n\t\t\t\telse this.internals?.states.delete('readonly')\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — called by the browser when the owning form\n\t\t * is reset. Delegates to `resetForm()` so subclasses have one\n\t\t * override point for both programmatic and user-initiated resets.\n\t\t */\n\t\tformResetCallback(): void {\n\t\t\tthis.resetForm()\n\t\t}\n\n\t\t/** Native FACE lifecycle — called when the form's disabled state changes. */\n\t\tformDisabledCallback(disabled: boolean): void {\n\t\t\tthis.disabled = disabled\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — restore value after bfcache / form autofill.\n\t\t */\n\t\tformStateRestoreCallback(state: string | File | FormData | null): void {\n\t\t\tif (state == null) return\n\t\t\tthis.value = state as any\n\t\t}\n\n\t\t/** Override to customize reset behavior; default restores `_defaultValue`. */\n\t\tresetForm(): void {\n\t\t\tthis.value = this._defaultValue ?? ''\n\t\t\tthis.error = false\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.touched = false\n\t\t\tthis.submitted = false\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t/**\n\t\t * Contribute entries to a parent FormData. Default: a single\n\t\t * `[name, value]` pair when `name` is set and value is meaningful.\n\t\t * Override for multi-entry controls (e.g. date range).\n\t\t */\n\t\ttoFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\t\tif (!this.name || this.disabled) return []\n\t\t\tconst v = this.value\n\t\t\tif (v === undefined || v === null || v === '') return []\n\t\t\tif (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\t\tif (typeof v === 'boolean') return v ? [[this.name, 'on']] : []\n\t\t\treturn [[this.name, String(v)]]\n\t\t}\n\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tconst requiredFailed =\n\t\t\t\tthis.required && (this.value === '' || this.value === undefined || this.value === null)\n\t\t\t// Custom errors set via setCustomValidity() are platform-truth too —\n\t\t\t// preserve them through re-validation cycles.\n\t\t\tconst customErrorSet = !!this.internals?.validity?.customError\n\t\t\tconst isValid = !requiredFailed && !customErrorSet\n\t\t\tconst requiredMessage =\n\t\t\t\tthis.errorMessages?.valueMissing ?? 'This field is required'\n\t\t\tconst defaultMessage = requiredFailed ? requiredMessage : 'Invalid value'\n\n\t\t\t// Platform validity (read by `form.checkValidity()` and `:invalid`)\n\t\t\t// is always set to the truth — independent of the visual gate.\n\t\t\tif (requiredFailed) {\n\t\t\t\tthis.internals?.setValidity(\n\t\t\t\t\t{ valueMissing: true },\n\t\t\t\t\tthis.validationMessage || defaultMessage,\n\t\t\t\t)\n\t\t\t} else if (!customErrorSet) {\n\t\t\t\t// No required failure, no custom error — clear flags.\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t\t// (customErrorSet branch falls through — leave the custom validity intact.)\n\n\t\t\t// Visual `error` flag is gated. The returned boolean tells the caller\n\t\t\t// the truth; only the in-component error display is suppressed for\n\t\t\t// pristine fields under `validateOn: 'dirty'`.\n\t\t\tif (this._shouldShowError()) {\n\t\t\t\tthis.error = !isValid\n\t\t\t\tif (!isValid && !this.validationMessage) {\n\t\t\t\t\tthis.validationMessage = defaultMessage\n\t\t\t\t} else if (isValid) {\n\t\t\t\t\tthis.validationMessage = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn isValid\n\t\t}\n\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) this.internals?.reportValidity()\n\t\t\treturn isValid\n\t\t}\n\n\t\tsetCustomValidity(message: string): void {\n\t\t\tthis.validationMessage = message\n\t\t\tthis.error = message !== ''\n\t\t\tif (message) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, message)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\n\t\temitChange(detail: any): void {\n\t\t\tif ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {\n\t\t\t\tthis.dispatchScopedEvent('change', detail, { bubbles: true })\n\t\t\t} else {\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\tdetail,\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with SchmancyElement\n * to create a base class for Schmancy form components. Subclasses gain the\n * full SchmancyElement stack (SignalWatcher, _activeHost wrap, AbortSignal,\n * automatic Tailwind injection) plus the form-field semantics.\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\tclass StyledSchmancyElement extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn FormFieldMixin(StyledSchmancyElement) as unknown as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { CSSResult, LitElement } from 'lit'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * @deprecated Extend `SchmancyElement` directly and declare `static styles`.\n *\n * Before: extends $LitElement(css`...`)\n * After: extends SchmancyElement { static styles = [css`...`] }\n *\n * Kept as a thin alias for the migration window; will be removed in the next\n * major Schmancy release. The returned class extends `SchmancyElement` so\n * runtime semantics (Tailwind injection, `disconnecting` Subject,\n * `disconnectedSignal` AbortSignal, SignalWatcher) match exactly.\n */\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass LegacyAlias extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn LegacyAlias as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { css } from 'lit'\n\n/**\n * Luminous Glass surface type styles.\n *\n * Depth model: blur intensity + opacity replaces M3 tonal hierarchy.\n * - solid: opaque ground (0 blur, 100% opacity)\n * - subtle: frosted panel (4px blur, ~72% opacity)\n * - glass: full frosted glass (20px blur, ~55% opacity)\n * - luminous: glass + glow halo (24px blur, ~22% opacity)\n */\nexport const surfaceTypeStyles = css`\n\t/* ================================================================\n\t STRUCTURAL TYPES — All-glass depth model.\n\t Nothing is opaque. Every layer is translucent.\n\t Blur creates readability. Light borders isolate layers.\n\t Rule: text must ALWAYS be readable on every surface.\n\t ================================================================ */\n\n\t/* Solid — dense glass, high readability ground layer (no blur — 92% opacity is enough) */\n\t:host([type='solid']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Subtle — bright vibrant glass: near-white tint, saturated blur, top-edge highlight */\n\t:host([type='subtle']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Glass — frosted glass, blur ensures readability */\n\t:host([type='glass']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* Luminous — glass + glow halo, heavy blur keeps readability */\n\t:host([type='luminous']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\t--glow-color: var(--schmancy-sys-color-primary-default);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 42%, transparent);\n\t\tbackdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\t-webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t UTILITY TYPES\n\t ================================================================ */\n\n\t/* Transparent — no background */\n\t:host([type='transparent']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Outlined — border with luminous hover potential */\n\t:host([type='outlined']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\ttransition: border-color 300ms ease, box-shadow 300ms ease;\n\t}\n\n\t/* ================================================================\n\t SEMANTIC TYPES — tinted glass for status/role\n\t ================================================================ */\n\n\t:host([type='primary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t:host([type='secondary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\t:host([type='tertiary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-tertiary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t:host([type='error']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-error-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-error-onContainer);\n\t}\n\t:host([type='success']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-success-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-success-onContainer);\n\t}\n\t:host([type='warning']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-warning-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-warning-onContainer);\n\t}\n\t:host([type='info']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-info-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-info-onContainer);\n\t}\n\n\t/* ================================================================\n\t LEGACY M3 ALIASES — backward compatibility\n\t Old type names render as their new Luminous Glass equivalents.\n\t ================================================================ */\n\n\t/* solid aliases — dense glass */\n\t:host([type='surface']),\n\t:host([type='surfaceDim']),\n\t:host([type='surfaceBright']),\n\t:host([type='containerLowest']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* subtle aliases — bright vibrant glass */\n\t:host([type='containerLow']),\n\t:host([type='container']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* glass aliases */\n\t:host([type='containerHigh']),\n\t:host([type='containerHighest']),\n\t:host([type='glassOforim']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t REDUCED MOTION — disable glass animations\n\t ================================================================ */\n`\n\n/**\n * Surface rounded corner styles\n */\nexport const surfaceRoundedStyles = css`\n\t:host([rounded='none']) {\n\t\tborder-radius: 0;\n\t}\n\t:host([rounded='top']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0 0;\n\t}\n\t:host([rounded='left']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) 0 0 var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='right']) {\n\t\tborder-radius: 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0;\n\t}\n\t:host([rounded='bottom']) {\n\t\tborder-radius: 0 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='all']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large);\n\t}\n`\n\n/**\n * Luminous glow elevation — replaces M3 dark drop shadows with primary-colored glow.\n * No ::after tint overlay — depth comes from glow intensity, not surface tint.\n */\nexport const surfaceElevationStyles = css`\n\t:host([elevation='1']) {\n\t\tbox-shadow: 0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='2']) {\n\t\tbox-shadow: 0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 22%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='3']) {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 28%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='4']) {\n\t\tbox-shadow: 0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 35%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='5']) {\n\t\tbox-shadow: 0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 42%, transparent);\n\t\tposition: relative;\n\t}\n`\n\n/**\n * Surface clickable styles - luminous hover, spring active\n */\nexport const surfaceClickableStyles = css`\n\t:host([clickable]) {\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t\ttransition:\n\t\t\tfilter 200ms ease,\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\tbox-shadow 400ms ease;\n\t}\n\t:host([clickable]:hover) {\n\t\tfilter: brightness(1.03);\n\t}\n\t:host([clickable]:active) {\n\t\tfilter: brightness(0.96);\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\t:host([clickable]:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([clickable]) { transition: filter 150ms ease; }\n\t\t:host([clickable]:hover) { transform: none; box-shadow: none; }\n\t\t:host([clickable]:active) { transform: none; }\n\t}\n`\n\n/**\n * Combined surface styles - includes all surface styling capabilities\n */\nexport const surfaceStyles = css`\n\t${surfaceTypeStyles}\n\t${surfaceRoundedStyles}\n\t${surfaceElevationStyles}\n\t${surfaceClickableStyles}\n`\n","import type { Constructor } from './constructor'\nimport { CSSResultGroup, CSSResultOrNative, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { TSurfaceColor } from '../src/types/surface'\nimport { surfaceStyles } from '../src/surface/surface.styles'\n\nexport type SchmancySurfaceRounded = 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all'\nexport type SchmancySurfaceElevation = 0 | 1 | 2 | 3 | 4 | 5\n\nexport declare class ISurfaceMixin {\n\trounded: SchmancySurfaceRounded\n\televation: SchmancySurfaceElevation\n\ttype: TSurfaceColor\n\tclickable: boolean\n}\n\n/**\n * SurfaceMixin - Adds surface styling properties AND styles to any LitElement\n *\n * Uses Lit's finalizeStyles hook to inject surfaceStyles CSS for all surface type selectors.\n * This is the recommended pattern for mixins that need to add styles.\n *\n * Provides these reflected properties:\n * - `rounded`: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' - Corner rounding\n * - `elevation`: 0-5 - Shadow depth level\n * - `type`: TSurfaceColor - Surface color variant (26+ options)\n *\n * Usage:\n * ```typescript\n * import { SurfaceMixin } from '@mixins/surface.mixin'\n *\n * @customElement('my-component')\n * class MyComponent extends SurfaceMixin(TailwindElement(css`\n * :host { display: block; }\n * `)) {\n * // Component now has type, fill, rounded, elevation properties\n * // AND surfaceStyles are automatically included\n * }\n * ```\n */\nexport const SurfaceMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n\tclass SurfaceMixinClass extends superClass {\n\t\t/**\n\t\t * Override finalizeStyles to inject surfaceStyles.\n\t\t * This is the Lit-recommended way for mixins to add styles.\n\t\t */\n\t\tprotected static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[] {\n\t\t\t// Get parent's finalized styles using LitElement's method\n\t\t\tconst parentStyles = (superClass as unknown as typeof LitElement).finalizeStyles(styles)\n\t\t\t// Append surfaceStyles at the end (higher specificity)\n\t\t\treturn [...parentStyles, surfaceStyles as CSSResultOrNative]\n\t\t}\n\n\t\t/**\n\t\t * Specifies the rounding style of the component's corners.\n\t\t * @default 'none'\n\t\t */\n\t\t@property({ reflect: true })\n\t\trounded: SchmancySurfaceRounded = 'none'\n\n\t\t/**\n\t\t * Defines the elevation level (shadow depth) of the surface.\n\t\t * @default 0\n\t\t */\n\t\t@property({ type: Number, reflect: true })\n\t\televation: SchmancySurfaceElevation = 0\n\n\t\t/**\n\t\t * Specifies the surface type for styling.\n\t\t * @default 'container'\n\t\t */\n\t\t@property({ reflect: true })\n\t\ttype: TSurfaceColor = 'subtle'\n\n\t\t/**\n\t\t * Makes the surface interactive with hover, active states and cursor pointer.\n\t\t * @default false\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\tclickable = false\n\t}\n\treturn SurfaceMixinClass as Constructor<ISurfaceMixin> & T\n}\n"],"m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A4C,eAAe,CAAA,GAExD,CAAA;EAC1B;CAAA;CA8BD,OAAA,EAAA,CAxBE,EAAS,EAAE,SAAA,CAAS,EAAA,CAAA,CAAA,GAAM,EAAA,WAAA,WAAA,KAAA,CAAA,GAAA,EAAA,CAO1B,EAAS;EAAE,MAAM;EAAQ,SAAA,CAAS;CAAA,CAAA,CAAA,GAAM,EAAA,WAAA,aAAA,KAAA,CAAA,GAAA,EAAA,CAOxC,EAAS,EAAE,SAAA,CAAS,EAAA,CAAA,CAAA,GAAM,EAAA,WAAA,QAAA,KAAA,CAAA,GAAA,EAAA,CAO1B,EAAS;EAAE,MAAM;EAAS,SAAA,CAAS;CAAA,CAAA,CAAA,GAAM,EAAA,WAAA,aAAA,KAAA,CAAA,GAGpC;AAAA;AAAA,SAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,KAAA,GAAA,GAAA,KAAA"}
1
+ {"version":3,"file":"mixins-De1zjyhy.js","names":[],"sources":["../mixins/formField.mixin.ts","../mixins/litElement.mixin.ts","../src/surface/surface.styles.ts","../mixins/surface.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin } from './tailwind.mixin'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * Cross-realm brand used by `<schmancy-form>` to discover form fields by\n * inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in\n * the global registry so detection works across module realms/bundles.\n */\nexport const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')\n\n/**\n * Composed event a field dispatches in `connectedCallback`. `<schmancy-form>`\n * subscribes via `fromEvent(this, FIELD_CONNECT_EVENT)` and adds the field to\n * its registry. No matching disconnect event — composed events from a\n * disconnected node have an empty composed path; cleanup is via `isConnected`\n * filter at iteration time.\n */\nexport const FIELD_CONNECT_EVENT = 'schmancy:field:connect'\n\n/**\n * Validation modes.\n * - `dirty` (default per Revolute) — show errors only after value diverged.\n * - `touched` — show errors after first blur, even if value unchanged.\n * - `always` — show errors immediately (live search).\n * - `submitted` — hold all errors until submit (wizard step).\n * - `length` — fire validation only when `value.length` reaches `maxlength`\n * (Stripe pattern for predictable-length fields: ZIP, phone, card number).\n */\nexport type ValidateOn = 'always' | 'touched' | 'dirty' | 'submitted' | 'length'\n\n/**\n * Per-field error-message override map. Keys are `ValidityState` flag names;\n * values are the message to display when that flag is set. Unset flags fall\n * back to the mixin's hardcoded defaults (English).\n *\n * Use for i18n or domain-specific copy:\n * ```ts\n * <schmancy-input\n * .errorMessages=${{ valueMissing: 'Adresse e-mail requise', typeMismatch: 'Format e-mail invalide' }}\n * type=\"email\" required\n * ></schmancy-input>\n * ```\n */\nexport type ErrorMessages = Partial<Record<keyof ValidityState, string>>\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\tname: string\n\tvalue: string | string[] | boolean | number | undefined\n\tlabel: string\n\trequired: boolean\n\tdisabled: boolean\n\treadonly: boolean\n\terror: boolean\n\tvalidationMessage: string\n\thint?: string\n\tid: string\n\n\t/** Set to `true` once the user has blurred the field at least once. */\n\ttouched: boolean\n\t/** `true` when the current value differs from the captured default. */\n\tdirty: boolean\n\t/** Inverse of `dirty`. */\n\tpristine: boolean\n\t/** Set to `true` by `<schmancy-form>` on submit (forces error display). */\n\tsubmitted: boolean\n\t/** Validation mode — controls when errors display. Default `'dirty'`. */\n\tvalidateOn: ValidateOn\n\n\t/**\n\t * Per-field error-message override map (i18n hook). See `ErrorMessages`.\n\t * Unset keys fall back to the mixin's hardcoded English defaults.\n\t */\n\terrorMessages?: ErrorMessages\n\n\t/**\n\t * `ElementInternals` instance attached by the mixin. Exposed so subclasses\n\t * with non-standard validity semantics (date-range, multi-select) can\n\t * surface platform `ValidityStateFlags` directly via\n\t * `internals.setValidity({ valueMissing: true })` rather than rolling their\n\t * own `attachInternals` call.\n\t */\n\tinternals: ElementInternals | undefined\n\n\tform: HTMLFormElement | null\n\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t/** Mark the field as touched (component should call on blur). */\n\tmarkTouched(): void\n\t/** Mark the field as submitted (called by `<schmancy-form>` on submit). */\n\tmarkSubmitted(): void\n\t/**\n\t * Clear the `submitted` flag without resetting value/touched/error.\n\t * Used by wizards: stepping back from step N to step N-1 should not\n\t * leave step N-1's fields in aggressive \"show all errors\" mode.\n\t */\n\tclearSubmitted(): void\n\n\t/**\n\t * `true` while an async validator is in flight. Broadcast as\n\t * `:state(validating)`. `<schmancy-form>` blocks submit until every\n\t * registered field's `isValidating` is back to `false`.\n\t */\n\tisValidating: boolean\n\n\t/**\n\t * Run an async validator. While the promise is pending, `isValidating` is\n\t * `true` and `:state(validating)` is broadcast. On resolve, the returned\n\t * string is passed to `setCustomValidity` — empty string clears any\n\t * existing custom error; non-empty marks the field invalid with that\n\t * message.\n\t *\n\t * Submitting the form while a validator is pending is queued — the form\n\t * waits for `Promise.all(pending validators)` to settle before proceeding.\n\t */\n\trunAsyncValidator(fn: () => Promise<string>): Promise<void>\n\n\t/**\n\t * Whether the gate for showing validation errors is open right now. Exposed\n\t * so subclasses with custom error-display channels (e.g. select renders\n\t * errors on a child input) can keep their gate consistent with the mixin's.\n\t * Subclasses should not override this — extend the truth table by changing\n\t * `validateOn` instead.\n\t */\n\t_shouldShowError(): boolean\n\n\ttoFormEntries(): Array<[string, FormDataEntryValue]>\n\tresetForm(): void\n\n\temitChange(detail: any): void\n}\n\n/** Predicate used by `<schmancy-form>` to detect mixin descendants. */\nexport function isSchmancyFormField(el: unknown): el is IFormFieldMixin {\n\treturn !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * Components that extend this mixin are automatically discovered and\n * collected by `<schmancy-form>` — no tag-name registration needed.\n *\n * Subclasses may override `toFormEntries()` to contribute multiple\n * name/value pairs to FormData (e.g. date-range, tag-input).\n *\n * @example\n * ```ts\n * class MyInput extends FormFieldMixin(TailwindElement(css`...`)) {\n * // Your component code here\n * }\n * ```\n */\nexport function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T) {\n\tclass FormFieldMixinClass extends superClass {\n\t\tstatic formAssociated = true\n\n\t\t/** Brand for cross-realm detection by `<schmancy-form>`. */\n\t\tstatic readonly [SCHMANCY_FORM_FIELD] = true\n\n\t\t// Element internals for form association\n\t\tinternals: ElementInternals | undefined\n\n\t\t/** Value snapshot captured at first render, used by `resetForm()`. */\n\t\tprotected _defaultValue: string | string[] | boolean | number | undefined = undefined\n\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\n\n\t\t// ----- Validation UX state (Revolute contract) -----\n\n\t\t/** True after the user has blurred the field at least once. */\n\t\t@state() touched: boolean = false\n\n\t\t/** Set by `<schmancy-form>` on submit; persists until `resetForm()`. */\n\t\t@state() submitted: boolean = false\n\n\t\t/**\n\t\t * When errors display. Default `'dirty'` — the autofocus+cancel anti-pattern\n\t\t * is avoided because pristine fields never show errors until submit.\n\t\t */\n\t\t@property({ type: String, reflect: true })\n\t\tvalidateOn: ValidateOn = 'dirty'\n\n\t\t/**\n\t\t * Optional override for the validity-flag → message map. See\n\t\t * `ErrorMessages`. Unset keys fall back to the mixin's defaults.\n\t\t */\n\t\t@property({ attribute: false })\n\t\terrorMessages?: ErrorMessages\n\n\t\t/** True when value has been changed from the captured default. */\n\t\tget dirty(): boolean {\n\t\t\treturn this._defaultValue !== undefined && this.value !== this._defaultValue\n\t\t}\n\n\t\tget pristine(): boolean {\n\t\t\treturn !this.dirty\n\t\t}\n\n\t\tmarkTouched(): void {\n\t\t\tif (!this.touched) this.touched = true\n\t\t}\n\n\t\tmarkSubmitted(): void {\n\t\t\tif (!this.submitted) this.submitted = true\n\t\t}\n\n\t\tclearSubmitted(): void {\n\t\t\tif (this.submitted) this.submitted = false\n\t\t}\n\n\t\t/**\n\t\t * Reactive flag set while an async validator is in flight. Read by\n\t\t * `<schmancy-form>` to gate submit; broadcast as `:state(validating)`\n\t\t * for CSS spinner targeting.\n\t\t */\n\t\t@state() isValidating: boolean = false\n\n\t\tasync runAsyncValidator(fn: () => Promise<string>): Promise<void> {\n\t\t\tif (this.isValidating) {\n\t\t\t\t// Cancel-by-supersede semantics — a new call wins; the previous\n\t\t\t\t// is best-effort and its result is dropped if it resolves later.\n\t\t\t\tthis._asyncValidatorEpoch++\n\t\t\t}\n\t\t\tconst epoch = ++this._asyncValidatorEpoch\n\t\t\tthis.isValidating = true\n\t\t\ttry {\n\t\t\t\tconst message = await fn()\n\t\t\t\tif (epoch !== this._asyncValidatorEpoch) return // superseded\n\t\t\t\tthis.setCustomValidity(message)\n\t\t\t} finally {\n\t\t\t\tif (epoch === this._asyncValidatorEpoch) {\n\t\t\t\t\tthis.isValidating = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate _asyncValidatorEpoch: number = 0\n\n\t\t/**\n\t\t * Whether `checkValidity()` should display errors right now.\n\t\t * `submitted` overrides every mode — once a submit attempt happens, the\n\t\t * field stays in live-correction mode (Phase 3) for the rest of the\n\t\t * session, and `resetForm()` is the only way back. The leading\n\t\t * underscore marks this as an internal API: subclasses may call it but\n\t\t * should not override it (extend the truth table by changing\n\t\t * `validateOn` instead).\n\t\t */\n\t\t_shouldShowError(): boolean {\n\t\t\tif (this.submitted) return true\n\t\t\tswitch (this.validateOn) {\n\t\t\t\tcase 'always':\n\t\t\t\t\treturn true\n\t\t\t\tcase 'touched':\n\t\t\t\t\treturn this.touched\n\t\t\t\tcase 'dirty':\n\t\t\t\t\treturn this.dirty\n\t\t\t\tcase 'submitted':\n\t\t\t\t\treturn false\n\t\t\t\tcase 'length':\n\t\t\t\t\t// Predictable-length fields: validate once value reaches the\n\t\t\t\t\t// maxlength constraint. Stripe pattern. Falls back to dirty\n\t\t\t\t\t// if no maxlength is set.\n\t\t\t\t\tif (typeof this.value === 'string') {\n\t\t\t\t\t\tconst max = (this as unknown as { maxlength?: number }).maxlength\n\t\t\t\t\t\tif (typeof max === 'number' && max > 0) {\n\t\t\t\t\t\t\treturn this.value.length >= max\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.dirty\n\t\t\t}\n\t\t}\n\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\n\t\toverride connectedCallback(): void {\n\t\t\tsuper.connectedCallback()\n\t\t\t// Register with any ancestor <schmancy-form> via composed event.\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent(FIELD_CONNECT_EVENT, {\n\t\t\t\t\tdetail: this,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\n\t\t/** The form this element is associated with (native FACE behavior). */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\tprotected firstUpdated(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.firstUpdated?.(changedProps)\n\t\t\tif (this._defaultValue === undefined) this._defaultValue = this.value\n\t\t\t// Sync platform validity (`internals.setValidity`) once after first\n\t\t\t// render so `<form>.checkValidity()` and `:invalid` reflect truth\n\t\t\t// even when no property change has fired through `willUpdate` yet\n\t\t\t// (e.g. for required-empty fields with class-field-initialized\n\t\t\t// defaults that Lit doesn't see as \"changed\" on the first cycle).\n\t\t\tthis.checkValidity()\n\t\t}\n\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\tif (changedProps.has('value')) {\n\t\t\t\tthis.internals?.setFormValue(this.value as string | File | FormData | null)\n\t\t\t\t// :state(dirty) tracks value-vs-default; recompute on every value change.\n\t\t\t\tif (this.dirty) this.internals?.states.add('dirty')\n\t\t\t\telse this.internals?.states.delete('dirty')\n\t\t\t\t// Always sync platform validity (internals.setValidity) so\n\t\t\t\t// `<form>.checkValidity()` and `:invalid` reflect truth, even\n\t\t\t\t// while the visual `error` gate stays closed for pristine\n\t\t\t\t// fields under `validateOn: 'dirty'`. The visibility gate is\n\t\t\t\t// inside checkValidity() itself.\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('isValidating')) {\n\t\t\t\tif (this.isValidating) this.internals?.states.add('validating')\n\t\t\t\telse this.internals?.states.delete('validating')\n\t\t\t}\n\n\t\t\tif (changedProps.has('touched')) {\n\t\t\t\tif (this.touched) this.internals?.states.add('touched')\n\t\t\t\telse this.internals?.states.delete('touched')\n\t\t\t\t// Phase 2 — blur on a dirty field. Validate to surface the error.\n\t\t\t\tif (this.touched && this.dirty) this.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('submitted')) {\n\t\t\t\tif (this.submitted) {\n\t\t\t\t\tthis.internals?.states.add('submitted')\n\t\t\t\t\t// Phase 4 — submit forces error display regardless of dirty/touched.\n\t\t\t\t\tthis.checkValidity()\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.states.delete('submitted')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: we do not write to `internals.setValidity` from willUpdate\n\t\t\t// based on `error` / `validationMessage` changes. `checkValidity`\n\t\t\t// and `setCustomValidity` are the sole writers — overwriting the\n\t\t\t// validity flags from willUpdate would clobber structured flags\n\t\t\t// set by subclass overrides (e.g. input.ts surfaces typeMismatch /\n\t\t\t// patternMismatch / tooShort / etc.).\n\n\t\t\tif (changedProps.has('error')) {\n\t\t\t\tif (this.error) this.internals?.states.add('invalid')\n\t\t\t\telse this.internals?.states.delete('invalid')\n\t\t\t\t// ARIA reflection through ElementInternals reaches AT through shadow DOM.\n\t\t\t\tif (this.internals) this.internals.ariaInvalid = this.error ? 'true' : 'false'\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tif (this.required) this.internals?.states.add('required')\n\t\t\t\telse this.internals?.states.delete('required')\n\t\t\t\t// Suppress aria-required when disabled — disabled fields shouldn't\n\t\t\t\t// announce as required to assistive tech.\n\t\t\t\tif (this.internals) {\n\t\t\t\t\tthis.internals.ariaRequired = this.required && !this.disabled ? 'true' : 'false'\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changedProps.has('disabled')) {\n\t\t\t\tif (this.disabled) this.internals?.states.add('disabled')\n\t\t\t\telse this.internals?.states.delete('disabled')\n\t\t\t}\n\t\t\tif (changedProps.has('readonly')) {\n\t\t\t\tif (this.readonly) this.internals?.states.add('readonly')\n\t\t\t\telse this.internals?.states.delete('readonly')\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — called by the browser when the owning form\n\t\t * is reset. Delegates to `resetForm()` so subclasses have one\n\t\t * override point for both programmatic and user-initiated resets.\n\t\t */\n\t\tformResetCallback(): void {\n\t\t\tthis.resetForm()\n\t\t}\n\n\t\t/** Native FACE lifecycle — called when the form's disabled state changes. */\n\t\tformDisabledCallback(disabled: boolean): void {\n\t\t\tthis.disabled = disabled\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — restore value after bfcache / form autofill.\n\t\t */\n\t\tformStateRestoreCallback(state: string | File | FormData | null): void {\n\t\t\tif (state == null) return\n\t\t\tthis.value = state as any\n\t\t}\n\n\t\t/** Override to customize reset behavior; default restores `_defaultValue`. */\n\t\tresetForm(): void {\n\t\t\tthis.value = this._defaultValue ?? ''\n\t\t\tthis.error = false\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.touched = false\n\t\t\tthis.submitted = false\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t/**\n\t\t * Contribute entries to a parent FormData. Default: a single\n\t\t * `[name, value]` pair when `name` is set and value is meaningful.\n\t\t * Override for multi-entry controls (e.g. date range).\n\t\t */\n\t\ttoFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\t\tif (!this.name || this.disabled) return []\n\t\t\tconst v = this.value\n\t\t\tif (v === undefined || v === null || v === '') return []\n\t\t\tif (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\t\tif (typeof v === 'boolean') return v ? [[this.name, 'on']] : []\n\t\t\treturn [[this.name, String(v)]]\n\t\t}\n\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tconst requiredFailed =\n\t\t\t\tthis.required && (this.value === '' || this.value === undefined || this.value === null)\n\t\t\t// Custom errors set via setCustomValidity() are platform-truth too —\n\t\t\t// preserve them through re-validation cycles.\n\t\t\tconst customErrorSet = !!this.internals?.validity?.customError\n\t\t\tconst isValid = !requiredFailed && !customErrorSet\n\t\t\tconst requiredMessage =\n\t\t\t\tthis.errorMessages?.valueMissing ?? 'This field is required'\n\t\t\tconst defaultMessage = requiredFailed ? requiredMessage : 'Invalid value'\n\n\t\t\t// Platform validity (read by `form.checkValidity()` and `:invalid`)\n\t\t\t// is always set to the truth — independent of the visual gate.\n\t\t\tif (requiredFailed) {\n\t\t\t\tthis.internals?.setValidity(\n\t\t\t\t\t{ valueMissing: true },\n\t\t\t\t\tthis.validationMessage || defaultMessage,\n\t\t\t\t)\n\t\t\t} else if (!customErrorSet) {\n\t\t\t\t// No required failure, no custom error — clear flags.\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t\t// (customErrorSet branch falls through — leave the custom validity intact.)\n\n\t\t\t// Visual `error` flag is gated. The returned boolean tells the caller\n\t\t\t// the truth; only the in-component error display is suppressed for\n\t\t\t// pristine fields under `validateOn: 'dirty'`.\n\t\t\tif (this._shouldShowError()) {\n\t\t\t\tthis.error = !isValid\n\t\t\t\tif (!isValid && !this.validationMessage) {\n\t\t\t\t\tthis.validationMessage = defaultMessage\n\t\t\t\t} else if (isValid) {\n\t\t\t\t\tthis.validationMessage = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn isValid\n\t\t}\n\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) this.internals?.reportValidity()\n\t\t\treturn isValid\n\t\t}\n\n\t\tsetCustomValidity(message: string): void {\n\t\t\tthis.validationMessage = message\n\t\t\tthis.error = message !== ''\n\t\t\tif (message) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, message)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\n\t\temitChange(detail: any): void {\n\t\t\tif ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {\n\t\t\t\tthis.dispatchScopedEvent('change', detail, { bubbles: true })\n\t\t\t} else {\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\tdetail,\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with SchmancyElement\n * to create a base class for Schmancy form components. Subclasses gain the\n * full SchmancyElement stack (SignalWatcher, _activeHost wrap, AbortSignal,\n * automatic Tailwind injection) plus the form-field semantics.\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\tclass StyledSchmancyElement extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn FormFieldMixin(StyledSchmancyElement) as unknown as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { CSSResult, LitElement } from 'lit'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * @deprecated Extend `SchmancyElement` directly and declare `static styles`.\n *\n * Before: extends $LitElement(css`...`)\n * After: extends SchmancyElement { static styles = [css`...`] }\n *\n * Kept as a thin alias for the migration window; will be removed in the next\n * major Schmancy release. The returned class extends `SchmancyElement` so\n * runtime semantics (Tailwind injection, `disconnecting` Subject,\n * `disconnectedSignal` AbortSignal, SignalWatcher) match exactly.\n */\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass LegacyAlias extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn LegacyAlias as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { css } from 'lit'\n\n/**\n * Luminous Glass surface type styles.\n *\n * Depth model: blur intensity + opacity replaces M3 tonal hierarchy.\n * - solid: opaque ground (0 blur, 100% opacity)\n * - subtle: frosted panel (4px blur, ~72% opacity)\n * - glass: full frosted glass (20px blur, ~55% opacity)\n * - luminous: glass + glow halo (24px blur, ~22% opacity)\n */\nexport const surfaceTypeStyles = css`\n\t/* ================================================================\n\t STRUCTURAL TYPES — All-glass depth model.\n\t Nothing is opaque. Every layer is translucent.\n\t Blur creates readability. Light borders isolate layers.\n\t Rule: text must ALWAYS be readable on every surface.\n\t ================================================================ */\n\n\t/* Solid — dense glass, high readability ground layer (no blur — 92% opacity is enough) */\n\t:host([type='solid']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Subtle — bright vibrant glass: near-white tint, saturated blur, top-edge highlight */\n\t:host([type='subtle']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Glass — frosted glass, blur ensures readability */\n\t:host([type='glass']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* Luminous — glass + glow halo, heavy blur keeps readability */\n\t:host([type='luminous']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\t--glow-color: var(--schmancy-sys-color-primary-default);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 42%, transparent);\n\t\tbackdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\t-webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t UTILITY TYPES\n\t ================================================================ */\n\n\t/* Transparent — no background */\n\t:host([type='transparent']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Outlined — border with luminous hover potential */\n\t:host([type='outlined']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\ttransition: border-color 300ms ease, box-shadow 300ms ease;\n\t}\n\n\t/* ================================================================\n\t SEMANTIC TYPES — tinted glass for status/role\n\t ================================================================ */\n\n\t:host([type='primary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t:host([type='secondary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\t:host([type='tertiary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-tertiary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t:host([type='error']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-error-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-error-onContainer);\n\t}\n\t:host([type='success']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-success-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-success-onContainer);\n\t}\n\t:host([type='warning']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-warning-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-warning-onContainer);\n\t}\n\t:host([type='info']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-info-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-info-onContainer);\n\t}\n\n\t/* ================================================================\n\t LEGACY M3 ALIASES — backward compatibility\n\t Old type names render as their new Luminous Glass equivalents.\n\t ================================================================ */\n\n\t/* solid aliases — dense glass */\n\t:host([type='surface']),\n\t:host([type='surfaceDim']),\n\t:host([type='surfaceBright']),\n\t:host([type='containerLowest']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* subtle aliases — bright vibrant glass */\n\t:host([type='containerLow']),\n\t:host([type='container']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* glass aliases */\n\t:host([type='containerHigh']),\n\t:host([type='containerHighest']),\n\t:host([type='glassOforim']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t REDUCED MOTION — disable glass animations\n\t ================================================================ */\n`\n\n/**\n * Surface rounded corner styles\n */\nexport const surfaceRoundedStyles = css`\n\t:host([rounded='none']) {\n\t\tborder-radius: 0;\n\t}\n\t:host([rounded='top']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0 0;\n\t}\n\t:host([rounded='left']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) 0 0 var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='right']) {\n\t\tborder-radius: 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0;\n\t}\n\t:host([rounded='bottom']) {\n\t\tborder-radius: 0 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='all']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large);\n\t}\n`\n\n/**\n * Luminous glow elevation — replaces M3 dark drop shadows with primary-colored glow.\n * No ::after tint overlay — depth comes from glow intensity, not surface tint.\n */\nexport const surfaceElevationStyles = css`\n\t:host([elevation='1']) {\n\t\tbox-shadow: 0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='2']) {\n\t\tbox-shadow: 0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 22%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='3']) {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 28%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='4']) {\n\t\tbox-shadow: 0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 35%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='5']) {\n\t\tbox-shadow: 0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 42%, transparent);\n\t\tposition: relative;\n\t}\n`\n\n/**\n * Surface clickable styles - luminous hover, spring active\n */\nexport const surfaceClickableStyles = css`\n\t:host([clickable]) {\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t\ttransition:\n\t\t\tfilter 200ms ease,\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\tbox-shadow 400ms ease;\n\t}\n\t:host([clickable]:hover) {\n\t\tfilter: brightness(1.03);\n\t}\n\t:host([clickable]:active) {\n\t\tfilter: brightness(0.96);\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\t:host([clickable]:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([clickable]) { transition: filter 150ms ease; }\n\t\t:host([clickable]:hover) { transform: none; box-shadow: none; }\n\t\t:host([clickable]:active) { transform: none; }\n\t}\n`\n\n/**\n * Combined surface styles - includes all surface styling capabilities\n */\nexport const surfaceStyles = css`\n\t${surfaceTypeStyles}\n\t${surfaceRoundedStyles}\n\t${surfaceElevationStyles}\n\t${surfaceClickableStyles}\n`\n","import type { Constructor } from './constructor'\nimport { CSSResultGroup, CSSResultOrNative, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { TSurfaceColor } from '../src/types/surface'\nimport { surfaceStyles } from '../src/surface/surface.styles'\n\nexport type SchmancySurfaceRounded = 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all'\nexport type SchmancySurfaceElevation = 0 | 1 | 2 | 3 | 4 | 5\n\nexport declare class ISurfaceMixin {\n\trounded: SchmancySurfaceRounded\n\televation: SchmancySurfaceElevation\n\ttype: TSurfaceColor\n\tclickable: boolean\n}\n\n/**\n * SurfaceMixin - Adds surface styling properties AND styles to any LitElement\n *\n * Uses Lit's finalizeStyles hook to inject surfaceStyles CSS for all surface type selectors.\n * This is the recommended pattern for mixins that need to add styles.\n *\n * Provides these reflected properties:\n * - `rounded`: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' - Corner rounding\n * - `elevation`: 0-5 - Shadow depth level\n * - `type`: TSurfaceColor - Surface color variant (26+ options)\n *\n * Usage:\n * ```typescript\n * import { SurfaceMixin } from '@mixins/surface.mixin'\n *\n * @customElement('my-component')\n * class MyComponent extends SurfaceMixin(TailwindElement(css`\n * :host { display: block; }\n * `)) {\n * // Component now has type, fill, rounded, elevation properties\n * // AND surfaceStyles are automatically included\n * }\n * ```\n */\nexport const SurfaceMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n\tclass SurfaceMixinClass extends superClass {\n\t\t/**\n\t\t * Override finalizeStyles to inject surfaceStyles.\n\t\t * This is the Lit-recommended way for mixins to add styles.\n\t\t */\n\t\tprotected static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[] {\n\t\t\t// Get parent's finalized styles using LitElement's method\n\t\t\tconst parentStyles = (superClass as unknown as typeof LitElement).finalizeStyles(styles)\n\t\t\t// Append surfaceStyles at the end (higher specificity)\n\t\t\treturn [...parentStyles, surfaceStyles as CSSResultOrNative]\n\t\t}\n\n\t\t/**\n\t\t * Specifies the rounding style of the component's corners.\n\t\t * @default 'none'\n\t\t */\n\t\t@property({ reflect: true })\n\t\trounded: SchmancySurfaceRounded = 'none'\n\n\t\t/**\n\t\t * Defines the elevation level (shadow depth) of the surface.\n\t\t * @default 0\n\t\t */\n\t\t@property({ type: Number, reflect: true })\n\t\televation: SchmancySurfaceElevation = 0\n\n\t\t/**\n\t\t * Specifies the surface type for styling.\n\t\t * @default 'container'\n\t\t */\n\t\t@property({ reflect: true })\n\t\ttype: TSurfaceColor = 'subtle'\n\n\t\t/**\n\t\t * Makes the surface interactive with hover, active states and cursor pointer.\n\t\t * @default false\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\tclickable = false\n\t}\n\treturn SurfaceMixinClass as Constructor<ISurfaceMixin> & T\n}\n"],"mappings":";;;AAYA,IAAa,IAAsB,OAAO,IAAI,qBAAA,GASjC,IAAsB;AAyHnC,SAAgB,EAAoB,GAAA;CACnC,OAAA,CAAA,CAAS,KAAoB,OAAP,KAAO,YAAP,CAAsE,MAAlD,EAAW,cAAc;AACpE;AAiBA,SAAgB,EAAkD,GAAA;CACjE,MAAM,UAA4B,EAAA;EAAA;GAAA,KAAA,iBAAA,CACT;EAAA;EAAA;GAAA,KAGP,KAAA,CAAuB;EAAA;EA6DxC,IAAA,QAAI;GACH,OAAO,KAAK,kBAAZ,KAA8B,KAAa,KAAK,UAAU,KAAK;EAChE;EAEA,IAAA,WAAI;GACH,OAAA,CAAQ,KAAK;EACd;EAEA,cAAA;GACM,AAAc,KAAK,YAAA,CAAU;EACnC;EAEA,gBAAA;GACM,AAAgB,KAAK,cAAA,CAAY;EACvC;EAEA,iBAAA;GACK,AAAgB,KAAK,cAAA,CAAY;EACtC;EASA,MAAA,kBAAwB,GAAA;GACnB,KAAK,gBAG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./SchmancyElement-CYIif26I.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=Symbol.for(`schmancy.form-field`),i=`schmancy:field:connect`;function a(e){return!!e&&typeof e==`object`&&!0===e.constructor?.[r]}function o(n){class a extends n{static{this.formAssociated=!0}static{this[r]=!0}get dirty(){return this._defaultValue!==void 0&&this.value!==this._defaultValue}get pristine(){return!this.dirty}markTouched(){this.touched||=!0}markSubmitted(){this.submitted||=!0}clearSubmitted(){this.submitted&&=!1}async runAsyncValidator(e){this.isValidating&&this._asyncValidatorEpoch++;let t=++this._asyncValidatorEpoch;this.isValidating=!0;try{let n=await e();if(t!==this._asyncValidatorEpoch)return;this.setCustomValidity(n)}finally{t===this._asyncValidatorEpoch&&(this.isValidating=!1)}}_shouldShowError(){if(this.submitted)return!0;switch(this.validateOn){case`always`:return!0;case`touched`:return this.touched;case`dirty`:return this.dirty;case`submitted`:return!1;case`length`:if(typeof this.value==`string`){let e=this.maxlength;if(typeof e==`number`&&e>0)return this.value.length>=e}return this.dirty}}constructor(...e){super(...e),this._defaultValue=void 0,this.name=``,this.value=``,this.label=``,this.required=!1,this.disabled=!1,this.readonly=!1,this.error=!1,this.validationMessage=``,this.id=`schmancy-field-${Date.now()}-${Math.floor(1e3*Math.random())}`,this.touched=!1,this.submitted=!1,this.validateOn=`dirty`,this.isValidating=!1,this._asyncValidatorEpoch=0;try{this.internals=this.attachInternals()}catch{this.internals=void 0}}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent(i,{detail:this,bubbles:!0,composed:!0}))}get form(){return this.internals?.form??null}firstUpdated(e){super.firstUpdated?.(e),this._defaultValue===void 0&&(this._defaultValue=this.value),this.checkValidity()}willUpdate(e){super.willUpdate(e),e.has(`value`)&&(this.internals?.setFormValue(this.value),this.dirty?this.internals?.states.add(`dirty`):this.internals?.states.delete(`dirty`),this.checkValidity()),(e.has(`required`)||e.has(`disabled`))&&this.checkValidity(),e.has(`isValidating`)&&(this.isValidating?this.internals?.states.add(`validating`):this.internals?.states.delete(`validating`)),e.has(`touched`)&&(this.touched?this.internals?.states.add(`touched`):this.internals?.states.delete(`touched`),this.touched&&this.dirty&&this.checkValidity()),e.has(`submitted`)&&(this.submitted?(this.internals?.states.add(`submitted`),this.checkValidity()):this.internals?.states.delete(`submitted`)),e.has(`error`)&&(this.error?this.internals?.states.add(`invalid`):this.internals?.states.delete(`invalid`),this.internals&&(this.internals.ariaInvalid=this.error?`true`:`false`)),(e.has(`required`)||e.has(`disabled`))&&(this.required?this.internals?.states.add(`required`):this.internals?.states.delete(`required`),this.internals&&(this.internals.ariaRequired=this.required&&!this.disabled?`true`:`false`)),e.has(`disabled`)&&(this.disabled?this.internals?.states.add(`disabled`):this.internals?.states.delete(`disabled`)),e.has(`readonly`)&&(this.readonly?this.internals?.states.add(`readonly`):this.internals?.states.delete(`readonly`))}formResetCallback(){this.resetForm()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){e!=null&&(this.value=e)}resetForm(){this.value=this._defaultValue??``,this.error=!1,this.validationMessage=``,this.touched=!1,this.submitted=!1,this.internals?.setValidity({})}toFormEntries(){if(!this.name||this.disabled)return[];let e=this.value;return e==null||e===``?[]:Array.isArray(e)?e.map(e=>[this.name,String(e)]):typeof e==`boolean`?e?[[this.name,`on`]]:[]:[[this.name,String(e)]]}checkValidity(){if(this.disabled)return this.internals?.setValidity({}),!0;let e=this.required&&(this.value===``||this.value===void 0||this.value===null),t=!!this.internals?.validity?.customError,n=!e&&!t,r=this.errorMessages?.valueMissing??`This field is required`,i=e?r:`Invalid value`;return e?this.internals?.setValidity({valueMissing:!0},this.validationMessage||i):t||this.internals?.setValidity({}),this._shouldShowError()&&(this.error=!n,n||this.validationMessage?n&&(this.validationMessage=``):this.validationMessage=i),n}reportValidity(){let e=this.checkValidity();return e||this.internals?.reportValidity(),e}setCustomValidity(e){this.validationMessage=e,this.error=e!==``,e?this.internals?.setValidity({customError:!0},e):this.internals?.setValidity({})}emitChange(e){`dispatchScopedEvent`in this&&typeof this.dispatchScopedEvent==`function`?this.dispatchScopedEvent(`change`,e,{bubbles:!0}):this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,composed:!0}))}}return e.u([(0,t.property)({type:String})],a.prototype,`name`,void 0),e.u([(0,t.property)({reflect:!0})],a.prototype,`value`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`label`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`required`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`disabled`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`readonly`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`error`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`validationMessage`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`hint`,void 0),e.u([(0,t.property)({reflect:!0})],a.prototype,`id`,void 0),e.u([(0,t.state)()],a.prototype,`touched`,void 0),e.u([(0,t.state)()],a.prototype,`submitted`,void 0),e.u([(0,t.property)({type:String,reflect:!0})],a.prototype,`validateOn`,void 0),e.u([(0,t.property)({attribute:!1})],a.prototype,`errorMessages`,void 0),e.u([(0,t.state)()],a.prototype,`isValidating`,void 0),a}function s(t){class n extends e.t{static{this.styles=t?[t]:[]}}return o(n)}var c=t=>{class n extends e.t{static{this.styles=t?[t]:[]}}return n},l=n.css`
1
+ require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-BHfQg3Tj.cjs`);let t=require(`lit/decorators.js`),n=require(`lit`);var r=Symbol.for(`schmancy.form-field`),i=`schmancy:field:connect`;function a(e){return!!e&&typeof e==`object`&&!0===e.constructor?.[r]}function o(n){class a extends n{static{this.formAssociated=!0}static{this[r]=!0}get dirty(){return this._defaultValue!==void 0&&this.value!==this._defaultValue}get pristine(){return!this.dirty}markTouched(){this.touched||=!0}markSubmitted(){this.submitted||=!0}clearSubmitted(){this.submitted&&=!1}async runAsyncValidator(e){this.isValidating&&this._asyncValidatorEpoch++;let t=++this._asyncValidatorEpoch;this.isValidating=!0;try{let n=await e();if(t!==this._asyncValidatorEpoch)return;this.setCustomValidity(n)}finally{t===this._asyncValidatorEpoch&&(this.isValidating=!1)}}_shouldShowError(){if(this.submitted)return!0;switch(this.validateOn){case`always`:return!0;case`touched`:return this.touched;case`dirty`:return this.dirty;case`submitted`:return!1;case`length`:if(typeof this.value==`string`){let e=this.maxlength;if(typeof e==`number`&&e>0)return this.value.length>=e}return this.dirty}}constructor(...e){super(...e),this._defaultValue=void 0,this.name=``,this.value=``,this.label=``,this.required=!1,this.disabled=!1,this.readonly=!1,this.error=!1,this.validationMessage=``,this.id=`schmancy-field-${Date.now()}-${Math.floor(1e3*Math.random())}`,this.touched=!1,this.submitted=!1,this.validateOn=`dirty`,this.isValidating=!1,this._asyncValidatorEpoch=0;try{this.internals=this.attachInternals()}catch{this.internals=void 0}}connectedCallback(){super.connectedCallback(),this.dispatchEvent(new CustomEvent(i,{detail:this,bubbles:!0,composed:!0}))}get form(){return this.internals?.form??null}firstUpdated(e){super.firstUpdated?.(e),this._defaultValue===void 0&&(this._defaultValue=this.value),this.checkValidity()}willUpdate(e){super.willUpdate(e),e.has(`value`)&&(this.internals?.setFormValue(this.value),this.dirty?this.internals?.states.add(`dirty`):this.internals?.states.delete(`dirty`),this.checkValidity()),(e.has(`required`)||e.has(`disabled`))&&this.checkValidity(),e.has(`isValidating`)&&(this.isValidating?this.internals?.states.add(`validating`):this.internals?.states.delete(`validating`)),e.has(`touched`)&&(this.touched?this.internals?.states.add(`touched`):this.internals?.states.delete(`touched`),this.touched&&this.dirty&&this.checkValidity()),e.has(`submitted`)&&(this.submitted?(this.internals?.states.add(`submitted`),this.checkValidity()):this.internals?.states.delete(`submitted`)),e.has(`error`)&&(this.error?this.internals?.states.add(`invalid`):this.internals?.states.delete(`invalid`),this.internals&&(this.internals.ariaInvalid=this.error?`true`:`false`)),(e.has(`required`)||e.has(`disabled`))&&(this.required?this.internals?.states.add(`required`):this.internals?.states.delete(`required`),this.internals&&(this.internals.ariaRequired=this.required&&!this.disabled?`true`:`false`)),e.has(`disabled`)&&(this.disabled?this.internals?.states.add(`disabled`):this.internals?.states.delete(`disabled`)),e.has(`readonly`)&&(this.readonly?this.internals?.states.add(`readonly`):this.internals?.states.delete(`readonly`))}formResetCallback(){this.resetForm()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){e!=null&&(this.value=e)}resetForm(){this.value=this._defaultValue??``,this.error=!1,this.validationMessage=``,this.touched=!1,this.submitted=!1,this.internals?.setValidity({})}toFormEntries(){if(!this.name||this.disabled)return[];let e=this.value;return e==null||e===``?[]:Array.isArray(e)?e.map(e=>[this.name,String(e)]):typeof e==`boolean`?e?[[this.name,`on`]]:[]:[[this.name,String(e)]]}checkValidity(){if(this.disabled)return this.internals?.setValidity({}),!0;let e=this.required&&(this.value===``||this.value===void 0||this.value===null),t=!!this.internals?.validity?.customError,n=!e&&!t,r=this.errorMessages?.valueMissing??`This field is required`,i=e?r:`Invalid value`;return e?this.internals?.setValidity({valueMissing:!0},this.validationMessage||i):t||this.internals?.setValidity({}),this._shouldShowError()&&(this.error=!n,n||this.validationMessage?n&&(this.validationMessage=``):this.validationMessage=i),n}reportValidity(){let e=this.checkValidity();return e||this.internals?.reportValidity(),e}setCustomValidity(e){this.validationMessage=e,this.error=e!==``,e?this.internals?.setValidity({customError:!0},e):this.internals?.setValidity({})}emitChange(e){`dispatchScopedEvent`in this&&typeof this.dispatchScopedEvent==`function`?this.dispatchScopedEvent(`change`,e,{bubbles:!0}):this.dispatchEvent(new CustomEvent(`change`,{detail:e,bubbles:!0,composed:!0}))}}return e.u([(0,t.property)({type:String})],a.prototype,`name`,void 0),e.u([(0,t.property)({reflect:!0})],a.prototype,`value`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`label`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`required`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`disabled`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`readonly`,void 0),e.u([(0,t.property)({type:Boolean,reflect:!0})],a.prototype,`error`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`validationMessage`,void 0),e.u([(0,t.property)({type:String})],a.prototype,`hint`,void 0),e.u([(0,t.property)({reflect:!0})],a.prototype,`id`,void 0),e.u([(0,t.state)()],a.prototype,`touched`,void 0),e.u([(0,t.state)()],a.prototype,`submitted`,void 0),e.u([(0,t.property)({type:String,reflect:!0})],a.prototype,`validateOn`,void 0),e.u([(0,t.property)({attribute:!1})],a.prototype,`errorMessages`,void 0),e.u([(0,t.state)()],a.prototype,`isValidating`,void 0),a}function s(t){class n extends e.t{static{this.styles=t?[t]:[]}}return o(n)}var c=t=>{class n extends e.t{static{this.styles=t?[t]:[]}}return n},l=n.css`
2
2
  /* ================================================================
3
3
  STRUCTURAL TYPES — All-glass depth model.
4
4
  Nothing is opaque. Every layer is translucent.
@@ -1 +1 @@
1
- {"version":3,"file":"mixins-CGXSzZc7.cjs","names":[],"sources":["../mixins/formField.mixin.ts","../mixins/litElement.mixin.ts","../src/surface/surface.styles.ts","../mixins/surface.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin } from './tailwind.mixin'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * Cross-realm brand used by `<schmancy-form>` to discover form fields by\n * inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in\n * the global registry so detection works across module realms/bundles.\n */\nexport const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')\n\n/**\n * Composed event a field dispatches in `connectedCallback`. `<schmancy-form>`\n * subscribes via `fromEvent(this, FIELD_CONNECT_EVENT)` and adds the field to\n * its registry. No matching disconnect event — composed events from a\n * disconnected node have an empty composed path; cleanup is via `isConnected`\n * filter at iteration time.\n */\nexport const FIELD_CONNECT_EVENT = 'schmancy:field:connect'\n\n/**\n * Validation modes.\n * - `dirty` (default per Revolute) — show errors only after value diverged.\n * - `touched` — show errors after first blur, even if value unchanged.\n * - `always` — show errors immediately (live search).\n * - `submitted` — hold all errors until submit (wizard step).\n * - `length` — fire validation only when `value.length` reaches `maxlength`\n * (Stripe pattern for predictable-length fields: ZIP, phone, card number).\n */\nexport type ValidateOn = 'always' | 'touched' | 'dirty' | 'submitted' | 'length'\n\n/**\n * Per-field error-message override map. Keys are `ValidityState` flag names;\n * values are the message to display when that flag is set. Unset flags fall\n * back to the mixin's hardcoded defaults (English).\n *\n * Use for i18n or domain-specific copy:\n * ```ts\n * <schmancy-input\n * .errorMessages=${{ valueMissing: 'Adresse e-mail requise', typeMismatch: 'Format e-mail invalide' }}\n * type=\"email\" required\n * ></schmancy-input>\n * ```\n */\nexport type ErrorMessages = Partial<Record<keyof ValidityState, string>>\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\tname: string\n\tvalue: string | string[] | boolean | number | undefined\n\tlabel: string\n\trequired: boolean\n\tdisabled: boolean\n\treadonly: boolean\n\terror: boolean\n\tvalidationMessage: string\n\thint?: string\n\tid: string\n\n\t/** Set to `true` once the user has blurred the field at least once. */\n\ttouched: boolean\n\t/** `true` when the current value differs from the captured default. */\n\tdirty: boolean\n\t/** Inverse of `dirty`. */\n\tpristine: boolean\n\t/** Set to `true` by `<schmancy-form>` on submit (forces error display). */\n\tsubmitted: boolean\n\t/** Validation mode — controls when errors display. Default `'dirty'`. */\n\tvalidateOn: ValidateOn\n\n\t/**\n\t * Per-field error-message override map (i18n hook). See `ErrorMessages`.\n\t * Unset keys fall back to the mixin's hardcoded English defaults.\n\t */\n\terrorMessages?: ErrorMessages\n\n\t/**\n\t * `ElementInternals` instance attached by the mixin. Exposed so subclasses\n\t * with non-standard validity semantics (date-range, multi-select) can\n\t * surface platform `ValidityStateFlags` directly via\n\t * `internals.setValidity({ valueMissing: true })` rather than rolling their\n\t * own `attachInternals` call.\n\t */\n\tinternals: ElementInternals | undefined\n\n\tform: HTMLFormElement | null\n\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t/** Mark the field as touched (component should call on blur). */\n\tmarkTouched(): void\n\t/** Mark the field as submitted (called by `<schmancy-form>` on submit). */\n\tmarkSubmitted(): void\n\t/**\n\t * Clear the `submitted` flag without resetting value/touched/error.\n\t * Used by wizards: stepping back from step N to step N-1 should not\n\t * leave step N-1's fields in aggressive \"show all errors\" mode.\n\t */\n\tclearSubmitted(): void\n\n\t/**\n\t * `true` while an async validator is in flight. Broadcast as\n\t * `:state(validating)`. `<schmancy-form>` blocks submit until every\n\t * registered field's `isValidating` is back to `false`.\n\t */\n\tisValidating: boolean\n\n\t/**\n\t * Run an async validator. While the promise is pending, `isValidating` is\n\t * `true` and `:state(validating)` is broadcast. On resolve, the returned\n\t * string is passed to `setCustomValidity` — empty string clears any\n\t * existing custom error; non-empty marks the field invalid with that\n\t * message.\n\t *\n\t * Submitting the form while a validator is pending is queued — the form\n\t * waits for `Promise.all(pending validators)` to settle before proceeding.\n\t */\n\trunAsyncValidator(fn: () => Promise<string>): Promise<void>\n\n\t/**\n\t * Whether the gate for showing validation errors is open right now. Exposed\n\t * so subclasses with custom error-display channels (e.g. select renders\n\t * errors on a child input) can keep their gate consistent with the mixin's.\n\t * Subclasses should not override this — extend the truth table by changing\n\t * `validateOn` instead.\n\t */\n\t_shouldShowError(): boolean\n\n\ttoFormEntries(): Array<[string, FormDataEntryValue]>\n\tresetForm(): void\n\n\temitChange(detail: any): void\n}\n\n/** Predicate used by `<schmancy-form>` to detect mixin descendants. */\nexport function isSchmancyFormField(el: unknown): el is IFormFieldMixin {\n\treturn !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * Components that extend this mixin are automatically discovered and\n * collected by `<schmancy-form>` — no tag-name registration needed.\n *\n * Subclasses may override `toFormEntries()` to contribute multiple\n * name/value pairs to FormData (e.g. date-range, tag-input).\n *\n * @example\n * ```ts\n * class MyInput extends FormFieldMixin(TailwindElement(css`...`)) {\n * // Your component code here\n * }\n * ```\n */\nexport function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T) {\n\tclass FormFieldMixinClass extends superClass {\n\t\tstatic formAssociated = true\n\n\t\t/** Brand for cross-realm detection by `<schmancy-form>`. */\n\t\tstatic readonly [SCHMANCY_FORM_FIELD] = true\n\n\t\t// Element internals for form association\n\t\tinternals: ElementInternals | undefined\n\n\t\t/** Value snapshot captured at first render, used by `resetForm()`. */\n\t\tprotected _defaultValue: string | string[] | boolean | number | undefined = undefined\n\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\n\n\t\t// ----- Validation UX state (Revolute contract) -----\n\n\t\t/** True after the user has blurred the field at least once. */\n\t\t@state() touched: boolean = false\n\n\t\t/** Set by `<schmancy-form>` on submit; persists until `resetForm()`. */\n\t\t@state() submitted: boolean = false\n\n\t\t/**\n\t\t * When errors display. Default `'dirty'` — the autofocus+cancel anti-pattern\n\t\t * is avoided because pristine fields never show errors until submit.\n\t\t */\n\t\t@property({ type: String, reflect: true })\n\t\tvalidateOn: ValidateOn = 'dirty'\n\n\t\t/**\n\t\t * Optional override for the validity-flag → message map. See\n\t\t * `ErrorMessages`. Unset keys fall back to the mixin's defaults.\n\t\t */\n\t\t@property({ attribute: false })\n\t\terrorMessages?: ErrorMessages\n\n\t\t/** True when value has been changed from the captured default. */\n\t\tget dirty(): boolean {\n\t\t\treturn this._defaultValue !== undefined && this.value !== this._defaultValue\n\t\t}\n\n\t\tget pristine(): boolean {\n\t\t\treturn !this.dirty\n\t\t}\n\n\t\tmarkTouched(): void {\n\t\t\tif (!this.touched) this.touched = true\n\t\t}\n\n\t\tmarkSubmitted(): void {\n\t\t\tif (!this.submitted) this.submitted = true\n\t\t}\n\n\t\tclearSubmitted(): void {\n\t\t\tif (this.submitted) this.submitted = false\n\t\t}\n\n\t\t/**\n\t\t * Reactive flag set while an async validator is in flight. Read by\n\t\t * `<schmancy-form>` to gate submit; broadcast as `:state(validating)`\n\t\t * for CSS spinner targeting.\n\t\t */\n\t\t@state() isValidating: boolean = false\n\n\t\tasync runAsyncValidator(fn: () => Promise<string>): Promise<void> {\n\t\t\tif (this.isValidating) {\n\t\t\t\t// Cancel-by-supersede semantics — a new call wins; the previous\n\t\t\t\t// is best-effort and its result is dropped if it resolves later.\n\t\t\t\tthis._asyncValidatorEpoch++\n\t\t\t}\n\t\t\tconst epoch = ++this._asyncValidatorEpoch\n\t\t\tthis.isValidating = true\n\t\t\ttry {\n\t\t\t\tconst message = await fn()\n\t\t\t\tif (epoch !== this._asyncValidatorEpoch) return // superseded\n\t\t\t\tthis.setCustomValidity(message)\n\t\t\t} finally {\n\t\t\t\tif (epoch === this._asyncValidatorEpoch) {\n\t\t\t\t\tthis.isValidating = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate _asyncValidatorEpoch: number = 0\n\n\t\t/**\n\t\t * Whether `checkValidity()` should display errors right now.\n\t\t * `submitted` overrides every mode — once a submit attempt happens, the\n\t\t * field stays in live-correction mode (Phase 3) for the rest of the\n\t\t * session, and `resetForm()` is the only way back. The leading\n\t\t * underscore marks this as an internal API: subclasses may call it but\n\t\t * should not override it (extend the truth table by changing\n\t\t * `validateOn` instead).\n\t\t */\n\t\t_shouldShowError(): boolean {\n\t\t\tif (this.submitted) return true\n\t\t\tswitch (this.validateOn) {\n\t\t\t\tcase 'always':\n\t\t\t\t\treturn true\n\t\t\t\tcase 'touched':\n\t\t\t\t\treturn this.touched\n\t\t\t\tcase 'dirty':\n\t\t\t\t\treturn this.dirty\n\t\t\t\tcase 'submitted':\n\t\t\t\t\treturn false\n\t\t\t\tcase 'length':\n\t\t\t\t\t// Predictable-length fields: validate once value reaches the\n\t\t\t\t\t// maxlength constraint. Stripe pattern. Falls back to dirty\n\t\t\t\t\t// if no maxlength is set.\n\t\t\t\t\tif (typeof this.value === 'string') {\n\t\t\t\t\t\tconst max = (this as unknown as { maxlength?: number }).maxlength\n\t\t\t\t\t\tif (typeof max === 'number' && max > 0) {\n\t\t\t\t\t\t\treturn this.value.length >= max\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.dirty\n\t\t\t}\n\t\t}\n\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\n\t\toverride connectedCallback(): void {\n\t\t\tsuper.connectedCallback()\n\t\t\t// Register with any ancestor <schmancy-form> via composed event.\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent(FIELD_CONNECT_EVENT, {\n\t\t\t\t\tdetail: this,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\n\t\t/** The form this element is associated with (native FACE behavior). */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\tprotected firstUpdated(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.firstUpdated?.(changedProps)\n\t\t\tif (this._defaultValue === undefined) this._defaultValue = this.value\n\t\t\t// Sync platform validity (`internals.setValidity`) once after first\n\t\t\t// render so `<form>.checkValidity()` and `:invalid` reflect truth\n\t\t\t// even when no property change has fired through `willUpdate` yet\n\t\t\t// (e.g. for required-empty fields with class-field-initialized\n\t\t\t// defaults that Lit doesn't see as \"changed\" on the first cycle).\n\t\t\tthis.checkValidity()\n\t\t}\n\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\tif (changedProps.has('value')) {\n\t\t\t\tthis.internals?.setFormValue(this.value as string | File | FormData | null)\n\t\t\t\t// :state(dirty) tracks value-vs-default; recompute on every value change.\n\t\t\t\tif (this.dirty) this.internals?.states.add('dirty')\n\t\t\t\telse this.internals?.states.delete('dirty')\n\t\t\t\t// Always sync platform validity (internals.setValidity) so\n\t\t\t\t// `<form>.checkValidity()` and `:invalid` reflect truth, even\n\t\t\t\t// while the visual `error` gate stays closed for pristine\n\t\t\t\t// fields under `validateOn: 'dirty'`. The visibility gate is\n\t\t\t\t// inside checkValidity() itself.\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('isValidating')) {\n\t\t\t\tif (this.isValidating) this.internals?.states.add('validating')\n\t\t\t\telse this.internals?.states.delete('validating')\n\t\t\t}\n\n\t\t\tif (changedProps.has('touched')) {\n\t\t\t\tif (this.touched) this.internals?.states.add('touched')\n\t\t\t\telse this.internals?.states.delete('touched')\n\t\t\t\t// Phase 2 — blur on a dirty field. Validate to surface the error.\n\t\t\t\tif (this.touched && this.dirty) this.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('submitted')) {\n\t\t\t\tif (this.submitted) {\n\t\t\t\t\tthis.internals?.states.add('submitted')\n\t\t\t\t\t// Phase 4 — submit forces error display regardless of dirty/touched.\n\t\t\t\t\tthis.checkValidity()\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.states.delete('submitted')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: we do not write to `internals.setValidity` from willUpdate\n\t\t\t// based on `error` / `validationMessage` changes. `checkValidity`\n\t\t\t// and `setCustomValidity` are the sole writers — overwriting the\n\t\t\t// validity flags from willUpdate would clobber structured flags\n\t\t\t// set by subclass overrides (e.g. input.ts surfaces typeMismatch /\n\t\t\t// patternMismatch / tooShort / etc.).\n\n\t\t\tif (changedProps.has('error')) {\n\t\t\t\tif (this.error) this.internals?.states.add('invalid')\n\t\t\t\telse this.internals?.states.delete('invalid')\n\t\t\t\t// ARIA reflection through ElementInternals reaches AT through shadow DOM.\n\t\t\t\tif (this.internals) this.internals.ariaInvalid = this.error ? 'true' : 'false'\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tif (this.required) this.internals?.states.add('required')\n\t\t\t\telse this.internals?.states.delete('required')\n\t\t\t\t// Suppress aria-required when disabled — disabled fields shouldn't\n\t\t\t\t// announce as required to assistive tech.\n\t\t\t\tif (this.internals) {\n\t\t\t\t\tthis.internals.ariaRequired = this.required && !this.disabled ? 'true' : 'false'\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changedProps.has('disabled')) {\n\t\t\t\tif (this.disabled) this.internals?.states.add('disabled')\n\t\t\t\telse this.internals?.states.delete('disabled')\n\t\t\t}\n\t\t\tif (changedProps.has('readonly')) {\n\t\t\t\tif (this.readonly) this.internals?.states.add('readonly')\n\t\t\t\telse this.internals?.states.delete('readonly')\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — called by the browser when the owning form\n\t\t * is reset. Delegates to `resetForm()` so subclasses have one\n\t\t * override point for both programmatic and user-initiated resets.\n\t\t */\n\t\tformResetCallback(): void {\n\t\t\tthis.resetForm()\n\t\t}\n\n\t\t/** Native FACE lifecycle — called when the form's disabled state changes. */\n\t\tformDisabledCallback(disabled: boolean): void {\n\t\t\tthis.disabled = disabled\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — restore value after bfcache / form autofill.\n\t\t */\n\t\tformStateRestoreCallback(state: string | File | FormData | null): void {\n\t\t\tif (state == null) return\n\t\t\tthis.value = state as any\n\t\t}\n\n\t\t/** Override to customize reset behavior; default restores `_defaultValue`. */\n\t\tresetForm(): void {\n\t\t\tthis.value = this._defaultValue ?? ''\n\t\t\tthis.error = false\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.touched = false\n\t\t\tthis.submitted = false\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t/**\n\t\t * Contribute entries to a parent FormData. Default: a single\n\t\t * `[name, value]` pair when `name` is set and value is meaningful.\n\t\t * Override for multi-entry controls (e.g. date range).\n\t\t */\n\t\ttoFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\t\tif (!this.name || this.disabled) return []\n\t\t\tconst v = this.value\n\t\t\tif (v === undefined || v === null || v === '') return []\n\t\t\tif (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\t\tif (typeof v === 'boolean') return v ? [[this.name, 'on']] : []\n\t\t\treturn [[this.name, String(v)]]\n\t\t}\n\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tconst requiredFailed =\n\t\t\t\tthis.required && (this.value === '' || this.value === undefined || this.value === null)\n\t\t\t// Custom errors set via setCustomValidity() are platform-truth too —\n\t\t\t// preserve them through re-validation cycles.\n\t\t\tconst customErrorSet = !!this.internals?.validity?.customError\n\t\t\tconst isValid = !requiredFailed && !customErrorSet\n\t\t\tconst requiredMessage =\n\t\t\t\tthis.errorMessages?.valueMissing ?? 'This field is required'\n\t\t\tconst defaultMessage = requiredFailed ? requiredMessage : 'Invalid value'\n\n\t\t\t// Platform validity (read by `form.checkValidity()` and `:invalid`)\n\t\t\t// is always set to the truth — independent of the visual gate.\n\t\t\tif (requiredFailed) {\n\t\t\t\tthis.internals?.setValidity(\n\t\t\t\t\t{ valueMissing: true },\n\t\t\t\t\tthis.validationMessage || defaultMessage,\n\t\t\t\t)\n\t\t\t} else if (!customErrorSet) {\n\t\t\t\t// No required failure, no custom error — clear flags.\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t\t// (customErrorSet branch falls through — leave the custom validity intact.)\n\n\t\t\t// Visual `error` flag is gated. The returned boolean tells the caller\n\t\t\t// the truth; only the in-component error display is suppressed for\n\t\t\t// pristine fields under `validateOn: 'dirty'`.\n\t\t\tif (this._shouldShowError()) {\n\t\t\t\tthis.error = !isValid\n\t\t\t\tif (!isValid && !this.validationMessage) {\n\t\t\t\t\tthis.validationMessage = defaultMessage\n\t\t\t\t} else if (isValid) {\n\t\t\t\t\tthis.validationMessage = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn isValid\n\t\t}\n\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) this.internals?.reportValidity()\n\t\t\treturn isValid\n\t\t}\n\n\t\tsetCustomValidity(message: string): void {\n\t\t\tthis.validationMessage = message\n\t\t\tthis.error = message !== ''\n\t\t\tif (message) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, message)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\n\t\temitChange(detail: any): void {\n\t\t\tif ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {\n\t\t\t\tthis.dispatchScopedEvent('change', detail, { bubbles: true })\n\t\t\t} else {\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\tdetail,\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with SchmancyElement\n * to create a base class for Schmancy form components. Subclasses gain the\n * full SchmancyElement stack (SignalWatcher, _activeHost wrap, AbortSignal,\n * automatic Tailwind injection) plus the form-field semantics.\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\tclass StyledSchmancyElement extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn FormFieldMixin(StyledSchmancyElement) as unknown as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { CSSResult, LitElement } from 'lit'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * @deprecated Extend `SchmancyElement` directly and declare `static styles`.\n *\n * Before: extends $LitElement(css`...`)\n * After: extends SchmancyElement { static styles = [css`...`] }\n *\n * Kept as a thin alias for the migration window; will be removed in the next\n * major Schmancy release. The returned class extends `SchmancyElement` so\n * runtime semantics (Tailwind injection, `disconnecting` Subject,\n * `disconnectedSignal` AbortSignal, SignalWatcher) match exactly.\n */\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass LegacyAlias extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn LegacyAlias as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { css } from 'lit'\n\n/**\n * Luminous Glass surface type styles.\n *\n * Depth model: blur intensity + opacity replaces M3 tonal hierarchy.\n * - solid: opaque ground (0 blur, 100% opacity)\n * - subtle: frosted panel (4px blur, ~72% opacity)\n * - glass: full frosted glass (20px blur, ~55% opacity)\n * - luminous: glass + glow halo (24px blur, ~22% opacity)\n */\nexport const surfaceTypeStyles = css`\n\t/* ================================================================\n\t STRUCTURAL TYPES — All-glass depth model.\n\t Nothing is opaque. Every layer is translucent.\n\t Blur creates readability. Light borders isolate layers.\n\t Rule: text must ALWAYS be readable on every surface.\n\t ================================================================ */\n\n\t/* Solid — dense glass, high readability ground layer (no blur — 92% opacity is enough) */\n\t:host([type='solid']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Subtle — bright vibrant glass: near-white tint, saturated blur, top-edge highlight */\n\t:host([type='subtle']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Glass — frosted glass, blur ensures readability */\n\t:host([type='glass']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* Luminous — glass + glow halo, heavy blur keeps readability */\n\t:host([type='luminous']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\t--glow-color: var(--schmancy-sys-color-primary-default);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 42%, transparent);\n\t\tbackdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\t-webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t UTILITY TYPES\n\t ================================================================ */\n\n\t/* Transparent — no background */\n\t:host([type='transparent']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Outlined — border with luminous hover potential */\n\t:host([type='outlined']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\ttransition: border-color 300ms ease, box-shadow 300ms ease;\n\t}\n\n\t/* ================================================================\n\t SEMANTIC TYPES — tinted glass for status/role\n\t ================================================================ */\n\n\t:host([type='primary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t:host([type='secondary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\t:host([type='tertiary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-tertiary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t:host([type='error']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-error-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-error-onContainer);\n\t}\n\t:host([type='success']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-success-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-success-onContainer);\n\t}\n\t:host([type='warning']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-warning-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-warning-onContainer);\n\t}\n\t:host([type='info']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-info-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-info-onContainer);\n\t}\n\n\t/* ================================================================\n\t LEGACY M3 ALIASES — backward compatibility\n\t Old type names render as their new Luminous Glass equivalents.\n\t ================================================================ */\n\n\t/* solid aliases — dense glass */\n\t:host([type='surface']),\n\t:host([type='surfaceDim']),\n\t:host([type='surfaceBright']),\n\t:host([type='containerLowest']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* subtle aliases — bright vibrant glass */\n\t:host([type='containerLow']),\n\t:host([type='container']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* glass aliases */\n\t:host([type='containerHigh']),\n\t:host([type='containerHighest']),\n\t:host([type='glassOforim']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t REDUCED MOTION — disable glass animations\n\t ================================================================ */\n`\n\n/**\n * Surface rounded corner styles\n */\nexport const surfaceRoundedStyles = css`\n\t:host([rounded='none']) {\n\t\tborder-radius: 0;\n\t}\n\t:host([rounded='top']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0 0;\n\t}\n\t:host([rounded='left']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) 0 0 var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='right']) {\n\t\tborder-radius: 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0;\n\t}\n\t:host([rounded='bottom']) {\n\t\tborder-radius: 0 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='all']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large);\n\t}\n`\n\n/**\n * Luminous glow elevation — replaces M3 dark drop shadows with primary-colored glow.\n * No ::after tint overlay — depth comes from glow intensity, not surface tint.\n */\nexport const surfaceElevationStyles = css`\n\t:host([elevation='1']) {\n\t\tbox-shadow: 0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='2']) {\n\t\tbox-shadow: 0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 22%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='3']) {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 28%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='4']) {\n\t\tbox-shadow: 0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 35%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='5']) {\n\t\tbox-shadow: 0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 42%, transparent);\n\t\tposition: relative;\n\t}\n`\n\n/**\n * Surface clickable styles - luminous hover, spring active\n */\nexport const surfaceClickableStyles = css`\n\t:host([clickable]) {\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t\ttransition:\n\t\t\tfilter 200ms ease,\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\tbox-shadow 400ms ease;\n\t}\n\t:host([clickable]:hover) {\n\t\tfilter: brightness(1.03);\n\t}\n\t:host([clickable]:active) {\n\t\tfilter: brightness(0.96);\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\t:host([clickable]:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([clickable]) { transition: filter 150ms ease; }\n\t\t:host([clickable]:hover) { transform: none; box-shadow: none; }\n\t\t:host([clickable]:active) { transform: none; }\n\t}\n`\n\n/**\n * Combined surface styles - includes all surface styling capabilities\n */\nexport const surfaceStyles = css`\n\t${surfaceTypeStyles}\n\t${surfaceRoundedStyles}\n\t${surfaceElevationStyles}\n\t${surfaceClickableStyles}\n`\n","import type { Constructor } from './constructor'\nimport { CSSResultGroup, CSSResultOrNative, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { TSurfaceColor } from '../src/types/surface'\nimport { surfaceStyles } from '../src/surface/surface.styles'\n\nexport type SchmancySurfaceRounded = 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all'\nexport type SchmancySurfaceElevation = 0 | 1 | 2 | 3 | 4 | 5\n\nexport declare class ISurfaceMixin {\n\trounded: SchmancySurfaceRounded\n\televation: SchmancySurfaceElevation\n\ttype: TSurfaceColor\n\tclickable: boolean\n}\n\n/**\n * SurfaceMixin - Adds surface styling properties AND styles to any LitElement\n *\n * Uses Lit's finalizeStyles hook to inject surfaceStyles CSS for all surface type selectors.\n * This is the recommended pattern for mixins that need to add styles.\n *\n * Provides these reflected properties:\n * - `rounded`: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' - Corner rounding\n * - `elevation`: 0-5 - Shadow depth level\n * - `type`: TSurfaceColor - Surface color variant (26+ options)\n *\n * Usage:\n * ```typescript\n * import { SurfaceMixin } from '@mixins/surface.mixin'\n *\n * @customElement('my-component')\n * class MyComponent extends SurfaceMixin(TailwindElement(css`\n * :host { display: block; }\n * `)) {\n * // Component now has type, fill, rounded, elevation properties\n * // AND surfaceStyles are automatically included\n * }\n * ```\n */\nexport const SurfaceMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n\tclass SurfaceMixinClass extends superClass {\n\t\t/**\n\t\t * Override finalizeStyles to inject surfaceStyles.\n\t\t * This is the Lit-recommended way for mixins to add styles.\n\t\t */\n\t\tprotected static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[] {\n\t\t\t// Get parent's finalized styles using LitElement's method\n\t\t\tconst parentStyles = (superClass as unknown as typeof LitElement).finalizeStyles(styles)\n\t\t\t// Append surfaceStyles at the end (higher specificity)\n\t\t\treturn [...parentStyles, surfaceStyles as CSSResultOrNative]\n\t\t}\n\n\t\t/**\n\t\t * Specifies the rounding style of the component's corners.\n\t\t * @default 'none'\n\t\t */\n\t\t@property({ reflect: true })\n\t\trounded: SchmancySurfaceRounded = 'none'\n\n\t\t/**\n\t\t * Defines the elevation level (shadow depth) of the surface.\n\t\t * @default 0\n\t\t */\n\t\t@property({ type: Number, reflect: true })\n\t\televation: SchmancySurfaceElevation = 0\n\n\t\t/**\n\t\t * Specifies the surface type for styling.\n\t\t * @default 'container'\n\t\t */\n\t\t@property({ reflect: true })\n\t\ttype: TSurfaceColor = 'subtle'\n\n\t\t/**\n\t\t * Makes the surface interactive with hover, active states and cursor pointer.\n\t\t * @default false\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\tclickable = false\n\t}\n\treturn SurfaceMixinClass as Constructor<ISurfaceMixin> & T\n}\n"],"mappings":"sIAYA,IAAa,EAAsB,OAAO,IAAI,qBAAA,EASjC,EAAsB,yBAyHnC,SAAgB,EAAoB,EAAA,CACnC,MAAA,CAAA,CAAS,GAAoB,OAAP,GAAO,UAAP,CAAsE,IAAlD,EAAW,cAAc,EACpE,CAiBA,SAAgB,EAAkD,EAAA,CACjE,MAAM,UAA4B,CAAA,CAAA,OAAA,KAAA,eAAA,CACT,CAAA,CAAA,OAAA,KAGP,GAAA,CAAuB,CAAA,CA6DxC,IAAA,OAAI,CACH,OAAO,KAAK,gBAAZ,IAA8B,IAAa,KAAK,QAAU,KAAK,aAChE,CAEA,IAAA,UAAI,CACH,MAAA,CAAQ,KAAK,KACd,CAEA,aAAA,CACM,AAAc,KAAK,UAAA,CAAU,CACnC,CAEA,eAAA,CACM,AAAgB,KAAK,YAAA,CAAY,CACvC,CAEA,gBAAA,CACK,AAAgB,KAAK,YAAA,CAA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,EAAA,EAAA,UAOjB,CAAE,KAAM,OAAQ,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,YAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAO/B,CAAE,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,OAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAOjB,CAAE,KAAM,QAAS,QAAA,CAAS,CAAA,CAAA,CAAA,EAAM,EAAA,UAAA,YAAA,IAAA,EAAA,EAGpC,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"mixins-DxHpyMHA.cjs","names":[],"sources":["../mixins/formField.mixin.ts","../mixins/litElement.mixin.ts","../src/surface/surface.styles.ts","../mixins/surface.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin } from './tailwind.mixin'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * Cross-realm brand used by `<schmancy-form>` to discover form fields by\n * inheritance rather than tag-name allowlists. `Symbol.for` puts the symbol in\n * the global registry so detection works across module realms/bundles.\n */\nexport const SCHMANCY_FORM_FIELD = Symbol.for('schmancy.form-field')\n\n/**\n * Composed event a field dispatches in `connectedCallback`. `<schmancy-form>`\n * subscribes via `fromEvent(this, FIELD_CONNECT_EVENT)` and adds the field to\n * its registry. No matching disconnect event — composed events from a\n * disconnected node have an empty composed path; cleanup is via `isConnected`\n * filter at iteration time.\n */\nexport const FIELD_CONNECT_EVENT = 'schmancy:field:connect'\n\n/**\n * Validation modes.\n * - `dirty` (default per Revolute) — show errors only after value diverged.\n * - `touched` — show errors after first blur, even if value unchanged.\n * - `always` — show errors immediately (live search).\n * - `submitted` — hold all errors until submit (wizard step).\n * - `length` — fire validation only when `value.length` reaches `maxlength`\n * (Stripe pattern for predictable-length fields: ZIP, phone, card number).\n */\nexport type ValidateOn = 'always' | 'touched' | 'dirty' | 'submitted' | 'length'\n\n/**\n * Per-field error-message override map. Keys are `ValidityState` flag names;\n * values are the message to display when that flag is set. Unset flags fall\n * back to the mixin's hardcoded defaults (English).\n *\n * Use for i18n or domain-specific copy:\n * ```ts\n * <schmancy-input\n * .errorMessages=${{ valueMissing: 'Adresse e-mail requise', typeMismatch: 'Format e-mail invalide' }}\n * type=\"email\" required\n * ></schmancy-input>\n * ```\n */\nexport type ErrorMessages = Partial<Record<keyof ValidityState, string>>\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\tname: string\n\tvalue: string | string[] | boolean | number | undefined\n\tlabel: string\n\trequired: boolean\n\tdisabled: boolean\n\treadonly: boolean\n\terror: boolean\n\tvalidationMessage: string\n\thint?: string\n\tid: string\n\n\t/** Set to `true` once the user has blurred the field at least once. */\n\ttouched: boolean\n\t/** `true` when the current value differs from the captured default. */\n\tdirty: boolean\n\t/** Inverse of `dirty`. */\n\tpristine: boolean\n\t/** Set to `true` by `<schmancy-form>` on submit (forces error display). */\n\tsubmitted: boolean\n\t/** Validation mode — controls when errors display. Default `'dirty'`. */\n\tvalidateOn: ValidateOn\n\n\t/**\n\t * Per-field error-message override map (i18n hook). See `ErrorMessages`.\n\t * Unset keys fall back to the mixin's hardcoded English defaults.\n\t */\n\terrorMessages?: ErrorMessages\n\n\t/**\n\t * `ElementInternals` instance attached by the mixin. Exposed so subclasses\n\t * with non-standard validity semantics (date-range, multi-select) can\n\t * surface platform `ValidityStateFlags` directly via\n\t * `internals.setValidity({ valueMissing: true })` rather than rolling their\n\t * own `attachInternals` call.\n\t */\n\tinternals: ElementInternals | undefined\n\n\tform: HTMLFormElement | null\n\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t/** Mark the field as touched (component should call on blur). */\n\tmarkTouched(): void\n\t/** Mark the field as submitted (called by `<schmancy-form>` on submit). */\n\tmarkSubmitted(): void\n\t/**\n\t * Clear the `submitted` flag without resetting value/touched/error.\n\t * Used by wizards: stepping back from step N to step N-1 should not\n\t * leave step N-1's fields in aggressive \"show all errors\" mode.\n\t */\n\tclearSubmitted(): void\n\n\t/**\n\t * `true` while an async validator is in flight. Broadcast as\n\t * `:state(validating)`. `<schmancy-form>` blocks submit until every\n\t * registered field's `isValidating` is back to `false`.\n\t */\n\tisValidating: boolean\n\n\t/**\n\t * Run an async validator. While the promise is pending, `isValidating` is\n\t * `true` and `:state(validating)` is broadcast. On resolve, the returned\n\t * string is passed to `setCustomValidity` — empty string clears any\n\t * existing custom error; non-empty marks the field invalid with that\n\t * message.\n\t *\n\t * Submitting the form while a validator is pending is queued — the form\n\t * waits for `Promise.all(pending validators)` to settle before proceeding.\n\t */\n\trunAsyncValidator(fn: () => Promise<string>): Promise<void>\n\n\t/**\n\t * Whether the gate for showing validation errors is open right now. Exposed\n\t * so subclasses with custom error-display channels (e.g. select renders\n\t * errors on a child input) can keep their gate consistent with the mixin's.\n\t * Subclasses should not override this — extend the truth table by changing\n\t * `validateOn` instead.\n\t */\n\t_shouldShowError(): boolean\n\n\ttoFormEntries(): Array<[string, FormDataEntryValue]>\n\tresetForm(): void\n\n\temitChange(detail: any): void\n}\n\n/** Predicate used by `<schmancy-form>` to detect mixin descendants. */\nexport function isSchmancyFormField(el: unknown): el is IFormFieldMixin {\n\treturn !!el && typeof el === 'object' && (el as any).constructor?.[SCHMANCY_FORM_FIELD] === true\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * Components that extend this mixin are automatically discovered and\n * collected by `<schmancy-form>` — no tag-name registration needed.\n *\n * Subclasses may override `toFormEntries()` to contribute multiple\n * name/value pairs to FormData (e.g. date-range, tag-input).\n *\n * @example\n * ```ts\n * class MyInput extends FormFieldMixin(TailwindElement(css`...`)) {\n * // Your component code here\n * }\n * ```\n */\nexport function FormFieldMixin<T extends Constructor<LitElement>>(superClass: T) {\n\tclass FormFieldMixinClass extends superClass {\n\t\tstatic formAssociated = true\n\n\t\t/** Brand for cross-realm detection by `<schmancy-form>`. */\n\t\tstatic readonly [SCHMANCY_FORM_FIELD] = true\n\n\t\t// Element internals for form association\n\t\tinternals: ElementInternals | undefined\n\n\t\t/** Value snapshot captured at first render, used by `resetForm()`. */\n\t\tprotected _defaultValue: string | string[] | boolean | number | undefined = undefined\n\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\n\n\t\t// ----- Validation UX state (Revolute contract) -----\n\n\t\t/** True after the user has blurred the field at least once. */\n\t\t@state() touched: boolean = false\n\n\t\t/** Set by `<schmancy-form>` on submit; persists until `resetForm()`. */\n\t\t@state() submitted: boolean = false\n\n\t\t/**\n\t\t * When errors display. Default `'dirty'` — the autofocus+cancel anti-pattern\n\t\t * is avoided because pristine fields never show errors until submit.\n\t\t */\n\t\t@property({ type: String, reflect: true })\n\t\tvalidateOn: ValidateOn = 'dirty'\n\n\t\t/**\n\t\t * Optional override for the validity-flag → message map. See\n\t\t * `ErrorMessages`. Unset keys fall back to the mixin's defaults.\n\t\t */\n\t\t@property({ attribute: false })\n\t\terrorMessages?: ErrorMessages\n\n\t\t/** True when value has been changed from the captured default. */\n\t\tget dirty(): boolean {\n\t\t\treturn this._defaultValue !== undefined && this.value !== this._defaultValue\n\t\t}\n\n\t\tget pristine(): boolean {\n\t\t\treturn !this.dirty\n\t\t}\n\n\t\tmarkTouched(): void {\n\t\t\tif (!this.touched) this.touched = true\n\t\t}\n\n\t\tmarkSubmitted(): void {\n\t\t\tif (!this.submitted) this.submitted = true\n\t\t}\n\n\t\tclearSubmitted(): void {\n\t\t\tif (this.submitted) this.submitted = false\n\t\t}\n\n\t\t/**\n\t\t * Reactive flag set while an async validator is in flight. Read by\n\t\t * `<schmancy-form>` to gate submit; broadcast as `:state(validating)`\n\t\t * for CSS spinner targeting.\n\t\t */\n\t\t@state() isValidating: boolean = false\n\n\t\tasync runAsyncValidator(fn: () => Promise<string>): Promise<void> {\n\t\t\tif (this.isValidating) {\n\t\t\t\t// Cancel-by-supersede semantics — a new call wins; the previous\n\t\t\t\t// is best-effort and its result is dropped if it resolves later.\n\t\t\t\tthis._asyncValidatorEpoch++\n\t\t\t}\n\t\t\tconst epoch = ++this._asyncValidatorEpoch\n\t\t\tthis.isValidating = true\n\t\t\ttry {\n\t\t\t\tconst message = await fn()\n\t\t\t\tif (epoch !== this._asyncValidatorEpoch) return // superseded\n\t\t\t\tthis.setCustomValidity(message)\n\t\t\t} finally {\n\t\t\t\tif (epoch === this._asyncValidatorEpoch) {\n\t\t\t\t\tthis.isValidating = false\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tprivate _asyncValidatorEpoch: number = 0\n\n\t\t/**\n\t\t * Whether `checkValidity()` should display errors right now.\n\t\t * `submitted` overrides every mode — once a submit attempt happens, the\n\t\t * field stays in live-correction mode (Phase 3) for the rest of the\n\t\t * session, and `resetForm()` is the only way back. The leading\n\t\t * underscore marks this as an internal API: subclasses may call it but\n\t\t * should not override it (extend the truth table by changing\n\t\t * `validateOn` instead).\n\t\t */\n\t\t_shouldShowError(): boolean {\n\t\t\tif (this.submitted) return true\n\t\t\tswitch (this.validateOn) {\n\t\t\t\tcase 'always':\n\t\t\t\t\treturn true\n\t\t\t\tcase 'touched':\n\t\t\t\t\treturn this.touched\n\t\t\t\tcase 'dirty':\n\t\t\t\t\treturn this.dirty\n\t\t\t\tcase 'submitted':\n\t\t\t\t\treturn false\n\t\t\t\tcase 'length':\n\t\t\t\t\t// Predictable-length fields: validate once value reaches the\n\t\t\t\t\t// maxlength constraint. Stripe pattern. Falls back to dirty\n\t\t\t\t\t// if no maxlength is set.\n\t\t\t\t\tif (typeof this.value === 'string') {\n\t\t\t\t\t\tconst max = (this as unknown as { maxlength?: number }).maxlength\n\t\t\t\t\t\tif (typeof max === 'number' && max > 0) {\n\t\t\t\t\t\t\treturn this.value.length >= max\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this.dirty\n\t\t\t}\n\t\t}\n\n\t\tconstructor(...args: any[]) {\n\t\t\tsuper(...args)\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\n\t\toverride connectedCallback(): void {\n\t\t\tsuper.connectedCallback()\n\t\t\t// Register with any ancestor <schmancy-form> via composed event.\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent(FIELD_CONNECT_EVENT, {\n\t\t\t\t\tdetail: this,\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\n\t\t/** The form this element is associated with (native FACE behavior). */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\tprotected firstUpdated(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.firstUpdated?.(changedProps)\n\t\t\tif (this._defaultValue === undefined) this._defaultValue = this.value\n\t\t\t// Sync platform validity (`internals.setValidity`) once after first\n\t\t\t// render so `<form>.checkValidity()` and `:invalid` reflect truth\n\t\t\t// even when no property change has fired through `willUpdate` yet\n\t\t\t// (e.g. for required-empty fields with class-field-initialized\n\t\t\t// defaults that Lit doesn't see as \"changed\" on the first cycle).\n\t\t\tthis.checkValidity()\n\t\t}\n\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\tif (changedProps.has('value')) {\n\t\t\t\tthis.internals?.setFormValue(this.value as string | File | FormData | null)\n\t\t\t\t// :state(dirty) tracks value-vs-default; recompute on every value change.\n\t\t\t\tif (this.dirty) this.internals?.states.add('dirty')\n\t\t\t\telse this.internals?.states.delete('dirty')\n\t\t\t\t// Always sync platform validity (internals.setValidity) so\n\t\t\t\t// `<form>.checkValidity()` and `:invalid` reflect truth, even\n\t\t\t\t// while the visual `error` gate stays closed for pristine\n\t\t\t\t// fields under `validateOn: 'dirty'`. The visibility gate is\n\t\t\t\t// inside checkValidity() itself.\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('isValidating')) {\n\t\t\t\tif (this.isValidating) this.internals?.states.add('validating')\n\t\t\t\telse this.internals?.states.delete('validating')\n\t\t\t}\n\n\t\t\tif (changedProps.has('touched')) {\n\t\t\t\tif (this.touched) this.internals?.states.add('touched')\n\t\t\t\telse this.internals?.states.delete('touched')\n\t\t\t\t// Phase 2 — blur on a dirty field. Validate to surface the error.\n\t\t\t\tif (this.touched && this.dirty) this.checkValidity()\n\t\t\t}\n\n\t\t\tif (changedProps.has('submitted')) {\n\t\t\t\tif (this.submitted) {\n\t\t\t\t\tthis.internals?.states.add('submitted')\n\t\t\t\t\t// Phase 4 — submit forces error display regardless of dirty/touched.\n\t\t\t\t\tthis.checkValidity()\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.states.delete('submitted')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Note: we do not write to `internals.setValidity` from willUpdate\n\t\t\t// based on `error` / `validationMessage` changes. `checkValidity`\n\t\t\t// and `setCustomValidity` are the sole writers — overwriting the\n\t\t\t// validity flags from willUpdate would clobber structured flags\n\t\t\t// set by subclass overrides (e.g. input.ts surfaces typeMismatch /\n\t\t\t// patternMismatch / tooShort / etc.).\n\n\t\t\tif (changedProps.has('error')) {\n\t\t\t\tif (this.error) this.internals?.states.add('invalid')\n\t\t\t\telse this.internals?.states.delete('invalid')\n\t\t\t\t// ARIA reflection through ElementInternals reaches AT through shadow DOM.\n\t\t\t\tif (this.internals) this.internals.ariaInvalid = this.error ? 'true' : 'false'\n\t\t\t}\n\n\t\t\tif (changedProps.has('required') || changedProps.has('disabled')) {\n\t\t\t\tif (this.required) this.internals?.states.add('required')\n\t\t\t\telse this.internals?.states.delete('required')\n\t\t\t\t// Suppress aria-required when disabled — disabled fields shouldn't\n\t\t\t\t// announce as required to assistive tech.\n\t\t\t\tif (this.internals) {\n\t\t\t\t\tthis.internals.ariaRequired = this.required && !this.disabled ? 'true' : 'false'\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (changedProps.has('disabled')) {\n\t\t\t\tif (this.disabled) this.internals?.states.add('disabled')\n\t\t\t\telse this.internals?.states.delete('disabled')\n\t\t\t}\n\t\t\tif (changedProps.has('readonly')) {\n\t\t\t\tif (this.readonly) this.internals?.states.add('readonly')\n\t\t\t\telse this.internals?.states.delete('readonly')\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — called by the browser when the owning form\n\t\t * is reset. Delegates to `resetForm()` so subclasses have one\n\t\t * override point for both programmatic and user-initiated resets.\n\t\t */\n\t\tformResetCallback(): void {\n\t\t\tthis.resetForm()\n\t\t}\n\n\t\t/** Native FACE lifecycle — called when the form's disabled state changes. */\n\t\tformDisabledCallback(disabled: boolean): void {\n\t\t\tthis.disabled = disabled\n\t\t}\n\n\t\t/**\n\t\t * Native FACE lifecycle — restore value after bfcache / form autofill.\n\t\t */\n\t\tformStateRestoreCallback(state: string | File | FormData | null): void {\n\t\t\tif (state == null) return\n\t\t\tthis.value = state as any\n\t\t}\n\n\t\t/** Override to customize reset behavior; default restores `_defaultValue`. */\n\t\tresetForm(): void {\n\t\t\tthis.value = this._defaultValue ?? ''\n\t\t\tthis.error = false\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.touched = false\n\t\t\tthis.submitted = false\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t/**\n\t\t * Contribute entries to a parent FormData. Default: a single\n\t\t * `[name, value]` pair when `name` is set and value is meaningful.\n\t\t * Override for multi-entry controls (e.g. date range).\n\t\t */\n\t\ttoFormEntries(): Array<[string, FormDataEntryValue]> {\n\t\t\tif (!this.name || this.disabled) return []\n\t\t\tconst v = this.value\n\t\t\tif (v === undefined || v === null || v === '') return []\n\t\t\tif (Array.isArray(v)) return v.map(item => [this.name, String(item)] as [string, FormDataEntryValue])\n\t\t\tif (typeof v === 'boolean') return v ? [[this.name, 'on']] : []\n\t\t\treturn [[this.name, String(v)]]\n\t\t}\n\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t\tconst requiredFailed =\n\t\t\t\tthis.required && (this.value === '' || this.value === undefined || this.value === null)\n\t\t\t// Custom errors set via setCustomValidity() are platform-truth too —\n\t\t\t// preserve them through re-validation cycles.\n\t\t\tconst customErrorSet = !!this.internals?.validity?.customError\n\t\t\tconst isValid = !requiredFailed && !customErrorSet\n\t\t\tconst requiredMessage =\n\t\t\t\tthis.errorMessages?.valueMissing ?? 'This field is required'\n\t\t\tconst defaultMessage = requiredFailed ? requiredMessage : 'Invalid value'\n\n\t\t\t// Platform validity (read by `form.checkValidity()` and `:invalid`)\n\t\t\t// is always set to the truth — independent of the visual gate.\n\t\t\tif (requiredFailed) {\n\t\t\t\tthis.internals?.setValidity(\n\t\t\t\t\t{ valueMissing: true },\n\t\t\t\t\tthis.validationMessage || defaultMessage,\n\t\t\t\t)\n\t\t\t} else if (!customErrorSet) {\n\t\t\t\t// No required failure, no custom error — clear flags.\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t\t// (customErrorSet branch falls through — leave the custom validity intact.)\n\n\t\t\t// Visual `error` flag is gated. The returned boolean tells the caller\n\t\t\t// the truth; only the in-component error display is suppressed for\n\t\t\t// pristine fields under `validateOn: 'dirty'`.\n\t\t\tif (this._shouldShowError()) {\n\t\t\t\tthis.error = !isValid\n\t\t\t\tif (!isValid && !this.validationMessage) {\n\t\t\t\t\tthis.validationMessage = defaultMessage\n\t\t\t\t} else if (isValid) {\n\t\t\t\t\tthis.validationMessage = ''\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn isValid\n\t\t}\n\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) this.internals?.reportValidity()\n\t\t\treturn isValid\n\t\t}\n\n\t\tsetCustomValidity(message: string): void {\n\t\t\tthis.validationMessage = message\n\t\t\tthis.error = message !== ''\n\t\t\tif (message) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, message)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\n\t\temitChange(detail: any): void {\n\t\t\tif ('dispatchScopedEvent' in this && typeof this.dispatchScopedEvent === 'function') {\n\t\t\t\tthis.dispatchScopedEvent('change', detail, { bubbles: true })\n\t\t\t} else {\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\t\tdetail,\n\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with SchmancyElement\n * to create a base class for Schmancy form components. Subclasses gain the\n * full SchmancyElement stack (SignalWatcher, _activeHost wrap, AbortSignal,\n * automatic Tailwind injection) plus the form-field semantics.\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\tclass StyledSchmancyElement extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn FormFieldMixin(StyledSchmancyElement) as unknown as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { CSSResult, LitElement } from 'lit'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { SchmancyElement } from './SchmancyElement'\n\n/**\n * @deprecated Extend `SchmancyElement` directly and declare `static styles`.\n *\n * Before: extends $LitElement(css`...`)\n * After: extends SchmancyElement { static styles = [css`...`] }\n *\n * Kept as a thin alias for the migration window; will be removed in the next\n * major Schmancy release. The returned class extends `SchmancyElement` so\n * runtime semantics (Tailwind injection, `disconnecting` Subject,\n * `disconnectedSignal` AbortSignal, SignalWatcher) match exactly.\n */\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass LegacyAlias extends SchmancyElement {\n\t\tstatic styles = componentStyle ? [componentStyle] : []\n\t}\n\treturn LegacyAlias as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { css } from 'lit'\n\n/**\n * Luminous Glass surface type styles.\n *\n * Depth model: blur intensity + opacity replaces M3 tonal hierarchy.\n * - solid: opaque ground (0 blur, 100% opacity)\n * - subtle: frosted panel (4px blur, ~72% opacity)\n * - glass: full frosted glass (20px blur, ~55% opacity)\n * - luminous: glass + glow halo (24px blur, ~22% opacity)\n */\nexport const surfaceTypeStyles = css`\n\t/* ================================================================\n\t STRUCTURAL TYPES — All-glass depth model.\n\t Nothing is opaque. Every layer is translucent.\n\t Blur creates readability. Light borders isolate layers.\n\t Rule: text must ALWAYS be readable on every surface.\n\t ================================================================ */\n\n\t/* Solid — dense glass, high readability ground layer (no blur — 92% opacity is enough) */\n\t:host([type='solid']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Subtle — bright vibrant glass: near-white tint, saturated blur, top-edge highlight */\n\t:host([type='subtle']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Glass — frosted glass, blur ensures readability */\n\t:host([type='glass']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* Luminous — glass + glow halo, heavy blur keeps readability */\n\t:host([type='luminous']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\t--glow-color: var(--schmancy-sys-color-primary-default);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 42%, transparent);\n\t\tbackdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\t-webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.08);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tcontain: content;\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t UTILITY TYPES\n\t ================================================================ */\n\n\t/* Transparent — no background */\n\t:host([type='transparent']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* Outlined — border with luminous hover potential */\n\t:host([type='outlined']) {\n\t\tbackground-color: transparent;\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\ttransition: border-color 300ms ease, box-shadow 300ms ease;\n\t}\n\n\t/* ================================================================\n\t SEMANTIC TYPES — tinted glass for status/role\n\t ================================================================ */\n\n\t:host([type='primary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-primary-default);\n\t}\n\t:host([type='secondary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-secondary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-secondary-default);\n\t}\n\t:host([type='tertiary']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-tertiary-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-tertiary-default);\n\t}\n\t:host([type='error']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-error-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-error-onContainer);\n\t}\n\t:host([type='success']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-success-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-success-onContainer);\n\t}\n\t:host([type='warning']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-warning-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-warning-onContainer);\n\t}\n\t:host([type='info']) {\n\t\tbackground: color-mix(in srgb, var(--schmancy-sys-color-info-default) 12%, transparent);\n\t\tbackdrop-filter: blur(4px) saturate(140%);\n\t\t-webkit-backdrop-filter: blur(4px) saturate(140%);\n\t\tcolor: var(--schmancy-sys-color-info-onContainer);\n\t}\n\n\t/* ================================================================\n\t LEGACY M3 ALIASES — backward compatibility\n\t Old type names render as their new Luminous Glass equivalents.\n\t ================================================================ */\n\n\t/* solid aliases — dense glass */\n\t:host([type='surface']),\n\t:host([type='surfaceDim']),\n\t:host([type='surfaceBright']),\n\t:host([type='containerLowest']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 92%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* subtle aliases — bright vibrant glass */\n\t:host([type='containerLow']),\n\t:host([type='container']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\t\tbackground: color-mix(in srgb, var(--glass-base) 30%, transparent);\n\t\tbackdrop-filter: blur(12px) saturate(160%);\n\t\t-webkit-backdrop-filter: blur(12px) saturate(160%);\n\t\tborder: 1px solid color-mix(in srgb, var(--schmancy-sys-color-outlineVariant) 60%, transparent);\n\t\tbox-shadow: inset 0 1px 0 color-mix(in srgb, var(--schmancy-sys-color-surface-on) 8%, transparent);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t}\n\n\t/* glass aliases */\n\t:host([type='containerHigh']),\n\t:host([type='containerHighest']),\n\t:host([type='glassOforim']) {\n\t\t--glass-base: var(--schmancy-sys-color-surface-lowest);\n\t\t--glass-tint: var(--schmancy-sys-color-surface-on);\n\n\t\tbackground: color-mix(in srgb, var(--glass-base) 55%, transparent);\n\t\tbackdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\t-webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.05);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tposition: relative;\n\t\toverflow: hidden;\n\t\tisolation: isolate;\n\t}\n\n\t/* ================================================================\n\t REDUCED MOTION — disable glass animations\n\t ================================================================ */\n`\n\n/**\n * Surface rounded corner styles\n */\nexport const surfaceRoundedStyles = css`\n\t:host([rounded='none']) {\n\t\tborder-radius: 0;\n\t}\n\t:host([rounded='top']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0 0;\n\t}\n\t:host([rounded='left']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large) 0 0 var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='right']) {\n\t\tborder-radius: 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large) 0;\n\t}\n\t:host([rounded='bottom']) {\n\t\tborder-radius: 0 0 var(--schmancy-sys-shape-corner-large) var(--schmancy-sys-shape-corner-large);\n\t}\n\t:host([rounded='all']) {\n\t\tborder-radius: var(--schmancy-sys-shape-corner-large);\n\t}\n`\n\n/**\n * Luminous glow elevation — replaces M3 dark drop shadows with primary-colored glow.\n * No ::after tint overlay — depth comes from glow intensity, not surface tint.\n */\nexport const surfaceElevationStyles = css`\n\t:host([elevation='1']) {\n\t\tbox-shadow: 0 2px 12px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='2']) {\n\t\tbox-shadow: 0 4px 20px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 22%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='3']) {\n\t\tbox-shadow: 0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 28%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='4']) {\n\t\tbox-shadow: 0 12px 44px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 35%, transparent);\n\t\tposition: relative;\n\t}\n\t:host([elevation='5']) {\n\t\tbox-shadow: 0 20px 60px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 42%, transparent);\n\t\tposition: relative;\n\t}\n`\n\n/**\n * Surface clickable styles - luminous hover, spring active\n */\nexport const surfaceClickableStyles = css`\n\t:host([clickable]) {\n\t\tcursor: pointer;\n\t\tuser-select: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t\ttransition:\n\t\t\tfilter 200ms ease,\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1),\n\t\t\tbox-shadow 400ms ease;\n\t}\n\t:host([clickable]:hover) {\n\t\tfilter: brightness(1.03);\n\t}\n\t:host([clickable]:active) {\n\t\tfilter: brightness(0.96);\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\t:host([clickable]:focus-visible) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([clickable]) { transition: filter 150ms ease; }\n\t\t:host([clickable]:hover) { transform: none; box-shadow: none; }\n\t\t:host([clickable]:active) { transform: none; }\n\t}\n`\n\n/**\n * Combined surface styles - includes all surface styling capabilities\n */\nexport const surfaceStyles = css`\n\t${surfaceTypeStyles}\n\t${surfaceRoundedStyles}\n\t${surfaceElevationStyles}\n\t${surfaceClickableStyles}\n`\n","import type { Constructor } from './constructor'\nimport { CSSResultGroup, CSSResultOrNative, LitElement } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport type { TSurfaceColor } from '../src/types/surface'\nimport { surfaceStyles } from '../src/surface/surface.styles'\n\nexport type SchmancySurfaceRounded = 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all'\nexport type SchmancySurfaceElevation = 0 | 1 | 2 | 3 | 4 | 5\n\nexport declare class ISurfaceMixin {\n\trounded: SchmancySurfaceRounded\n\televation: SchmancySurfaceElevation\n\ttype: TSurfaceColor\n\tclickable: boolean\n}\n\n/**\n * SurfaceMixin - Adds surface styling properties AND styles to any LitElement\n *\n * Uses Lit's finalizeStyles hook to inject surfaceStyles CSS for all surface type selectors.\n * This is the recommended pattern for mixins that need to add styles.\n *\n * Provides these reflected properties:\n * - `rounded`: 'none' | 'top' | 'left' | 'right' | 'bottom' | 'all' - Corner rounding\n * - `elevation`: 0-5 - Shadow depth level\n * - `type`: TSurfaceColor - Surface color variant (26+ options)\n *\n * Usage:\n * ```typescript\n * import { SurfaceMixin } from '@mixins/surface.mixin'\n *\n * @customElement('my-component')\n * class MyComponent extends SurfaceMixin(TailwindElement(css`\n * :host { display: block; }\n * `)) {\n * // Component now has type, fill, rounded, elevation properties\n * // AND surfaceStyles are automatically included\n * }\n * ```\n */\nexport const SurfaceMixin = <T extends Constructor<LitElement>>(superClass: T) => {\n\tclass SurfaceMixinClass extends superClass {\n\t\t/**\n\t\t * Override finalizeStyles to inject surfaceStyles.\n\t\t * This is the Lit-recommended way for mixins to add styles.\n\t\t */\n\t\tprotected static finalizeStyles(styles?: CSSResultGroup): CSSResultOrNative[] {\n\t\t\t// Get parent's finalized styles using LitElement's method\n\t\t\tconst parentStyles = (superClass as unknown as typeof LitElement).finalizeStyles(styles)\n\t\t\t// Append surfaceStyles at the end (higher specificity)\n\t\t\treturn [...parentStyles, surfaceStyles as CSSResultOrNative]\n\t\t}\n\n\t\t/**\n\t\t * Specifies the rounding style of the component's corners.\n\t\t * @default 'none'\n\t\t */\n\t\t@property({ reflect: true })\n\t\trounded: SchmancySurfaceRounded = 'none'\n\n\t\t/**\n\t\t * Defines the elevation level (shadow depth) of the surface.\n\t\t * @default 0\n\t\t */\n\t\t@property({ type: Number, reflect: true })\n\t\televation: SchmancySurfaceElevation = 0\n\n\t\t/**\n\t\t * Specifies the surface type for styling.\n\t\t * @default 'container'\n\t\t */\n\t\t@property({ reflect: true })\n\t\ttype: TSurfaceColor = 'subtle'\n\n\t\t/**\n\t\t * Makes the surface interactive with hover, active states and cursor pointer.\n\t\t * @default false\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\tclickable = false\n\t}\n\treturn SurfaceMixinClass as Constructor<ISurfaceMixin> & T\n}\n"],"mappings":"sIAYA,IAAa,EAAsB,OAAO,IAAI,qBAAA,EASjC,EAAsB,yBAyHnC,SAAgB,EAAoB,EAAA,CACnC,MAAA,CAAA,CAAS,GAAoB,OAAP,GAAO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IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA,EAAA,OAAA,eAAA,QAAA,IAAA,CAAA,WAAA,CAAA,EAAA,IAAA,UAAA,CAAA,OAAA,CAAA,CAAA,CAAA"}
package/dist/mixins.cjs CHANGED
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./SchmancyElement-CYIif26I.cjs`),t=require(`./mixins-CGXSzZc7.cjs`);exports.$LitElement=t.n,exports.BaseElement=e.l,exports.DISCOVER_EVENT=e.f,exports.DISCOVER_RESPONSE_EVENT=e.p,exports.FIELD_CONNECT_EVENT=t.r,exports.FormFieldMixin=t.i,exports.SCHMANCY_FORM_FIELD=t.a,exports.SchmancyElement=e.t,exports.SchmancyFormField=t.o,exports.SurfaceMixin=t.t,exports.TailwindElement=e.s,exports.discover=e.m,exports.discoverAllElements=e.h,exports.discoverAnyComponent=e.g,exports.discoverComponent=e._,exports.discoverElement=e.v,exports.isSchmancyFormField=t.s,exports.schmancyElement=e.n,exports.tailwindStyles=e.c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./SchmancyElement-BHfQg3Tj.cjs`),t=require(`./mixins-DxHpyMHA.cjs`);exports.$LitElement=t.n,exports.BaseElement=e.l,exports.DISCOVER_EVENT=e.f,exports.DISCOVER_RESPONSE_EVENT=e.p,exports.FIELD_CONNECT_EVENT=t.r,exports.FormFieldMixin=t.i,exports.SCHMANCY_FORM_FIELD=t.a,exports.SchmancyElement=e.t,exports.SchmancyFormField=t.o,exports.SurfaceMixin=t.t,exports.TailwindElement=e.s,exports.discover=e.m,exports.discoverAllElements=e.h,exports.discoverAnyComponent=e.g,exports.discoverComponent=e._,exports.discoverElement=e.v,exports.isSchmancyFormField=t.s,exports.schmancyElement=e.n,exports.tailwindStyles=e.c;
package/dist/mixins.js CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as e, c as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, s as l, t as u, v as d } from "./SchmancyElement-CA0Wqt8m.js";
2
- import { a as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./mixins-Bp0wIHg2.js";
1
+ import { _ as e, c as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, s as l, t as u, v as d } from "./SchmancyElement-CDT2q1lA.js";
2
+ import { a as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./mixins-De1zjyhy.js";
3
3
  export { m as $LitElement, a as BaseElement, n as DISCOVER_EVENT, c as DISCOVER_RESPONSE_EVENT, g as FIELD_CONNECT_EVENT, p as FormFieldMixin, f as SCHMANCY_FORM_FIELD, u as SchmancyElement, h as SchmancyFormField, v as SurfaceMixin, l as TailwindElement, o as discover, i as discoverAllElements, r as discoverAnyComponent, e as discoverComponent, d as discoverElement, _ as isSchmancyFormField, s as schmancyElement, t as tailwindStyles };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-qzUpLbje.cjs`);exports.$drawer=e.p,Object.defineProperty(exports,`SchmancyDrawerAppbar`,{enumerable:!0,get:function(){return e.f}}),exports.SchmancyDrawerNavbarMode=e.l,exports.SchmancyDrawerNavbarState=e.u,Object.defineProperty(exports,`SchmancyNavigationDrawer`,{enumerable:!0,get:function(){return e.c}}),Object.defineProperty(exports,`SchmancyNavigationDrawerContent`,{enumerable:!0,get:function(){return e.d}}),Object.defineProperty(exports,`SchmancyNavigationDrawerSidebar`,{enumerable:!0,get:function(){return e.s}}),exports.schmancyNavDrawer=e.m;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-Um_pzb-U.cjs`);exports.$drawer=e.p,Object.defineProperty(exports,`SchmancyDrawerAppbar`,{enumerable:!0,get:function(){return e.f}}),exports.SchmancyDrawerNavbarMode=e.l,exports.SchmancyDrawerNavbarState=e.u,Object.defineProperty(exports,`SchmancyNavigationDrawer`,{enumerable:!0,get:function(){return e.c}}),Object.defineProperty(exports,`SchmancyNavigationDrawerContent`,{enumerable:!0,get:function(){return e.d}}),Object.defineProperty(exports,`SchmancyNavigationDrawerSidebar`,{enumerable:!0,get:function(){return e.s}}),exports.schmancyNavDrawer=e.m;
@@ -1,2 +1,2 @@
1
- import { c as e, d as t, f as n, l as r, m as i, p as a, s as o, u as s } from "./src-C5g3p1J5.js";
1
+ import { c as e, d as t, f as n, l as r, m as i, p as a, s as o, u as s } from "./src-BP3h-9d9.js";
2
2
  export { a as $drawer, n as SchmancyDrawerAppbar, r as SchmancyDrawerNavbarMode, s as SchmancyDrawerNavbarState, e as SchmancyNavigationDrawer, t as SchmancyNavigationDrawerContent, o as SchmancyNavigationDrawerSidebar, i as schmancyNavDrawer };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-qzUpLbje.cjs`);Object.defineProperty(exports,`SchmancyNavigationBar`,{enumerable:!0,get:function(){return e.a}}),Object.defineProperty(exports,`SchmancyNavigationBarItem`,{enumerable:!0,get:function(){return e.o}});
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./src-Um_pzb-U.cjs`);Object.defineProperty(exports,`SchmancyNavigationBar`,{enumerable:!0,get:function(){return e.a}}),Object.defineProperty(exports,`SchmancyNavigationBarItem`,{enumerable:!0,get:function(){return e.o}});
@@ -1,2 +1,2 @@
1
- import { a as e, o as t } from "./src-C5g3p1J5.js";
1
+ import { a as e, o as t } from "./src-BP3h-9d9.js";
2
2
  export { e as SchmancyNavigationBar, t as SchmancyNavigationBarItem };
@@ -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(`rxjs`),n=require(`rxjs/operators`),r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/when.js`);var o=class extends e.t{constructor(...e){super(...e),this.hovering$=new t.BehaviorSubject(!1),this.pressing$=new t.BehaviorSubject(!1),this.active$=new t.BehaviorSubject(!1),this.icon=``,this.label=``,this.value=``,this.badge=``,this.badgeVariant=`error`,this.showLabel=!1,this.disabled=!1,this.nested=!1,this.group=!1,this.showRipple=!1}get active(){return this.active$.value}set active(e){this.active$.next(e)}get selected(){return this.active}set selected(e){this.active=e}connectedCallback(){super.connectedCallback(),(0,t.merge)((0,t.fromEvent)(this,`mouseenter`).pipe((0,n.tap)(()=>this.hovering$.next(!0))),(0,t.fromEvent)(this,`mouseleave`).pipe((0,n.tap)(()=>this.hovering$.next(!1)))).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(),(0,t.merge)((0,t.fromEvent)(this,`mousedown`).pipe((0,n.tap)(()=>this.pressing$.next(!0))),(0,t.fromEvent)(this,`mouseup`).pipe((0,n.tap)(()=>this.pressing$.next(!1))),(0,t.fromEvent)(this,`mouseleave`).pipe((0,n.tap)(()=>this.pressing$.next(!1)))).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(),this.pressing$.pipe((0,n.tap)(e=>{e&&!this.disabled&&(this.showRipple=!0)}),(0,n.delay)(600),(0,n.tap)(()=>this.showRipple=!1),(0,t.takeUntil)(this.disconnecting)).subscribe(),this.active$.pipe((0,n.distinctUntilChanged)(),(0,n.tap)(e=>{this.requestUpdate(),this.setAttribute(`aria-selected`,String(e)),this.setAttribute(`tabindex`,e?`0`:`-1`)}),(0,t.takeUntil)(this.disconnecting)).subscribe(),this.setAttribute(`role`,`listitem`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,this.active?`0`:`-1`)}updated(e){super.updated(e),e.has(`disabled`)&&this.setAttribute(`aria-disabled`,String(this.disabled)),e.has(`label`)&&this.setAttribute(`aria-label`,this.label)}handleClick(e){if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.dispatchEvent(new CustomEvent(`navigate`,{detail:this.value||this.label,bubbles:!0,composed:!0}))}handleKeyDown(e){this.disabled||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),this.click())}render(){let e=!!this.querySelector(`[slot="icon"]`),t=this.querySelector(`[slot="badge"]`),n=this.classMap({"flex flex-col items-center justify-start":!0,"min-h-14 w-full":!0,"gap-1":!0,"rounded-lg":!0,"cursor-pointer":!0,relative:!0,"select-none":!0,"box-border":!0,"text-surface-onVariant":!this.active,"text-secondary-onContainer":this.active,"hover:bg-surface-containerHighest":!0,"transition-all duration-150 ease-out":!0,"pointer-events-none opacity-38":this.disabled,"[&>.ripple]:scale-100":this.showRipple,"min-h-12 pl-8":this.nested,"mb-2 after:absolute after:bottom-[-4px] after:left-3 after:right-3 after:h-px after:bg-outline-variant after:opacity-12":this.group}),r=this.classMap({"flex items-center justify-center":!0,"w-auto min-w-14 h-8":!0,"shrink-0 relative z-10":!0}),o=this.classMap({"absolute top-1/2 left-1/2 opacity-30":!0,"w-14 h-8":!0,"rounded-lg":!0,"bg-secondary-container":!0,"transition-transform duration-150 ease-out":!0,"scale-0 -translate-x-1/2 -translate-y-1/2":!this.active,"scale-100 -translate-x-1/2 -translate-y-1/2":this.active}),s=this.classMap({"relative z-100":!0,"text-2xl leading-none":!this.nested,"text-xl leading-none":this.nested}),c=this.classMap({"text-xs font-medium leading-4":!0,"text-center":!0,"overflow-hidden text-ellipsis whitespace-nowrap":!0,"z-10 max-w-14 px-1":!0,hidden:!this.showLabel&&!this.label}),l=this.classMap({"absolute top-2 right-3":!0,"min-w-4 h-4":!0,"rounded-sm":!0,"text-xs font-semibold":!0,"flex items-center justify-center":!0,"px-1 box-border z-20":!0,"animate-pulse":!0,"bg-error-default text-error-on":this.badgeVariant===`error`,"bg-primary-default text-primary-on":this.badgeVariant===`primary`,"bg-secondary-default text-secondary-on":this.badgeVariant===`secondary`}),u=this.classMap({"absolute inset-0 rounded-lg overflow-hidden z-0":!0,'before:content-[""] before:absolute before:top-1/2 before:left-1/2':!0,"before:w-0 before:h-0 before:rounded-full":!0,"before:bg-current before:opacity-0":!0,"before:-translate-x-1/2 before:-translate-y-1/2":!0,"before:transition-all before:duration-300":!0,"before:w-[200%] before:h-[200%] before:opacity-12":this.showRipple});return i.html`
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`./chunk-CncqDLb2.cjs`);const e=require(`./SchmancyElement-BHfQg3Tj.cjs`);require(`./mixins-DxHpyMHA.cjs`);let t=require(`rxjs`),n=require(`rxjs/operators`),r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/when.js`);var o=class extends e.t{constructor(...e){super(...e),this.hovering$=new t.BehaviorSubject(!1),this.pressing$=new t.BehaviorSubject(!1),this.active$=new t.BehaviorSubject(!1),this.icon=``,this.label=``,this.value=``,this.badge=``,this.badgeVariant=`error`,this.showLabel=!1,this.disabled=!1,this.nested=!1,this.group=!1,this.showRipple=!1}get active(){return this.active$.value}set active(e){this.active$.next(e)}get selected(){return this.active}set selected(e){this.active=e}connectedCallback(){super.connectedCallback(),(0,t.merge)((0,t.fromEvent)(this,`mouseenter`).pipe((0,n.tap)(()=>this.hovering$.next(!0))),(0,t.fromEvent)(this,`mouseleave`).pipe((0,n.tap)(()=>this.hovering$.next(!1)))).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(),(0,t.merge)((0,t.fromEvent)(this,`mousedown`).pipe((0,n.tap)(()=>this.pressing$.next(!0))),(0,t.fromEvent)(this,`mouseup`).pipe((0,n.tap)(()=>this.pressing$.next(!1))),(0,t.fromEvent)(this,`mouseleave`).pipe((0,n.tap)(()=>this.pressing$.next(!1)))).pipe((0,t.takeUntil)(this.disconnecting)).subscribe(),this.pressing$.pipe((0,n.tap)(e=>{e&&!this.disabled&&(this.showRipple=!0)}),(0,n.delay)(600),(0,n.tap)(()=>this.showRipple=!1),(0,t.takeUntil)(this.disconnecting)).subscribe(),this.active$.pipe((0,n.distinctUntilChanged)(),(0,n.tap)(e=>{this.requestUpdate(),this.setAttribute(`aria-selected`,String(e)),this.setAttribute(`tabindex`,e?`0`:`-1`)}),(0,t.takeUntil)(this.disconnecting)).subscribe(),this.setAttribute(`role`,`listitem`),this.hasAttribute(`tabindex`)||this.setAttribute(`tabindex`,this.active?`0`:`-1`)}updated(e){super.updated(e),e.has(`disabled`)&&this.setAttribute(`aria-disabled`,String(this.disabled)),e.has(`label`)&&this.setAttribute(`aria-label`,this.label)}handleClick(e){if(this.disabled)return e.preventDefault(),void e.stopPropagation();this.dispatchEvent(new CustomEvent(`navigate`,{detail:this.value||this.label,bubbles:!0,composed:!0}))}handleKeyDown(e){this.disabled||e.key!==`Enter`&&e.key!==` `||(e.preventDefault(),this.click())}render(){let e=!!this.querySelector(`[slot="icon"]`),t=this.querySelector(`[slot="badge"]`),n=this.classMap({"flex flex-col items-center justify-start":!0,"min-h-14 w-full":!0,"gap-1":!0,"rounded-lg":!0,"cursor-pointer":!0,relative:!0,"select-none":!0,"box-border":!0,"text-surface-onVariant":!this.active,"text-secondary-onContainer":this.active,"hover:bg-surface-containerHighest":!0,"transition-all duration-150 ease-out":!0,"pointer-events-none opacity-38":this.disabled,"[&>.ripple]:scale-100":this.showRipple,"min-h-12 pl-8":this.nested,"mb-2 after:absolute after:bottom-[-4px] after:left-3 after:right-3 after:h-px after:bg-outline-variant after:opacity-12":this.group}),r=this.classMap({"flex items-center justify-center":!0,"w-auto min-w-14 h-8":!0,"shrink-0 relative z-10":!0}),o=this.classMap({"absolute top-1/2 left-1/2 opacity-30":!0,"w-14 h-8":!0,"rounded-lg":!0,"bg-secondary-container":!0,"transition-transform duration-150 ease-out":!0,"scale-0 -translate-x-1/2 -translate-y-1/2":!this.active,"scale-100 -translate-x-1/2 -translate-y-1/2":this.active}),s=this.classMap({"relative z-100":!0,"text-2xl leading-none":!this.nested,"text-xl leading-none":this.nested}),c=this.classMap({"text-xs font-medium leading-4":!0,"text-center":!0,"overflow-hidden text-ellipsis whitespace-nowrap":!0,"z-10 max-w-14 px-1":!0,hidden:!this.showLabel&&!this.label}),l=this.classMap({"absolute top-2 right-3":!0,"min-w-4 h-4":!0,"rounded-sm":!0,"text-xs font-semibold":!0,"flex items-center justify-center":!0,"px-1 box-border z-20":!0,"animate-pulse":!0,"bg-error-default text-error-on":this.badgeVariant===`error`,"bg-primary-default text-primary-on":this.badgeVariant===`primary`,"bg-secondary-default text-secondary-on":this.badgeVariant===`secondary`}),u=this.classMap({"absolute inset-0 rounded-lg overflow-hidden z-0":!0,'before:content-[""] before:absolute before:top-1/2 before:left-1/2':!0,"before:w-0 before:h-0 before:rounded-full":!0,"before:bg-current before:opacity-0":!0,"before:-translate-x-1/2 before:-translate-y-1/2":!0,"before:transition-all before:duration-300":!0,"before:w-[200%] before:h-[200%] before:opacity-12":this.showRipple});return i.html`
2
2
  <div
3
3
  class=${n}
4
4
  part="container"
@@ -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-CDT2q1lA.js";
2
+ import "./mixins-De1zjyhy.js";
3
3
  import { BehaviorSubject as n, Observable as r, fromEvent as i, merge as a, takeUntil as o } from "rxjs";
4
4
  import { delay as s, distinctUntilChanged as c, tap as l } from "rxjs/operators";
5
5
  import { customElement as u, property as d, queryAssignedElements as f, state as p } from "lit/decorators.js";
@@ -1,7 +1,7 @@
1
- import { t as e, u as t } from "./SchmancyElement-CA0Wqt8m.js";
2
- import "./mixins-Bp0wIHg2.js";
3
- import { t as n } from "./audio-DFYoaw0M.js";
4
- import "./progress-CAKsxp29.js";
1
+ import { t as e, u as t } from "./SchmancyElement-CDT2q1lA.js";
2
+ import "./mixins-De1zjyhy.js";
3
+ import { t as n } from "./audio-zIJVTo_V.js";
4
+ import "./progress-DYA83CFU.js";
5
5
  import { BehaviorSubject as r, NEVER as i, catchError as a, finalize as o, fromEvent as s, interval as c, tap as l, timer as u } from "rxjs";
6
6
  import { distinctUntilChanged as d, map as f, switchMap as p, takeUntil as m, tap as h } from "rxjs/operators";
7
7
  import { customElement as g, property as _, state as v } from "lit/decorators.js";