@mhmo91/schmancy 0.4.9 → 0.4.11

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 (308) hide show
  1. package/ai/button.md +6 -3
  2. package/ai/code-highlight.md +239 -0
  3. package/ai/countries.md +270 -0
  4. package/ai/dialog.md +22 -3
  5. package/ai/directives.md +237 -0
  6. package/ai/input.md +99 -55
  7. package/ai/payment-card-form.md +241 -0
  8. package/ai/surface.md +1 -1
  9. package/ai/timezone.md +275 -0
  10. package/ai/typography.md +78 -43
  11. package/dist/ai/button.md +6 -3
  12. package/dist/ai/code-highlight.md +239 -0
  13. package/dist/ai/countries.md +270 -0
  14. package/dist/ai/dialog.md +22 -3
  15. package/dist/ai/directives.md +237 -0
  16. package/dist/ai/input.md +99 -55
  17. package/dist/ai/payment-card-form.md +241 -0
  18. package/dist/ai/surface.md +1 -1
  19. package/dist/ai/timezone.md +275 -0
  20. package/dist/ai/typography.md +78 -43
  21. package/dist/{animated-text-CgY-L1nI.cjs → animated-text-BD04H8eV.cjs} +2 -2
  22. package/dist/{animated-text-CgY-L1nI.cjs.map → animated-text-BD04H8eV.cjs.map} +1 -1
  23. package/dist/{animated-text-BqZjMyzb.js → animated-text-TALC3vSJ.js} +8 -8
  24. package/dist/{animated-text-BqZjMyzb.js.map → animated-text-TALC3vSJ.js.map} +1 -1
  25. package/dist/animated-text.cjs +1 -1
  26. package/dist/animated-text.js +1 -1
  27. package/dist/area.cjs +1 -1
  28. package/dist/{area.component-B7U96CpD.js → area.component-DXcT-c4L.js} +8 -8
  29. package/dist/{area.component-B7U96CpD.js.map → area.component-DXcT-c4L.js.map} +1 -1
  30. package/dist/{area.component-Zbs-bAJV.cjs → area.component-GvVVYEaK.cjs} +2 -2
  31. package/dist/{area.component-Zbs-bAJV.cjs.map → area.component-GvVVYEaK.cjs.map} +1 -1
  32. package/dist/area.js +1 -1
  33. package/dist/{autocomplete-qK00SJRP.cjs → autocomplete-B-UCdew3.cjs} +2 -2
  34. package/dist/{autocomplete-qK00SJRP.cjs.map → autocomplete-B-UCdew3.cjs.map} +1 -1
  35. package/dist/{autocomplete-DIUsdT73.js → autocomplete-gfBf6Pph.js} +4 -4
  36. package/dist/{autocomplete-DIUsdT73.js.map → autocomplete-gfBf6Pph.js.map} +1 -1
  37. package/dist/autocomplete.cjs +1 -1
  38. package/dist/autocomplete.js +1 -1
  39. package/dist/{avatar-BK-Ikpdw.cjs → avatar-DCQVq0UH.cjs} +2 -2
  40. package/dist/{avatar-BK-Ikpdw.cjs.map → avatar-DCQVq0UH.cjs.map} +1 -1
  41. package/dist/{avatar-Bp0t8NU5.js → avatar-wfAWpFxG.js} +44 -44
  42. package/dist/{avatar-Bp0t8NU5.js.map → avatar-wfAWpFxG.js.map} +1 -1
  43. package/dist/badge.cjs +1 -1
  44. package/dist/badge.js +1 -1
  45. package/dist/{boat-By-PBLw8.js → boat-6nw0fphH.js} +2 -2
  46. package/dist/{boat-By-PBLw8.js.map → boat-6nw0fphH.js.map} +1 -1
  47. package/dist/{boat-DUU675NX.cjs → boat-De0k6DJ6.cjs} +2 -2
  48. package/dist/{boat-DUU675NX.cjs.map → boat-De0k6DJ6.cjs.map} +1 -1
  49. package/dist/boat.cjs +1 -1
  50. package/dist/boat.js +1 -1
  51. package/dist/busy.cjs +1 -1
  52. package/dist/busy.js +1 -1
  53. package/dist/button.cjs +1 -1
  54. package/dist/button.js +1 -1
  55. package/dist/card.cjs +1 -1
  56. package/dist/card.js +1 -1
  57. package/dist/{checkbox-_WevqQDR.js → checkbox-DsmG1Evz.js} +6 -6
  58. package/dist/{checkbox-_WevqQDR.js.map → checkbox-DsmG1Evz.js.map} +1 -1
  59. package/dist/{checkbox-f7BewP4u.cjs → checkbox-Xr-OTKiq.cjs} +2 -2
  60. package/dist/{checkbox-f7BewP4u.cjs.map → checkbox-Xr-OTKiq.cjs.map} +1 -1
  61. package/dist/checkbox.cjs +1 -1
  62. package/dist/checkbox.js +1 -1
  63. package/dist/{chips-DiDm29N_.js → chips-CtQ6KScS.js} +14 -14
  64. package/dist/{chips-DiDm29N_.js.map → chips-CtQ6KScS.js.map} +1 -1
  65. package/dist/{chips-D1QElds4.cjs → chips-TCtGSVDM.cjs} +2 -2
  66. package/dist/{chips-D1QElds4.cjs.map → chips-TCtGSVDM.cjs.map} +1 -1
  67. package/dist/chips.cjs +1 -1
  68. package/dist/chips.js +1 -1
  69. package/dist/{circular-progress-BAlic8HY.js → circular-progress-CUp7rBzy.js} +8 -8
  70. package/dist/{circular-progress-BAlic8HY.js.map → circular-progress-CUp7rBzy.js.map} +1 -1
  71. package/dist/{circular-progress-CfPyDLX6.cjs → circular-progress-Cud0rg3a.cjs} +2 -2
  72. package/dist/{circular-progress-CfPyDLX6.cjs.map → circular-progress-Cud0rg3a.cjs.map} +1 -1
  73. package/dist/circular-progress.cjs +1 -1
  74. package/dist/circular-progress.js +1 -1
  75. package/dist/code-highlight.cjs +1 -1
  76. package/dist/code-highlight.js +1 -1
  77. package/dist/{code-preview-DtvCblTa.cjs → code-preview-DM8oGBFy.cjs} +2 -2
  78. package/dist/{code-preview-DtvCblTa.cjs.map → code-preview-DM8oGBFy.cjs.map} +1 -1
  79. package/dist/{code-preview-BiVj9uxF.js → code-preview-N0FaD6oD.js} +8 -8
  80. package/dist/{code-preview-BiVj9uxF.js.map → code-preview-N0FaD6oD.js.map} +1 -1
  81. package/dist/components.cjs +1 -1
  82. package/dist/components.js +1 -1
  83. package/dist/content-drawer.cjs +1 -1
  84. package/dist/content-drawer.js +1 -1
  85. package/dist/date-range-DBdwrYhp.cjs +131 -0
  86. package/dist/date-range-DBdwrYhp.cjs.map +1 -0
  87. package/dist/date-range-DnYewL7B.js +638 -0
  88. package/dist/date-range-DnYewL7B.js.map +1 -0
  89. package/dist/date-range.cjs +1 -1
  90. package/dist/date-range.js +1 -1
  91. package/dist/{delay-BdXEKapp.js → delay-C0F-H48q.js} +12 -12
  92. package/dist/{delay-BdXEKapp.js.map → delay-C0F-H48q.js.map} +1 -1
  93. package/dist/{delay-KEyQxDNp.cjs → delay-YfksbdSk.cjs} +2 -2
  94. package/dist/{delay-KEyQxDNp.cjs.map → delay-YfksbdSk.cjs.map} +1 -1
  95. package/dist/delay.cjs +1 -1
  96. package/dist/delay.js +1 -1
  97. package/dist/{dialog-content-D3sFNuVs.js → dialog-content-COidAlIa.js} +11 -11
  98. package/dist/{dialog-content-D3sFNuVs.js.map → dialog-content-COidAlIa.js.map} +1 -1
  99. package/dist/{dialog-content-D5YTttrK.cjs → dialog-content-CyPNCPyp.cjs} +2 -2
  100. package/dist/{dialog-content-D5YTttrK.cjs.map → dialog-content-CyPNCPyp.cjs.map} +1 -1
  101. package/dist/dialog.cjs +1 -1
  102. package/dist/dialog.js +1 -1
  103. package/dist/{divider-CNXiMvWd.js → divider-CHtq7YkK.js} +8 -8
  104. package/dist/{divider-CNXiMvWd.js.map → divider-CHtq7YkK.js.map} +1 -1
  105. package/dist/{divider-CDz3pUAy.cjs → divider-Cy75eDOI.cjs} +2 -2
  106. package/dist/{divider-CDz3pUAy.cjs.map → divider-Cy75eDOI.cjs.map} +1 -1
  107. package/dist/divider.cjs +1 -1
  108. package/dist/divider.js +1 -1
  109. package/dist/{dropdown-content-jlq_cqLS.cjs → dropdown-content-AKsZIRkY.cjs} +2 -2
  110. package/dist/{dropdown-content-jlq_cqLS.cjs.map → dropdown-content-AKsZIRkY.cjs.map} +1 -1
  111. package/dist/{dropdown-content-CVz6zPSO.js → dropdown-content-DgscCd-v.js} +11 -11
  112. package/dist/{dropdown-content-CVz6zPSO.js.map → dropdown-content-DgscCd-v.js.map} +1 -1
  113. package/dist/dropdown.cjs +1 -1
  114. package/dist/dropdown.js +1 -1
  115. package/dist/extra.cjs +1 -1
  116. package/dist/extra.js +1 -1
  117. package/dist/{flex-DFatBgot.cjs → flex-B9AdlerG.cjs} +2 -2
  118. package/dist/{flex-DFatBgot.cjs.map → flex-B9AdlerG.cjs.map} +1 -1
  119. package/dist/{flex-TjhbDSMX.js → flex-ChnKQLCI.js} +2 -2
  120. package/dist/{flex-TjhbDSMX.js.map → flex-ChnKQLCI.js.map} +1 -1
  121. package/dist/{form-D-auKn-K.js → form-BFc52uuY.js} +10 -10
  122. package/dist/{form-D-auKn-K.js.map → form-BFc52uuY.js.map} +1 -1
  123. package/dist/{form-ClDdYqke.cjs → form-DfUjGCp4.cjs} +2 -2
  124. package/dist/{form-ClDdYqke.cjs.map → form-DfUjGCp4.cjs.map} +1 -1
  125. package/dist/form.cjs +1 -1
  126. package/dist/form.js +1 -1
  127. package/dist/formField.mixin-CuGsxsHl.js +48 -0
  128. package/dist/formField.mixin-CuGsxsHl.js.map +1 -0
  129. package/dist/formField.mixin-Cxw6KKHR.cjs +2 -0
  130. package/dist/formField.mixin-Cxw6KKHR.cjs.map +1 -0
  131. package/dist/{icon-D2xGQiZb.cjs → icon-Csw2jGjz.cjs} +2 -2
  132. package/dist/{icon-D2xGQiZb.cjs.map → icon-Csw2jGjz.cjs.map} +1 -1
  133. package/dist/{icon-BfY2ZJUE.js → icon-PHYf6Ww3.js} +7 -7
  134. package/dist/{icon-BfY2ZJUE.js.map → icon-PHYf6Ww3.js.map} +1 -1
  135. package/dist/{icon-button-BUkdhu_-.cjs → icon-button-B4ItyJ98.cjs} +2 -2
  136. package/dist/{icon-button-BUkdhu_-.cjs.map → icon-button-B4ItyJ98.cjs.map} +1 -1
  137. package/dist/{icon-button-yKwaljg0.js → icon-button-D889ly9B.js} +9 -9
  138. package/dist/{icon-button-yKwaljg0.js.map → icon-button-D889ly9B.js.map} +1 -1
  139. package/dist/icons.cjs +1 -1
  140. package/dist/icons.js +1 -1
  141. package/dist/index.cjs +1 -1
  142. package/dist/index.js +42 -42
  143. package/dist/input-BbLEIWkk.cjs +122 -0
  144. package/dist/input-BbLEIWkk.cjs.map +1 -0
  145. package/dist/input-j_kMoC0l.js +480 -0
  146. package/dist/input-j_kMoC0l.js.map +1 -0
  147. package/dist/input.cjs +1 -1
  148. package/dist/input.js +1 -1
  149. package/dist/layout.cjs +1 -1
  150. package/dist/layout.js +1 -1
  151. package/dist/{list-CHZKII-L.js → list-B-vruXz6.js} +7 -7
  152. package/dist/{list-CHZKII-L.js.map → list-B-vruXz6.js.map} +1 -1
  153. package/dist/{list-BO9C13wk.cjs → list-CSu6cyoR.cjs} +2 -2
  154. package/dist/{list-BO9C13wk.cjs.map → list-CSu6cyoR.cjs.map} +1 -1
  155. package/dist/list.cjs +1 -1
  156. package/dist/list.js +1 -1
  157. package/dist/{litElement.mixin-CUibxXWX.cjs → litElement.mixin-CejONOpd.cjs} +2 -2
  158. package/dist/{litElement.mixin-CUibxXWX.cjs.map → litElement.mixin-CejONOpd.cjs.map} +1 -1
  159. package/dist/{litElement.mixin-5RC72TVS.js → litElement.mixin-D-SDs-Ez.js} +2 -2
  160. package/dist/{litElement.mixin-5RC72TVS.js.map → litElement.mixin-D-SDs-Ez.js.map} +1 -1
  161. package/dist/{media-4arP4Xi0.js → media-B_Me35Lz.js} +12 -12
  162. package/dist/{media-4arP4Xi0.js.map → media-B_Me35Lz.js.map} +1 -1
  163. package/dist/{media-v2LZA3zQ.cjs → media-BfzuayBO.cjs} +2 -2
  164. package/dist/{media-v2LZA3zQ.cjs.map → media-BfzuayBO.cjs.map} +1 -1
  165. package/dist/{menu-C-ZpBMON.cjs → menu-BDv4zBeO.cjs} +2 -2
  166. package/dist/{menu-C-ZpBMON.cjs.map → menu-BDv4zBeO.cjs.map} +1 -1
  167. package/dist/{menu-DvcxRQrY.js → menu-CXq_e2XW.js} +11 -11
  168. package/dist/{menu-DvcxRQrY.js.map → menu-CXq_e2XW.js.map} +1 -1
  169. package/dist/menu.cjs +1 -1
  170. package/dist/menu.js +1 -1
  171. package/dist/mixins/index.ts +1 -0
  172. package/dist/nav-drawer.cjs +1 -1
  173. package/dist/nav-drawer.js +1 -1
  174. package/dist/{notification-service-CcapAF2G.js → notification-service-CD96gC_Q.js} +4 -4
  175. package/dist/{notification-service-CcapAF2G.js.map → notification-service-CD96gC_Q.js.map} +1 -1
  176. package/dist/{notification-service-BXTqvkWg.cjs → notification-service-CzJSG4Sn.cjs} +2 -2
  177. package/dist/{notification-service-BXTqvkWg.cjs.map → notification-service-CzJSG4Sn.cjs.map} +1 -1
  178. package/dist/notification.cjs +1 -1
  179. package/dist/notification.js +1 -1
  180. package/dist/{option-xSW3D1j5.js → option-CVtfqsYE.js} +6 -6
  181. package/dist/{option-xSW3D1j5.js.map → option-CVtfqsYE.js.map} +1 -1
  182. package/dist/{option-Cj3xNzQG.cjs → option-h_WFbBOi.cjs} +2 -2
  183. package/dist/{option-Cj3xNzQG.cjs.map → option-h_WFbBOi.cjs.map} +1 -1
  184. package/dist/option.cjs +1 -1
  185. package/dist/option.js +1 -1
  186. package/dist/{payment-card-form-CdNQkQa5.cjs → payment-card-form-BskQ6TgU.cjs} +2 -2
  187. package/dist/{payment-card-form-CdNQkQa5.cjs.map → payment-card-form-BskQ6TgU.cjs.map} +1 -1
  188. package/dist/{payment-card-form-B-W0YXS5.js → payment-card-form-tNrkE6OQ.js} +11 -11
  189. package/dist/{payment-card-form-B-W0YXS5.js.map → payment-card-form-tNrkE6OQ.js.map} +1 -1
  190. package/dist/radio-button-DF08cuJS.js +114 -0
  191. package/dist/radio-button-DF08cuJS.js.map +1 -0
  192. package/dist/radio-button-DnCXtbRy.cjs +41 -0
  193. package/dist/radio-button-DnCXtbRy.cjs.map +1 -0
  194. package/dist/radio-group.cjs +1 -1
  195. package/dist/radio-group.js +1 -1
  196. package/dist/{schmancy-steps-container-kh5hz8Q8.cjs → schmancy-steps-container-B-Bvr-wZ.cjs} +2 -2
  197. package/dist/{schmancy-steps-container-kh5hz8Q8.cjs.map → schmancy-steps-container-B-Bvr-wZ.cjs.map} +1 -1
  198. package/dist/{schmancy-steps-container-DTR_ppqJ.js → schmancy-steps-container-BACX3hp6.js} +2 -2
  199. package/dist/{schmancy-steps-container-DTR_ppqJ.js.map → schmancy-steps-container-BACX3hp6.js.map} +1 -1
  200. package/dist/{select-BeStY5QU.js → select-BLigK7WJ.js} +10 -10
  201. package/dist/{select-BeStY5QU.js.map → select-BLigK7WJ.js.map} +1 -1
  202. package/dist/{select-D6OdooZd.cjs → select-BtsHlkD9.cjs} +2 -2
  203. package/dist/{select-D6OdooZd.cjs.map → select-BtsHlkD9.cjs.map} +1 -1
  204. package/dist/select.cjs +1 -1
  205. package/dist/select.js +1 -1
  206. package/dist/{sheet-DurXVAka.js → sheet-Bq4x2qJR.js} +8 -8
  207. package/dist/{sheet-DurXVAka.js.map → sheet-Bq4x2qJR.js.map} +1 -1
  208. package/dist/{sheet-BHdCyBYA.cjs → sheet-H3p6cwja.cjs} +2 -2
  209. package/dist/{sheet-BHdCyBYA.cjs.map → sheet-H3p6cwja.cjs.map} +1 -1
  210. package/dist/sheet.cjs +1 -1
  211. package/dist/sheet.js +2 -2
  212. package/dist/{slider-CcOPTwfV.js → slider-B8oe73hM.js} +9 -9
  213. package/dist/{slider-CcOPTwfV.js.map → slider-B8oe73hM.js.map} +1 -1
  214. package/dist/{slider-eKHfEAqk.cjs → slider-Cfo8tVKG.cjs} +2 -2
  215. package/dist/{slider-eKHfEAqk.cjs.map → slider-Cfo8tVKG.cjs.map} +1 -1
  216. package/dist/slider.cjs +1 -1
  217. package/dist/slider.js +1 -1
  218. package/dist/{spinner-0BTyqnFH.cjs → spinner-DnRMrl9v.cjs} +2 -2
  219. package/dist/{spinner-0BTyqnFH.cjs.map → spinner-DnRMrl9v.cjs.map} +1 -1
  220. package/dist/{spinner-BcaOyZIW.js → spinner-U7S7P4no.js} +11 -11
  221. package/dist/{spinner-BcaOyZIW.js.map → spinner-U7S7P4no.js.map} +1 -1
  222. package/dist/steps.cjs +1 -1
  223. package/dist/steps.js +1 -1
  224. package/dist/{surface-DhTA5nKg.cjs → surface-CTlwMC6K.cjs} +2 -2
  225. package/dist/{surface-DhTA5nKg.cjs.map → surface-CTlwMC6K.cjs.map} +1 -1
  226. package/dist/{surface-XqJoAcEI.js → surface-D7X23FXb.js} +2 -2
  227. package/dist/{surface-XqJoAcEI.js.map → surface-D7X23FXb.js.map} +1 -1
  228. package/dist/surface.cjs +1 -1
  229. package/dist/surface.js +1 -1
  230. package/dist/{table-DPfOXBUJ.cjs → table-0HYVgRpO.cjs} +2 -2
  231. package/dist/{table-DPfOXBUJ.cjs.map → table-0HYVgRpO.cjs.map} +1 -1
  232. package/dist/{table-Dy5Fqu4G.js → table-Dwrox4AT.js} +2 -2
  233. package/dist/{table-Dy5Fqu4G.js.map → table-Dwrox4AT.js.map} +1 -1
  234. package/dist/table.cjs +1 -1
  235. package/dist/table.js +1 -1
  236. package/dist/{tabs-compatibility-TPaYG7ev.cjs → tabs-compatibility-9Rd3aAz8.cjs} +2 -2
  237. package/dist/{tabs-compatibility-TPaYG7ev.cjs.map → tabs-compatibility-9Rd3aAz8.cjs.map} +1 -1
  238. package/dist/{tabs-compatibility-BqSkFV08.js → tabs-compatibility-Bhqb9_1G.js} +8 -8
  239. package/dist/{tabs-compatibility-BqSkFV08.js.map → tabs-compatibility-Bhqb9_1G.js.map} +1 -1
  240. package/dist/tabs.cjs +1 -1
  241. package/dist/tabs.js +1 -1
  242. package/dist/tailwind.mixin-Dx35wOig.js +43 -0
  243. package/dist/{tailwind.mixin-DpiTmETl.js.map → tailwind.mixin-Dx35wOig.js.map} +1 -1
  244. package/dist/tailwind.mixin-xwSbeHSt.cjs +2 -0
  245. package/dist/{tailwind.mixin-C6mrbvH3.cjs.map → tailwind.mixin-xwSbeHSt.cjs.map} +1 -1
  246. package/dist/teleport.cjs +1 -1
  247. package/dist/teleport.js +1 -1
  248. package/dist/{textarea-Dy7B8B0d.cjs → textarea-D7NLGUQL.cjs} +2 -2
  249. package/dist/{textarea-Dy7B8B0d.cjs.map → textarea-D7NLGUQL.cjs.map} +1 -1
  250. package/dist/{textarea-Ba8gRDPS.js → textarea-Dx-DzkDe.js} +2 -2
  251. package/dist/{textarea-Ba8gRDPS.js.map → textarea-Dx-DzkDe.js.map} +1 -1
  252. package/dist/textarea.cjs +1 -1
  253. package/dist/textarea.js +1 -1
  254. package/dist/{theme-button-COwSZ83Y.js → theme-button-gIEpz0yO.js} +6 -6
  255. package/dist/{theme-button-COwSZ83Y.js.map → theme-button-gIEpz0yO.js.map} +1 -1
  256. package/dist/{theme-button-Bnm7IL1u.cjs → theme-button-oLGQfECu.cjs} +2 -2
  257. package/dist/{theme-button-Bnm7IL1u.cjs.map → theme-button-oLGQfECu.cjs.map} +1 -1
  258. package/dist/theme-button.cjs +1 -1
  259. package/dist/theme-button.js +1 -1
  260. package/dist/theme.cjs +1 -1
  261. package/dist/{theme.component-BV_e_mXY.js → theme.component-BAA4DyC6.js} +2 -2
  262. package/dist/{theme.component-BV_e_mXY.js.map → theme.component-BAA4DyC6.js.map} +1 -1
  263. package/dist/{theme.component-UBy29B7c.cjs → theme.component-DIXxdhcR.cjs} +2 -2
  264. package/dist/{theme.component-UBy29B7c.cjs.map → theme.component-DIXxdhcR.cjs.map} +1 -1
  265. package/dist/theme.js +1 -1
  266. package/dist/{timezone-DEhkif2j.js → timezone-Bo5mdJkY.js} +9 -9
  267. package/dist/{timezone-DEhkif2j.js.map → timezone-Bo5mdJkY.js.map} +1 -1
  268. package/dist/{timezone-DBxPtZan.cjs → timezone-DjBVPwPe.cjs} +2 -2
  269. package/dist/{timezone-DBxPtZan.cjs.map → timezone-DjBVPwPe.cjs.map} +1 -1
  270. package/dist/{tooltip-D0coQKih.js → tooltip-Dy5bvLg8.js} +2 -2
  271. package/dist/{tooltip-D0coQKih.js.map → tooltip-Dy5bvLg8.js.map} +1 -1
  272. package/dist/{tooltip-CTBMN8M6.cjs → tooltip-dz3rb8at.cjs} +2 -2
  273. package/dist/{tooltip-CTBMN8M6.cjs.map → tooltip-dz3rb8at.cjs.map} +1 -1
  274. package/dist/tooltip.cjs +1 -1
  275. package/dist/tooltip.js +1 -1
  276. package/dist/{tree-Co4Ithrh.cjs → tree-BjNNPfOq.cjs} +2 -2
  277. package/dist/{tree-Co4Ithrh.cjs.map → tree-BjNNPfOq.cjs.map} +1 -1
  278. package/dist/{tree-Zy0XMFKh.js → tree-DYiGGb5x.js} +7 -7
  279. package/dist/{tree-Zy0XMFKh.js.map → tree-DYiGGb5x.js.map} +1 -1
  280. package/dist/tree.cjs +1 -1
  281. package/dist/tree.js +1 -1
  282. package/dist/{typewriter-soteXIt4.cjs → typewriter-CQWBe0l-.cjs} +2 -2
  283. package/dist/{typewriter-soteXIt4.cjs.map → typewriter-CQWBe0l-.cjs.map} +1 -1
  284. package/dist/{typewriter-C0InniFB.js → typewriter-DNyZpGkL.js} +12 -12
  285. package/dist/{typewriter-C0InniFB.js.map → typewriter-DNyZpGkL.js.map} +1 -1
  286. package/dist/typewriter.cjs +1 -1
  287. package/dist/typewriter.js +1 -1
  288. package/dist/{typography-Bw9baiV3.cjs → typography-BLenYAmX.cjs} +2 -2
  289. package/dist/{typography-Bw9baiV3.cjs.map → typography-BLenYAmX.cjs.map} +1 -1
  290. package/dist/{typography-CeTZ2VqE.js → typography-DtpDTIi7.js} +2 -2
  291. package/dist/{typography-CeTZ2VqE.js.map → typography-DtpDTIi7.js.map} +1 -1
  292. package/dist/typography.cjs +1 -1
  293. package/dist/typography.js +1 -1
  294. package/package.json +1 -1
  295. package/dist/date-range-BLs8_7pI.js +0 -609
  296. package/dist/date-range-BLs8_7pI.js.map +0 -1
  297. package/dist/date-range-Ch_Ir3s1.cjs +0 -117
  298. package/dist/date-range-Ch_Ir3s1.cjs.map +0 -1
  299. package/dist/input-B3GMd-FZ.js +0 -363
  300. package/dist/input-B3GMd-FZ.js.map +0 -1
  301. package/dist/input-By2O_8YL.cjs +0 -111
  302. package/dist/input-By2O_8YL.cjs.map +0 -1
  303. package/dist/radio-button-CNrcOMLm.js +0 -151
  304. package/dist/radio-button-CNrcOMLm.js.map +0 -1
  305. package/dist/radio-button-WeQklCIj.cjs +0 -41
  306. package/dist/radio-button-WeQklCIj.cjs.map +0 -1
  307. package/dist/tailwind.mixin-C6mrbvH3.cjs +0 -2
  308. package/dist/tailwind.mixin-DpiTmETl.js +0 -43
@@ -1,111 +0,0 @@
1
- "use strict";const d=require("lit"),e=require("lit/decorators.js"),h=require("lit/directives/if-defined.js"),b=require("lit/directives/ref.js"),v=require("lit/directives/when.js"),n=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const g=require("./tailwind.mixin-C6mrbvH3.cjs"),f=require("./ripple-C2BHbhcS.cjs"),c=require("./theme.interface-Xg5Zi46a.cjs"),E=":host{border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important;width:-webkit-fill-available}:host:focus{box-shadow:unset!important}input:focus-visible{outline:none!important}input{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-shadow:inherit;text-overflow:inherit;text-rendering:inherit;text-size-adjust:inherit;text-align-last:inherit}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes onAutoFillStart{}input:-webkit-autofill{animation-name:onAutoFillStart}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px var(--schmancy-sys-color-surface-highest) inset!important;-webkit-text-fill-color:var(--schmancy-sys-color-surface-on)!important;transition:background-color 5000s ease-in-out 0s}@-moz-document url-prefix(){input:-moz-autofill,input:-moz-autofill:focus{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}";var $=Object.defineProperty,x=Object.getOwnPropertyDescriptor,r=(t,i,l,u)=>{for(var y,p=u>1?void 0:u?x(i,l):i,m=t.length-1;m>=0;m--)(y=t[m])&&(p=(u?y(i,l,p):y(p))||p);return u&&p&&$(i,l,p),p};let s=class extends g.TailwindElement(E){constructor(){if(super(),this.id="",this.label="",this.type="text",this.name=`name_${Date.now()}`,this.placeholder="",this.value="",this.required=!1,this.disabled=!1,this.readonly=!1,this.clickable=!1,this.spellcheck=!1,this.align="left",this.autofocus=!1,this.autocomplete="on",this.tabIndex=0,this.error=!1,this.size="md",this.validateOn="touched",this.validationMessage="",this.inputRef=b.createRef(),this.isAutofilled=!1,this.touched=!1,this.dirty=!1,this.submitted=!1,this.defaultValue="","attachInternals"in this)try{this.internals=this.attachInternals()}catch{this.internals=void 0}}willUpdate(t){this.id||(this.id="sch-input-"+s._idCounter++),super.willUpdate(t)}get form(){return this.internals?.form??null}updated(t){super.updated(t),t.has("value")&&(this.value!==this.defaultValue&&(this.dirty=!0),this.internals?.setFormValue(this.value),this.validateInput()),t.has("error")&&this.updateValidityState(),!this.hasUpdated&&t.has("value")&&(this.defaultValue=this.value)}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value,this.setupFormIntegration(),this.setupExternalLabelAssociation()}setupFormIntegration(){this.internals?.form&&(this.formResetObserver=new MutationObserver(t=>{for(const i of t)i.type==="attributes"&&i.attributeName==="reset"&&this.resetToDefault()}),this.formResetObserver.observe(this.internals.form,{attributes:!0,childList:!1,subtree:!1}),this.internals.form.addEventListener("reset",()=>{this.resetToDefault()}),this.internals.form.addEventListener("submit",()=>{this.submitted=!0,this.validateInput(!0)}))}setupExternalLabelAssociation(){if(this.id){const t=()=>{document.querySelectorAll(`label[for="${this.id}"]`).forEach(i=>{i.addEventListener("click",()=>{this.focus()})})};document.readyState==="complete"?t():document.addEventListener("DOMContentLoaded",t)}}disconnectedCallback(){super.disconnectedCallback(),this.formResetObserver&&this.formResetObserver.disconnect(),this.id&&document.querySelectorAll(`label[for="${this.id}"]`).forEach(t=>{t.removeEventListener("click",()=>{this.focus()})})}resetToDefault(){this.value=this.defaultValue,this.touched=!1,this.dirty=!1,this.submitted=!1,this.error=!1,this.validationMessage="",this.dispatchEvent(new CustomEvent("reset",{bubbles:!0}))}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this.touched;case"dirty":return this.dirty;case"submitted":return this.submitted}}updateValidityState(){this.error?this.validationMessage?this.internals?.setValidity({customError:!0},this.validationMessage,this.inputElement):this.internals?.setValidity({customError:!0},"Invalid input",this.inputElement):this.internals?.setValidity({})}validateInput(t=!1){if(this.disabled)return;const i=this.shouldShowValidation(t),l=this.inputElement?.validity??{customError:!1,valid:!0},u=!l.valid&&!l.customError;i&&u?(this.error=!0,this.validationMessage=this.inputElement?.validationMessage||""):l.valid?(this.error=!1,l.customError||(this.validationMessage="")):i||(this.error=!1),this.updateValidityState()}checkValidity(){const t=this.inputRef.value?.checkValidity()??!0;return this.internals&&!t?(this.internals.checkValidity(),!1):t}reportValidity(){this.touched=!0,this.submitted=!0;const t=this.inputRef.value?.reportValidity()??!0;return this.validateInput(!0),this.internals&&!t?(this.internals.reportValidity(),!1):t}setCustomValidity(t){this.inputRef.value&&this.inputRef.value.setCustomValidity(t),this.validationMessage=t,this.error=t!==""&&this.shouldShowValidation(),this.internals&&(t?this.internals.setValidity({customError:!0},t,this.inputElement):this.internals.setValidity({}))}firstUpdated(){this.autofocus&&setTimeout(()=>{this.focus()},0),this.setupInputEvents(),this.setupFocusBlurEvents(),this.setupAutofillDetection(),this.setupEnterKeyEvents()}setupInputEvents(){n.fromEvent(this.inputElement,"input").pipe(n.map(t=>{const i=t;return{value:t.target.value,inputType:i.inputType,data:i.data,isComposing:i.isComposing,originalEvent:t}}),n.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t.value,this.dirty=this.value!==this.defaultValue;const i=new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0});Object.defineProperties(i,{inputType:{value:t.inputType},data:{value:t.data},isComposing:{value:t.isComposing}}),this.dispatchEvent(i),this.validateInput()}),n.fromEvent(this.inputElement,"change").pipe(n.map(t=>t.target.value),n.distinctUntilChanged(),n.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.validateInput()})}setupFocusBlurEvents(){n.fromEvent(this.inputElement,"focus").pipe(n.takeUntil(this.disconnecting)).subscribe(t=>{const i=new CustomEvent("focus",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(i,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(i)}),n.fromEvent(this.inputElement,"blur").pipe(n.takeUntil(this.disconnecting)).subscribe(t=>{this.touched=!0,this.disabled||this.validateInput();const i=new CustomEvent("blur",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(i,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(i)})}setupAutofillDetection(){n.fromEvent(this.inputElement,"animationstart").pipe(n.filter(t=>t.animationName==="onAutoFillStart"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:i}=t.target;this.value=i,this.isAutofilled=!0,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("autofill",{detail:{value:i},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:i},bubbles:!0,composed:!0}))}),n.fromEvent(this.inputElement,"animationstart").pipe(n.filter(t=>t.animationName==="onAutoFillCancel"),n.takeUntil(this.disconnecting)).subscribe(()=>{this.isAutofilled=!1})}setupEnterKeyEvents(){n.fromEvent(this.inputElement,"keyup").pipe(n.filter(t=>t.key==="Enter"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:i}=t.target;this.value=i,this.dirty=this.value!==this.defaultValue;const l=new CustomEvent("enter",{detail:{value:i},bubbles:!0,composed:!0});Object.defineProperties(l,{key:{value:"Enter"},code:{value:"Enter"},keyCode:{value:13},which:{value:13}}),this.dispatchEvent(l)})}select(){return this.inputRef.value?.select()}getValidity(){return this.inputRef.value?.validity}setSelectionRange(t,i,l){this.inputRef.value?.setSelectionRange(t,i,l)}get selectionStart(){return this.inputRef.value?.selectionStart??null}get selectionEnd(){return this.inputRef.value?.selectionEnd??null}get selectionDirection(){return this.inputRef.value?.selectionDirection??null}setRangeText(t,i,l,u){i!==void 0&&l!==void 0?this.inputRef.value?.setRangeText(t,i,l,u):this.inputRef.value?.setRangeText(t)}focus(t){this.inputRef.value?.focus(t),this.dispatchEvent(new Event("focus"))}click(){this.inputRef.value?.click(),this.dispatchEvent(new Event("click"))}blur(){this.inputRef.value?.blur(),this.dispatchEvent(new Event("blur"))}render(){const{height:t,padding:i,fontSize:l}=(()=>{switch(this.size){case"sm":return{height:"40px",padding:"0 8px",fontSize:"0.875rem"};case"lg":return{height:"60px",padding:"0 20px",fontSize:"1.125rem"};default:return{height:"50px",padding:"0 16px",fontSize:"1rem"}}})(),u={"w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on":!0,"outline-secondary-default focus:outline-1 ":!0,"outline-secondary-default focus:outline-1":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 ring-inset focus:ring-1 focus:ring-inset":!0,"ring-secondary-default ring-outline focus:ring-secondary-default":!this.error,"ring-error-default focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer text-select-none":this.readonly,"cursor-pointer":this.clickable,"text-center":this.align==="center","text-right":this.align==="right",autofilled:this.isAutofilled},y={"opacity-40":this.disabled,"block mb-[4px]":!0,"text-sm":this.size==="sm","text-base":this.size==="md","text-lg":this.size==="lg"},p={height:t,padding:i,fontSize:l};return d.html`
2
- ${v.when(this.label,()=>d.html`
3
- <label
4
- for=${this.id}
5
- id="label-${this.id}"
6
- class=${this.classMap(y)}
7
- ${f.color({color:this.error?c.SchmancyTheme.sys.color.error.default:c.SchmancyTheme.sys.color.primary.default})}
8
- >
9
- <schmancy-typography type="label" token=${this.size==="sm"?"sm":this.size==="lg"?"lg":"md"}>
10
- ${this.label}
11
- </schmancy-typography>
12
- </label>
13
- `)}
14
-
15
- <input
16
- ${f.color({bgColor:c.SchmancyTheme.sys.color.surface.highest,color:c.SchmancyTheme.sys.color.surface.on})}
17
- ${b.ref(this.inputRef)}
18
- id=${this.id}
19
- name=${this.name}
20
- class=${this.classMap(u)}
21
- style=${this.styleMap(p)}
22
- .value=${this.value}
23
- .type=${this.type}
24
- .autocomplete=${this.autocomplete}
25
- .spellcheck=${this.spellcheck}
26
- placeholder=${this.placeholder}
27
- inputmode=${h.ifDefined(this.inputmode)}
28
- pattern=${h.ifDefined(this.pattern)}
29
- step=${h.ifDefined(this.step)}
30
- minlength=${h.ifDefined(this.minlength)}
31
- maxlength=${h.ifDefined(this.maxlength)}
32
- min=${h.ifDefined(this.min)}
33
- max=${h.ifDefined(this.max)}
34
- list=${h.ifDefined(this.list)}
35
- ?required=${this.required}
36
- ?disabled=${this.disabled}
37
- ?readonly=${this.readonly}
38
- aria-invalid=${this.error?"true":"false"}
39
- aria-required=${this.required?"true":"false"}
40
- aria-labelledby=${this.label?`label-${this.id}`:d.nothing}
41
- aria-describedby=${this.hint?`hint-${this.id}`:d.nothing}
42
- aria-label=${h.ifDefined(this.label?void 0:this.placeholder||"Input")}
43
- aria-autocomplete=${this.list?"list":"none"}
44
- />
45
-
46
- ${v.when(this.hint,()=>d.html`
47
- <div
48
- id="hint-${this.id}"
49
- class="${this.size==="sm"?"pt-[1px] text-xs":this.size==="lg"?"pt-[3px] text-base":"pt-[2px] text-sm"}"
50
- ${f.color({color:this.error?c.SchmancyTheme.sys.color.error.default:c.SchmancyTheme.sys.color.primary.default})}
51
- >
52
- <schmancy-typography
53
- align="left"
54
- type="label"
55
- token=${this.size==="sm"?"sm":this.size==="lg"?"lg":"md"}
56
- >
57
- ${this.hint}
58
- </schmancy-typography>
59
- </div>
60
- `)}
61
- `}};s._idCounter=0,s.formAssociated=!0,s.shadowRootOptions={...d.LitElement.shadowRootOptions,delegatesFocus:!0},r([e.property({reflect:!0})],s.prototype,"id",2),r([e.property({type:String})],s.prototype,"label",2),r([e.property({reflect:!0})],s.prototype,"type",2),r([e.property()],s.prototype,"name",2),r([e.property()],s.prototype,"placeholder",2),r([e.property({type:String,reflect:!0})],s.prototype,"value",2),r([e.property({type:String,reflect:!0})],s.prototype,"pattern",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"required",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"disabled",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"readonly",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"clickable",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"spellcheck",2),r([e.property({type:String,reflect:!0})],s.prototype,"align",2),r([e.property()],s.prototype,"inputmode",2),r([e.property({type:Number,reflect:!0})],s.prototype,"minlength",2),r([e.property({type:Number})],s.prototype,"maxlength",2),r([e.property()],s.prototype,"min",2),r([e.property()],s.prototype,"max",2),r([e.property({type:Number,reflect:!0})],s.prototype,"step",2),r([e.property({type:Boolean})],s.prototype,"autofocus",2),r([e.property({type:String,reflect:!0})],s.prototype,"autocomplete",2),r([e.property({type:Number,reflect:!0})],s.prototype,"tabIndex",2),r([e.property()],s.prototype,"hint",2),r([e.property({type:Boolean,reflect:!0})],s.prototype,"error",2),r([e.property({type:String,reflect:!0})],s.prototype,"size",2),r([e.property({type:String})],s.prototype,"validateOn",2),r([e.property({type:String})],s.prototype,"list",2),r([e.property({type:String})],s.prototype,"validationMessage",2),r([e.query("input")],s.prototype,"inputElement",2),r([e.state()],s.prototype,"isAutofilled",2),r([e.state()],s.prototype,"touched",2),r([e.state()],s.prototype,"dirty",2),r([e.state()],s.prototype,"submitted",2),r([e.state()],s.prototype,"defaultValue",2),s=r([e.customElement("sch-input")],s);var k=Object.defineProperty,w=Object.getOwnPropertyDescriptor,a=(t,i,l,u)=>{for(var y,p=u>1?void 0:u?w(i,l):i,m=t.length-1;m>=0;m--)(y=t[m])&&(p=(u?y(i,l,p):y(p))||p);return u&&p&&k(i,l,p),p};let o=class extends g.TailwindElement(E){constructor(){if(super(),this.id="",this.label="",this.type="text",this.name=`name_${Date.now()}`,this.placeholder="",this.value="",this.required=!1,this.disabled=!1,this.readonly=!1,this.clickable=!1,this.spellcheck=!1,this.align="left",this.autofocus=!1,this.autocomplete="on",this.tabIndex=0,this.error=!1,this.inputRef=b.createRef(),"attachInternals"in this)try{this.internals=this.attachInternals()}catch{this.internals=void 0}}willUpdate(t){this.id||(this.id="schmancy-input-"+o._idCounter++),super.willUpdate(t)}get form(){return this.internals?.form??null}updated(t){super.updated(t),t.has("value")&&this.internals?.setFormValue(this.value),t.has("error")&&(this.error?this.internals?.setValidity({customError:!0},"Invalid input",this.inputElement):this.internals?.setValidity({}))}checkValidity(){return this.inputRef.value?.checkValidity()??!0}reportValidity(){return this.inputRef.value?.reportValidity()??!0}setCustomValidity(t){this.inputRef.value?.setCustomValidity(t)}firstUpdated(){this.autofocus&&this.focus(),n.fromEvent(this.inputElement,"input").pipe(n.map(t=>t.target.value),n.distinctUntilChanged(),n.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dispatchEvent(new CustomEvent("input",{detail:{value:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}),n.fromEvent(this.inputElement,"change").pipe(n.map(t=>t.target.value),n.distinctUntilChanged(),n.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}),n.fromEvent(this.inputElement,"keyup").pipe(n.filter(t=>t.key==="Enter"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:i}=t.target;this.value=i,this.dispatchEvent(new CustomEvent("enter",{detail:{value:i},bubbles:!0,composed:!0}))}),n.fromEvent(this.inputElement,"animationstart").pipe(n.filter(t=>t.animationName==="onAutoFillStart"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:i}=t.target;this.value=i,this.dispatchEvent(new CustomEvent("change",{detail:{value:i},bubbles:!0,composed:!0}))})}select(){return this.inputRef.value?.select()}getValidity(){return this.inputRef.value?.validity}focus(t){this.inputRef.value?.focus(t),this.dispatchEvent(new Event("focus"))}click(){this.inputRef.value?.click(),this.dispatchEvent(new Event("click"))}blur(){this.inputRef.value?.blur(),this.dispatchEvent(new Event("blur"))}render(){const t={"w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]":!0,"outline-secondary-default focus:outline-1 ":!0,"disabled:opacity-40 disabled:cursor-not-allowed":!0,"placeholder:text-muted":!0,"ring-0 ring-inset focus:ring-1 focus:ring-inset":!0,"ring-secondary-default ring-outline focus:ring-secondary-default":!this.error,"ring-error-default focus:ring-error-default":this.error,"caret-transparent focus:outline-hidden cursor-pointer text-select-none":this.readonly,"cursor-pointer":this.clickable,"text-center":this.align==="center","text-right":this.align==="right"},i={"opacity-40":this.disabled,"block mb-[4px]":!0};return d.html`
62
- ${v.when(this.label,()=>d.html`
63
- <label
64
- for=${this.id}
65
- id="label-${this.id}"
66
- class=${this.classMap(i)}
67
- ${f.color({color:this.error?c.SchmancyTheme.sys.color.error.default:c.SchmancyTheme.sys.color.primary.default})}
68
- >
69
- <schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>
70
- </label>
71
- `)}
72
-
73
- <input
74
- ${f.color({bgColor:c.SchmancyTheme.sys.color.surface.highest,color:c.SchmancyTheme.sys.color.surface.on})}
75
- ${b.ref(this.inputRef)}
76
- id=${this.id}
77
- name=${this.name}
78
- class=${this.classMap(t)}
79
- .value=${this.value}
80
- .type=${this.type}
81
- .autocomplete=${this.autocomplete}
82
- .spellcheck=${this.spellcheck}
83
- placeholder=${this.placeholder}
84
- inputmode=${h.ifDefined(this.inputmode)}
85
- pattern=${h.ifDefined(this.pattern)}
86
- step=${h.ifDefined(this.step)}
87
- minlength=${h.ifDefined(this.minlength)}
88
- maxlength=${h.ifDefined(this.maxlength)}
89
- min=${h.ifDefined(this.min)}
90
- max=${h.ifDefined(this.max)}
91
- ?required=${this.required}
92
- ?disabled=${this.disabled}
93
- ?readonly=${this.readonly}
94
- aria-invalid=${this.error?"true":"false"}
95
- aria-required=${this.required?"true":"false"}
96
- aria-labelledby=${this.label?`label-${this.id}`:d.nothing}
97
- aria-describedby=${this.hint?`hint-${this.id}`:d.nothing}
98
- aria-label=${h.ifDefined(this.label?void 0:this.placeholder||"Input")}
99
- />
100
-
101
- ${v.when(this.hint,()=>d.html`
102
- <div
103
- id="hint-${this.id}"
104
- class="pt-[2px]"
105
- ${f.color({color:this.error?c.SchmancyTheme.sys.color.error.default:c.SchmancyTheme.sys.color.primary.default})}
106
- >
107
- <schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
108
- </div>
109
- `)}
110
- `}};o._idCounter=0,o.formAssociated=!0,o.shadowRootOptions={...d.LitElement.shadowRootOptions,delegatesFocus:!0},a([e.property({reflect:!0})],o.prototype,"id",2),a([e.property({type:String})],o.prototype,"label",2),a([e.property({reflect:!0})],o.prototype,"type",2),a([e.property()],o.prototype,"name",2),a([e.property()],o.prototype,"placeholder",2),a([e.property({type:String,reflect:!0})],o.prototype,"value",2),a([e.property({type:String,reflect:!0})],o.prototype,"pattern",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"required",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"disabled",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"readonly",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"clickable",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"spellcheck",2),a([e.property({type:String,reflect:!0})],o.prototype,"align",2),a([e.property()],o.prototype,"inputmode",2),a([e.property({type:Number})],o.prototype,"minlength",2),a([e.property({type:Number})],o.prototype,"maxlength",2),a([e.property()],o.prototype,"min",2),a([e.property()],o.prototype,"max",2),a([e.property({type:Number,reflect:!0})],o.prototype,"step",2),a([e.property({type:Boolean})],o.prototype,"autofocus",2),a([e.property({type:String,reflect:!0})],o.prototype,"autocomplete",2),a([e.property({type:Number,reflect:!0})],o.prototype,"tabIndex",2),a([e.property()],o.prototype,"hint",2),a([e.property({type:Boolean,reflect:!0})],o.prototype,"error",2),a([e.query("input")],o.prototype,"inputElement",2),o=a([e.customElement("schmancy-input")],o);
111
- //# sourceMappingURL=input-By2O_8YL.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input-By2O_8YL.cjs","sources":["../src/input/input-v2.ts","../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { TailwindElement } from '@mixins/index'\n\n// color directive + theme interface\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport style from './input.scss?inline'\n\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-input': SchmancyInputV2\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEventV2 = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEventV2 = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEventV2 = CustomEvent<EventDetails>\n\n/**\n * Size variants for the input.\n * - sm: Small, compact input (40px height)\n * - md: Medium input (50px height, default)\n * - lg: Large, spacious input (60px height)\n */\nexport type InputSize = 'sm' | 'md' | 'lg'\n\n/**\n * Enhanced version of the SchmancyInput component with improved form integration\n * and compatibility with legacy API.\n *\n * This component uses the native form association API and maintains parity with\n * native input behaviors while providing a stylish, accessible interface.\n */\n@customElement('sch-input')\nexport default class SchmancyInputV2 extends TailwindElement(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** Auto-incrementing counter for generating unique IDs */\n\tstatic _idCounter = 0\n\n\t@property({ reflect: true })\n\tpublic override id = ''\n\n\t/**\n\t * The label for the control. If populated, we render a `<label for=\"...\">`.\n\t * If empty, we add an `aria-label` to the <input> for better screenreader support.\n\t */\n\t@property({ type: String }) label = ''\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\t/**\n\t * Name attribute (for form submissions). By default, a unique fallback.\n\t */\n\t@property()\n\tpublic name = `name_${Date.now()}`\n\n\t@property()\n\tpublic placeholder = ''\n\n\t/** Current value of the input. */\n\t@property({ type: String, reflect: true })\n\tpublic value = ''\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\t/** Whether the control is required for form validation. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic required = false\n\n\t/** Whether the control is disabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t/** Whether the input is read-only. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic readonly = false\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number, reflect: true })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic override tabIndex = 0\n\n\t/**\n\t * A small hint text or error message to display under the input.\n\t */\n\t@property()\n\tpublic hint?: string\n\n\t/**\n\t * If true, we style the input as an error state, and possibly display\n\t * the hint as an error message.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic error = false\n\n\t/**\n\t * The size of the input.\n\t * - 'sm': Small, compact size\n\t * - 'md': Medium size (default)\n\t * - 'lg': Large size\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic size: InputSize = 'md'\n\n\t/**\n\t * Controls when validation should show.\n\t * - 'always' - Always show validation\n\t * - 'touched' - Only show after field has been focused and then blurred\n\t * - 'dirty' - Only show after value has changed\n\t * - 'submitted' - Only show after form submission\n\t */\n\t@property({ type: String })\n\tpublic validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t/**\n\t * For datalist support\n\t */\n\t@property({ type: String })\n\tpublic list?: string\n\n\t/**\n\t * The validation message to display (mimics native input.validationMessage)\n\t */\n\t@property({ type: String })\n\tpublic validationMessage = ''\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Internal States\n\t// ----------------------------\n\n\t/**\n\t * For integration with browser's autofill support\n\t */\n\t@state()\n\tprivate isAutofilled = false\n\n\t/**\n\t * Track user interaction state for validation\n\t */\n\t@state()\n\tprivate touched = false\n\n\t@state()\n\tprivate dirty = false\n\n\t@state()\n\tprivate submitted = false\n\n\t/**\n\t * Store the default value for reset behavior\n\t */\n\t@state()\n\tprivate defaultValue = ''\n\n\t// ----------------------------\n\t// D) Form-associated logic\n\t// ----------------------------\n\tstatic formAssociated = true\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate internals?: ElementInternals\n\tprivate formResetObserver?: MutationObserver\n\n\tconstructor() {\n\t\tsuper()\n\t\tif ('attachInternals' in this) {\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\t// no-op for older browsers / polyfills\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `sch-input-${SchmancyInputV2._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\t/** The form this element is associated with, if any. */\n\tget form() {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\n\t\t// Handle value changes\n\t\tif (changedProps.has('value')) {\n\t\t\t// If value changes from original default, mark as dirty\n\t\t\tif (this.value !== this.defaultValue) {\n\t\t\t\tthis.dirty = true\n\t\t\t}\n\n\t\t\t// Reflect the current value to the form internals, so it's submitted.\n\t\t\tthis.internals?.setFormValue(this.value)\n\n\t\t\t// Update validation state when value changes\n\t\t\tthis.validateInput()\n\t\t}\n\n\t\t// Handle error state changes\n\t\tif (changedProps.has('error')) {\n\t\t\tthis.updateValidityState()\n\t\t}\n\n\t\t// Store default value if this is the first update\n\t\tif (!this.hasUpdated && changedProps.has('value')) {\n\t\t\tthis.defaultValue = this.value\n\t\t}\n\t}\n\n\t/**\n\t * Connect to the closest form element and set up form integration\n\t */\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Store initial default value for form reset\n\t\tthis.defaultValue = this.value\n\n\t\t// Set up form integration\n\t\tthis.setupFormIntegration()\n\n\t\t// Setup for external label association\n\t\tthis.setupExternalLabelAssociation()\n\t}\n\n\t/**\n\t * Set up form integration with ElementInternals\n\t */\n\tprivate setupFormIntegration() {\n\t\tif (this.internals?.form) {\n\t\t\t// Listen for form reset events\n\t\t\tthis.formResetObserver = new MutationObserver(mutations => {\n\t\t\t\tfor (const mutation of mutations) {\n\t\t\t\t\tif (mutation.type === 'attributes' && mutation.attributeName === 'reset') {\n\t\t\t\t\t\tthis.resetToDefault()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t// Observe the form for reset events\n\t\t\tthis.formResetObserver.observe(this.internals.form, {\n\t\t\t\tattributes: true,\n\t\t\t\tchildList: false,\n\t\t\t\tsubtree: false,\n\t\t\t})\n\n\t\t\t// Also directly listen for the reset event\n\t\t\tthis.internals.form.addEventListener('reset', () => {\n\t\t\t\tthis.resetToDefault()\n\t\t\t})\n\n\t\t\t// Listen for form submit events to mark field as submitted\n\t\t\tthis.internals.form.addEventListener('submit', () => {\n\t\t\t\tthis.submitted = true\n\t\t\t\t// Validate on form submission\n\t\t\t\tthis.validateInput(true)\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Set up external label association for native HTML label support\n\t */\n\tprivate setupExternalLabelAssociation() {\n\t\tif (this.id) {\n\t\t\tconst setupLabelClickListener = () => {\n\t\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\t\tlabels.forEach(label => {\n\t\t\t\t\tlabel.addEventListener('click', () => {\n\t\t\t\t\t\tthis.focus()\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// Initialize after DOM is ready\n\t\t\tif (document.readyState === 'complete') {\n\t\t\t\tsetupLabelClickListener()\n\t\t\t} else {\n\t\t\t\tdocument.addEventListener('DOMContentLoaded', setupLabelClickListener)\n\t\t\t}\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\n\t\t// Clean up the form observer\n\t\tif (this.formResetObserver) {\n\t\t\tthis.formResetObserver.disconnect()\n\t\t}\n\n\t\t// Clean up external label click listeners\n\t\tif (this.id) {\n\t\t\tconst labels = document.querySelectorAll(`label[for=\"${this.id}\"]`)\n\t\t\tlabels.forEach(label => {\n\t\t\t\tlabel.removeEventListener('click', () => {\n\t\t\t\t\tthis.focus()\n\t\t\t\t})\n\t\t\t})\n\t\t}\n\t}\n\n\t/**\n\t * Reset the input to its default state\n\t */\n\tprivate resetToDefault() {\n\t\tthis.value = this.defaultValue\n\t\tthis.touched = false\n\t\tthis.dirty = false\n\t\tthis.submitted = false\n\t\tthis.error = false\n\t\tthis.validationMessage = ''\n\t\tthis.dispatchEvent(new CustomEvent('reset', { bubbles: true }))\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this.touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this.dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this.submitted\n\t\t\tdefault:\n\t\t\t\treturn this.touched\n\t\t}\n\t}\n\n\t/**\n\t * Update validity state based on current error state\n\t */\n\tprivate updateValidityState() {\n\t\tif (this.error) {\n\t\t\t// Only set custom validity if validationMessage is provided\n\t\t\tif (this.validationMessage) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, this.validationMessage, this.inputElement)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, 'Invalid input', this.inputElement)\n\t\t\t}\n\t\t} else {\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\t}\n\n\t/**\n\t * Validate input based on required, pattern, etc.\n\t * This mimics native validation behavior\n\t */\n\tprivate validateInput(forceValidation = false) {\n\t\t// Skip validation for disabled inputs\n\t\tif (this.disabled) return\n\n\t\t// Only show validation errors if we should based on the validation strategy\n\t\tconst shouldValidate = this.shouldShowValidation(forceValidation)\n\n\t\t// Get validity state from internal input if available\n\t\tconst validity: ValidityState = this.inputElement?.validity ?? {\n\t\t\tbadInput: false,\n\t\t\tcustomError: false,\n\t\t\tpatternMismatch: false,\n\t\t\trangeOverflow: false,\n\t\t\trangeUnderflow: false,\n\t\t\tstepMismatch: false,\n\t\t\ttooLong: false,\n\t\t\ttooShort: false,\n\t\t\ttypeMismatch: false,\n\t\t\tvalid: true,\n\t\t\tvalueMissing: false,\n\t\t}\n\n\t\t// Check if the input has an actual validation error (not a custom error)\n\t\tconst hasError = !validity.valid && !validity.customError\n\n\t\tif (shouldValidate && hasError) {\n\t\t\t// There's an error and we should show it\n\t\t\tthis.error = true\n\t\t\tthis.validationMessage = this.inputElement?.validationMessage || ''\n\t\t} else if (validity.valid) {\n\t\t\t// Input is valid, so clear the error state\n\t\t\tthis.error = false\n\n\t\t\t// Only clear validation message if there's no custom error\n\t\t\tif (!validity.customError) {\n\t\t\t\tthis.validationMessage = ''\n\t\t\t}\n\t\t} else if (!shouldValidate) {\n\t\t\t// We shouldn't show validation yet, so clear visual error state\n\t\t\tthis.error = false\n\t\t}\n\n\t\t// Always update internals with current validity state\n\t\tthis.updateValidityState()\n\t}\n\n\t/**\n\t * Check validity without showing validation UI\n\t */\n\tpublic checkValidity() {\n\t\t// Check internal input first\n\t\tconst inputValid = this.inputRef.value?.checkValidity() ?? true\n\n\t\t// Also synchronize with internals API for better form integration\n\t\tif (this.internals && !inputValid) {\n\t\t\tthis.internals.checkValidity()\n\t\t\treturn false\n\t\t}\n\n\t\treturn inputValid\n\t}\n\n\t/**\n\t * Show validation UI and check validity\n\t */\n\tpublic reportValidity() {\n\t\t// Mark as touched and submitted to show validation\n\t\tthis.touched = true\n\t\tthis.submitted = true\n\n\t\t// First check using native input\n\t\tconst inputValid = this.inputRef.value?.reportValidity() ?? true\n\n\t\t// Update our component's validation state with force=true\n\t\tthis.validateInput(true)\n\n\t\t// Also report to internals API for better form integration\n\t\tif (this.internals && !inputValid) {\n\t\t\tthis.internals.reportValidity()\n\t\t\treturn false\n\t\t}\n\n\t\treturn inputValid\n\t}\n\n\t/**\n\t * Set a custom validation error message\n\t */\n\tpublic setCustomValidity(message: string) {\n\t\t// Set on the native input\n\t\tif (this.inputRef.value) {\n\t\t\tthis.inputRef.value.setCustomValidity(message)\n\t\t}\n\n\t\t// Also update our component state\n\t\tthis.validationMessage = message\n\t\tthis.error = message !== '' && this.shouldShowValidation()\n\n\t\t// And update internals\n\t\tif (this.internals) {\n\t\t\tif (message) {\n\t\t\t\tthis.internals.setValidity({ customError: true }, message, this.inputElement)\n\t\t\t} else {\n\t\t\t\tthis.internals.setValidity({})\n\t\t\t}\n\t\t}\n\t}\n\n\t// ----------------------------\n\t// E) Lifecycle Hooks & Event Handlers\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\t// Use setTimeout to match browser behavior - autofocus happens after initial rendering\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.focus()\n\t\t\t}, 0)\n\t\t}\n\n\t\t// Subscribe to input events\n\t\tthis.setupInputEvents()\n\t\tthis.setupFocusBlurEvents()\n\t\tthis.setupAutofillDetection()\n\t\tthis.setupEnterKeyEvents()\n\t}\n\n\t/**\n\t * Set up input event handling for value changes\n\t */\n\tprivate setupInputEvents() {\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => {\n\t\t\t\t\t// Capture all input event properties for complete event forwarding\n\t\t\t\t\tconst inputEvent = ev as InputEvent\n\t\t\t\t\tconst target = ev.target as HTMLInputElement\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: target.value,\n\t\t\t\t\t\tinputType: inputEvent.inputType,\n\t\t\t\t\t\tdata: inputEvent.data,\n\t\t\t\t\t\tisComposing: inputEvent.isComposing,\n\t\t\t\t\t\toriginalEvent: ev,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(eventData => {\n\t\t\t\t// Update component value\n\t\t\t\tthis.value = eventData.value\n\n\t\t\t\t// Mark as dirty when user types\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire custom 'input' event with extended details\n\t\t\t\tconst customEvent = new CustomEvent<EventDetails>('input', {\n\t\t\t\t\tdetail: { value: eventData.value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add additional properties to match native events more closely\n\t\t\t\tObject.defineProperties(customEvent, {\n\t\t\t\t\tinputType: { value: eventData.inputType },\n\t\t\t\t\tdata: { value: eventData.data },\n\t\t\t\t\tisComposing: { value: eventData.isComposing },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(customEvent)\n\n\t\t\t\t// REMOVED: Duplicate change event dispatch that was here\n\t\t\t\t// Run validation like native inputs do on input, but respect the validation strategy\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\n\t\t// Subscribe to native change events (usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Fire regular change event with bubbling\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t\t\t// Run validation on change like native inputs\n\t\t\t\tthis.validateInput()\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up focus/blur event handling\n\t */\n\tprivate setupFocusBlurEvents() {\n\t\tfromEvent<FocusEvent>(this.inputElement, 'focus')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Create a custom focus event that includes standard props\n\t\t\t\tconst focusEvent = new CustomEvent('focus', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add focus-specific properties\n\t\t\t\tObject.defineProperties(focusEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(focusEvent)\n\t\t\t})\n\n\t\tfromEvent<FocusEvent>(this.inputElement, 'blur')\n\t\t\t.pipe(takeUntil(this.disconnecting))\n\t\t\t.subscribe(ev => {\n\t\t\t\t// Mark as touched when field loses focus\n\t\t\t\tthis.touched = true\n\n\t\t\t\t// Run validation on blur like native inputs, respecting validation strategy\n\t\t\t\tif (!this.disabled) {\n\t\t\t\t\tthis.validateInput()\n\t\t\t\t}\n\n\t\t\t\t// Create a custom blur event that includes standard props\n\t\t\t\tconst blurEvent = new CustomEvent('blur', {\n\t\t\t\t\tbubbles: ev.bubbles,\n\t\t\t\t\tcancelable: ev.cancelable,\n\t\t\t\t\tcomposed: ev.composed,\n\t\t\t\t})\n\n\t\t\t\t// Add blur-specific properties\n\t\t\t\tObject.defineProperties(blurEvent, {\n\t\t\t\t\trelatedTarget: { value: ev.relatedTarget },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(blurEvent)\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up autofill detection\n\t */\n\tprivate setupAutofillDetection() {\n\t\t// Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.isAutofilled = true\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Dispatch autofill event for integration with autofill systems\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent('autofill', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t\t\t// Also propagate as a change event like browsers do\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t// Detect end of autofill (Chrome)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillCancel'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis.isAutofilled = false\n\t\t\t})\n\t}\n\n\t/**\n\t * Set up enter key event handling\n\t */\n\tprivate setupEnterKeyEvents() {\n\t\t// Emit a custom 'enter' event when user presses Enter\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keyup')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dirty = this.value !== this.defaultValue\n\n\t\t\t\t// Dispatch enhanced enter event\n\t\t\t\tconst enterEvent = new CustomEvent<EventDetails>('enter', {\n\t\t\t\t\tdetail: { value },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\n\t\t\t\t// Add extra keyboard event props\n\t\t\t\tObject.defineProperties(enterEvent, {\n\t\t\t\t\tkey: { value: 'Enter' },\n\t\t\t\t\tcode: { value: 'Enter' },\n\t\t\t\t\tkeyCode: { value: 13 },\n\t\t\t\t\twhich: { value: 13 },\n\t\t\t\t})\n\n\t\t\t\tthis.dispatchEvent(enterEvent)\n\t\t\t})\n\t}\n\n\t// ----------------------------\n\t// F) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Sets the selection range. Mirrors native input.setSelectionRange\n\t */\n\tpublic setSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none') {\n\t\tthis.inputRef.value?.setSelectionRange(start, end, direction)\n\t}\n\n\t/**\n\t * Returns the selected text within the input (start position)\n\t */\n\tpublic get selectionStart(): number | null {\n\t\treturn this.inputRef.value?.selectionStart ?? null\n\t}\n\n\t/**\n\t * Returns the selected text within the input (end position)\n\t */\n\tpublic get selectionEnd(): number | null {\n\t\treturn this.inputRef.value?.selectionEnd ?? null\n\t}\n\n\t/**\n\t * Returns the direction of selection\n\t */\n\tpublic get selectionDirection(): 'forward' | 'backward' | 'none' | null {\n\t\treturn this.inputRef.value?.selectionDirection ?? null\n\t}\n\n\t/**\n\t * Sets the range of text to be selected.\n\t */\n\tpublic setRangeText(\n\t\treplacement: string,\n\t\tstart?: number,\n\t\tend?: number,\n\t\tselectMode?: 'select' | 'start' | 'end' | 'preserve',\n\t) {\n\t\tif (start !== undefined && end !== undefined) {\n\t\t\tthis.inputRef.value?.setRangeText(replacement, start, end, selectMode)\n\t\t} else {\n\t\t\tthis.inputRef.value?.setRangeText(replacement)\n\t\t}\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// G) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\t// Determine height and padding based on size\n\t\tconst getHeightAndPadding = () => {\n\t\t\tswitch (this.size) {\n\t\t\t\tcase 'sm':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '40px',\n\t\t\t\t\t\tpadding: '0 8px',\n\t\t\t\t\t\tfontSize: '0.875rem', // 14px\n\t\t\t\t\t}\n\t\t\t\tcase 'lg':\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '60px',\n\t\t\t\t\t\tpadding: '0 20px',\n\t\t\t\t\t\tfontSize: '1.125rem', // 18px\n\t\t\t\t\t}\n\t\t\t\tcase 'md':\n\t\t\t\tdefault:\n\t\t\t\t\treturn {\n\t\t\t\t\t\theight: '50px',\n\t\t\t\t\t\tpadding: '0 16px',\n\t\t\t\t\t\tfontSize: '1rem', // 16px\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst { height, padding, fontSize } = getHeightAndPadding()\n\n\t\tconst inputClasses = {\n\t\t\t'w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on': true,\n\t\t\t'outline-secondary-default focus:outline-1 ': true,\n\t\t\t'outline-secondary-default focus:outline-1': true,\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t'placeholder:text-muted': true,\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// If not in error state, use standard ring color:\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t// Error ring override:\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// If read-only but \"clickable\" is true, show pointer. Otherwise normal text cursor.\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer text-select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Alignment classes:\n\t\t\t'text-center': this.align === 'center',\n\t\t\t'text-right': this.align === 'right',\n\t\t\t// Autofill class\n\t\t\tautofilled: this.isAutofilled,\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'block mb-[4px]': true,\n\t\t\t'text-sm': this.size === 'sm',\n\t\t\t'text-base': this.size === 'md',\n\t\t\t'text-lg': this.size === 'lg',\n\t\t}\n\n\t\tconst styles = {\n\t\t\theight,\n\t\t\tpadding,\n\t\t\tfontSize,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t${when(\n\t\t\t\tthis.label,\n\t\t\t\t() => html`\n\t\t\t\t\t<label\n\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\tid=\"label-${this.id}\"\n\t\t\t\t\t\tclass=${this.classMap(labelClasses)}\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography type=\"label\" token=${this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md'}>\n\t\t\t\t\t\t\t${this.label}\n\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t</label>\n\t\t\t\t`,\n\t\t\t)}\n\n\t\t\t<input\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.highest,\n\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t})}\n\t\t\t\t${ref(this.inputRef)}\n\t\t\t\tid=${this.id}\n\t\t\t\tname=${this.name}\n\t\t\t\tclass=${this.classMap(inputClasses)}\n\t\t\t\tstyle=${this.styleMap(styles)}\n\t\t\t\t.value=${this.value}\n\t\t\t\t.type=${this.type}\n\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\tlist=${ifDefined(this.list)}\n\t\t\t\t?required=${this.required}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t?readonly=${this.readonly}\n\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\taria-describedby=${this.hint ? `hint-${this.id}` : nothing}\n\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t\taria-autocomplete=${this.list ? 'list' : 'none'}\n\t\t\t/>\n\n\t\t\t${when(\n\t\t\t\tthis.hint,\n\t\t\t\t() => html`\n\t\t\t\t\t<div\n\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\tclass=\"${this.size === 'sm'\n\t\t\t\t\t\t\t? 'pt-[1px] text-xs'\n\t\t\t\t\t\t\t: this.size === 'lg'\n\t\t\t\t\t\t\t\t? 'pt-[3px] text-base'\n\t\t\t\t\t\t\t\t: 'pt-[2px] text-sm'}\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography\n\t\t\t\t\t\t\talign=\"left\"\n\t\t\t\t\t\t\ttype=\"label\"\n\t\t\t\t\t\t\ttoken=${this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t${this.hint}\n\t\t\t\t\t\t</schmancy-typography>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n\t\t\t)}\n\t\t`\n\t}\n}\n","import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { distinctUntilChanged, filter, fromEvent, map, takeUntil } from 'rxjs'\n\nimport { TailwindElement } from '@mixins/index'\n\n// color directive + theme interface\nimport { color } from '@schmancy/directives'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport style from './input.scss?inline'\n// If you want to be form-associated, define the type on `ElementInternals`.\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-input': SchmancyInput\n\t}\n}\n\ntype EventDetails = {\n\tvalue: string\n}\n\n/**\n * Custom events the component may emit:\n * - 'input': on every keystroke\n * - 'change': on native blur/change\n * - 'enter': specifically when user presses Enter\n */\nexport type SchmancyInputInputEvent = CustomEvent<EventDetails>\nexport type SchmancyInputChangeEvent = CustomEvent<EventDetails>\nexport type SchmancyInputEnterEvent = CustomEvent<EventDetails>\n\n@customElement('schmancy-input')\nexport default class SchmancyInput extends TailwindElement(style) {\n\t// ----------------------------\n\t// A) Public properties\n\t// ----------------------------\n\n\t/** If user does NOT set `id`, we'll autogenerate one. */\n\tstatic _idCounter = 0\n\n\t@property({ reflect: true })\n\tpublic override id = ''\n\n\t/**\n\t * The label for the control. If populated, we render a `<label for=\"...\">`.\n\t * If empty, we add an `aria-label` to the <input> for better screenreader support.\n\t */\n\t@property({ type: String }) label = ''\n\n\t/**\n\t * The type of input. (e.g. 'text', 'password', 'email', etc.)\n\t */\n\t@property({ reflect: true })\n\tpublic type: HTMLInputElement['type'] = 'text'\n\n\t/**\n\t * Name attribute (for form submissions). By default, a unique fallback.\n\t */\n\t@property()\n\tpublic name = `name_${Date.now()}`\n\n\t@property()\n\tpublic placeholder = ''\n\n\t/** Current value of the input. */\n\t@property({ type: String, reflect: true })\n\tpublic value = ''\n\n\t/** Pattern validation attribute. */\n\t@property({ type: String, reflect: true })\n\tpublic pattern?: string\n\n\t/** Whether the control is required for form validation. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic required = false\n\n\t/** Whether the control is disabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic disabled = false\n\n\t/** Whether the input is read-only. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic readonly = false\n\n\t/** If true, we visually show a pointer cursor even if readOnly. */\n\t@property({ type: Boolean, reflect: true }) public clickable = false\n\n\t/** Whether browser spellcheck is enabled. */\n\t@property({ type: Boolean, reflect: true })\n\tpublic spellcheck = false\n\n\t/**\n\t * Text alignment within the input.\n\t * - 'left' | 'center' | 'right'\n\t */\n\t@property({ type: String, reflect: true })\n\tpublic align: 'left' | 'center' | 'right' = 'left'\n\n\t/** inputmode attribute (affects on-screen keyboards in mobile). */\n\t@property()\n\tpublic inputmode?: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'\n\n\t@property({ type: Number })\n\tpublic minlength?: number\n\n\t@property({ type: Number })\n\tpublic maxlength?: number\n\n\t@property()\n\tpublic min?: string\n\n\t@property()\n\tpublic max?: string\n\n\t@property({ type: Number, reflect: true })\n\tpublic step?: number\n\n\t/** If true, auto-focus this input on first render. */\n\t@property({ type: Boolean })\n\tpublic autofocus = false\n\n\t/** Autocomplete/autofill hints. */\n\t@property({ type: String, reflect: true })\n\tpublic autocomplete: AutoFill = 'on'\n\n\t/**\n\t * tabIndex for focusing by tab key. Typically 0 or -1.\n\t */\n\t@property({ type: Number, reflect: true })\n\tpublic tabIndex = 0\n\n\t/**\n\t * A small hint text or error message to display under the input.\n\t */\n\t@property()\n\tpublic hint?: string\n\n\t/**\n\t * If true, we style the input as an error state, and possibly display\n\t * the hint as an error message.\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic error = false\n\n\t// ----------------------------\n\t// B) Queries & Refs\n\t// ----------------------------\n\t@query('input') private inputElement!: HTMLInputElement\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t// ----------------------------\n\t// C) Form-associated logic\n\t// ----------------------------\n\tstatic formAssociated = true\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true, // so focus() goes to <input>\n\t}\n\n\tprivate internals?: ElementInternals\n\n\tconstructor() {\n\t\tsuper()\n\t\tif ('attachInternals' in this) {\n\t\t\ttry {\n\t\t\t\tthis.internals = this.attachInternals()\n\t\t\t} catch {\n\t\t\t\t// no-op for older browsers / polyfills\n\t\t\t\tthis.internals = undefined\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * If user did not provide an ID, auto-generate one so <label for=\"...\">\n\t * and various aria-* attributes can reference it.\n\t */\n\tprotected override willUpdate(changedProps: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-input-${SchmancyInput._idCounter++}`\n\t\t}\n\t\tsuper.willUpdate(changedProps)\n\t}\n\n\t/** The form this element is associated with, if any. */\n\tget form() {\n\t\treturn this.internals?.form ?? null\n\t}\n\n\tprotected override updated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\t\tif (changedProps.has('value')) {\n\t\t\t// Reflect the current value to the form internals, so it’s submitted.\n\t\t\tthis.internals?.setFormValue(this.value)\n\t\t}\n\n\t\tif (changedProps.has('error')) {\n\t\t\t// If we have an error state, we can set custom error validity, or none if resolved.\n\t\t\tif (this.error) {\n\t\t\t\tthis.internals?.setValidity({ customError: true }, 'Invalid input', this.inputElement)\n\t\t\t} else {\n\t\t\t\tthis.internals?.setValidity({})\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Native form methods:\n\t * - checkValidity()\n\t * - reportValidity()\n\t * - setCustomValidity()\n\t */\n\tpublic checkValidity() {\n\t\treturn this.inputRef.value?.checkValidity() ?? true\n\t}\n\tpublic reportValidity() {\n\t\treturn this.inputRef.value?.reportValidity() ?? true\n\t}\n\tpublic setCustomValidity(message: string) {\n\t\tthis.inputRef.value?.setCustomValidity(message)\n\t}\n\n\t// ----------------------------\n\t// D) Lifecycle Hooks\n\t// ----------------------------\n\tfirstUpdated() {\n\t\t// Autofocus if desired\n\t\tif (this.autofocus) {\n\t\t\tthis.focus()\n\t\t}\n\n\t\t// 1) Subscribe to 'input' events (every keystroke)\n\t\tfromEvent<InputEvent>(this.inputElement, 'input')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\t// Fire custom 'input' event with details\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('input', {\n\t\t\t\t\t\tdetail: { value },\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\t// dispatch change event\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t// 2) Subscribe to 'change' events (native behavior, usually on blur)\n\t\tfromEvent<Event>(this.inputElement, 'change')\n\t\t\t.pipe(\n\t\t\t\tmap(ev => (ev.target as HTMLInputElement).value),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(value => {\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t// 3) Emit a custom 'enter' event when user presses Enter\n\t\tfromEvent<KeyboardEvent>(this.inputElement, 'keyup')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.key === 'Enter'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('enter', {\n\t\t\t\t\t\tdetail: { value },\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\n\t\t// 4) Detect autofill animation (Chrome, etc.)\n\t\tfromEvent<AnimationEvent>(this.inputElement, 'animationstart')\n\t\t\t.pipe(\n\t\t\t\tfilter(ev => ev.animationName === 'onAutoFillStart'),\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(ev => {\n\t\t\t\tconst { value } = ev.target as HTMLInputElement\n\t\t\t\tthis.value = value\n\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\tnew CustomEvent<EventDetails>('change', {\n\t\t\t\t\t\tdetail: { value },\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}\n\n\t// ----------------------------\n\t// E) Utility Methods\n\t// ----------------------------\n\t/** Selects all text within the input. */\n\tpublic select() {\n\t\treturn this.inputRef.value?.select()\n\t}\n\n\t/** Returns the native validity state of the inner <input>. */\n\tpublic getValidity(): ValidityState | undefined {\n\t\treturn this.inputRef.value?.validity\n\t}\n\n\t/**\n\t * Override to forward focus to the internal <input>.\n\t * Also dispatch a 'focus' event for external listeners.\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t\tthis.dispatchEvent(new Event('focus'))\n\t}\n\n\t/**\n\t * Override to forward clicks to the internal <input>.\n\t * Also dispatch a 'click' event for external listeners.\n\t */\n\tpublic override click() {\n\t\tthis.inputRef.value?.click()\n\t\tthis.dispatchEvent(new Event('click'))\n\t}\n\n\t/** Forward blur to the internal <input>. */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t\tthis.dispatchEvent(new Event('blur'))\n\t}\n\n\t// ----------------------------\n\t// F) Rendering\n\t// ----------------------------\n\tprotected override render() {\n\t\tconst inputClasses = {\n\t\t\t'w-full flex-1 h-[50px] rounded-[8px] border-0 px-[8px] sm:px-[12px] md:px-[16px]': true,\n\t\t\t'outline-secondary-default focus:outline-1 ': true,\n\t\t\t'disabled:opacity-40 disabled:cursor-not-allowed': true,\n\t\t\t'placeholder:text-muted': true,\n\t\t\t'ring-0 ring-inset focus:ring-1 focus:ring-inset': true,\n\t\t\t// If not in error state, use standard ring color:\n\t\t\t'ring-secondary-default ring-outline focus:ring-secondary-default': !this.error,\n\t\t\t// Error ring override:\n\t\t\t'ring-error-default focus:ring-error-default': this.error,\n\t\t\t// If read-only but \"clickable\" is true, show pointer. Otherwise normal text cursor.\n\t\t\t'caret-transparent focus:outline-hidden cursor-pointer text-select-none': this.readonly,\n\t\t\t'cursor-pointer': this.clickable,\n\t\t\t// Alignment classes:\n\t\t\t'text-center': this.align === 'center',\n\t\t\t'text-right': this.align === 'right',\n\t\t}\n\n\t\tconst labelClasses = {\n\t\t\t'opacity-40': this.disabled,\n\t\t\t'block mb-[4px]': true,\n\t\t}\n\n\t\t/**\n\t\t * - If `this.label` is present, we render a proper `<label for=\"${this.id}\">`.\n\t\t * - If not, we add an aria-label to the <input> for better accessibility.\n\t\t * - If there's a `hint`, we reference it via aria-describedby.\n\t\t * - If there's an error, we set aria-invalid and could set aria-errormessage.\n\t\t */\n\t\treturn html`\n\t\t\t${when(\n\t\t\t\tthis.label,\n\t\t\t\t() => html`\n\t\t\t\t\t<label\n\t\t\t\t\t\tfor=${this.id}\n\t\t\t\t\t\tid=\"label-${this.id}\"\n\t\t\t\t\t\tclass=${this.classMap(labelClasses)}\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography type=\"label\" token=\"lg\">${this.label}</schmancy-typography>\n\t\t\t\t\t</label>\n\t\t\t\t`,\n\t\t\t)}\n\n\t\t\t<input\n\t\t\t\t${color({\n\t\t\t\t\tbgColor: SchmancyTheme.sys.color.surface.highest,\n\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.on,\n\t\t\t\t})}\n\t\t\t\t${ref(this.inputRef)}\n\t\t\t\tid=${this.id}\n\t\t\t\tname=${this.name}\n\t\t\t\tclass=${this.classMap(inputClasses)}\n\t\t\t\t.value=${this.value}\n\t\t\t\t.type=${this.type}\n\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t.spellcheck=${this.spellcheck}\n\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\tinputmode=${ifDefined(this.inputmode)}\n\t\t\t\tpattern=${ifDefined(this.pattern)}\n\t\t\t\tstep=${ifDefined(this.step)}\n\t\t\t\tminlength=${ifDefined(this.minlength)}\n\t\t\t\tmaxlength=${ifDefined(this.maxlength)}\n\t\t\t\tmin=${ifDefined(this.min)}\n\t\t\t\tmax=${ifDefined(this.max)}\n\t\t\t\t?required=${this.required}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t?readonly=${this.readonly}\n\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\taria-required=${this.required ? 'true' : 'false'}\n\t\t\t\taria-labelledby=${this.label ? `label-${this.id}` : nothing}\n\t\t\t\taria-describedby=${this.hint ? `hint-${this.id}` : nothing}\n\t\t\t\taria-label=${ifDefined(!this.label ? this.placeholder || 'Input' : undefined)}\n\t\t\t/>\n\n\t\t\t${when(\n\t\t\t\tthis.hint,\n\t\t\t\t() => html`\n\t\t\t\t\t<div\n\t\t\t\t\t\tid=\"hint-${this.id}\"\n\t\t\t\t\t\tclass=\"pt-[2px]\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: this.error ? SchmancyTheme.sys.color.error.default : SchmancyTheme.sys.color.primary.default,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<schmancy-typography align=\"left\" type=\"label\"> ${this.hint} </schmancy-typography>\n\t\t\t\t\t</div>\n\t\t\t\t`,\n\t\t\t)}\n\t\t`\n\t}\n}\n"],"names":["SchmancyInputV2","TailwindElement","style","super","this","id","label","type","name","Date","now","placeholder","value","required","disabled","readonly","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","error","size","validateOn","validationMessage","inputRef","createRef","isAutofilled","touched","dirty","submitted","defaultValue","internals","attachInternals","changedProps","_idCounter","willUpdate","form","updated","has","setFormValue","validateInput","updateValidityState","hasUpdated","connectedCallback","setupFormIntegration","setupExternalLabelAssociation","formResetObserver","MutationObserver","mutations","mutation","attributeName","resetToDefault","observe","attributes","childList","subtree","addEventListener","setupLabelClickListener","document","querySelectorAll","forEach","focus","readyState","disconnectedCallback","disconnect","removeEventListener","dispatchEvent","CustomEvent","bubbles","forceValidation","setValidity","customError","inputElement","shouldValidate","shouldShowValidation","validity","valid","hasError","inputValid","checkValidity","reportValidity","message","setCustomValidity","setTimeout","setupInputEvents","setupFocusBlurEvents","setupAutofillDetection","setupEnterKeyEvents","fromEvent","pipe","map","ev","inputEvent","target","inputType","data","isComposing","originalEvent","takeUntil","disconnecting","subscribe","eventData","customEvent","detail","composed","Object","defineProperties","distinctUntilChanged","focusEvent","cancelable","relatedTarget","blurEvent","filter","animationName","key","enterEvent","code","keyCode","which","select","start","end","direction","setSelectionRange","selectionStart","selectionEnd","selectionDirection","replacement","selectMode","setRangeText","options","Event","click","blur","render","height","padding","fontSize","getHeightAndPadding","inputClasses","autofilled","labelClasses","styles","n","html","when","classMap","color","SchmancyTheme","sys","default","primary","bgColor","surface","highest","on","ref","styleMap","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","list","nothing","hint","formAssociated","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","reflect","prototype","String","Boolean","Number","query","state","customElement","SchmancyInput","firstUpdated","getValidity"],"mappings":"gmEAmDA,IAAqBA,EAArB,cAA6CC,kBAAgBC,CA6L5D,CAAA,CAAA,aAEC,CAAA,GADMC,QArLPC,KAAgBC,GAAK,GAMeD,KAAAE,MAAA,GAMpCF,KAAOG,KAAiC,OAMxCH,KAAOI,KAAO,QAAQC,KAAKC,IAAAA,CAAAA,GAG3BN,KAAOO,YAAc,GAIrBP,KAAOQ,MAAQ,GAQfR,KAAOS,SAAW,GAIlBT,KAAOU,SAAW,GAIlBV,KAAOW,SAAAA,GAGqCX,KAAOY,UAAAA,GAInDZ,KAAOa,cAOPb,KAAOc,MAAqC,OAuB5Cd,KAAOe,UAAY,GAInBf,KAAOgB,aAAyB,KAMhChB,KAAgBiB,SAAW,EAa3BjB,KAAOkB,S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,CAAAA,CAAAA,EAAAA,EAuEbP,UAAA,YAAA,CAAA,EAGAH,EAAA,CADNC,WAAS,CAAEzK,KAAM8K,UAzEEI,EA0EbP,UAAA,YAAA,CAAA,EAGAH,EAAA,CADNC,EAASA,SA5EUS,CAAAA,EAAAA,EA6EbP,UAAA,MAAA,CAAA,EAGAH,EAAA,CADNC,EAASA,SAAAA,CAAAA,EA/EUS,EAgFbP,UAAA,MAAA,CAGAH,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEzK,KAAM8K,OAAQJ,QAAAA,MAlFNQ,EAmFbP,UAAA,OAAA,CAAA,EAIAH,EAAA,CADNC,WAAS,CAAEzK,KAAM6K,OAAAA,CAAAA,CAAAA,EAtFEK,EAuFbP,UAAA,YAAA,CAIAH,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEzK,KAAM4K,OAAQF,QAAAA,EA1FNQ,CAAAA,CAAAA,EAAAA,EA2FbP,UAAA,eAAA,GAMAH,EAAA,CADNC,EAAAA,SAAS,CAAEzK,KAAM8K,OAAQJ,QAAS,EAAA,CAAA,CAAA,EAhGfQ,EAiGbP,UAAA,WAAA,CAMAH,EAAAA,EAAA,CADNC,EAASA,SAtGUS,CAAAA,EAAAA,EAuGbP,UAAA,OAAA,CAAA,EAOAH,EAAA,CADNC,EAAAA,SAAS,CAAEzK,KAAM6K,QAASH,UA7GPQ,CAAAA,CAAAA,EAAAA,EA8GbP,UAAA,QAAA,CAKiBH,EAAAA,EAAA,CAAvBO,EAAAA,MAAM,OAnHaG,CAAAA,EAAAA,EAmHIP,UAAA,eAAA,GAnHJO,EAArBV,EAAA,CADCS,EAAAA,cAAc,gBACMC,CAAAA,EAAAA,CAAAA"}
@@ -1,151 +0,0 @@
1
- import { html as u } from "lit";
2
- import { property as r, customElement as y } from "lit/decorators.js";
3
- import { Subject as b } from "rxjs";
4
- import "lit/directives/class-map.js";
5
- import "lit/directives/style-map.js";
6
- import { T as v } from "./tailwind.mixin-DpiTmETl.js";
7
- import { when as g } from "lit/directives/when.js";
8
- var f = Object.defineProperty, n = (t, e, a, o) => {
9
- for (var i, s = void 0, l = t.length - 1; l >= 0; l--) (i = t[l]) && (s = i(e, a, s) || s);
10
- return s && f(e, a, s), s;
11
- };
12
- function m(t) {
13
- const a = class a extends t {
14
- constructor(...i) {
15
- super(...i), 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())}`;
16
- try {
17
- this.internals = this.attachInternals();
18
- } catch {
19
- this.internals = void 0;
20
- }
21
- }
22
- get form() {
23
- return this.internals?.form ?? null;
24
- }
25
- willUpdate(i) {
26
- super.willUpdate(i), i.has("value") && this.internals?.setFormValue(this.value), (i.has("error") || i.has("validationMessage")) && (this.error && this.validationMessage ? this.internals?.setValidity({ customError: !0 }, this.validationMessage) : this.internals?.setValidity({}));
27
- }
28
- checkValidity() {
29
- return !!this.disabled || !this.required || this.value !== "" && this.value !== void 0 && this.value !== null || (this.error = !0, this.validationMessage = "This field is required", !1);
30
- }
31
- reportValidity() {
32
- const i = this.checkValidity();
33
- return i || this.internals?.reportValidity(), i;
34
- }
35
- setCustomValidity(i) {
36
- this.validationMessage = i, this.error = i !== "", i ? this.internals?.setValidity({ customError: !0 }, i) : this.internals?.setValidity({});
37
- }
38
- emitChange(i) {
39
- this.dispatchEvent(new CustomEvent("change", { detail: i, bubbles: !0, composed: !0 }));
40
- }
41
- };
42
- a.formAssociated = !0;
43
- let e = a;
44
- return n([r({ type: String })], e.prototype, "name"), n([r({ reflect: !0 })], e.prototype, "value"), n([r({ type: String })], e.prototype, "label"), n([r({ type: Boolean, reflect: !0 })], e.prototype, "required"), n([r({ type: Boolean, reflect: !0 })], e.prototype, "disabled"), n([r({ type: Boolean, reflect: !0 })], e.prototype, "readonly"), n([r({ type: Boolean, reflect: !0 })], e.prototype, "error"), n([r({ type: String })], e.prototype, "validationMessage"), n([r({ type: String })], e.prototype, "hint"), n([r({ reflect: !0 })], e.prototype, "id"), e;
45
- }
46
- var k = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, c = (t, e, a, o) => {
47
- for (var i, s = o > 1 ? void 0 : o ? $(e, a) : e, l = t.length - 1; l >= 0; l--) (i = t[l]) && (s = (o ? i(e, a, s) : i(s)) || s);
48
- return o && s && k(e, a, s), s;
49
- };
50
- let d = class extends m(v(":host{display:inherit;position:inherit}")) {
51
- constructor() {
52
- super(...arguments), this.label = "", this.name = "", this.value = "", this.options = [], this.required = !1, this.selection$ = new b();
53
- }
54
- connectedCallback() {
55
- super.connectedCallback(), this.selection$.subscribe((t) => {
56
- this.value = t, this.emitChange({ value: t }), this.updateChildRadioButtons();
57
- }), this.addEventListener("radio-button-click", (t) => {
58
- this.selection$.next(t.detail.value);
59
- });
60
- }
61
- disconnectedCallback() {
62
- super.disconnectedCallback(), this.selection$?.unsubscribe();
63
- }
64
- handleSelection(t) {
65
- this.selection$.next(t);
66
- }
67
- updateChildRadioButtons() {
68
- this.querySelectorAll("schmancy-radio-button").forEach((t) => {
69
- t.getAttribute("value") === this.value ? t.setAttribute("checked", "") : t.removeAttribute("checked");
70
- });
71
- }
72
- updated(t) {
73
- super.updated(t), t.has("value") && this.updateChildRadioButtons();
74
- }
75
- render() {
76
- const t = this.childElementCount > 0;
77
- return u`
78
- <div class="grid gap-4">
79
- ${g(this.label, () => u` <label class="text-base font-semibold text-gray-900">${this.label}</label> `)}
80
-
81
- ${t ? u`<slot></slot>` : this.options?.map((e) => u`
82
- <div class="flex items-center">
83
- <input
84
- .required=${this.required}
85
- id=${e.value}
86
- class="h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600"
87
- type="radio"
88
- name=${this.name}
89
- .value=${e.value}
90
- .checked=${e.value === this.value}
91
- @change=${() => this.handleSelection(e.value)}
92
- />
93
- <label for=${e.value} class="ml-3 block text-sm font-medium leading-6 text-gray-900">
94
- ${e.label || e.value}
95
- </label>
96
- </div>
97
- `)}
98
- </div>
99
- `;
100
- }
101
- };
102
- c([r({ type: String })], d.prototype, "label", 2), c([r({ type: String })], d.prototype, "name", 2), c([r({ type: String })], d.prototype, "value", 2), c([r({ type: Array })], d.prototype, "options", 2), c([r({ type: Boolean })], d.prototype, "required", 2), d = c([y("schmancy-radio-group")], d);
103
- var C = Object.defineProperty, x = Object.getOwnPropertyDescriptor, p = (t, e, a, o) => {
104
- for (var i, s = o > 1 ? void 0 : o ? x(e, a) : e, l = t.length - 1; l >= 0; l--) (i = t[l]) && (s = (o ? i(e, a, s) : i(s)) || s);
105
- return o && s && C(e, a, s), s;
106
- };
107
- let h = class extends m(v()) {
108
- constructor() {
109
- super(...arguments), this.value = "", this.checked = !1, this.disabled = !1, this.name = "";
110
- }
111
- connectedCallback() {
112
- super.connectedCallback(), this.addEventListener("click", this.handleClick);
113
- }
114
- disconnectedCallback() {
115
- super.disconnectedCallback(), this.removeEventListener("click", this.handleClick);
116
- }
117
- handleClick() {
118
- if (!this.disabled)
119
- if (this.closest("schmancy-radio-group")) {
120
- const t = new CustomEvent("radio-button-click", { detail: { value: this.value }, bubbles: !0, composed: !0 });
121
- this.dispatchEvent(t);
122
- } else this.checked = !0, this.emitChange({ value: this.value });
123
- }
124
- render() {
125
- return u`
126
- <label class="relative flex items-start cursor-pointer">
127
- <div class="flex items-center h-6">
128
- <input
129
- type="radio"
130
- class="h-4 w-4 text-primary focus:ring-primary-light border-gray-300"
131
- .value=${this.value}
132
- .checked=${this.checked}
133
- .disabled=${this.disabled}
134
- .name=${this.name}
135
- @change=${() => {
136
- }}
137
- />
138
- </div>
139
- <div class="ml-3">
140
- <slot name="label"></slot>
141
- </div>
142
- </label>
143
- `;
144
- }
145
- };
146
- p([r({ type: String })], h.prototype, "value", 2), p([r({ type: Boolean, reflect: !0 })], h.prototype, "checked", 2), p([r({ type: Boolean })], h.prototype, "disabled", 2), p([r({ type: String })], h.prototype, "name", 2), h = p([y("schmancy-radio-button")], h);
147
- export {
148
- d as R,
149
- h as a
150
- };
151
- //# sourceMappingURL=radio-button-CNrcOMLm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"radio-button-CNrcOMLm.js","sources":["../mixins/formField.mixin.ts","../src/radio-group/radio-group.ts","../src/radio-group/radio-button.ts"],"sourcesContent":["import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\nimport { ITailwindElementMixin, TailwindElement } from './tailwind.mixin'\n\n/**\n * Interface defining the properties and methods that the FormFieldMixin adds.\n */\nexport interface IFormFieldMixin extends Element {\n\t// Properties\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// Form association\n\tform: HTMLFormElement | null\n\n\t// Methods\n\tcheckValidity(): boolean\n\treportValidity(): boolean\n\tsetCustomValidity(message: string): void\n\n\t// Event emitter helper\n\temitChange(detail: any): void\n}\n\n/**\n * A mixin that adds form field capabilities to a LitElement class.\n * This provides common form field properties, validation, and form association.\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// Element internals for form association\n\t\tprivate internals: ElementInternals | undefined\n\n\t\t// Properties common to form fields\n\t\t/**\n\t\t * The name of the form field (used for form submission)\n\t\t */\n\t\t@property({ type: String })\n\t\tname: string = ''\n\n\t\t/**\n\t\t * The current value of the form field\n\t\t */\n\t\t@property({ reflect: true })\n\t\tvalue: string | string[] | boolean | number | undefined = ''\n\n\t\t/**\n\t\t * Label text for the form field\n\t\t */\n\t\t@property({ type: String })\n\t\tlabel: string = ''\n\n\t\t/**\n\t\t * Whether the field is required\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\trequired: boolean = false\n\n\t\t/**\n\t\t * Whether the field is disabled\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\tdisabled: boolean = false\n\n\t\t/**\n\t\t * Whether the field is read-only\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\treadonly: boolean = false\n\n\t\t/**\n\t\t * Whether the field is in an error state\n\t\t */\n\t\t@property({ type: Boolean, reflect: true })\n\t\terror: boolean = false\n\n\t\t/**\n\t\t * The validation message to display\n\t\t */\n\t\t@property({ type: String })\n\t\tvalidationMessage: string = ''\n\n\t\t/**\n\t\t * Optional hint text to display below the field\n\t\t */\n\t\t@property({ type: String })\n\t\thint?: string\n\n\t\t/**\n\t\t * Unique identifier for the field\n\t\t */\n\t\t@property({ reflect: true })\n\t\toverride id: string = `schmancy-field-${Date.now()}-${Math.floor(Math.random() * 1000)}`\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\t/**\n\t\t * Gets the form this element is associated with\n\t\t */\n\t\tget form(): HTMLFormElement | null {\n\t\t\treturn this.internals?.form ?? null\n\t\t}\n\n\t\t/**\n\t\t * Lifecycle method called when properties change\n\t\t */\n\t\tprotected willUpdate(changedProps: PropertyValueMap<any>): void {\n\t\t\tsuper.willUpdate(changedProps)\n\n\t\t\t// Update form value when value changes\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}\n\n\t\t\t// Update validation state when error or validation message changes\n\t\t\tif (changedProps.has('error') || changedProps.has('validationMessage')) {\n\t\t\t\tif (this.error && this.validationMessage) {\n\t\t\t\t\tthis.internals?.setValidity({ customError: true }, this.validationMessage)\n\t\t\t\t} else {\n\t\t\t\t\tthis.internals?.setValidity({})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Checks if the field is valid without showing validation UI\n\t\t */\n\t\tcheckValidity(): boolean {\n\t\t\tif (this.disabled) return true\n\n\t\t\tif (this.required && (this.value === '' || this.value === undefined || this.value === null)) {\n\t\t\t\tthis.error = true\n\t\t\t\tthis.validationMessage = 'This field is required'\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\treturn true\n\t\t}\n\n\t\t/**\n\t\t * Reports validity and shows validation UI if invalid\n\t\t */\n\t\treportValidity(): boolean {\n\t\t\tconst isValid = this.checkValidity()\n\t\t\tif (!isValid) {\n\t\t\t\tthis.internals?.reportValidity()\n\t\t\t}\n\t\t\treturn isValid\n\t\t}\n\n\t\t/**\n\t\t * Sets a custom validation message\n\t\t */\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\t/**\n\t\t * Helper method to emit change events\n\t\t */\n\t\temitChange(detail: any): void {\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail,\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\t}\n\n\treturn FormFieldMixinClass as Constructor<IFormFieldMixin> & T\n}\n\n/**\n * A convenience function that composes FormFieldMixin with TailwindElement\n * to create a base class for Schmancy form components.\n *\n * @example\n * ```ts\n * class MyInput extends SchmancyFormField(css`...`) {\n * // Your component code here\n * }\n * ```\n */\nexport function SchmancyFormField<T extends CSSResult>(componentStyle?: T) {\n\treturn FormFieldMixin(TailwindElement(componentStyle)) as Constructor<IFormFieldMixin> &\n\t\tConstructor<ITailwindElementMixin> &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin>\n}\n","import { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { Subject } from 'rxjs'\nimport style from './radio-group.scss?inline'\nimport { TailwindElement } from '@mixins/index'\nimport { when } from 'lit/directives/when.js'\nimport { FormFieldMixin } from '../../mixins/formField.mixin'\n\nexport type SchmancyRadioGroupOption = {\n\tlabel: string\n\tvalue: string\n}\nexport type SchmancyRadioGroupChangeEvent = CustomEvent<{\n\tvalue: string\n}>\n@customElement('schmancy-radio-group')\nexport class RadioGroup extends FormFieldMixin(TailwindElement(style)) {\n\t@property({ type: String }) override label = ''\n\t@property({ type: String }) override name = ''\n\t@property({ type: String }) override value = ''\n\t@property({ type: Array }) options: SchmancyRadioGroupOption[] = []\n\t@property({ type: Boolean }) override required: boolean = false\n\tprivate selection$ = new Subject<string>()\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.selection$.subscribe(value => {\n\t\t\tthis.value = value\n\t\t\tthis.emitChange({ value })\n\t\t\t// Update all child radio buttons\n\t\t\tthis.updateChildRadioButtons()\n\t\t})\n\t\t\n\t\t// Listen for radio button clicks from children\n\t\tthis.addEventListener('radio-button-click', ((e: CustomEvent) => {\n\t\t\tthis.selection$.next(e.detail.value)\n\t\t}) as EventListener)\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.selection$?.unsubscribe()\n\t}\n\t\n\tprivate handleSelection(value: string) {\n\t\tthis.selection$.next(value)\n\t}\n\t\n\tprivate updateChildRadioButtons() {\n\t\t// Update child radio buttons checked state\n\t\tconst radioButtons = this.querySelectorAll('schmancy-radio-button')\n\t\tradioButtons.forEach(button => {\n\t\t\tconst buttonValue = button.getAttribute('value')\n\t\t\tif (buttonValue === this.value) {\n\t\t\t\tbutton.setAttribute('checked', '')\n\t\t\t} else {\n\t\t\t\tbutton.removeAttribute('checked')\n\t\t\t}\n\t\t})\n\t}\n\t\n\t// For backwards compatibility with direct option setting\n\tupdated(changedProperties: Map<string, any>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('value')) {\n\t\t\tthis.updateChildRadioButtons()\n\t\t}\n\t}\n\n\trender() {\n\t\t// Check if we have any slotted radio buttons\n\t\tconst hasSlottedContent = this.childElementCount > 0\n\t\t\n\t\treturn html`\n\t\t\t<div class=\"grid gap-4\">\n\t\t\t\t${when(this.label, () => html` <label class=\"text-base font-semibold text-gray-900\">${this.label}</label> `)}\n\t\t\t\t\n\t\t\t\t${hasSlottedContent ? \n\t\t\t\t\thtml`<slot></slot>` :\n\t\t\t\t\tthis.options?.map(option => html`\n\t\t\t\t\t\t<div class=\"flex items-center\">\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t\t\t\tid=${option.value}\n\t\t\t\t\t\t\t\tclass=\"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600\"\n\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\tname=${this.name}\n\t\t\t\t\t\t\t\t.value=${option.value}\n\t\t\t\t\t\t\t\t.checked=${option.value === this.value}\n\t\t\t\t\t\t\t\t@change=${() => this.handleSelection(option.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<label for=${option.value} class=\"ml-3 block text-sm font-medium leading-6 text-gray-900\">\n\t\t\t\t\t\t\t\t${option.label || option.value}\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t`)\n\t\t\t\t}\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-radio-group': RadioGroup\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { FormFieldMixin } from '../../mixins/formField.mixin'\n\n@customElement('schmancy-radio-button')\nexport class RadioButton extends FormFieldMixin(TailwindElement()) {\n\t@property({ type: String }) override value = ''\n\t@property({ type: Boolean, reflect: true }) checked = false\n\t@property({ type: Boolean }) override disabled = false\n\t@property({ type: String }) override name = ''\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Find parent radio-group if exists\n\t\tthis.addEventListener('click', this.handleClick)\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.removeEventListener('click', this.handleClick)\n\t}\n\n\tprivate handleClick() {\n\t\tif (this.disabled) return\n\n\t\t// Find parent radio-group if exists\n\t\tconst radioGroup = this.closest('schmancy-radio-group')\n\t\tif (radioGroup) {\n\t\t\t// Let the radio-group handle the change\n\t\t\tconst event = new CustomEvent('radio-button-click', {\n\t\t\t\tdetail: { value: this.value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t})\n\t\t\tthis.dispatchEvent(event)\n\t\t} else {\n\t\t\t// Standalone usage\n\t\t\tthis.checked = true\n\t\t\tthis.emitChange({ value: this.value })\n\t\t}\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<label class=\"relative flex items-start cursor-pointer\">\n\t\t\t\t<div class=\"flex items-center h-6\">\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\tclass=\"h-4 w-4 text-primary focus:ring-primary-light border-gray-300\"\n\t\t\t\t\t\t.value=${this.value}\n\t\t\t\t\t\t.checked=${this.checked}\n\t\t\t\t\t\t.disabled=${this.disabled}\n\t\t\t\t\t\t.name=${this.name}\n\t\t\t\t\t\t@change=${() => {}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"ml-3\">\n\t\t\t\t\t<slot name=\"label\"></slot>\n\t\t\t\t</div>\n\t\t\t</label>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-radio-button': RadioButton\n\t}\n}\n"],"names":["FormFieldMixin","superClass","FormFieldMixinClass","args","super","this","name","value","label","required","disabled","readonly","error","validationMessage","id","Date","now","Math","floor","random","internals","attachInternals","form","changedProps","willUpdate","has","setFormValue","setValidity","customError","checkValidity","reportValidity","isValid","message","detail","dispatchEvent","CustomEvent","bubbles","composed","formAssociated","_i","__decorateClass","property","type","String","prototype","reflect","Boolean","RadioGroup","TailwindElement","arguments","options","selection$","Subject","connectedCallback","subscribe","emitChange","updateChildRadioButtons","addEventListener","e","next","disconnectedCallback","unsubscribe","querySelectorAll","forEach","button","getAttribute","setAttribute","removeAttribute","changedProperties","updated","render","hasSlottedContent","childElementCount","html","when","map","option","handleSelection","Array","customElement","RadioButton","checked","handleClick","removeEventListener","closest","event"],"mappings":";;;;;;;;;;;AA6CO,SAASA,EAAkDC,GACjE;AAAA,QAAMC,IAAN,MAAMA,UAA4BD,EAAAA;AAAAA,IAmEjC,eAAeE,GACdC;AAAAA,YAAAA,GAASD,CAzDKE,GAAAA,KAAAC,OAAA,IAM2CD,KAAAE,QAAA,IAM1CF,KAAAG,QAAA,IAMIH,KAAAI,WAAAA,IAMAJ,KAAAK,WAAA,IAMAL,KAAAM,WAAAA,IAMHN,KAAAO,QAAA,IAMWP,KAAAQ,oBAAA,IAY5BR,KAASS,KAAa,kBAAkBC,KAAKC,IAAAA,CAAAA,IAASC,KAAKC,MAAsB,MAAhBD,KAAKE,OAIjE,CAAA,CAAA;AAAA,UAAA;AACEd,aAAAe,YAAYf,KAAKgB,gBAAAA;AAAAA,MAAgB,QAC/B;AACPhB,aAAKe,YAAAA;AAAAA,MAAY;AAAA,IAClB;AAAA,IAMD,IAAA,OACQ;AAAA,aAAAf,KAAKe,WAAWE,QAAQ;AAAA,IAAA;AAAA,IAMtB,WAAWC,GAAAA;AACpBnB,YAAMoB,WAAWD,IAGbA,EAAaE,IAAI,OACfpB,KAAAA,KAAAe,WAAWM,aAAarB,KAAKE,KAAAA,IAI/BgB,EAAaE,IAAI,OAAYF,KAAAA,EAAaE,IAAI,mBAAA,OAC7CpB,KAAKO,SAASP,KAAKQ,oBACtBR,KAAKe,WAAWO,YAAY,EAAEC,aAAa,GAAA,GAAQvB,KAAK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A;AAAAA,gBACH,MAAA;AAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAQ;AA/CckC;AAAAA,EAAA,CAApCC,EAAS,EAAEC,MAAMC,OADNqC,CAAAA,CAAAA,GAAAA,EACyBpC,WAAA,SAAA,CACOJ,GAAAA,EAAA,CAA3CC,EAAS,EAAEC,MAAMI,SAASD,SAAAA,QAFfmC,EAEgCpC,WAAA,WAAA,CAAA,GACNJ,EAAA,CAArCC,EAAS,EAAEC,MAAMI,aAHNkC,EAG0BpC,WAAA,YAAA,CACDJ,GAAAA,EAAA,CAApCC,EAAS,EAAEC,MAAMC,YAJNqC,EAIyBpC,WAAA,QAAA,CAJzBoC,GAAAA,IAANxC,EAAA,CADNuC,EAAc,uBACFC,CAAAA,GAAAA,CAAAA;"}
@@ -1,41 +0,0 @@
1
- "use strict";const c=require("lit"),o=require("lit/decorators.js"),y=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const h=require("./tailwind.mixin-C6mrbvH3.cjs"),v=require("lit/directives/when.js");var m=Object.defineProperty,n=(t,e,s,l)=>{for(var i,r=void 0,a=t.length-1;a>=0;a--)(i=t[a])&&(r=i(e,s,r)||r);return r&&m(e,s,r),r};function u(t){const s=class s extends t{constructor(...i){super(...i),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())}`;try{this.internals=this.attachInternals()}catch{this.internals=void 0}}get form(){return this.internals?.form??null}willUpdate(i){super.willUpdate(i),i.has("value")&&this.internals?.setFormValue(this.value),(i.has("error")||i.has("validationMessage"))&&(this.error&&this.validationMessage?this.internals?.setValidity({customError:!0},this.validationMessage):this.internals?.setValidity({}))}checkValidity(){return!!this.disabled||!this.required||this.value!==""&&this.value!==void 0&&this.value!==null||(this.error=!0,this.validationMessage="This field is required",!1)}reportValidity(){const i=this.checkValidity();return i||this.internals?.reportValidity(),i}setCustomValidity(i){this.validationMessage=i,this.error=i!=="",i?this.internals?.setValidity({customError:!0},i):this.internals?.setValidity({})}emitChange(i){this.dispatchEvent(new CustomEvent("change",{detail:i,bubbles:!0,composed:!0}))}};s.formAssociated=!0;let e=s;return n([o.property({type:String})],e.prototype,"name"),n([o.property({reflect:!0})],e.prototype,"value"),n([o.property({type:String})],e.prototype,"label"),n([o.property({type:Boolean,reflect:!0})],e.prototype,"required"),n([o.property({type:Boolean,reflect:!0})],e.prototype,"disabled"),n([o.property({type:Boolean,reflect:!0})],e.prototype,"readonly"),n([o.property({type:Boolean,reflect:!0})],e.prototype,"error"),n([o.property({type:String})],e.prototype,"validationMessage"),n([o.property({type:String})],e.prototype,"hint"),n([o.property({reflect:!0})],e.prototype,"id"),e}var b=Object.defineProperty,g=Object.getOwnPropertyDescriptor,d=(t,e,s,l)=>{for(var i,r=l>1?void 0:l?g(e,s):e,a=t.length-1;a>=0;a--)(i=t[a])&&(r=(l?i(e,s,r):i(r))||r);return l&&r&&b(e,s,r),r};exports.RadioGroup=class extends u(h.TailwindElement(":host{display:inherit;position:inherit}")){constructor(){super(...arguments),this.label="",this.name="",this.value="",this.options=[],this.required=!1,this.selection$=new y.Subject}connectedCallback(){super.connectedCallback(),this.selection$.subscribe(t=>{this.value=t,this.emitChange({value:t}),this.updateChildRadioButtons()}),this.addEventListener("radio-button-click",t=>{this.selection$.next(t.detail.value)})}disconnectedCallback(){super.disconnectedCallback(),this.selection$?.unsubscribe()}handleSelection(t){this.selection$.next(t)}updateChildRadioButtons(){this.querySelectorAll("schmancy-radio-button").forEach(t=>{t.getAttribute("value")===this.value?t.setAttribute("checked",""):t.removeAttribute("checked")})}updated(t){super.updated(t),t.has("value")&&this.updateChildRadioButtons()}render(){const t=this.childElementCount>0;return c.html`
2
- <div class="grid gap-4">
3
- ${v.when(this.label,()=>c.html` <label class="text-base font-semibold text-gray-900">${this.label}</label> `)}
4
-
5
- ${t?c.html`<slot></slot>`:this.options?.map(e=>c.html`
6
- <div class="flex items-center">
7
- <input
8
- .required=${this.required}
9
- id=${e.value}
10
- class="h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600"
11
- type="radio"
12
- name=${this.name}
13
- .value=${e.value}
14
- .checked=${e.value===this.value}
15
- @change=${()=>this.handleSelection(e.value)}
16
- />
17
- <label for=${e.value} class="ml-3 block text-sm font-medium leading-6 text-gray-900">
18
- ${e.label||e.value}
19
- </label>
20
- </div>
21
- `)}
22
- </div>
23
- `}},d([o.property({type:String})],exports.RadioGroup.prototype,"label",2),d([o.property({type:String})],exports.RadioGroup.prototype,"name",2),d([o.property({type:String})],exports.RadioGroup.prototype,"value",2),d([o.property({type:Array})],exports.RadioGroup.prototype,"options",2),d([o.property({type:Boolean})],exports.RadioGroup.prototype,"required",2),exports.RadioGroup=d([o.customElement("schmancy-radio-group")],exports.RadioGroup);var f=Object.defineProperty,k=Object.getOwnPropertyDescriptor,p=(t,e,s,l)=>{for(var i,r=l>1?void 0:l?k(e,s):e,a=t.length-1;a>=0;a--)(i=t[a])&&(r=(l?i(e,s,r):i(r))||r);return l&&r&&f(e,s,r),r};exports.RadioButton=class extends u(h.TailwindElement()){constructor(){super(...arguments),this.value="",this.checked=!1,this.disabled=!1,this.name=""}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.handleClick)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.handleClick)}handleClick(){if(!this.disabled)if(this.closest("schmancy-radio-group")){const t=new CustomEvent("radio-button-click",{detail:{value:this.value},bubbles:!0,composed:!0});this.dispatchEvent(t)}else this.checked=!0,this.emitChange({value:this.value})}render(){return c.html`
24
- <label class="relative flex items-start cursor-pointer">
25
- <div class="flex items-center h-6">
26
- <input
27
- type="radio"
28
- class="h-4 w-4 text-primary focus:ring-primary-light border-gray-300"
29
- .value=${this.value}
30
- .checked=${this.checked}
31
- .disabled=${this.disabled}
32
- .name=${this.name}
33
- @change=${()=>{}}
34
- />
35
- </div>
36
- <div class="ml-3">
37
- <slot name="label"></slot>
38
- </div>
39
- </label>
40
- `}},p([o.property({type:String})],exports.RadioButton.prototype,"value",2),p([o.property({type:Boolean,reflect:!0})],exports.RadioButton.prototype,"checked",2),p([o.property({type:Boolean})],exports.RadioButton.prototype,"disabled",2),p([o.property({type:String})],exports.RadioButton.prototype,"name",2),exports.RadioButton=p([o.customElement("schmancy-radio-button")],exports.RadioButton);
41
- //# sourceMappingURL=radio-button-WeQklCIj.cjs.map