@mhmo91/schmancy 0.2.113 → 0.2.115
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.
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-Bold.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-Light.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-Medium.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-Regular.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-Thin.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-UBold.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Display-ULight.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Bold-Italic.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Bold.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Book-Italic.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Book.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Light.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Medium-Italic.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Medium.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Regular.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Thin-Italic.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-Thin.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-ULight-Italic.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Pro-Text-ULight.woff +0 -0
- package/dist/GT-Eesti/GT-Eesti-Text-Regular.woff2 +0 -0
- package/dist/{animated-text-B576YswO.cjs → animated-text-BJ8e_TdT.cjs} +2 -2
- package/dist/{animated-text-B576YswO.cjs.map → animated-text-BJ8e_TdT.cjs.map} +1 -1
- package/dist/{animated-text-BuRbVM-X.js → animated-text-C-LJVhLw.js} +3 -3
- package/dist/{animated-text-BuRbVM-X.js.map → animated-text-C-LJVhLw.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-Bo5aB8BH.js → area.component-6ebQ-3Kb.js} +10 -10
- package/dist/{area.component-Bo5aB8BH.js.map → area.component-6ebQ-3Kb.js.map} +1 -1
- package/dist/{area.component-BFj0Dvfb.cjs → area.component-Bf5USqvC.cjs} +2 -2
- package/dist/{area.component-BFj0Dvfb.cjs.map → area.component-Bf5USqvC.cjs.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-CM_YM2UF.cjs +57 -0
- package/dist/autocomplete-CM_YM2UF.cjs.map +1 -0
- package/dist/autocomplete-NTEOksdT.js +295 -0
- package/dist/autocomplete-NTEOksdT.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-DQYRlKod.js → checkbox-1tBSHNXu.js} +2 -2
- package/dist/{checkbox-DQYRlKod.js.map → checkbox-1tBSHNXu.js.map} +1 -1
- package/dist/{checkbox-FM06WS9G.cjs → checkbox-jcFvgv_5.cjs} +2 -2
- package/dist/{checkbox-FM06WS9G.cjs.map → checkbox-jcFvgv_5.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-Ctk7cxHI.js → chips-CdcS0QXD.js} +3 -3
- package/dist/{chips-Ctk7cxHI.js.map → chips-CdcS0QXD.js.map} +1 -1
- package/dist/{chips-CJZbtp-O.cjs → chips-K7p1j3Uk.cjs} +2 -2
- package/dist/{chips-CJZbtp-O.cjs.map → chips-K7p1j3Uk.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/color-D8r6dpWm.cjs +2 -0
- package/dist/color-D8r6dpWm.cjs.map +1 -0
- package/dist/color-DrgmL7QT.js +19 -0
- package/dist/color-DrgmL7QT.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-CZiZR3OZ.js → date-range-BSBJICYH.js} +3 -3
- package/dist/{date-range-CZiZR3OZ.js.map → date-range-BSBJICYH.js.map} +1 -1
- package/dist/{date-range-FxAO_oqk.cjs → date-range-BmVLxD4w.cjs} +2 -2
- package/dist/{date-range-FxAO_oqk.cjs.map → date-range-BmVLxD4w.cjs.map} +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-NkgyZVcO.cjs → delay-BC-GT6yV.cjs} +2 -2
- package/dist/{delay-NkgyZVcO.cjs.map → delay-BC-GT6yV.cjs.map} +1 -1
- package/dist/{delay-gZOjfjX_.js → delay-CgOaVklg.js} +2 -2
- package/dist/{delay-gZOjfjX_.js.map → delay-CgOaVklg.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/directives.cjs +1 -1
- package/dist/directives.js +5 -4
- package/dist/directives.js.map +1 -1
- package/dist/{divider-nNk0E_jZ.cjs → divider-Dw4upy-U.cjs} +2 -2
- package/dist/{divider-nNk0E_jZ.cjs.map → divider-Dw4upy-U.cjs.map} +1 -1
- package/dist/{divider-B-JF8gre.js → divider-lRP5ZCxr.js} +3 -3
- package/dist/{divider-B-JF8gre.js.map → divider-lRP5ZCxr.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/extra.cjs +2 -0
- package/dist/extra.cjs.map +1 -0
- package/dist/extra.js +6 -0
- package/dist/extra.js.map +1 -0
- package/dist/{flex-CieqpOUS.js → flex-BkuM0UK7.js} +2 -2
- package/dist/{flex-CieqpOUS.js.map → flex-BkuM0UK7.js.map} +1 -1
- package/dist/{flex-INEcbqBe.cjs → flex-X4APHjaR.cjs} +2 -2
- package/dist/{flex-INEcbqBe.cjs.map → flex-X4APHjaR.cjs.map} +1 -1
- package/dist/{form-lcamXnkd.js → form-Ci8uCvU-.js} +2 -2
- package/dist/{form-lcamXnkd.js.map → form-Ci8uCvU-.js.map} +1 -1
- package/dist/{form-CKMp4UzU.cjs → form-Ct_Qt0rD.cjs} +2 -2
- package/dist/{form-CKMp4UzU.cjs.map → form-Ct_Qt0rD.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-BZqH7sp7.cjs → icon-BPsYPc8h.cjs} +2 -2
- package/dist/{icon-BZqH7sp7.cjs.map → icon-BPsYPc8h.cjs.map} +1 -1
- package/dist/{icon-CJrmUGTm.js → icon-DOJOFG3x.js} +3 -3
- package/dist/{icon-CJrmUGTm.js.map → icon-DOJOFG3x.js.map} +1 -1
- package/dist/{icon-button-BNn0qRfC.js → icon-button-BPa29txC.js} +3 -3
- package/dist/{icon-button-BNn0qRfC.js.map → icon-button-BPa29txC.js.map} +1 -1
- package/dist/{icon-button-nMHz4MDw.cjs → icon-button-cirbgD54.cjs} +2 -2
- package/dist/{icon-button-nMHz4MDw.cjs.map → icon-button-cirbgD54.cjs.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +84 -78
- package/dist/index.js.map +1 -1
- package/dist/input-B4miYmDK.cjs +98 -0
- package/dist/input-B4miYmDK.cjs.map +1 -0
- package/dist/input-CuvPPYVq.js +136 -0
- package/dist/input-CuvPPYVq.js.map +1 -0
- package/dist/input-DTJsOi9t.js +205 -0
- package/dist/input-DTJsOi9t.js.map +1 -0
- package/dist/input-DibJxeWY.cjs +51 -0
- package/dist/input-DibJxeWY.cjs.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-CjrF4M5H.js → list-CWbygRrR.js} +2 -2
- package/dist/{list-CjrF4M5H.js.map → list-CWbygRrR.js.map} +1 -1
- package/dist/{list-D4y-Mkap.cjs → list-QiglVzPK.cjs} +2 -2
- package/dist/{list-D4y-Mkap.cjs.map → list-QiglVzPK.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-djlKJ0lX.cjs → litElement.mixin-D_oDZMIO.cjs} +2 -2
- package/dist/{litElement.mixin-djlKJ0lX.cjs.map → litElement.mixin-D_oDZMIO.cjs.map} +1 -1
- package/dist/{litElement.mixin-NzkxESus.js → litElement.mixin-MZntPOCu.js} +2 -2
- package/dist/{litElement.mixin-NzkxESus.js.map → litElement.mixin-MZntPOCu.js.map} +1 -1
- package/dist/{menu-DAtFS31a.cjs → menu-Bn4JuaBS.cjs} +2 -2
- package/dist/{menu-DAtFS31a.cjs.map → menu-Bn4JuaBS.cjs.map} +1 -1
- package/dist/{menu-Cb5kUAvU.js → menu-iSx7aWwL.js} +3 -3
- package/dist/{menu-Cb5kUAvU.js.map → menu-iSx7aWwL.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/mixins/formField.mixin.ts +223 -0
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/option-DBfFfXNm.cjs +18 -0
- package/dist/option-DBfFfXNm.cjs.map +1 -0
- package/dist/option-DMwxI7ML.js +75 -0
- package/dist/option-DMwxI7ML.js.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{outlet-DofHDlGH.cjs → outlet-CEaS1zUl.cjs} +2 -2
- package/dist/{outlet-DofHDlGH.cjs.map → outlet-CEaS1zUl.cjs.map} +1 -1
- package/dist/{outlet-6HZp4fo1.js → outlet-KhTjvKCU.js} +2 -2
- package/dist/{outlet-6HZp4fo1.js.map → outlet-KhTjvKCU.js.map} +1 -1
- package/dist/payment-card-form-CVZyDkcJ.cjs +74 -0
- package/dist/{payment-card-form-Bi3yNg4b.cjs.map → payment-card-form-CVZyDkcJ.cjs.map} +1 -1
- package/dist/{payment-card-form-C8FxRlh4.js → payment-card-form-DK86Lcng.js} +183 -134
- package/dist/{payment-card-form-C8FxRlh4.js.map → payment-card-form-DK86Lcng.js.map} +1 -1
- package/dist/{radio-group-A5QxSGOr.cjs → radio-group-CxJXNx54.cjs} +2 -2
- package/dist/{radio-group-A5QxSGOr.cjs.map → radio-group-CxJXNx54.cjs.map} +1 -1
- package/dist/{radio-group-BapuNl8y.js → radio-group-DNmZuvSj.js} +2 -2
- package/dist/{radio-group-BapuNl8y.js.map → radio-group-DNmZuvSj.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/ripple-3indJ14o.js +64 -0
- package/dist/ripple-3indJ14o.js.map +1 -0
- package/dist/ripple-B_wT0zgD.cjs +16 -0
- package/dist/ripple-B_wT0zgD.cjs.map +1 -0
- package/dist/{select-8AjN6LbM.js → select-DRi9CB_N.js} +64 -39
- package/dist/select-DRi9CB_N.js.map +1 -0
- package/dist/select-SQOIioEy.cjs +56 -0
- package/dist/select-SQOIioEy.cjs.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-xR13xD2A.js → sheet-BJGyAQko.js} +6 -6
- package/dist/{sheet-xR13xD2A.js.map → sheet-BJGyAQko.js.map} +1 -1
- package/dist/{sheet-CQFdHSwJ.cjs → sheet-QIcFyBDD.cjs} +2 -2
- package/dist/{sheet-CQFdHSwJ.cjs.map → sheet-QIcFyBDD.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-BakU-Bdw.js → slider-A_LoTZ1P.js} +3 -3
- package/dist/{slider-BakU-Bdw.js.map → slider-A_LoTZ1P.js.map} +1 -1
- package/dist/{slider-B4OCBlQg.cjs → slider-XRH0sXZN.cjs} +2 -2
- package/dist/{slider-B4OCBlQg.cjs.map → slider-XRH0sXZN.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-C3VJtLgk.cjs → spinner-CSsb6sKK.cjs} +4 -4
- package/dist/{spinner-C3VJtLgk.cjs.map → spinner-CSsb6sKK.cjs.map} +1 -1
- package/dist/{spinner-BDx3SZsl.js → spinner-D0l2eAK5.js} +12 -11
- package/dist/{spinner-BDx3SZsl.js.map → spinner-D0l2eAK5.js.map} +1 -1
- package/dist/{surface-YiaJJQ5m.js → surface-D5FgxeIB.js} +2 -2
- package/dist/{surface-YiaJJQ5m.js.map → surface-D5FgxeIB.js.map} +1 -1
- package/dist/{surface-kjOrb8TO.cjs → surface-DEAdaZUh.cjs} +2 -2
- package/dist/{surface-kjOrb8TO.cjs.map → surface-DEAdaZUh.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-BZV2dBD5.cjs → table-Cygw_pIl.cjs} +2 -2
- package/dist/{table-BZV2dBD5.cjs.map → table-Cygw_pIl.cjs.map} +1 -1
- package/dist/{table-BguYeeBH.js → table-DC86Vj6Z.js} +2 -2
- package/dist/{table-BguYeeBH.js.map → table-DC86Vj6Z.js.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-H3C6ZnQn.js → tabs-group-7bz0I9uV.js} +2 -2
- package/dist/{tabs-group-H3C6ZnQn.js.map → tabs-group-7bz0I9uV.js.map} +1 -1
- package/dist/{tabs-group-BZFBZ1_G.cjs → tabs-group-BQomo5q3.cjs} +2 -2
- package/dist/{tabs-group-BZFBZ1_G.cjs.map → tabs-group-BQomo5q3.cjs.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-B-T2bBPl.js +43 -0
- package/dist/{tailwind.mixin-DklgfhB4.js.map → tailwind.mixin-B-T2bBPl.js.map} +1 -1
- package/dist/tailwind.mixin-CduPdozY.cjs +2 -0
- package/dist/{tailwind.mixin-CBhPue3q.cjs.map → tailwind.mixin-CduPdozY.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-CF-USarR.cjs → teleport.component-BMLwCM8y.cjs} +19 -19
- package/dist/{teleport.component-CF-USarR.cjs.map → teleport.component-BMLwCM8y.cjs.map} +1 -1
- package/dist/{teleport.component-D8DXijGl.js → teleport.component-gFIqLOrA.js} +43 -40
- package/dist/{teleport.component-D8DXijGl.js.map → teleport.component-gFIqLOrA.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-D7bTMerW.js → textarea-1aeql05N.js} +9 -8
- package/dist/{textarea-D7bTMerW.js.map → textarea-1aeql05N.js.map} +1 -1
- package/dist/textarea-CixoZTFB.cjs +42 -0
- package/dist/{textarea-BCWPb0Sn.cjs.map → textarea-CixoZTFB.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-DHuXg7vh.cjs → theme-button-DocSoRxe.cjs} +2 -2
- package/dist/{theme-button-DHuXg7vh.cjs.map → theme-button-DocSoRxe.cjs.map} +1 -1
- package/dist/{theme-button-CP2_aq__.js → theme-button-MRgILdtC.js} +2 -2
- package/dist/{theme-button-CP2_aq__.js.map → theme-button-MRgILdtC.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-BtBosXb1.js → theme.component-BFkhNT0D.js} +47 -47
- package/dist/{theme.component-BtBosXb1.js.map → theme.component-BFkhNT0D.js.map} +1 -1
- package/dist/{theme.component-Ly2C_fQ8.cjs → theme.component-BgOdO6iM.cjs} +2 -2
- package/dist/{theme.component-Ly2C_fQ8.cjs.map → theme.component-BgOdO6iM.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/timezone-BW6MC511.js +119 -0
- package/dist/timezone-BW6MC511.js.map +1 -0
- package/dist/timezone-CvOrPfno.cjs +34 -0
- package/dist/timezone-CvOrPfno.cjs.map +1 -0
- package/dist/{tree-CG9B3uQP.cjs → tree-DysB6Y8C.cjs} +2 -2
- package/dist/{tree-CG9B3uQP.cjs.map → tree-DysB6Y8C.cjs.map} +1 -1
- package/dist/{tree-Y2B7yK7L.js → tree-PSCsuzDT.js} +2 -2
- package/dist/{tree-Y2B7yK7L.js.map → tree-PSCsuzDT.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-CzV1O28F.cjs → typewriter-C8pWgRuU.cjs} +2 -2
- package/dist/{typewriter-CzV1O28F.cjs.map → typewriter-C8pWgRuU.cjs.map} +1 -1
- package/dist/{typewriter-bnkFoDFz.js → typewriter-DmzUuxvZ.js} +14 -14
- package/dist/{typewriter-bnkFoDFz.js.map → typewriter-DmzUuxvZ.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-D-a-z23R.cjs → typography-BfjWKELJ.cjs} +2 -2
- package/dist/{typography-D-a-z23R.cjs.map → typography-BfjWKELJ.cjs.map} +1 -1
- package/dist/{typography-CSQByhJF.js → typography-D486o2A3.js} +2 -2
- package/dist/{typography-CSQByhJF.js.map → typography-D486o2A3.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/v2.cjs +2 -0
- package/dist/v2.cjs.map +1 -0
- package/dist/v2.js +5 -0
- package/dist/v2.js.map +1 -0
- package/package.json +3 -4
- package/types/mixins/formField.mixin.d.ts +48 -0
- package/types/src/autocomplete/autocomplete.d.ts +17 -7
- package/types/src/components/form-elements/payment-card-form.d.ts +57 -4
- package/types/src/extra/countries/countries.d.ts +26 -0
- package/types/src/extra/countries/countries.data.d.ts +5 -0
- package/types/src/extra/countries/index.d.ts +2 -0
- package/types/src/extra/index.d.ts +2 -0
- package/types/src/extra/timezone/index.d.ts +2 -0
- package/types/src/extra/timezone/timezone.d.ts +26 -0
- package/types/src/extra/timezone/timezones.data.d.ts +7 -0
- package/types/src/index.d.ts +2 -1
- package/types/src/option/option.d.ts +4 -0
- package/types/src/select/select.d.ts +8 -1
- package/types/src/utils/search.d.ts +10 -0
- package/types/src/v2/form.d.ts +51 -0
- package/types/src/v2/index.d.ts +2 -0
- package/types/src/v2/input.d.ts +71 -0
- package/dist/autocomplete-Du2Jw0a2.cjs +0 -49
- package/dist/autocomplete-Du2Jw0a2.cjs.map +0 -1
- package/dist/autocomplete-NL-c1Qp-.js +0 -264
- package/dist/autocomplete-NL-c1Qp-.js.map +0 -1
- package/dist/data.cjs +0 -2
- package/dist/data.cjs.map +0 -1
- package/dist/data.js +0 -2
- package/dist/data.js.map +0 -1
- package/dist/input-CszLZ81k.cjs +0 -51
- package/dist/input-CszLZ81k.cjs.map +0 -1
- package/dist/input-CwWLOBMF.js +0 -135
- package/dist/input-CwWLOBMF.js.map +0 -1
- package/dist/option-0le6-QeS.cjs +0 -18
- package/dist/option-0le6-QeS.cjs.map +0 -1
- package/dist/option-_1gW48HB.js +0 -49
- package/dist/option-_1gW48HB.js.map +0 -1
- package/dist/payment-card-form-Bi3yNg4b.cjs +0 -48
- package/dist/ripple-BumgqsDT.js +0 -78
- package/dist/ripple-BumgqsDT.js.map +0 -1
- package/dist/ripple-C2BHbhcS.cjs +0 -16
- package/dist/ripple-C2BHbhcS.cjs.map +0 -1
- package/dist/select-8AjN6LbM.js.map +0 -1
- package/dist/select-BdU6KcPX.cjs +0 -54
- package/dist/select-BdU6KcPX.cjs.map +0 -1
- package/dist/tailwind.mixin-CBhPue3q.cjs +0 -2
- package/dist/tailwind.mixin-DklgfhB4.js +0 -43
- package/dist/textarea-BCWPb0Sn.cjs +0 -42
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { T as b } from "./tailwind.mixin-B-T2bBPl.js";
|
|
2
|
+
import { css as $, html as y } from "lit";
|
|
3
|
+
import { property as o, query as x, customElement as w } from "lit/decorators.js";
|
|
4
|
+
import { createRef as V, ref as S } from "lit/directives/ref.js";
|
|
5
|
+
import { when as v } from "lit/directives/when.js";
|
|
6
|
+
import { c as g } from "./color-DrgmL7QT.js";
|
|
7
|
+
import { S as m } from "./theme.interface-C5Kj6WjD.js";
|
|
8
|
+
var E = Object.defineProperty, k = Object.getOwnPropertyDescriptor, c = (e, a, r, i) => {
|
|
9
|
+
for (var n, t = i > 1 ? void 0 : i ? k(a, r) : a, s = e.length - 1; s >= 0; s--) (n = e[s]) && (t = (i ? n(a, r, t) : n(t)) || t);
|
|
10
|
+
return i && t && E(a, r, t), t;
|
|
11
|
+
};
|
|
12
|
+
let p = class extends b($`
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
}
|
|
16
|
+
`) {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments), this.novalidate = !1, this.method = "post", this.action = "", this.enctype = "application/x-www-form-urlencoded";
|
|
19
|
+
}
|
|
20
|
+
handleSubmit(e) {
|
|
21
|
+
if (e.preventDefault(), !this.novalidate && !this.formElement.checkValidity()) return void this.formElement.reportValidity();
|
|
22
|
+
const a = new FormData(this.formElement), r = Array.from(a.entries()).reduce((i, [n, t]) => (i[n] !== void 0 ? (Array.isArray(i[n]) || (i[n] = [i[n]]), i[n].push(t)) : i[n] = t, i), {});
|
|
23
|
+
this.dispatchEvent(new CustomEvent("submit", { detail: { formData: a, data: r }, bubbles: !0 })), this.action && !this.novalidate && this.formElement.submit();
|
|
24
|
+
}
|
|
25
|
+
reset() {
|
|
26
|
+
var e;
|
|
27
|
+
(e = this.formElement) == null || e.reset();
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return y`
|
|
31
|
+
<form
|
|
32
|
+
method=${this.method}
|
|
33
|
+
action=${this.action}
|
|
34
|
+
enctype=${this.enctype}
|
|
35
|
+
?novalidate=${this.novalidate}
|
|
36
|
+
@submit=${this.handleSubmit}
|
|
37
|
+
>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</form>
|
|
40
|
+
`;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
c([o({ type: Boolean })], p.prototype, "novalidate", 2), c([o({ type: String })], p.prototype, "method", 2), c([o({ type: String })], p.prototype, "action", 2), c([o({ type: String })], p.prototype, "enctype", 2), c([x("form")], p.prototype, "formElement", 2), p = c([w("sch-form")], p);
|
|
44
|
+
var M = Object.defineProperty, l = (e, a, r, i) => {
|
|
45
|
+
for (var n, t = void 0, s = e.length - 1; s >= 0; s--) (n = e[s]) && (t = n(a, r, t) || t);
|
|
46
|
+
return t && M(a, r, t), t;
|
|
47
|
+
};
|
|
48
|
+
function O(e) {
|
|
49
|
+
return function(a) {
|
|
50
|
+
const i = class i extends a {
|
|
51
|
+
constructor(...t) {
|
|
52
|
+
super(...t), 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())}`;
|
|
53
|
+
try {
|
|
54
|
+
this.internals = this.attachInternals();
|
|
55
|
+
} catch {
|
|
56
|
+
this.internals = void 0;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
get form() {
|
|
60
|
+
var t;
|
|
61
|
+
return ((t = this.internals) == null ? void 0 : t.form) ?? null;
|
|
62
|
+
}
|
|
63
|
+
willUpdate(t) {
|
|
64
|
+
var s, u, f;
|
|
65
|
+
super.willUpdate(t), t.has("value") && ((s = this.internals) == null || s.setFormValue(this.value)), (t.has("error") || t.has("validationMessage")) && (this.error && this.validationMessage ? (u = this.internals) == null || u.setValidity({ customError: !0 }, this.validationMessage) : (f = this.internals) == null || f.setValidity({}));
|
|
66
|
+
}
|
|
67
|
+
checkValidity() {
|
|
68
|
+
return !!this.disabled || !this.required || this.value !== "" && this.value !== void 0 && this.value !== null || (this.error = !0, this.validationMessage = "This field is required", !1);
|
|
69
|
+
}
|
|
70
|
+
reportValidity() {
|
|
71
|
+
var s;
|
|
72
|
+
const t = this.checkValidity();
|
|
73
|
+
return t || ((s = this.internals) == null || s.reportValidity()), t;
|
|
74
|
+
}
|
|
75
|
+
setCustomValidity(t) {
|
|
76
|
+
var s, u;
|
|
77
|
+
this.validationMessage = t, this.error = t !== "", t ? (s = this.internals) == null || s.setValidity({ customError: !0 }, t) : (u = this.internals) == null || u.setValidity({});
|
|
78
|
+
}
|
|
79
|
+
emitChange(t) {
|
|
80
|
+
this.dispatchEvent(new CustomEvent("change", { detail: t, bubbles: !0, composed: !0 }));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
i.formAssociated = !0;
|
|
84
|
+
let r = i;
|
|
85
|
+
return l([o({ type: String })], r.prototype, "name"), l([o({ reflect: !0 })], r.prototype, "value"), l([o({ type: String })], r.prototype, "label"), l([o({ type: Boolean, reflect: !0 })], r.prototype, "required"), l([o({ type: Boolean, reflect: !0 })], r.prototype, "disabled"), l([o({ type: Boolean, reflect: !0 })], r.prototype, "readonly"), l([o({ type: Boolean, reflect: !0 })], r.prototype, "error"), l([o({ type: String })], r.prototype, "validationMessage"), l([o({ type: String })], r.prototype, "hint"), l([o({ reflect: !0 })], r.prototype, "id"), r;
|
|
86
|
+
}(b(e));
|
|
87
|
+
}
|
|
88
|
+
var q = Object.defineProperty, R = Object.getOwnPropertyDescriptor, d = (e, a, r, i) => {
|
|
89
|
+
for (var n, t = i > 1 ? void 0 : i ? R(a, r) : a, s = e.length - 1; s >= 0; s--) (n = e[s]) && (t = (i ? n(a, r, t) : n(t)) || t);
|
|
90
|
+
return i && t && q(a, r, t), t;
|
|
91
|
+
};
|
|
92
|
+
let h = class extends O($`
|
|
93
|
+
:host {
|
|
94
|
+
display: block;
|
|
95
|
+
width: 100%;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
input {
|
|
99
|
+
width: 100%;
|
|
100
|
+
height: var(--sch-input-height, 40px);
|
|
101
|
+
padding: var(--sch-input-padding, 0 12px);
|
|
102
|
+
border-radius: var(--sch-input-radius, 4px);
|
|
103
|
+
font-family: inherit;
|
|
104
|
+
font-size: inherit;
|
|
105
|
+
background-color: var(--schmancy-sys-color-surface-highest);
|
|
106
|
+
color: var(--schmancy-sys-color-surface-on);
|
|
107
|
+
border: 1px solid var(--schmancy-sys-color-surface-onVariant);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
input:focus {
|
|
111
|
+
outline: none;
|
|
112
|
+
border-color: var(--schmancy-sys-color-primary-default);
|
|
113
|
+
box-shadow: 0 0 0 1px var(--schmancy-sys-color-primary-default);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Only show invalid state after the user has interacted with the field */
|
|
117
|
+
input:not(:placeholder-shown):invalid {
|
|
118
|
+
border-color: var(--schmancy-sys-color-error-default);
|
|
119
|
+
box-shadow: 0 0 0 1px var(--schmancy-sys-color-error-default);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.input-wrapper {
|
|
123
|
+
position: relative;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
label {
|
|
127
|
+
display: block;
|
|
128
|
+
margin-bottom: 4px;
|
|
129
|
+
font-size: 0.875rem;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.hint {
|
|
133
|
+
font-size: 0.75rem;
|
|
134
|
+
margin-top: 4px;
|
|
135
|
+
}
|
|
136
|
+
`) {
|
|
137
|
+
constructor() {
|
|
138
|
+
super(...arguments), this.type = "text", this.placeholder = "", this.autocomplete = "off", this.inputRef = V();
|
|
139
|
+
}
|
|
140
|
+
handleInput(e) {
|
|
141
|
+
this.value = e.target.value, this.emitChange({ value: this.value });
|
|
142
|
+
}
|
|
143
|
+
focus(e) {
|
|
144
|
+
var a;
|
|
145
|
+
(a = this.inputRef.value) == null || a.focus(e);
|
|
146
|
+
}
|
|
147
|
+
blur() {
|
|
148
|
+
var e;
|
|
149
|
+
(e = this.inputRef.value) == null || e.blur();
|
|
150
|
+
}
|
|
151
|
+
checkValidity() {
|
|
152
|
+
var e;
|
|
153
|
+
return ((e = this.inputRef.value) == null ? void 0 : e.checkValidity()) ?? !0;
|
|
154
|
+
}
|
|
155
|
+
reportValidity() {
|
|
156
|
+
var e;
|
|
157
|
+
return ((e = this.inputRef.value) == null ? void 0 : e.reportValidity()) ?? !0;
|
|
158
|
+
}
|
|
159
|
+
render() {
|
|
160
|
+
return y`
|
|
161
|
+
${v(this.label, () => y`
|
|
162
|
+
<label
|
|
163
|
+
for=${this.id}
|
|
164
|
+
${g({ color: this.error ? m.sys.color.error.default : m.sys.color.primary.default })}
|
|
165
|
+
>
|
|
166
|
+
${this.label}
|
|
167
|
+
</label>
|
|
168
|
+
`)}
|
|
169
|
+
|
|
170
|
+
<div class="input-wrapper">
|
|
171
|
+
<input
|
|
172
|
+
${S(this.inputRef)}
|
|
173
|
+
id=${this.id}
|
|
174
|
+
.type=${this.type}
|
|
175
|
+
name=${this.name}
|
|
176
|
+
placeholder=${this.placeholder}
|
|
177
|
+
?required=${this.required}
|
|
178
|
+
?disabled=${this.disabled}
|
|
179
|
+
?readonly=${this.readonly}
|
|
180
|
+
minlength=${this.minlength ?? ""}
|
|
181
|
+
maxlength=${this.maxlength ?? ""}
|
|
182
|
+
pattern=${this.pattern ?? ""}
|
|
183
|
+
.autocomplete=${this.autocomplete}
|
|
184
|
+
aria-invalid=${this.error ? "true" : "false"}
|
|
185
|
+
.value=${this.value}
|
|
186
|
+
@input=${this.handleInput}
|
|
187
|
+
/>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
${v(this.hint, () => y`
|
|
191
|
+
<div
|
|
192
|
+
class="hint"
|
|
193
|
+
${g({ color: m.sys.color.surface.onVariant })}
|
|
194
|
+
>
|
|
195
|
+
${this.hint}
|
|
196
|
+
</div>
|
|
197
|
+
`)}
|
|
198
|
+
`;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
d([o({ type: String })], h.prototype, "type", 2), d([o({ type: String })], h.prototype, "placeholder", 2), d([o({ type: Number })], h.prototype, "minlength", 2), d([o({ type: Number })], h.prototype, "maxlength", 2), d([o({ type: String })], h.prototype, "pattern", 2), d([o({ type: String })], h.prototype, "autocomplete", 2), h = d([w("sch-input")], h);
|
|
202
|
+
export {
|
|
203
|
+
p as S
|
|
204
|
+
};
|
|
205
|
+
//# sourceMappingURL=input-DTJsOi9t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-DTJsOi9t.js","sources":["../src/v2/form.ts","../mixins/formField.mixin.ts","../src/v2/input.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { html, css } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\n\n/**\n * A form component that enforces native browser validation\n * for all contained form elements.\n *\n * @example\n * ```html\n * <sch-form @submit=${handleSubmit}>\n * <sch-input label=\"Name\" required></sch-input>\n * <schmancy-button type=\"submit\">Submit</schmancy-button>\n * </sch-form>\n * ```\n */\n@customElement('sch-form')\nexport class SchForm extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t}\n`) {\n\t/**\n\t * If true, form validation will be skipped\n\t */\n\t@property({ type: Boolean })\n\tnovalidate = false\n\n\t/**\n\t * The form's submission method (get or post)\n\t */\n\t@property({ type: String })\n\tmethod: 'get' | 'post' = 'post'\n\n\t/**\n\t * The URL to submit the form to\n\t */\n\t@property({ type: String })\n\taction = ''\n\n\t/**\n\t * The form's encoding type\n\t */\n\t@property({ type: String })\n\tenctype: 'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain' =\n\t\t'application/x-www-form-urlencoded'\n\n\t/**\n\t * Reference to the internal form element\n\t */\n\t@query('form')\n\tformElement!: HTMLFormElement\n\n\t/**\n\t * Handle form submission\n\t * This is the key method that ensures browser validation works\n\t */\n\tprivate handleSubmit(e: Event) {\n\t\t// Always prevent the default submission\n\t\te.preventDefault()\n\n\t\t// Use the browser's built-in validation\n\t\tif (!this.novalidate && !this.formElement.checkValidity()) {\n\t\t\t// This will trigger the browser's default validation UI on all fields\n\t\t\tthis.formElement.reportValidity()\n\t\t\treturn\n\t\t}\n\n\t\t// If validation passes or is disabled, collect the form data\n\t\tconst formData = new FormData(this.formElement)\n\n\t\t// Convert FormData to a plain object for easier consumption\n\t\tconst formDataObj = Array.from(formData.entries()).reduce(\n\t\t\t(obj, [key, value]) => {\n\t\t\t\tif (obj[key] !== undefined) {\n\t\t\t\t\tif (!Array.isArray(obj[key])) {\n\t\t\t\t\t\tobj[key] = [obj[key]]\n\t\t\t\t\t}\n\t\t\t\t\tobj[key].push(value)\n\t\t\t\t} else {\n\t\t\t\t\tobj[key] = value\n\t\t\t\t}\n\t\t\t\treturn obj\n\t\t\t},\n\t\t\t{} as Record<string, any>,\n\t\t)\n\n\t\t// Dispatch a submit event with the form data\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('submit', {\n\t\t\t\tdetail: { formData, data: formDataObj },\n\t\t\t\tbubbles: true,\n\t\t\t}),\n\t\t)\n\n\t\t// If there's an action URL, submit the form to it\n\t\tif (this.action && !this.novalidate) {\n\t\t\tthis.formElement.submit()\n\t\t}\n\t}\n\n\t/**\n\t * Reset the form\n\t */\n\tpublic reset() {\n\t\tthis.formElement?.reset()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<form\n\t\t\t\tmethod=${this.method}\n\t\t\t\taction=${this.action}\n\t\t\t\tenctype=${this.enctype}\n\t\t\t\t?novalidate=${this.novalidate}\n\t\t\t\t@submit=${this.handleSubmit}\n\t\t\t>\n\t\t\t\t<slot></slot>\n\t\t\t</form>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-form': SchForm\n\t}\n}\n","import { CSSResult, LitElement, PropertyValueMap } from 'lit'\nimport { property } from 'lit/decorators.js'\nimport { IBaseMixin } from '../mixins/baseElement'\nimport { Constructor } from '../mixins/constructor'\nimport { ITailwindElementMixin, TailwindElement } from '../mixins/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, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { when } from 'lit/directives/when.js'\nimport { color } from '../directives/color'\nimport { SchmancyTheme } from '../theme/theme.interface'\nimport { SchmancyFormField } from '@mixins/formField.mixin'\n\n/**\n * A simplified input component that works with browser validation.\n *\n * @example\n * ```html\n * <sch-input\n * label=\"Email\"\n * name=\"email\"\n * required\n * type=\"email\"\n * ></sch-input>\n * ```\n */\n@customElement('sch-input')\nexport default class SchInput extends SchmancyFormField(css`\n\t:host {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t}\n\n\tinput {\n\t\twidth: 100%;\n\t\theight: var(--sch-input-height, 40px);\n\t\tpadding: var(--sch-input-padding, 0 12px);\n\t\tborder-radius: var(--sch-input-radius, 4px);\n\t\tfont-family: inherit;\n\t\tfont-size: inherit;\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tcolor: var(--schmancy-sys-color-surface-on);\n\t\tborder: 1px solid var(--schmancy-sys-color-surface-onVariant);\n\t}\n\n\tinput:focus {\n\t\toutline: none;\n\t\tborder-color: var(--schmancy-sys-color-primary-default);\n\t\tbox-shadow: 0 0 0 1px var(--schmancy-sys-color-primary-default);\n\t}\n\n\t/* Only show invalid state after the user has interacted with the field */\n\tinput:not(:placeholder-shown):invalid {\n\t\tborder-color: var(--schmancy-sys-color-error-default);\n\t\tbox-shadow: 0 0 0 1px var(--schmancy-sys-color-error-default);\n\t}\n\n\t.input-wrapper {\n\t\tposition: relative;\n\t}\n\n\tlabel {\n\t\tdisplay: block;\n\t\tmargin-bottom: 4px;\n\t\tfont-size: 0.875rem;\n\t}\n\n\t.hint {\n\t\tfont-size: 0.75rem;\n\t\tmargin-top: 4px;\n\t}\n`) {\n\t/**\n\t * The type of input (text, email, password, etc.)\n\t */\n\t@property({ type: String })\n\ttype: string = 'text'\n\n\t/**\n\t * Placeholder text\n\t */\n\t@property({ type: String })\n\tplaceholder: string = ''\n\n\t/**\n\t * Minimum input length\n\t */\n\t@property({ type: Number })\n\tminlength?: number\n\n\t/**\n\t * Maximum input length\n\t */\n\t@property({ type: Number })\n\tmaxlength?: number\n\n\t/**\n\t * Pattern for validation\n\t */\n\t@property({ type: String })\n\tpattern?: string\n\n\t/**\n\t * Whether to enable autocomplete\n\t */\n\t@property({ type: String })\n\tautocomplete: string = 'off'\n\n\t/**\n\t * Reference to the internal input element\n\t */\n\tprivate inputRef = createRef<HTMLInputElement>()\n\n\t/**\n\t * Handle input change\n\t */\n\tprivate handleInput(e: Event) {\n\t\tthis.value = (e.target as HTMLInputElement).value\n\t\tthis.emitChange({ value: this.value })\n\t}\n\n\t/**\n\t * Focus the input\n\t */\n\tpublic override focus(options?: FocusOptions) {\n\t\tthis.inputRef.value?.focus(options)\n\t}\n\n\t/**\n\t * Blur the input\n\t */\n\tpublic override blur() {\n\t\tthis.inputRef.value?.blur()\n\t}\n\n\t/**\n\t * Let the browser handle validation\n\t */\n\tpublic override checkValidity(): boolean {\n\t\treturn this.inputRef.value?.checkValidity() ?? true\n\t}\n\n\t/**\n\t * Use the browser's built-in validation UI\n\t */\n\tpublic override reportValidity(): boolean {\n\t\treturn this.inputRef.value?.reportValidity() ?? true\n\t}\n\n\trender() {\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\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${this.label}\n\t\t\t\t\t</label>\n\t\t\t\t`,\n\t\t\t)}\n\n\t\t\t<div class=\"input-wrapper\">\n\t\t\t\t<input\n\t\t\t\t\t${ref(this.inputRef)}\n\t\t\t\t\tid=${this.id}\n\t\t\t\t\t.type=${this.type}\n\t\t\t\t\tname=${this.name}\n\t\t\t\t\tplaceholder=${this.placeholder}\n\t\t\t\t\t?required=${this.required}\n\t\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t\t?readonly=${this.readonly}\n\t\t\t\t\tminlength=${this.minlength ?? ''}\n\t\t\t\t\tmaxlength=${this.maxlength ?? ''}\n\t\t\t\t\tpattern=${this.pattern ?? ''}\n\t\t\t\t\t.autocomplete=${this.autocomplete}\n\t\t\t\t\taria-invalid=${this.error ? 'true' : 'false'}\n\t\t\t\t\t.value=${this.value as string}\n\t\t\t\t\t@input=${this.handleInput}\n\t\t\t\t/>\n\t\t\t</div>\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\tclass=\"hint\"\n\t\t\t\t\t\t${color({\n\t\t\t\t\t\t\tcolor: SchmancyTheme.sys.color.surface.onVariant,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t${this.hint}\n\t\t\t\t\t</div>\n\t\t\t\t`,\n\t\t\t)}\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sch-input': SchInput\n\t}\n}\n"],"names":["SchForm","TailwindElement","css","constructor","super","arguments","this","novalidate","method","action","enctype","e","preventDefault","formElement","checkValidity","reportValidity","formData","FormData","formDataObj","Array","from","entries","reduce","obj","key","value","isArray","push","dispatchEvent","CustomEvent","detail","data","bubbles","submit","reset","html","handleSubmit","__decorateClass","property","type","Boolean","prototype","String","query","customElement","SchmancyFormField","componentStyle","superClass","FormFieldMixinClass","args","name","label","required","disabled","readonly","error","validationMessage","id","Date","now","Math","floor","random","internals","attachInternals","form","changedProps","willUpdate","has","setFormValue","setValidity","customError","isValid","message","composed","formAssociated","_i","reflect","SchInput","placeholder","autocomplete","inputRef","createRef","target","emitChange","options","focus","blur","render","when","color","SchmancyTheme","sys","default","primary","ref","minlength","maxlength","pattern","handleInput","hint","surface","onVariant","Number"],"mappings":";;;;;;;;;;;AAiBa,IAAAA,IAAN,cAAsBC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;EAAtC,cAAAC;AAAAC,aAAAC,SASOC,GAAAA,KAAAC,iBAMYD,KAAAE,SAAA,QAMhBF,KAAAG,SAAA,IAORH,KAAAI,UAAA;AAAA,EAAA;AAAA,EAYO,aAAaC,GAAAA;AAKpB,QAHAA,EAAEC,eAGGN,GAAAA,CAAAA,KAAKC,eAAeD,KAAKO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;AAAAA;AAAAA;AAAAA;AAAAA,KAIdV,EACDnF,KAAK8F,MACL,MAAMjE;AAAAA;AAAAA;AAAAA,QAGFuD,EAAM,EACPA,OAAOC,EAAcC,IAAIF,MAAMW,QAAQC,UAAAA,CAAAA,CAAAA;AAAAA;AAAAA,QAGtChG,KAAK8F,IAAAA;AAAAA;AAAAA;;EAGT;AAAA;AAzHH/D,EAAA,CADCC,EAAS,EAAEC,MAAMG,OAAAA,CAAAA,CAAAA,GAhDEoC,EAiDpBrC,WAAA,QAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,OAtDEoC,CAAAA,CAAAA,GAAAA,EAuDpBrC,WAAA,eAAA,CAMAJ,GAAAA,EAAA,CADCC,EAAS,EAAEC,MAAMgE,OA5DEzB,CAAAA,CAAAA,GAAAA,EA6DpBrC,WAAA,aAAA,IAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMgE,OAAAA,CAAAA,CAAAA,GAlEEzB,EAmEpBrC,WAAA,aAAA,CAAA,GAMAJ,EAAA,CADCC,EAAS,EAAEC,MAAMG,OAAAA,CAAAA,CAAAA,GAxEEoC,EAyEpBrC,WAAA,WAAA,CAMAJ,GAAAA,EAAA,CADCC,EAAS,EAAEC,MAAMG,YA9EEoC,EA+EpBrC,WAAA,gBAAA,CAAA,GA/EoBqC,IAArBzC,EAAA,CADCO,EAAc,eACMkC;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";const u=require("lit"),i=require("lit/decorators.js"),m=require("lit/directives/class-map.js"),s=require("lit/directives/if-defined.js"),f=require("lit/directives/ref.js"),b=require("lit/directives/when.js"),o=require("rxjs");require("lit/directives/style-map.js");const g=require("./tailwind.mixin-CduPdozY.cjs"),y=require("./color-D8r6dpWm.cjs");require("./ripple-B_wT0zgD.cjs");const h=require("./theme.interface-Xg5Zi46a.cjs");var v=Object.defineProperty,$=Object.getOwnPropertyDescriptor,r=(t,n,p,a)=>{for(var c,l=a>1?void 0:a?$(n,p):n,d=t.length-1;d>=0;d--)(c=t[d])&&(l=(a?c(n,p,l):c(l))||l);return a&&l&&v(n,p,l),l};let e=class extends g.TailwindElement(":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}"){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=f.createRef(),"attachInternals"in this)try{this.internals=this.attachInternals()}catch{this.internals=void 0}}willUpdate(t){this.id||(this.id="schmancy-input-"+e._idCounter++),super.willUpdate(t)}get form(){var t;return((t=this.internals)==null?void 0:t.form)??null}updated(t){var n,p,a;super.updated(t),t.has("value")&&((n=this.internals)==null||n.setFormValue(this.value)),t.has("error")&&(this.error?(p=this.internals)==null||p.setValidity({customError:!0},"Invalid input",this.inputElement):(a=this.internals)==null||a.setValidity({}))}checkValidity(){var t;return((t=this.inputRef.value)==null?void 0:t.checkValidity())??!0}reportValidity(){var t;return((t=this.inputRef.value)==null?void 0:t.reportValidity())??!0}setCustomValidity(t){var n;(n=this.inputRef.value)==null||n.setCustomValidity(t)}firstUpdated(){this.autofocus&&this.focus(),o.fromEvent(this.inputElement,"input").pipe(o.map(t=>t.target.value),o.distinctUntilChanged(),o.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}))}),o.fromEvent(this.inputElement,"change").pipe(o.map(t=>t.target.value),o.distinctUntilChanged(),o.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t,this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0}))}),o.fromEvent(this.inputElement,"keyup").pipe(o.filter(t=>t.key==="Enter"),o.takeUntil(this.disconnecting)).subscribe(t=>{const{value:n}=t.target;this.value=n,this.dispatchEvent(new CustomEvent("enter",{detail:{value:n},bubbles:!0,composed:!0}))}),o.fromEvent(this.inputElement,"animationstart").pipe(o.filter(t=>t.animationName==="onAutoFillStart"),o.takeUntil(this.disconnecting)).subscribe(t=>{const{value:n}=t.target;this.value=n,this.dispatchEvent(new CustomEvent("change",{detail:{value:n},bubbles:!0,composed:!0}))})}select(){var t;return(t=this.inputRef.value)==null?void 0:t.select()}getValidity(){var t;return(t=this.inputRef.value)==null?void 0:t.validity}focus(t){var n;(n=this.inputRef.value)==null||n.focus(t),this.dispatchEvent(new Event("focus"))}click(){var t;(t=this.inputRef.value)==null||t.click(),this.dispatchEvent(new Event("click"))}blur(){var t;(t=this.inputRef.value)==null||t.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"},n={"opacity-40":this.disabled,"block mb-[4px]":!0};return u.html`
|
|
2
|
+
${b.when(this.label,()=>u.html`
|
|
3
|
+
<label
|
|
4
|
+
for=${this.id}
|
|
5
|
+
id="label-${this.id}"
|
|
6
|
+
class=${m.classMap(n)}
|
|
7
|
+
${y.color({color:this.error?h.SchmancyTheme.sys.color.error.default:h.SchmancyTheme.sys.color.primary.default})}
|
|
8
|
+
>
|
|
9
|
+
<schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>
|
|
10
|
+
</label>
|
|
11
|
+
`)}
|
|
12
|
+
|
|
13
|
+
<input
|
|
14
|
+
${y.color({bgColor:h.SchmancyTheme.sys.color.surface.highest,color:h.SchmancyTheme.sys.color.surface.on})}
|
|
15
|
+
${f.ref(this.inputRef)}
|
|
16
|
+
id=${this.id}
|
|
17
|
+
name=${this.name}
|
|
18
|
+
class=${m.classMap(t)}
|
|
19
|
+
.value=${this.value}
|
|
20
|
+
.type=${this.type}
|
|
21
|
+
.autocomplete=${this.autocomplete}
|
|
22
|
+
.spellcheck=${this.spellcheck}
|
|
23
|
+
placeholder=${this.placeholder}
|
|
24
|
+
inputmode=${s.ifDefined(this.inputmode)}
|
|
25
|
+
pattern=${s.ifDefined(this.pattern)}
|
|
26
|
+
step=${s.ifDefined(this.step)}
|
|
27
|
+
minlength=${s.ifDefined(this.minlength)}
|
|
28
|
+
maxlength=${s.ifDefined(this.maxlength)}
|
|
29
|
+
min=${s.ifDefined(this.min)}
|
|
30
|
+
max=${s.ifDefined(this.max)}
|
|
31
|
+
?required=${this.required}
|
|
32
|
+
?disabled=${this.disabled}
|
|
33
|
+
?readonly=${this.readonly}
|
|
34
|
+
aria-invalid=${this.error?"true":"false"}
|
|
35
|
+
aria-required=${this.required?"true":"false"}
|
|
36
|
+
aria-labelledby=${this.label?`label-${this.id}`:u.nothing}
|
|
37
|
+
aria-describedby=${this.hint?`hint-${this.id}`:u.nothing}
|
|
38
|
+
aria-label=${s.ifDefined(this.label?void 0:this.placeholder||"Input")}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
${b.when(this.hint,()=>u.html`
|
|
42
|
+
<div
|
|
43
|
+
id="hint-${this.id}"
|
|
44
|
+
class="pt-[2px]"
|
|
45
|
+
${y.color({color:this.error?h.SchmancyTheme.sys.color.error.default:h.SchmancyTheme.sys.color.primary.default})}
|
|
46
|
+
>
|
|
47
|
+
<schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
|
|
48
|
+
</div>
|
|
49
|
+
`)}
|
|
50
|
+
`}};e._idCounter=0,e.formAssociated=!0,e.shadowRootOptions={...u.LitElement.shadowRootOptions,delegatesFocus:!0},r([i.property({reflect:!0})],e.prototype,"id",2),r([i.property({type:String})],e.prototype,"label",2),r([i.property({reflect:!0})],e.prototype,"type",2),r([i.property()],e.prototype,"name",2),r([i.property()],e.prototype,"placeholder",2),r([i.property({type:String,reflect:!0})],e.prototype,"value",2),r([i.property({type:String,reflect:!0})],e.prototype,"pattern",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"required",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"disabled",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"readonly",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"clickable",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"spellcheck",2),r([i.property({type:String,reflect:!0})],e.prototype,"align",2),r([i.property()],e.prototype,"inputmode",2),r([i.property({type:Number})],e.prototype,"minlength",2),r([i.property({type:Number})],e.prototype,"maxlength",2),r([i.property()],e.prototype,"min",2),r([i.property()],e.prototype,"max",2),r([i.property({type:Number,reflect:!0})],e.prototype,"step",2),r([i.property({type:Boolean})],e.prototype,"autofocus",2),r([i.property({type:String,reflect:!0})],e.prototype,"autocomplete",2),r([i.property({type:Number,reflect:!0})],e.prototype,"tabIndex",2),r([i.property()],e.prototype,"hint",2),r([i.property({type:Boolean,reflect:!0})],e.prototype,"error",2),r([i.query("input")],e.prototype,"inputElement",2),e=r([i.customElement("schmancy-input")],e);
|
|
51
|
+
//# sourceMappingURL=input-DibJxeWY.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-DibJxeWY.cjs","sources":["../src/input/input.ts"],"sourcesContent":["import { html, LitElement, nothing, PropertyValueMap } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.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=${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=${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":["SchmancyInput","TailwindElement","constructor","super","this","id","label","type","name","Date","now","placeholder","value","required","disabled","readonly","clickable","spellcheck","align","autofocus","autocomplete","tabIndex","error","inputRef","createRef","internals","attachInternals","changedProps","_idCounter","willUpdate","form","updated","has","setFormValue","setValidity","customError","inputElement","checkValidity","reportValidity","message","setCustomValidity","focus","fromEvent","pipe","map","ev","target","distinctUntilChanged","takeUntil","disconnecting","subscribe","dispatchEvent","CustomEvent","detail","bubbles","composed","filter","key","animationName","select","validity","options","Event","click","blur","render","inputClasses","labelClasses","html","when","classMap","color","SchmancyTheme","sys","default","primary","bgColor","surface","highest","on","ref","ifDefined","inputmode","pattern","step","minlength","maxlength","min","max","nothing","hint","formAssociated","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","reflect","prototype","String","Boolean","Number","query","customElement"],"mappings":"4nBAoCA,IAAqBA,EAArB,cAA2CC,g1BAiI1C,aAAAC,CAEC,GADMC,MAAAA,EAzHPC,KAAgBC,GAAK,GAMeD,KAAAE,MAAA,GAMpCF,KAAOG,KAAiC,OAMxCH,KAAOI,KAAO,QAAQC,KAAKC,IAAAA,CAAAA,GAG3BN,KAAOO,YAAc,GAIrBP,KAAOQ,MAAQ,GAQfR,KAAOS,SAAAA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SAAAA,CAAAA,EA/EUhG,EAgFbkG,UAAA,MAAA,CAGAH,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM8F,OAAQJ,QAAAA,MAlFNjG,EAmFbkG,UAAA,OAAA,CAAA,EAIAH,EAAA,CADNC,WAAS,CAAEzF,KAAM6F,OAAAA,CAAAA,CAAAA,EAtFEpG,EAuFbkG,UAAA,YAAA,CAIAH,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM4F,OAAQF,QAAAA,EA1FNjG,CAAAA,CAAAA,EAAAA,EA2FbkG,UAAA,eAAA,GAMAH,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM8F,OAAQJ,QAAS,EAAA,CAAA,CAAA,EAhGfjG,EAiGbkG,UAAA,WAAA,CAMAH,EAAAA,EAAA,CADNC,EAASA,SAtGUhG,CAAAA,EAAAA,EAuGbkG,UAAA,OAAA,CAAA,EAOAH,EAAA,CADNC,EAAAA,SAAS,CAAEzF,KAAM6F,QAASH,UA7GPjG,CAAAA,CAAAA,EAAAA,EA8GbkG,UAAA,QAAA,CAKiBH,EAAAA,EAAA,CAAvBO,EAAAA,MAAM,OAnHatG,CAAAA,EAAAA,EAmHIkG,UAAA,eAAA,GAnHJlG,EAArB+F,EAAA,CADCQ,EAAAA,cAAc,gBACMvG,CAAAA,EAAAA,CAAAA"}
|
package/dist/input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./input-
|
|
1
|
+
"use strict";require("./input-DibJxeWY.cjs");
|
|
2
2
|
//# sourceMappingURL=input.cjs.map
|
package/dist/input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./input-
|
|
1
|
+
import "./input-CuvPPYVq.js";
|
|
2
2
|
//# sourceMappingURL=input.js.map
|
package/dist/layout.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./flex-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./flex-X4APHjaR.cjs");Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>e.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>e.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>e.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>e.SchmancyScroll});
|
|
2
2
|
//# sourceMappingURL=layout.cjs.map
|
package/dist/layout.js
CHANGED
|
@@ -2,7 +2,7 @@ import { c as g } from "./consume-fRVATvdE.js";
|
|
|
2
2
|
import "rxjs";
|
|
3
3
|
import "lit/directives/class-map.js";
|
|
4
4
|
import "lit/directives/style-map.js";
|
|
5
|
-
import { T as y } from "./tailwind.mixin-
|
|
5
|
+
import { T as y } from "./tailwind.mixin-B-T2bBPl.js";
|
|
6
6
|
import { n as h, e as v } from "./provide-BLSgVvMJ.js";
|
|
7
7
|
import { html as u, css as b } from "lit";
|
|
8
8
|
import { property as p, queryAssignedElements as f, customElement as m } from "lit/decorators.js";
|
|
@@ -66,4 +66,4 @@ export {
|
|
|
66
66
|
$ as S,
|
|
67
67
|
i as a
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=list-
|
|
69
|
+
//# sourceMappingURL=list-CWbygRrR.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-
|
|
1
|
+
{"version":3,"file":"list-CWbygRrR.js","sources":["../src/list/context.ts","../src/surface/context.ts","../src/list/list-item.ts","../src/list/list.ts"],"sourcesContent":["import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancySurfaceTypeContext = createContext<TSurfaceColor>('surface')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceFill } from '@schmancy/surface'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * `<schmancy-list>` component.\n *\n * A list component that wraps its content within a customizable surface.\n * It allows you to set the surface type and fill style, and can optionally\n * enable scrolling behavior by delegating the scroller attribute to the surface.\n *\n * @element schmancy-list\n * @slot - The default slot for list items.\n *\n * @example\n * <schmancy-list surface=\"container\" scroller>\n * <schmancy-list-item>List Item 1</schmancy-list-item>\n * </schmancy-list>\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * Defines the type or color of the surface used by the component.\n\t * This value is provided to descendant components via context.\n\t *\n\t * @attr surface\n\t * @type {TSurfaceColor}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\t/**\n\t * Determines the fill style of the underlying surface.\n\t *\n\t * @attr fill\n\t * @type {SchmancySurfaceFill}\n\t * @default 'auto'\n\t */\n\t@property({ type: String, reflect: true })\n\tfill: SchmancySurfaceFill = 'auto'\n\n\t/**\n\t * Defines the elevation level of the surface.\n\t *\n\t * @attr elevation\n\t * @type {number}\n\t * @default 0\n\t */\n\t@property({ type: Number })\n\televation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\t/**\n\t * Renders the component's template.\n\t * The list content is wrapped inside a `<schmancy-surface>` element.\n\t * The scroller property is delegated to the surface so that it controls\n\t * the scrollable behavior.\n\t *\n\t * @returns The HTML template for the component.\n\t */\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface .elevation=${this.elevation} .fill=${this.fill} type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListTypeContext","createContext","SchmancySurfaceTypeContext","SchmancyListItem","TailwindElement","super","arguments","this","selected","imgClasses","firstUpdated","leading","forEach","img","classList","add","trailing","render","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","List","css","fill","elevation","surface","provide","String","reflect","Number"],"mappings":";;;;;;;;;AAEa,MAAAA,IAA0BC,QCA1BC,GAAAA,IAA6BD,EAA6B,SAAA;;;;;ACa1D,IAAAE,IAAN,cAA+BC,EAAAA,EAAAA;AAAAA,EAA/B,cAAAC;AAAAA,UAAAA,GAAAC,SAU2CC,GAAAA,KAAAC;EAAA;AAAA,EAcjD,IAAcC,aAAAA;AACN,WAAA,CAAC,YAAY,YAAY,gBAAA;AAAA,EAAgB;AAAA,EAGjD,eAAAC;;AACMH,KAAAA,IAAAA,KAAAI,YAAAJ,QAAAA,EAASK,QAAeC,CAAAA,MAC5BA;AAAAA,MAAAA,EAAIC,UAAUC,IAAAA,GAAOR,KAAKE,UAAU;AAAA,IAAA,KAEhCF,IAAAA,KAAAS,aAAAT,QAAAA,EAAUK,QAAeC,CAAAA,MAC7BA;AAAAA,MAAAA,EAAIC,UAAUC,IAAOR,GAAAA,KAAKE;IA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AAA;AAAAA;AAAAA,CAAnC,EAAA;AAAA,EAAA,cAAAjC;AAAAA,UAAAA,GAAAC,SA2BsBC,GAAAA,KAAAgC,OAAA,QAUOhC,KAAAiC,YAAA;AAAA,EAAA;AAAA,EAUnC,SAAAvB;AACQ,WAAAK;AAAAA,kCACyBf,KAAKiC,SAAAA,UAAmBjC,KAAKgC,IAAAA,SAAahC,KAAKkC,OAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAAO;AAAA;AAhCvFhB,EAAA,CAFCiB,EAAQ,EAAEf,SAAS3B,EAAAA,CAAAA,GACnB6B,MAhBWQ,EAiBZP,WAAA,WAAA,CAAA,GAUAL,EAAA,CADCI,EAAS,EAAEE,MAAMY,QAAQC,YA1BdP,CAAAA,CAAAA,GAAAA,EA2BZP,WAAA,QAAA,IAUAL,EAAA,CADCI,EAAS,EAAEE,MAAMc,YApCNR,EAqCZP,WAAA,aAAA,CAAA,GArCYO,IAANZ,EAAA,CADNW,EAAc,eACFC,CAAAA,GAAAA,CAAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const h=require("./consume-Bb7_UzYd.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const y=require("./tailwind.mixin-
|
|
1
|
+
"use strict";const h=require("./consume-Bb7_UzYd.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const y=require("./tailwind.mixin-CduPdozY.cjs"),d=require("./provide-DSU87U5x.cjs"),p=require("lit"),r=require("lit/decorators.js"),m=require("lit/directives/when.js"),u=d.n(void 0),f=d.n("surface");var g=Object.defineProperty,v=Object.getOwnPropertyDescriptor,a=(i,t,s,n)=>{for(var o,e=n>1?void 0:n?v(t,s):t,l=i.length-1;l>=0;l--)(o=i[l])&&(e=(n?o(t,s,e):o(e))||e);return n&&e&&g(t,s,e),e};exports.SchmancyListItem=class extends y.TailwindElement(){constructor(){super(...arguments),this.selected=!1}get imgClasses(){return["h-[24px]","w-[24px]","object-contain"]}firstUpdated(){var i,t;(i=this.leading)==null||i.forEach(s=>{s.classList.add(...this.imgClasses)}),(t=this.trailing)==null||t.forEach(s=>{s.classList.add(...this.imgClasses)})}render(){const i={"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden":!0,"bg-secondary-container text-secondery-onContainer":this.selected},t={"z-0 duration-500 transition-opacity":!0,"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ":!this.readonly};return p.html` <li .tabIndex=${this.readonly?-1:0} class=${this.classMap(i)}>
|
|
2
2
|
${m.when(!this.readonly,()=>p.html` <div class="${this.classMap(t)}"></div>`)}
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</li>`}},a([h.c({context:f,subscribe:!0}),r.property()],exports.SchmancyListItem.prototype,"variant",2),a([r.property({type:Boolean})],exports.SchmancyListItem.prototype,"rounded",2),a([r.property({type:Boolean})],exports.SchmancyListItem.prototype,"readonly",2),a([r.property({type:Boolean})],exports.SchmancyListItem.prototype,"selected",2),a([r.queryAssignedElements({slot:"leading",flatten:!0})],exports.SchmancyListItem.prototype,"leading",2),a([r.queryAssignedElements({slot:"trailing",flatten:!0})],exports.SchmancyListItem.prototype,"trailing",2),exports.SchmancyListItem=a([r.customElement("schmancy-list-item")],exports.SchmancyListItem);var b=Object.defineProperty,L=Object.getOwnPropertyDescriptor,c=(i,t,s,n)=>{for(var o,e=n>1?void 0:n?L(t,s):t,l=i.length-1;l>=0;l--)(o=i[l])&&(e=(n?o(t,s,e):o(e))||e);return n&&e&&b(t,s,e),e};exports.List=class extends y.TailwindElement(p.css`
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
</ul>
|
|
15
15
|
</schmancy-surface>
|
|
16
16
|
`}},c([d.e({context:u}),r.property()],exports.List.prototype,"surface",2),c([r.property({type:String,reflect:!0})],exports.List.prototype,"fill",2),c([r.property({type:Number})],exports.List.prototype,"elevation",2),exports.List=c([r.customElement("schmancy-list")],exports.List),exports.SchmancyListTypeContext=u;
|
|
17
|
-
//# sourceMappingURL=list-
|
|
17
|
+
//# sourceMappingURL=list-QiglVzPK.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-
|
|
1
|
+
{"version":3,"file":"list-QiglVzPK.cjs","sources":["../src/list/context.ts","../src/surface/context.ts","../src/list/list-item.ts","../src/list/list.ts"],"sourcesContent":["import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancySurfaceTypeContext = createContext<TSurfaceColor>('surface')\n","import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceFill } from '@schmancy/surface'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * `<schmancy-list>` component.\n *\n * A list component that wraps its content within a customizable surface.\n * It allows you to set the surface type and fill style, and can optionally\n * enable scrolling behavior by delegating the scroller attribute to the surface.\n *\n * @element schmancy-list\n * @slot - The default slot for list items.\n *\n * @example\n * <schmancy-list surface=\"container\" scroller>\n * <schmancy-list-item>List Item 1</schmancy-list-item>\n * </schmancy-list>\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * Defines the type or color of the surface used by the component.\n\t * This value is provided to descendant components via context.\n\t *\n\t * @attr surface\n\t * @type {TSurfaceColor}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\t/**\n\t * Determines the fill style of the underlying surface.\n\t *\n\t * @attr fill\n\t * @type {SchmancySurfaceFill}\n\t * @default 'auto'\n\t */\n\t@property({ type: String, reflect: true })\n\tfill: SchmancySurfaceFill = 'auto'\n\n\t/**\n\t * Defines the elevation level of the surface.\n\t *\n\t * @attr elevation\n\t * @type {number}\n\t * @default 0\n\t */\n\t@property({ type: Number })\n\televation: 0 | 1 | 2 | 3 | 4 | 5 = 0\n\n\t/**\n\t * Renders the component's template.\n\t * The list content is wrapped inside a `<schmancy-surface>` element.\n\t * The scroller property is delegated to the surface so that it controls\n\t * the scrollable behavior.\n\t *\n\t * @returns The HTML template for the component.\n\t */\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface .elevation=${this.elevation} .fill=${this.fill} type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListTypeContext","createContext","SchmancySurfaceTypeContext","SchmancyListItem","TailwindElement","super","arguments","this","selected","leading","forEach","img","classList","add","imgClasses","trailing","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","List","css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list.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-QiglVzPK.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem}),exports.SchmancyListTypeContext=e.SchmancyListTypeContext;
|
|
2
2
|
//# sourceMappingURL=list.cjs.map
|
package/dist/list.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("./tailwind.mixin-
|
|
2
|
-
//# sourceMappingURL=litElement.mixin-
|
|
1
|
+
"use strict";const e=require("./tailwind.mixin-CduPdozY.cjs");exports.$LitElement=t=>{class s extends e.BaseElement(e.TailwindElement(t)){constructor(){super(...arguments),this.disconnectedCallback=()=>{super.disconnectedCallback()}}}return s};
|
|
2
|
+
//# sourceMappingURL=litElement.mixin-D_oDZMIO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"litElement.mixin-
|
|
1
|
+
{"version":3,"file":"litElement.mixin-D_oDZMIO.cjs","sources":["../mixins/litElement.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement } from 'lit'\nimport { TailwindElement } from './tailwind.mixin'\nimport { BaseElement, IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\n\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass TailwindMixinClass extends BaseElement(TailwindElement(componentStyle)) {\n\t\tdisconnectedCallback = () => {\n\t\t\tsuper.disconnectedCallback()\n\t\t}\n\t}\n\treturn TailwindMixinClass as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin> /* see \"typing the subclass\" below */\n}\n"],"names":["componentStyle","TailwindMixinClass","BaseElement","TailwindElement","constructor","super","arguments","this","disconnectedCallback"],"mappings":"kFAKiDA,GAAAA,CAChD,MAAMC,UAA2BC,EAAAA,YAAYC,kBAAgBH,IAA7D,aAAAI,CAAAC,MAAAC,GAAAA,SAAAA,EACCC,KAAAC,qBAAuB,IACtBH,CAAAA,MAAMG,qBAAqB,CAAA,CAC5B,CAEM,CAAA,OAAAP,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as t, T as r } from "./tailwind.mixin-
|
|
1
|
+
import { B as t, T as r } from "./tailwind.mixin-B-T2bBPl.js";
|
|
2
2
|
const n = (s) => {
|
|
3
3
|
class e extends t(r(s)) {
|
|
4
4
|
constructor() {
|
|
@@ -12,4 +12,4 @@ const n = (s) => {
|
|
|
12
12
|
export {
|
|
13
13
|
n as $
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=litElement.mixin-
|
|
15
|
+
//# sourceMappingURL=litElement.mixin-MZntPOCu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"litElement.mixin-
|
|
1
|
+
{"version":3,"file":"litElement.mixin-MZntPOCu.js","sources":["../mixins/litElement.mixin.ts"],"sourcesContent":["import { CSSResult, LitElement } from 'lit'\nimport { TailwindElement } from './tailwind.mixin'\nimport { BaseElement, IBaseMixin } from './baseElement'\nimport { Constructor } from './constructor'\n\nexport const $LitElement = <T extends CSSResult>(componentStyle?: T) => {\n\tclass TailwindMixinClass extends BaseElement(TailwindElement(componentStyle)) {\n\t\tdisconnectedCallback = () => {\n\t\t\tsuper.disconnectedCallback()\n\t\t}\n\t}\n\treturn TailwindMixinClass as CustomElementConstructor &\n\t\tConstructor<LitElement> &\n\t\tConstructor<IBaseMixin> /* see \"typing the subclass\" below */\n}\n"],"names":["$LitElement","componentStyle","TailwindMixinClass","BaseElement","TailwindElement","super","arguments","this","disconnectedCallback"],"mappings":";AAKa,MAAAA,IAAoCC,CAAAA;EAChD,MAAMC,UAA2BC,EAAYC,EAAgBH,CAA7D,CAAA,EAAA;AAAA,IAAA;AAAAI,YAAAC,GAAAA,SAAAA,GACCC,KAAAC,uBAAuB,MACtBH;AAAAA,cAAMG;MAAqB;AAAA,IAC5B;AAAA,EAAA;AAEM,SAAAN;AAAA;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const d=require("./litElement.mixin-
|
|
1
|
+
"use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const d=require("./litElement.mixin-D_oDZMIO.cjs"),b=require("./tailwind.mixin-CduPdozY.cjs"),u=require("lit"),c=require("lit/decorators.js"),l=require("@floating-ui/dom");var y=Object.getOwnPropertyDescriptor;let p=class extends d.$LitElement(u.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
}
|
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
<slot></slot>
|
|
34
34
|
</ul>
|
|
35
35
|
`}};h([c.queryAssignedElements({flatten:!0,slot:"button"})],m.prototype,"buttonElement",2),h([c.query("#menu")],m.prototype,"menuElement",2),m=h([c.customElement("schmancy-menu")],m);
|
|
36
|
-
//# sourceMappingURL=menu-
|
|
36
|
+
//# sourceMappingURL=menu-Bn4JuaBS.cjs.map
|