@mhmo91/schmancy 0.4.1 → 0.4.3
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/{animated-text-DBk95qoX.cjs → animated-text-5NJFGbRC.cjs} +2 -2
- package/dist/{animated-text-DBk95qoX.cjs.map → animated-text-5NJFGbRC.cjs.map} +1 -1
- package/dist/{animated-text-BhACpxZL.js → animated-text-C63wwL5H.js} +3 -3
- package/dist/{animated-text-BhACpxZL.js.map → animated-text-C63wwL5H.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-B78lu4GT.cjs +8 -0
- package/dist/{area.component-CbT_WCUv.cjs.map → area.component-B78lu4GT.cjs.map} +1 -1
- package/dist/{area.component-DX2Y6cAp.js → area.component-mDv3w12S.js} +85 -90
- package/dist/{area.component-DX2Y6cAp.js.map → area.component-mDv3w12S.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-BLtChct9.js +315 -0
- package/dist/{autocomplete-Qr_SNWus.js.map → autocomplete-BLtChct9.js.map} +1 -1
- package/dist/autocomplete-JjaB0OPh.cjs +73 -0
- package/dist/{autocomplete-ByVC8MLH.cjs.map → autocomplete-JjaB0OPh.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar-BuCRVCII.cjs +211 -0
- package/dist/avatar-BuCRVCII.cjs.map +1 -0
- package/dist/{avatar-BFxYkrCv.js → avatar-WaHuf8DW.js} +205 -322
- package/dist/avatar-WaHuf8DW.js.map +1 -0
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-ZKuOCC1g.js → boat-BTnwHy3K.js} +2 -2
- package/dist/{boat-ZKuOCC1g.js.map → boat-BTnwHy3K.js.map} +1 -1
- package/dist/{boat-RaIwtGNW.cjs → boat-RjFQ6YHH.cjs} +2 -2
- package/dist/{boat-RaIwtGNW.cjs.map → boat-RjFQ6YHH.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.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 +7 -1
- package/dist/{checkbox-BZvRSKLj.cjs → checkbox-BdCbMFh6.cjs} +4 -4
- package/dist/{checkbox-BZvRSKLj.cjs.map → checkbox-BdCbMFh6.cjs.map} +1 -1
- package/dist/{checkbox-Cy3X3PGY.js → checkbox-C6B9Iii2.js} +34 -35
- package/dist/{checkbox-Cy3X3PGY.js.map → checkbox-C6B9Iii2.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-Y1qvw2Wa.js → chips-CLKkNCVv.js} +59 -61
- package/dist/{chips-Y1qvw2Wa.js.map → chips-CLKkNCVv.js.map} +1 -1
- package/dist/{chips-5IKm7m8x.cjs → chips-eAdPw08P.cjs} +25 -25
- package/dist/{chips-5IKm7m8x.cjs.map → chips-eAdPw08P.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/{circular-progress-utG8iIPV.js → circular-progress-C246y_3U.js} +3 -3
- package/dist/{circular-progress-utG8iIPV.js.map → circular-progress-C246y_3U.js.map} +1 -1
- package/dist/{circular-progress-BZwI11v0.cjs → circular-progress-E9riM09J.cjs} +2 -2
- package/dist/{circular-progress-BZwI11v0.cjs.map → circular-progress-E9riM09J.cjs.map} +1 -1
- package/dist/circular-progress.cjs +1 -1
- package/dist/circular-progress.js +1 -1
- package/dist/code-highlight.cjs +1 -1
- package/dist/code-highlight.js +1 -1
- package/dist/{code-preview-CN4mbrHE.cjs → code-preview-Cw3eINAz.cjs} +9 -9
- package/dist/{code-preview-CN4mbrHE.cjs.map → code-preview-Cw3eINAz.cjs.map} +1 -1
- package/dist/{code-preview-C_W44LD7.js → code-preview-CxDOJhpM.js} +166 -168
- package/dist/{code-preview-C_W44LD7.js.map → code-preview-CxDOJhpM.js.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/{consume-B05Dd6qy.js → consume-5D1qfVWM.js} +2 -2
- package/dist/{consume-B05Dd6qy.js.map → consume-5D1qfVWM.js.map} +1 -1
- package/dist/{consume-uKrSupzs.cjs → consume-edta5ng5.cjs} +2 -2
- package/dist/{consume-uKrSupzs.cjs.map → consume-edta5ng5.cjs.map} +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{context-object-CISes2bD.js → context-object-CDDP4bTk.js} +6 -8
- package/dist/{context-object-CISes2bD.js.map → context-object-CDDP4bTk.js.map} +1 -1
- package/dist/context-object-K_1gDFu-.cjs +2 -0
- package/dist/{context-object-CP7HbDFQ.cjs.map → context-object-K_1gDFu-.cjs.map} +1 -1
- package/dist/date-range-CYMv_xG-.cjs +121 -0
- package/dist/date-range-CYMv_xG-.cjs.map +1 -0
- package/dist/date-range-DStUXYx-.js +596 -0
- package/dist/date-range-DStUXYx-.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-Cd-N6nxZ.js → delay-1MUDagyy.js} +57 -70
- package/dist/{delay-Cd-N6nxZ.js.map → delay-1MUDagyy.js.map} +1 -1
- package/dist/delay-DkQ3ZZuE.cjs +10 -0
- package/dist/{delay-CLGKeX0n.cjs.map → delay-DkQ3ZZuE.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{dialog-content-C835zQHB.js → dialog-content-CXBx9Bmp.js} +9 -11
- package/dist/{dialog-content-C835zQHB.js.map → dialog-content-CXBx9Bmp.js.map} +1 -1
- package/dist/{dialog-content-DWITDRHy.cjs → dialog-content-CjgsxN8I.cjs} +4 -4
- package/dist/{dialog-content-DWITDRHy.cjs.map → dialog-content-CjgsxN8I.cjs.map} +1 -1
- package/dist/dialog-service-BgqAlT7T.cjs +2 -0
- package/dist/{dialog-service-Di9NiBao.cjs.map → dialog-service-BgqAlT7T.cjs.map} +1 -1
- package/dist/dialog-service-CnjZCTMj.js +127 -0
- package/dist/{dialog-service-noGCuxg1.js.map → dialog-service-CnjZCTMj.js.map} +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +2 -2
- package/dist/{divider-D7pxxtTI.js → divider-GhXZhIur.js} +3 -3
- package/dist/{divider-D7pxxtTI.js.map → divider-GhXZhIur.js.map} +1 -1
- package/dist/{divider-C7UzzgIj.cjs → divider-OSlBVpO-.cjs} +2 -2
- package/dist/{divider-C7UzzgIj.cjs.map → divider-OSlBVpO-.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{dropdown-content-DJFDnoKm.js → dropdown-content-BcGSsDWz.js} +16 -20
- package/dist/{dropdown-content-DJFDnoKm.js.map → dropdown-content-BcGSsDWz.js.map} +1 -1
- package/dist/{dropdown-content-RMyyjS7G.cjs → dropdown-content-Cd1O_kVO.cjs} +4 -4
- package/dist/{dropdown-content-RMyyjS7G.cjs.map → dropdown-content-Cd1O_kVO.cjs.map} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-Bu7OqH-d.js → flex-BftnODFE.js} +63 -64
- package/dist/{flex-Bu7OqH-d.js.map → flex-BftnODFE.js.map} +1 -1
- package/dist/{flex-Cg_UtAIG.cjs → flex-DyHrvDQU.cjs} +10 -10
- package/dist/{flex-Cg_UtAIG.cjs.map → flex-DyHrvDQU.cjs.map} +1 -1
- package/dist/flow-D0e7hGXO.cjs +2 -0
- package/dist/{flow-CnJl1T1A.cjs.map → flow-D0e7hGXO.cjs.map} +1 -1
- package/dist/{flow-B1wMqea2.js → flow-DXYqC9OA.js} +50 -52
- package/dist/{flow-B1wMqea2.js.map → flow-DXYqC9OA.js.map} +1 -1
- package/dist/{form-WeCrsPmp.js → form-2QZDF5pF.js} +19 -28
- package/dist/{form-WeCrsPmp.js.map → form-2QZDF5pF.js.map} +1 -1
- package/dist/form-B0stbhfQ.cjs +14 -0
- package/dist/{form-DzfdidJO.cjs.map → form-B0stbhfQ.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-Be8aUtz9.js → icon-DWdq9YQM.js} +8 -9
- package/dist/{icon-Be8aUtz9.js.map → icon-DWdq9YQM.js.map} +1 -1
- package/dist/{icon-4c4f-QXa.cjs → icon-JitLog9X.cjs} +4 -4
- package/dist/{icon-4c4f-QXa.cjs.map → icon-JitLog9X.cjs.map} +1 -1
- package/dist/{icon-button-Mfs7C_ol.js → icon-button-BMkYjAl1.js} +40 -41
- package/dist/{icon-button-Mfs7C_ol.js.map → icon-button-BMkYjAl1.js.map} +1 -1
- package/dist/icon-button-em1NSoxk.cjs +69 -0
- package/dist/{icon-button-DNvGlOPI.cjs.map → icon-button-em1NSoxk.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 +167 -162
- package/dist/index.js.map +1 -1
- package/dist/{input-CpYu_aUV.js → input-6XNB7MZP.js} +86 -113
- package/dist/{input-CpYu_aUV.js.map → input-6XNB7MZP.js.map} +1 -1
- package/dist/input-BlpSg5js.cjs +111 -0
- package/dist/{input-CD59n3y-.cjs.map → input-BlpSg5js.cjs.map} +1 -1
- 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-DNZhjJ-s.js → list-BxLFi3dU.js} +20 -21
- package/dist/{list-DNZhjJ-s.js.map → list-BxLFi3dU.js.map} +1 -1
- package/dist/{list-kvjz9d5N.cjs → list-CmbK_JyT.cjs} +4 -4
- package/dist/{list-kvjz9d5N.cjs.map → list-CmbK_JyT.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-DMTxmbnz.js → litElement.mixin-BC40ZfGG.js} +2 -2
- package/dist/{litElement.mixin-DMTxmbnz.js.map → litElement.mixin-BC40ZfGG.js.map} +1 -1
- package/dist/{litElement.mixin-CrXwM_fu.cjs → litElement.mixin-BDMVhBpu.cjs} +2 -2
- package/dist/{litElement.mixin-CrXwM_fu.cjs.map → litElement.mixin-BDMVhBpu.cjs.map} +1 -1
- package/dist/media-DR_teeoc.js +185 -0
- package/dist/media-DR_teeoc.js.map +1 -0
- package/dist/media-DSVZ83aB.cjs +128 -0
- package/dist/media-DSVZ83aB.cjs.map +1 -0
- package/dist/{menu-CzoGF0Jg.js → menu-CwKx1goz.js} +3 -3
- package/dist/{menu-CzoGF0Jg.js.map → menu-CwKx1goz.js.map} +1 -1
- package/dist/{menu-DSJGu_Le.cjs → menu-DRwYeROH.cjs} +2 -2
- package/dist/{menu-DSJGu_Le.cjs.map → menu-DRwYeROH.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{notification-service-dKoZweFH.cjs → notification-service-C6Bv3f71.cjs} +6 -6
- package/dist/{notification-service-dKoZweFH.cjs.map → notification-service-C6Bv3f71.cjs.map} +1 -1
- package/dist/{notification-service-BUZQ2nOZ.js → notification-service-ufUrNaq3.js} +4 -4
- package/dist/{notification-service-BUZQ2nOZ.js.map → notification-service-ufUrNaq3.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-dBiLTB_w.js → option-CayvURH3.js} +3 -4
- package/dist/{option-dBiLTB_w.js.map → option-CayvURH3.js.map} +1 -1
- package/dist/{option-BXU6HGLZ.cjs → option-Dt7pNR-a.cjs} +3 -3
- package/dist/{option-BXU6HGLZ.cjs.map → option-Dt7pNR-a.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{payment-card-form-Bhy7PHzr.js → payment-card-form-DPf41TU3.js} +3 -3
- package/dist/{payment-card-form-Bhy7PHzr.js.map → payment-card-form-DPf41TU3.js.map} +1 -1
- package/dist/{payment-card-form-HSho3d5z.cjs → payment-card-form-xKlOCP9C.cjs} +2 -2
- package/dist/{payment-card-form-HSho3d5z.cjs.map → payment-card-form-xKlOCP9C.cjs.map} +1 -1
- package/dist/provide-BxZ2kn_p.cjs +2 -0
- package/dist/{provide-BGGp1Iks.cjs.map → provide-BxZ2kn_p.cjs.map} +1 -1
- package/dist/{provide-hwQSumt-.js → provide-tcktw8xB.js} +41 -42
- package/dist/{provide-hwQSumt-.js.map → provide-tcktw8xB.js.map} +1 -1
- package/dist/radio-button-BWJLsF3d.cjs +41 -0
- package/dist/{radio-button-dwmtJ2ef.cjs.map → radio-button-BWJLsF3d.cjs.map} +1 -1
- package/dist/radio-button-DouFDjcL.js +151 -0
- package/dist/{radio-button-DDbyvXw1.js.map → radio-button-DouFDjcL.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{redispatch-event-CF5ekzwZ.js → redispatch-event-BLom7yp4.js} +65 -68
- package/dist/{redispatch-event-CF5ekzwZ.js.map → redispatch-event-BLom7yp4.js.map} +1 -1
- package/dist/redispatch-event-DHcobAl6.cjs +4 -0
- package/dist/{redispatch-event-roczetCU.cjs.map → redispatch-event-DHcobAl6.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-COL9P7PV.cjs → schmancy-steps-container-3-Bd627o.cjs} +3 -3
- package/dist/{schmancy-steps-container-COL9P7PV.cjs.map → schmancy-steps-container-3-Bd627o.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-BrfKRYkI.js → schmancy-steps-container-CWBj3izf.js} +5 -6
- package/dist/{schmancy-steps-container-BrfKRYkI.js.map → schmancy-steps-container-CWBj3izf.js.map} +1 -1
- package/dist/{select-C6O6NRea.js → select-BjZUTKHm.js} +46 -56
- package/dist/{select-C6O6NRea.js.map → select-BjZUTKHm.js.map} +1 -1
- package/dist/select-Bv_TZZ-v.cjs +56 -0
- package/dist/{select-PrgXr6zf.cjs.map → select-Bv_TZZ-v.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{selector-hook-B6uqLA-J.js → selector-hook-BvXML7_4.js} +61 -64
- package/dist/{selector-hook-B6uqLA-J.js.map → selector-hook-BvXML7_4.js.map} +1 -1
- package/dist/selector-hook-CYMLsOvh.cjs +2 -0
- package/dist/{selector-hook-CyvD9WN9.cjs.map → selector-hook-CYMLsOvh.cjs.map} +1 -1
- package/dist/sheet-D8SmGguy.js +141 -0
- package/dist/{sheet-lcz-71nv.js.map → sheet-D8SmGguy.js.map} +1 -1
- package/dist/sheet-tx2jWxVd.cjs +47 -0
- package/dist/{sheet-CNvW8vrn.cjs.map → sheet-tx2jWxVd.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/{slider-BNXI3Yj7.cjs → slider-Bo-4a-Ss.cjs} +8 -8
- package/dist/{slider-BNXI3Yj7.cjs.map → slider-Bo-4a-Ss.cjs.map} +1 -1
- package/dist/{slider-i-AZp4UF.js → slider-ytiEVvLJ.js} +36 -40
- package/dist/{slider-i-AZp4UF.js.map → slider-ytiEVvLJ.js.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-Df6JHzWX.js → spinner-BuH3Wf-1.js} +3 -3
- package/dist/{spinner-Df6JHzWX.js.map → spinner-BuH3Wf-1.js.map} +1 -1
- package/dist/{spinner-DItpvohq.cjs → spinner-RIkASBZt.cjs} +2 -2
- package/dist/{spinner-DItpvohq.cjs.map → spinner-RIkASBZt.cjs.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.js +2 -2
- package/dist/{surface-BaatMeqX.js → surface-Bkj3lZLo.js} +3 -3
- package/dist/{surface-BaatMeqX.js.map → surface-Bkj3lZLo.js.map} +1 -1
- package/dist/{surface-DiP3y6CA.cjs → surface-D-2akvnF.cjs} +2 -2
- package/dist/{surface-DiP3y6CA.cjs.map → surface-D-2akvnF.cjs.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-BY56H-_F.js → table-BNUCQw-a.js} +58 -68
- package/dist/{table-BY56H-_F.js.map → table-BNUCQw-a.js.map} +1 -1
- package/dist/table-BpeeUiM1.cjs +65 -0
- package/dist/{table-BRQDbCA8.cjs.map → table-BpeeUiM1.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-compatibility-pq--kZ3e.cjs → tabs-compatibility-CIQWnzk8.cjs} +5 -5
- package/dist/{tabs-compatibility-pq--kZ3e.cjs.map → tabs-compatibility-CIQWnzk8.cjs.map} +1 -1
- package/dist/{tabs-compatibility-qFYA1HDl.js → tabs-compatibility-c-iBrBOK.js} +20 -21
- package/dist/{tabs-compatibility-qFYA1HDl.js.map → tabs-compatibility-c-iBrBOK.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-Ba46CZMW.js +43 -0
- package/dist/{tailwind.mixin-DbsxfE0U.js.map → tailwind.mixin-Ba46CZMW.js.map} +1 -1
- package/dist/tailwind.mixin-DJWjTKPc.cjs +2 -0
- package/dist/{tailwind.mixin-CPvz1Npj.cjs.map → tailwind.mixin-DJWjTKPc.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DPD_F-N6.cjs → textarea-DL-qgeME.cjs} +12 -12
- package/dist/{textarea-DPD_F-N6.cjs.map → textarea-DL-qgeME.cjs.map} +1 -1
- package/dist/{textarea-D2m3usht.js → textarea-jbhUeEzu.js} +31 -45
- package/dist/{textarea-D2m3usht.js.map → textarea-jbhUeEzu.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-0dEQlWtO.cjs → theme-button-BcRuHUSa.cjs} +2 -2
- package/dist/{theme-button-0dEQlWtO.cjs.map → theme-button-BcRuHUSa.cjs.map} +1 -1
- package/dist/{theme-button-ucq2VrW0.js → theme-button-CBJXLV0Z.js} +2 -2
- package/dist/{theme-button-ucq2VrW0.js.map → theme-button-CBJXLV0Z.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-DOSuAou9.js → theme.component-DC3WGfcn.js} +24 -25
- package/dist/{theme.component-DOSuAou9.js.map → theme.component-DC3WGfcn.js.map} +1 -1
- package/dist/{theme.component-E4gA7t5r.cjs → theme.component-DFALHVCM.cjs} +2 -2
- package/dist/{theme.component-E4gA7t5r.cjs.map → theme.component-DFALHVCM.cjs.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-xOWMbSDV.js → timezone-CDz5qI2Z.js} +22 -28
- package/dist/{timezone-xOWMbSDV.js.map → timezone-CDz5qI2Z.js.map} +1 -1
- package/dist/{timezone-Bf4J_3By.cjs → timezone-IrGPq2tl.cjs} +6 -6
- package/dist/{timezone-Bf4J_3By.cjs.map → timezone-IrGPq2tl.cjs.map} +1 -1
- package/dist/{tooltip-zsp-xmPP.js → tooltip-BaX2Qoi8.js} +29 -31
- package/dist/{tooltip-zsp-xmPP.js.map → tooltip-BaX2Qoi8.js.map} +1 -1
- package/dist/tooltip-VUFi4Gjt.cjs +7 -0
- package/dist/{tooltip-6a1_bSeD.cjs.map → tooltip-VUFi4Gjt.cjs.map} +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/{tree-DRa2127p.cjs → tree-Bz6GjWwf.cjs} +2 -2
- package/dist/{tree-DRa2127p.cjs.map → tree-Bz6GjWwf.cjs.map} +1 -1
- package/dist/{tree-D0FCXUWg.js → tree-DGUU6cQI.js} +2 -2
- package/dist/{tree-D0FCXUWg.js.map → tree-DGUU6cQI.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typewriter-9XKXLbKA.cjs +21 -0
- package/dist/{typewriter-XTltzkLy.cjs.map → typewriter-9XKXLbKA.cjs.map} +1 -1
- package/dist/typewriter-BdQEQLOW.js +437 -0
- package/dist/{typewriter-BNTzu9jY.js.map → typewriter-BdQEQLOW.js.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DCP0jC-m.js → typography-B1KbZvto.js} +2 -2
- package/dist/{typography-DCP0jC-m.js.map → typography-B1KbZvto.js.map} +1 -1
- package/dist/{typography-nVG55_Y6.cjs → typography-RGPsRMJw.cjs} +2 -2
- package/dist/{typography-nVG55_Y6.cjs.map → typography-RGPsRMJw.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +14 -17
- package/dist/area.component-CbT_WCUv.cjs +0 -8
- package/dist/autocomplete-ByVC8MLH.cjs +0 -73
- package/dist/autocomplete-Qr_SNWus.js +0 -324
- package/dist/avatar-BFxYkrCv.js.map +0 -1
- package/dist/avatar-Bqohpa1o.cjs +0 -281
- package/dist/avatar-Bqohpa1o.cjs.map +0 -1
- package/dist/context-object-CP7HbDFQ.cjs +0 -2
- package/dist/date-range-CIn-HKuL.js +0 -637
- package/dist/date-range-CIn-HKuL.js.map +0 -1
- package/dist/date-range-Dff7Y8Ph.cjs +0 -139
- package/dist/date-range-Dff7Y8Ph.cjs.map +0 -1
- package/dist/delay-CLGKeX0n.cjs +0 -10
- package/dist/dialog-service-Di9NiBao.cjs +0 -2
- package/dist/dialog-service-noGCuxg1.js +0 -127
- package/dist/flow-CnJl1T1A.cjs +0 -2
- package/dist/form-DzfdidJO.cjs +0 -14
- package/dist/icon-button-DNvGlOPI.cjs +0 -69
- package/dist/input-CD59n3y-.cjs +0 -111
- package/dist/provide-BGGp1Iks.cjs +0 -2
- package/dist/radio-button-DDbyvXw1.js +0 -157
- package/dist/radio-button-dwmtJ2ef.cjs +0 -41
- package/dist/redispatch-event-roczetCU.cjs +0 -4
- package/dist/select-PrgXr6zf.cjs +0 -56
- package/dist/selector-hook-CyvD9WN9.cjs +0 -2
- package/dist/sheet-CNvW8vrn.cjs +0 -47
- package/dist/sheet-lcz-71nv.js +0 -146
- package/dist/table-BRQDbCA8.cjs +0 -65
- package/dist/tailwind.mixin-CPvz1Npj.cjs +0 -2
- package/dist/tailwind.mixin-DbsxfE0U.js +0 -43
- package/dist/tooltip-6a1_bSeD.cjs +0 -7
- package/dist/typewriter-BNTzu9jY.js +0 -436
- package/dist/typewriter-XTltzkLy.cjs +0 -21
package/dist/input-CD59n3y-.cjs
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";const y=require("lit"),i=require("lit/decorators.js"),u=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-CPvz1Npj.cjs"),f=require("./ripple-C2BHbhcS.cjs"),d=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,e,o,h)=>{for(var c,p=h>1?void 0:h?x(e,o):e,m=t.length-1;m>=0;m--)(c=t[m])&&(p=(h?c(e,o,p):c(p))||p);return h&&p&&$(e,o,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(){var t;return((t=this.internals)==null?void 0:t.form)??null}updated(t){var e;super.updated(t),t.has("value")&&(this.value!==this.defaultValue&&(this.dirty=!0),(e=this.internals)==null||e.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(){var t;(t=this.internals)!=null&&t.form&&(this.formResetObserver=new MutationObserver(e=>{for(const o of e)o.type==="attributes"&&o.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(e=>{e.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(){var t,e,o;this.error?this.validationMessage?(t=this.internals)==null||t.setValidity({customError:!0},this.validationMessage,this.inputElement):(e=this.internals)==null||e.setValidity({customError:!0},"Invalid input",this.inputElement):(o=this.internals)==null||o.setValidity({})}validateInput(t=!1){var c,p;if(this.disabled)return;const e=this.shouldShowValidation(t),o=((c=this.inputElement)==null?void 0:c.validity)??{customError:!1,valid:!0},h=!o.valid&&!o.customError;e&&h?(this.error=!0,this.validationMessage=((p=this.inputElement)==null?void 0:p.validationMessage)||""):o.valid?(this.error=!1,o.customError||(this.validationMessage="")):e||(this.error=!1),this.updateValidityState()}checkValidity(){var e;const t=((e=this.inputRef.value)==null?void 0:e.checkValidity())??!0;return this.internals&&!t?(this.internals.checkValidity(),!1):t}reportValidity(){var e;this.touched=!0,this.submitted=!0;const t=((e=this.inputRef.value)==null?void 0:e.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 e=t;return{value:t.target.value,inputType:e.inputType,data:e.data,isComposing:e.isComposing,originalEvent:t}}),n.takeUntil(this.disconnecting)).subscribe(t=>{this.value=t.value,this.dirty=this.value!==this.defaultValue;const e=new CustomEvent("input",{detail:{value:t.value},bubbles:!0,composed:!0});Object.defineProperties(e,{inputType:{value:t.inputType},data:{value:t.data},isComposing:{value:t.isComposing}}),this.dispatchEvent(e),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 e=new CustomEvent("focus",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)}),n.fromEvent(this.inputElement,"blur").pipe(n.takeUntil(this.disconnecting)).subscribe(t=>{this.touched=!0,this.disabled||this.validateInput();const e=new CustomEvent("blur",{bubbles:t.bubbles,cancelable:t.cancelable,composed:t.composed});Object.defineProperties(e,{relatedTarget:{value:t.relatedTarget}}),this.dispatchEvent(e)})}setupAutofillDetection(){n.fromEvent(this.inputElement,"animationstart").pipe(n.filter(t=>t.animationName==="onAutoFillStart"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value=e,this.isAutofilled=!0,this.dirty=this.value!==this.defaultValue,this.dispatchEvent(new CustomEvent("autofill",{detail:{value:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:{value:e},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:e}=t.target;this.value=e,this.dirty=this.value!==this.defaultValue;const o=new CustomEvent("enter",{detail:{value:e},bubbles:!0,composed:!0});Object.defineProperties(o,{key:{value:"Enter"},code:{value:"Enter"},keyCode:{value:13},which:{value:13}}),this.dispatchEvent(o)})}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}setSelectionRange(t,e,o){var h;(h=this.inputRef.value)==null||h.setSelectionRange(t,e,o)}get selectionStart(){var t;return((t=this.inputRef.value)==null?void 0:t.selectionStart)??null}get selectionEnd(){var t;return((t=this.inputRef.value)==null?void 0:t.selectionEnd)??null}get selectionDirection(){var t;return((t=this.inputRef.value)==null?void 0:t.selectionDirection)??null}setRangeText(t,e,o,h){var c,p;e!==void 0&&o!==void 0?(c=this.inputRef.value)==null||c.setRangeText(t,e,o,h):(p=this.inputRef.value)==null||p.setRangeText(t)}focus(t){var e;(e=this.inputRef.value)==null||e.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{height:t,padding:e,fontSize:o}=(()=>{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"}}})(),h={"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},c={"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:e,fontSize:o};return y.html`
|
|
2
|
-
${v.when(this.label,()=>y.html`
|
|
3
|
-
<label
|
|
4
|
-
for=${this.id}
|
|
5
|
-
id="label-${this.id}"
|
|
6
|
-
class=${this.classMap(c)}
|
|
7
|
-
${f.color({color:this.error?d.SchmancyTheme.sys.color.error.default:d.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:d.SchmancyTheme.sys.color.surface.highest,color:d.SchmancyTheme.sys.color.surface.on})}
|
|
17
|
-
${b.ref(this.inputRef)}
|
|
18
|
-
id=${this.id}
|
|
19
|
-
name=${this.name}
|
|
20
|
-
class=${this.classMap(h)}
|
|
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=${u.ifDefined(this.inputmode)}
|
|
28
|
-
pattern=${u.ifDefined(this.pattern)}
|
|
29
|
-
step=${u.ifDefined(this.step)}
|
|
30
|
-
minlength=${u.ifDefined(this.minlength)}
|
|
31
|
-
maxlength=${u.ifDefined(this.maxlength)}
|
|
32
|
-
min=${u.ifDefined(this.min)}
|
|
33
|
-
max=${u.ifDefined(this.max)}
|
|
34
|
-
list=${u.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}`:y.nothing}
|
|
41
|
-
aria-describedby=${this.hint?`hint-${this.id}`:y.nothing}
|
|
42
|
-
aria-label=${u.ifDefined(this.label?void 0:this.placeholder||"Input")}
|
|
43
|
-
aria-autocomplete=${this.list?"list":"none"}
|
|
44
|
-
/>
|
|
45
|
-
|
|
46
|
-
${v.when(this.hint,()=>y.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?d.SchmancyTheme.sys.color.error.default:d.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={...y.LitElement.shadowRootOptions,delegatesFocus:!0},r([i.property({reflect:!0})],s.prototype,"id",2),r([i.property({type:String})],s.prototype,"label",2),r([i.property({reflect:!0})],s.prototype,"type",2),r([i.property()],s.prototype,"name",2),r([i.property()],s.prototype,"placeholder",2),r([i.property({type:String,reflect:!0})],s.prototype,"value",2),r([i.property({type:String,reflect:!0})],s.prototype,"pattern",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"required",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"disabled",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"readonly",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"clickable",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"spellcheck",2),r([i.property({type:String,reflect:!0})],s.prototype,"align",2),r([i.property()],s.prototype,"inputmode",2),r([i.property({type:Number,reflect:!0})],s.prototype,"minlength",2),r([i.property({type:Number})],s.prototype,"maxlength",2),r([i.property()],s.prototype,"min",2),r([i.property()],s.prototype,"max",2),r([i.property({type:Number,reflect:!0})],s.prototype,"step",2),r([i.property({type:Boolean})],s.prototype,"autofocus",2),r([i.property({type:String,reflect:!0})],s.prototype,"autocomplete",2),r([i.property({type:Number,reflect:!0})],s.prototype,"tabIndex",2),r([i.property()],s.prototype,"hint",2),r([i.property({type:Boolean,reflect:!0})],s.prototype,"error",2),r([i.property({type:String,reflect:!0})],s.prototype,"size",2),r([i.property({type:String})],s.prototype,"validateOn",2),r([i.property({type:String})],s.prototype,"list",2),r([i.property({type:String})],s.prototype,"validationMessage",2),r([i.query("input")],s.prototype,"inputElement",2),r([i.state()],s.prototype,"isAutofilled",2),r([i.state()],s.prototype,"touched",2),r([i.state()],s.prototype,"dirty",2),r([i.state()],s.prototype,"submitted",2),r([i.state()],s.prototype,"defaultValue",2),s=r([i.customElement("sch-input")],s);var k=Object.defineProperty,w=Object.getOwnPropertyDescriptor,l=(t,e,o,h)=>{for(var c,p=h>1?void 0:h?w(e,o):e,m=t.length-1;m>=0;m--)(c=t[m])&&(p=(h?c(e,o,p):c(p))||p);return h&&p&&k(e,o,p),p};let a=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-"+a._idCounter++),super.willUpdate(t)}get form(){var t;return((t=this.internals)==null?void 0:t.form)??null}updated(t){var e,o,h;super.updated(t),t.has("value")&&((e=this.internals)==null||e.setFormValue(this.value)),t.has("error")&&(this.error?(o=this.internals)==null||o.setValidity({customError:!0},"Invalid input",this.inputElement):(h=this.internals)==null||h.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 e;(e=this.inputRef.value)==null||e.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:e}=t.target;this.value=e,this.dispatchEvent(new CustomEvent("enter",{detail:{value:e},bubbles:!0,composed:!0}))}),n.fromEvent(this.inputElement,"animationstart").pipe(n.filter(t=>t.animationName==="onAutoFillStart"),n.takeUntil(this.disconnecting)).subscribe(t=>{const{value:e}=t.target;this.value=e,this.dispatchEvent(new CustomEvent("change",{detail:{value:e},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 e;(e=this.inputRef.value)==null||e.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"},e={"opacity-40":this.disabled,"block mb-[4px]":!0};return y.html`
|
|
62
|
-
${v.when(this.label,()=>y.html`
|
|
63
|
-
<label
|
|
64
|
-
for=${this.id}
|
|
65
|
-
id="label-${this.id}"
|
|
66
|
-
class=${this.classMap(e)}
|
|
67
|
-
${f.color({color:this.error?d.SchmancyTheme.sys.color.error.default:d.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:d.SchmancyTheme.sys.color.surface.highest,color:d.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=${u.ifDefined(this.inputmode)}
|
|
85
|
-
pattern=${u.ifDefined(this.pattern)}
|
|
86
|
-
step=${u.ifDefined(this.step)}
|
|
87
|
-
minlength=${u.ifDefined(this.minlength)}
|
|
88
|
-
maxlength=${u.ifDefined(this.maxlength)}
|
|
89
|
-
min=${u.ifDefined(this.min)}
|
|
90
|
-
max=${u.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}`:y.nothing}
|
|
97
|
-
aria-describedby=${this.hint?`hint-${this.id}`:y.nothing}
|
|
98
|
-
aria-label=${u.ifDefined(this.label?void 0:this.placeholder||"Input")}
|
|
99
|
-
/>
|
|
100
|
-
|
|
101
|
-
${v.when(this.hint,()=>y.html`
|
|
102
|
-
<div
|
|
103
|
-
id="hint-${this.id}"
|
|
104
|
-
class="pt-[2px]"
|
|
105
|
-
${f.color({color:this.error?d.SchmancyTheme.sys.color.error.default:d.SchmancyTheme.sys.color.primary.default})}
|
|
106
|
-
>
|
|
107
|
-
<schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
|
|
108
|
-
</div>
|
|
109
|
-
`)}
|
|
110
|
-
`}};a._idCounter=0,a.formAssociated=!0,a.shadowRootOptions={...y.LitElement.shadowRootOptions,delegatesFocus:!0},l([i.property({reflect:!0})],a.prototype,"id",2),l([i.property({type:String})],a.prototype,"label",2),l([i.property({reflect:!0})],a.prototype,"type",2),l([i.property()],a.prototype,"name",2),l([i.property()],a.prototype,"placeholder",2),l([i.property({type:String,reflect:!0})],a.prototype,"value",2),l([i.property({type:String,reflect:!0})],a.prototype,"pattern",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"required",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"disabled",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"readonly",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"clickable",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"spellcheck",2),l([i.property({type:String,reflect:!0})],a.prototype,"align",2),l([i.property()],a.prototype,"inputmode",2),l([i.property({type:Number})],a.prototype,"minlength",2),l([i.property({type:Number})],a.prototype,"maxlength",2),l([i.property()],a.prototype,"min",2),l([i.property()],a.prototype,"max",2),l([i.property({type:Number,reflect:!0})],a.prototype,"step",2),l([i.property({type:Boolean})],a.prototype,"autofocus",2),l([i.property({type:String,reflect:!0})],a.prototype,"autocomplete",2),l([i.property({type:Number,reflect:!0})],a.prototype,"tabIndex",2),l([i.property()],a.prototype,"hint",2),l([i.property({type:Boolean,reflect:!0})],a.prototype,"error",2),l([i.query("input")],a.prototype,"inputElement",2),a=l([i.customElement("schmancy-input")],a);
|
|
111
|
-
//# sourceMappingURL=input-CD59n3y-.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";let l=class extends Event{constructor(r,t,s,i){super("context-request",{bubbles:!0,composed:!0}),this.context=r,this.contextTarget=t,this.callback=s,this.subscribe=i??!1}};class d{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,s=!1){const i=s||!Object.is(t,this.o);this.o=t,i&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[s,{disposer:i}]of this.subscriptions)s(this.o,i)},t!==void 0&&(this.value=t)}addCallback(t,s,i){if(!i)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:s});const{disposer:o}=this.subscriptions.get(t);t(this.value,o)}clearCallbacks(){this.subscriptions.clear()}}let p=class extends Event{constructor(r,t){super("context-provider",{bubbles:!0,composed:!0}),this.context=r,this.contextTarget=t}};class u extends d{constructor(t,s,i){var o,c;super(s.context!==void 0?s.initialValue:i),this.onContextRequest=e=>{if(e.context!==this.context)return;const n=e.contextTarget??e.composedPath()[0];n!==this.host&&(e.stopPropagation(),this.addCallback(e.callback,n,e.subscribe))},this.onProviderRequest=e=>{if(e.context!==this.context||(e.contextTarget??e.composedPath()[0])===this.host)return;const n=new Set;for(const[h,{consumerHost:a}]of this.subscriptions)n.has(h)||(n.add(h),a.dispatchEvent(new l(this.context,a,h,!0)));e.stopPropagation()},this.host=t,s.context!==void 0?this.context=s.context:this.context=s,this.attachListeners(),(c=(o=this.host).addController)==null||c.call(o,this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new p(this.context,this.host))}}exports.e=function({context:r}){return(t,s)=>{const i=new WeakMap;if(typeof s=="object")return{get(){return t.get.call(this)},set(o){return i.get(this).setValue(o),t.set.call(this,o)},init(o){return i.set(this,new u(this,{context:r,initialValue:o})),o}};{t.constructor.addInitializer(e=>{i.set(e,new u(e,{context:r}))});const o=Object.getOwnPropertyDescriptor(t,s);let c;if(o===void 0){const e=new WeakMap;c={get(){return e.get(this)},set(n){i.get(this).setValue(n),e.set(this,n)},configurable:!0,enumerable:!0}}else{const e=o.set;c={...o,set(n){i.get(this).setValue(n),e==null||e.call(this,n)}}}return void Object.defineProperty(t,s,c)}}},exports.n=function(r){return r},exports.s=l;
|
|
2
|
-
//# sourceMappingURL=provide-BGGp1Iks.cjs.map
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { html as u } from "lit";
|
|
2
|
-
import { property as a, customElement as v } from "lit/decorators.js";
|
|
3
|
-
import { Subject as g } from "rxjs";
|
|
4
|
-
import "lit/directives/class-map.js";
|
|
5
|
-
import "lit/directives/style-map.js";
|
|
6
|
-
import { T as m } from "./tailwind.mixin-DbsxfE0U.js";
|
|
7
|
-
import { when as f } from "lit/directives/when.js";
|
|
8
|
-
var k = Object.defineProperty, n = (e, s, r, o) => {
|
|
9
|
-
for (var i, t = void 0, l = e.length - 1; l >= 0; l--) (i = e[l]) && (t = i(s, r, t) || t);
|
|
10
|
-
return t && k(s, r, t), t;
|
|
11
|
-
};
|
|
12
|
-
function b(e) {
|
|
13
|
-
const r = class r extends e {
|
|
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
|
-
var i;
|
|
24
|
-
return ((i = this.internals) == null ? void 0 : i.form) ?? null;
|
|
25
|
-
}
|
|
26
|
-
willUpdate(i) {
|
|
27
|
-
var t, l, y;
|
|
28
|
-
super.willUpdate(i), i.has("value") && ((t = this.internals) == null || t.setFormValue(this.value)), (i.has("error") || i.has("validationMessage")) && (this.error && this.validationMessage ? (l = this.internals) == null || l.setValidity({ customError: !0 }, this.validationMessage) : (y = this.internals) == null || y.setValidity({}));
|
|
29
|
-
}
|
|
30
|
-
checkValidity() {
|
|
31
|
-
return !!this.disabled || !this.required || this.value !== "" && this.value !== void 0 && this.value !== null || (this.error = !0, this.validationMessage = "This field is required", !1);
|
|
32
|
-
}
|
|
33
|
-
reportValidity() {
|
|
34
|
-
var t;
|
|
35
|
-
const i = this.checkValidity();
|
|
36
|
-
return i || ((t = this.internals) == null || t.reportValidity()), i;
|
|
37
|
-
}
|
|
38
|
-
setCustomValidity(i) {
|
|
39
|
-
var t, l;
|
|
40
|
-
this.validationMessage = i, this.error = i !== "", i ? (t = this.internals) == null || t.setValidity({ customError: !0 }, i) : (l = this.internals) == null || l.setValidity({});
|
|
41
|
-
}
|
|
42
|
-
emitChange(i) {
|
|
43
|
-
this.dispatchEvent(new CustomEvent("change", { detail: i, bubbles: !0, composed: !0 }));
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
r.formAssociated = !0;
|
|
47
|
-
let s = r;
|
|
48
|
-
return n([a({ type: String })], s.prototype, "name"), n([a({ reflect: !0 })], s.prototype, "value"), n([a({ type: String })], s.prototype, "label"), n([a({ type: Boolean, reflect: !0 })], s.prototype, "required"), n([a({ type: Boolean, reflect: !0 })], s.prototype, "disabled"), n([a({ type: Boolean, reflect: !0 })], s.prototype, "readonly"), n([a({ type: Boolean, reflect: !0 })], s.prototype, "error"), n([a({ type: String })], s.prototype, "validationMessage"), n([a({ type: String })], s.prototype, "hint"), n([a({ reflect: !0 })], s.prototype, "id"), s;
|
|
49
|
-
}
|
|
50
|
-
var $ = Object.defineProperty, C = Object.getOwnPropertyDescriptor, c = (e, s, r, o) => {
|
|
51
|
-
for (var i, t = o > 1 ? void 0 : o ? C(s, r) : s, l = e.length - 1; l >= 0; l--) (i = e[l]) && (t = (o ? i(s, r, t) : i(t)) || t);
|
|
52
|
-
return o && t && $(s, r, t), t;
|
|
53
|
-
};
|
|
54
|
-
let d = class extends b(m(":host{display:inherit;position:inherit}")) {
|
|
55
|
-
constructor() {
|
|
56
|
-
super(...arguments), this.label = "", this.name = "", this.value = "", this.options = [], this.required = !1, this.selection$ = new g();
|
|
57
|
-
}
|
|
58
|
-
connectedCallback() {
|
|
59
|
-
super.connectedCallback(), this.selection$.subscribe((e) => {
|
|
60
|
-
this.value = e, this.emitChange({ value: e }), this.updateChildRadioButtons();
|
|
61
|
-
}), this.addEventListener("radio-button-click", (e) => {
|
|
62
|
-
this.selection$.next(e.detail.value);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
disconnectedCallback() {
|
|
66
|
-
var e;
|
|
67
|
-
super.disconnectedCallback(), (e = this.selection$) == null || e.unsubscribe();
|
|
68
|
-
}
|
|
69
|
-
handleSelection(e) {
|
|
70
|
-
this.selection$.next(e);
|
|
71
|
-
}
|
|
72
|
-
updateChildRadioButtons() {
|
|
73
|
-
this.querySelectorAll("schmancy-radio-button").forEach((e) => {
|
|
74
|
-
e.getAttribute("value") === this.value ? e.setAttribute("checked", "") : e.removeAttribute("checked");
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
updated(e) {
|
|
78
|
-
super.updated(e), e.has("value") && this.updateChildRadioButtons();
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
var s;
|
|
82
|
-
const e = this.childElementCount > 0;
|
|
83
|
-
return u`
|
|
84
|
-
<div class="grid gap-4">
|
|
85
|
-
${f(this.label, () => u` <label class="text-base font-semibold text-gray-900">${this.label}</label> `)}
|
|
86
|
-
|
|
87
|
-
${e ? u`<slot></slot>` : (s = this.options) == null ? void 0 : s.map((r) => u`
|
|
88
|
-
<div class="flex items-center">
|
|
89
|
-
<input
|
|
90
|
-
.required=${this.required}
|
|
91
|
-
id=${r.value}
|
|
92
|
-
class="h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600"
|
|
93
|
-
type="radio"
|
|
94
|
-
name=${this.name}
|
|
95
|
-
.value=${r.value}
|
|
96
|
-
.checked=${r.value === this.value}
|
|
97
|
-
@change=${() => this.handleSelection(r.value)}
|
|
98
|
-
/>
|
|
99
|
-
<label for=${r.value} class="ml-3 block text-sm font-medium leading-6 text-gray-900">
|
|
100
|
-
${r.label || r.value}
|
|
101
|
-
</label>
|
|
102
|
-
</div>
|
|
103
|
-
`)}
|
|
104
|
-
</div>
|
|
105
|
-
`;
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
c([a({ type: String })], d.prototype, "label", 2), c([a({ type: String })], d.prototype, "name", 2), c([a({ type: String })], d.prototype, "value", 2), c([a({ type: Array })], d.prototype, "options", 2), c([a({ type: Boolean })], d.prototype, "required", 2), d = c([v("schmancy-radio-group")], d);
|
|
109
|
-
var x = Object.defineProperty, S = Object.getOwnPropertyDescriptor, p = (e, s, r, o) => {
|
|
110
|
-
for (var i, t = o > 1 ? void 0 : o ? S(s, r) : s, l = e.length - 1; l >= 0; l--) (i = e[l]) && (t = (o ? i(s, r, t) : i(t)) || t);
|
|
111
|
-
return o && t && x(s, r, t), t;
|
|
112
|
-
};
|
|
113
|
-
let h = class extends b(m()) {
|
|
114
|
-
constructor() {
|
|
115
|
-
super(...arguments), this.value = "", this.checked = !1, this.disabled = !1, this.name = "";
|
|
116
|
-
}
|
|
117
|
-
connectedCallback() {
|
|
118
|
-
super.connectedCallback(), this.addEventListener("click", this.handleClick);
|
|
119
|
-
}
|
|
120
|
-
disconnectedCallback() {
|
|
121
|
-
super.disconnectedCallback(), this.removeEventListener("click", this.handleClick);
|
|
122
|
-
}
|
|
123
|
-
handleClick() {
|
|
124
|
-
if (!this.disabled)
|
|
125
|
-
if (this.closest("schmancy-radio-group")) {
|
|
126
|
-
const e = new CustomEvent("radio-button-click", { detail: { value: this.value }, bubbles: !0, composed: !0 });
|
|
127
|
-
this.dispatchEvent(e);
|
|
128
|
-
} else this.checked = !0, this.emitChange({ value: this.value });
|
|
129
|
-
}
|
|
130
|
-
render() {
|
|
131
|
-
return u`
|
|
132
|
-
<label class="relative flex items-start cursor-pointer">
|
|
133
|
-
<div class="flex items-center h-6">
|
|
134
|
-
<input
|
|
135
|
-
type="radio"
|
|
136
|
-
class="h-4 w-4 text-primary focus:ring-primary-light border-gray-300"
|
|
137
|
-
.value=${this.value}
|
|
138
|
-
.checked=${this.checked}
|
|
139
|
-
.disabled=${this.disabled}
|
|
140
|
-
.name=${this.name}
|
|
141
|
-
@change=${() => {
|
|
142
|
-
}}
|
|
143
|
-
/>
|
|
144
|
-
</div>
|
|
145
|
-
<div class="ml-3">
|
|
146
|
-
<slot name="label"></slot>
|
|
147
|
-
</div>
|
|
148
|
-
</label>
|
|
149
|
-
`;
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
p([a({ type: String })], h.prototype, "value", 2), p([a({ type: Boolean, reflect: !0 })], h.prototype, "checked", 2), p([a({ type: Boolean })], h.prototype, "disabled", 2), p([a({ type: String })], h.prototype, "name", 2), h = p([v("schmancy-radio-button")], h);
|
|
153
|
-
export {
|
|
154
|
-
d as R,
|
|
155
|
-
h as a
|
|
156
|
-
};
|
|
157
|
-
//# sourceMappingURL=radio-button-DDbyvXw1.js.map
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("lit"),s=require("lit/decorators.js"),v=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const u=require("./tailwind.mixin-CPvz1Npj.cjs"),m=require("lit/directives/when.js");var b=Object.defineProperty,n=(e,r,o,l)=>{for(var i,t=void 0,a=e.length-1;a>=0;a--)(i=e[a])&&(t=i(r,o,t)||t);return t&&b(r,o,t),t};function y(e){const o=class o extends e{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(){var i;return((i=this.internals)==null?void 0:i.form)??null}willUpdate(i){var t,a,h;super.willUpdate(i),i.has("value")&&((t=this.internals)==null||t.setFormValue(this.value)),(i.has("error")||i.has("validationMessage"))&&(this.error&&this.validationMessage?(a=this.internals)==null||a.setValidity({customError:!0},this.validationMessage):(h=this.internals)==null||h.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(){var t;const i=this.checkValidity();return i||((t=this.internals)==null||t.reportValidity()),i}setCustomValidity(i){var t,a;this.validationMessage=i,this.error=i!=="",i?(t=this.internals)==null||t.setValidity({customError:!0},i):(a=this.internals)==null||a.setValidity({})}emitChange(i){this.dispatchEvent(new CustomEvent("change",{detail:i,bubbles:!0,composed:!0}))}};o.formAssociated=!0;let r=o;return n([s.property({type:String})],r.prototype,"name"),n([s.property({reflect:!0})],r.prototype,"value"),n([s.property({type:String})],r.prototype,"label"),n([s.property({type:Boolean,reflect:!0})],r.prototype,"required"),n([s.property({type:Boolean,reflect:!0})],r.prototype,"disabled"),n([s.property({type:Boolean,reflect:!0})],r.prototype,"readonly"),n([s.property({type:Boolean,reflect:!0})],r.prototype,"error"),n([s.property({type:String})],r.prototype,"validationMessage"),n([s.property({type:String})],r.prototype,"hint"),n([s.property({reflect:!0})],r.prototype,"id"),r}var g=Object.defineProperty,f=Object.getOwnPropertyDescriptor,d=(e,r,o,l)=>{for(var i,t=l>1?void 0:l?f(r,o):r,a=e.length-1;a>=0;a--)(i=e[a])&&(t=(l?i(r,o,t):i(t))||t);return l&&t&&g(r,o,t),t};exports.RadioGroup=class extends y(u.TailwindElement(":host{display:inherit;position:inherit}")){constructor(){super(...arguments),this.label="",this.name="",this.value="",this.options=[],this.required=!1,this.selection$=new v.Subject}connectedCallback(){super.connectedCallback(),this.selection$.subscribe(e=>{this.value=e,this.emitChange({value:e}),this.updateChildRadioButtons()}),this.addEventListener("radio-button-click",e=>{this.selection$.next(e.detail.value)})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.selection$)==null||e.unsubscribe()}handleSelection(e){this.selection$.next(e)}updateChildRadioButtons(){this.querySelectorAll("schmancy-radio-button").forEach(e=>{e.getAttribute("value")===this.value?e.setAttribute("checked",""):e.removeAttribute("checked")})}updated(e){super.updated(e),e.has("value")&&this.updateChildRadioButtons()}render(){var r;const e=this.childElementCount>0;return c.html`
|
|
2
|
-
<div class="grid gap-4">
|
|
3
|
-
${m.when(this.label,()=>c.html` <label class="text-base font-semibold text-gray-900">${this.label}</label> `)}
|
|
4
|
-
|
|
5
|
-
${e?c.html`<slot></slot>`:(r=this.options)==null?void 0:r.map(o=>c.html`
|
|
6
|
-
<div class="flex items-center">
|
|
7
|
-
<input
|
|
8
|
-
.required=${this.required}
|
|
9
|
-
id=${o.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=${o.value}
|
|
14
|
-
.checked=${o.value===this.value}
|
|
15
|
-
@change=${()=>this.handleSelection(o.value)}
|
|
16
|
-
/>
|
|
17
|
-
<label for=${o.value} class="ml-3 block text-sm font-medium leading-6 text-gray-900">
|
|
18
|
-
${o.label||o.value}
|
|
19
|
-
</label>
|
|
20
|
-
</div>
|
|
21
|
-
`)}
|
|
22
|
-
</div>
|
|
23
|
-
`}},d([s.property({type:String})],exports.RadioGroup.prototype,"label",2),d([s.property({type:String})],exports.RadioGroup.prototype,"name",2),d([s.property({type:String})],exports.RadioGroup.prototype,"value",2),d([s.property({type:Array})],exports.RadioGroup.prototype,"options",2),d([s.property({type:Boolean})],exports.RadioGroup.prototype,"required",2),exports.RadioGroup=d([s.customElement("schmancy-radio-group")],exports.RadioGroup);var k=Object.defineProperty,$=Object.getOwnPropertyDescriptor,p=(e,r,o,l)=>{for(var i,t=l>1?void 0:l?$(r,o):r,a=e.length-1;a>=0;a--)(i=e[a])&&(t=(l?i(r,o,t):i(t))||t);return l&&t&&k(r,o,t),t};exports.RadioButton=class extends y(u.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 e=new CustomEvent("radio-button-click",{detail:{value:this.value},bubbles:!0,composed:!0});this.dispatchEvent(e)}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([s.property({type:String})],exports.RadioButton.prototype,"value",2),p([s.property({type:Boolean,reflect:!0})],exports.RadioButton.prototype,"checked",2),p([s.property({type:Boolean})],exports.RadioButton.prototype,"disabled",2),p([s.property({type:String})],exports.RadioButton.prototype,"name",2),exports.RadioButton=p([s.customElement("schmancy-radio-button")],exports.RadioButton);
|
|
41
|
-
//# sourceMappingURL=radio-button-dwmtJ2ef.cjs.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("./tslib.es6-DgOcxv4s.cjs"),c=require("lit/decorators.js"),l=require("lit"),k=require("lit/directives/class-map.js"),S=Symbol("attachableController");let v;l.isServer||(v=new MutationObserver(s=>{var t;for(const e of s)(t=e.target[S])==null||t.hostConnected()}));class I{get htmlFor(){return this.host.getAttribute("for")}set htmlFor(t){t===null?this.host.removeAttribute("for"):this.host.setAttribute("for",t)}get control(){return this.host.hasAttribute("for")?this.htmlFor&&this.host.isConnected?this.host.getRootNode().querySelector(`#${this.htmlFor}`):null:this.currentControl||this.host.parentElement}set control(t){t?this.attach(t):this.detach()}constructor(t,e){this.host=t,this.onControlChange=e,this.currentControl=null,t.addController(this),t[S]=this,v==null||v.observe(t,{attributeFilter:["for"]})}attach(t){t!==this.currentControl&&(this.setCurrentControl(t),this.host.removeAttribute("for"))}detach(){this.setCurrentControl(null),this.host.setAttribute("for","")}hostConnected(){this.setCurrentControl(this.control)}hostDisconnected(){this.setCurrentControl(null)}setCurrentControl(t){this.onControlChange(this.currentControl,t),this.currentControl=t}}const R=["focusin","focusout","pointerdown"];class A extends l.LitElement{constructor(){super(...arguments),this.visible=!1,this.inward=!1,this.attachableController=new I(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}handleEvent(t){var e;if(!t[E]){switch(t.type){default:return;case"focusin":this.visible=((e=this.control)==null?void 0:e.matches(":focus-visible"))??!1;break;case"focusout":case"pointerdown":this.visible=!1}t[E]=!0}}onControlChange(t,e){if(!l.isServer)for(const i of R)t==null||t.removeEventListener(i,this),e==null||e.addEventListener(i,this)}update(t){t.has("visible")&&this.dispatchEvent(new Event("visibility-changed")),super.update(t)}}d.t([c.property({type:Boolean,reflect:!0})],A.prototype,"visible",void 0),d.t([c.property({type:Boolean,reflect:!0})],A.prototype,"inward",void 0);const E=Symbol("handledByFocusRing"),L=l.css`:host{animation-delay:0s,calc(var(--md-focus-ring-duration, 600ms)*.25);animation-duration:calc(var(--md-focus-ring-duration, 600ms)*.25),calc(var(--md-focus-ring-duration, 600ms)*.75);animation-timing-function:cubic-bezier(0.2, 0, 0, 1);box-sizing:border-box;color:var(--md-focus-ring-color, var(--md-sys-color-secondary, #625b71));display:none;pointer-events:none;position:absolute}:host([visible]){display:flex}:host(:not([inward])){animation-name:outward-grow,outward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) + var(--md-focus-ring-outward-offset, 2px));inset:calc(-1*var(--md-focus-ring-outward-offset, 2px));outline:var(--md-focus-ring-width, 3px) solid currentColor}:host([inward]){animation-name:inward-grow,inward-shrink;border-end-end-radius:calc(var(--md-focus-ring-shape-end-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-end-start-radius:calc(var(--md-focus-ring-shape-end-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-end-radius:calc(var(--md-focus-ring-shape-start-end, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border-start-start-radius:calc(var(--md-focus-ring-shape-start-start, var(--md-focus-ring-shape, var(--md-sys-shape-corner-full, 9999px))) - var(--md-focus-ring-inward-offset, 0px));border:var(--md-focus-ring-width, 3px) solid currentColor;inset:var(--md-focus-ring-inward-offset, 0px)}@keyframes outward-grow{from{outline-width:0}to{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes outward-shrink{from{outline-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-grow{from{border-width:0}to{border-width:var(--md-focus-ring-active-width, 8px)}}@keyframes inward-shrink{from{border-width:var(--md-focus-ring-active-width, 8px)}}@media(prefers-reduced-motion){:host{animation:none}}
|
|
2
|
-
`;let b=class extends A{};b.styles=[L],b=d.t([c.customElement("md-focus-ring")],b);const F="cubic-bezier(0.2, 0, 0, 1)";var n;(function(s){s[s.INACTIVE=0]="INACTIVE",s[s.TOUCH_DELAY=1]="TOUCH_DELAY",s[s.HOLDING=2]="HOLDING",s[s.WAITING_FOR_CLICK=3]="WAITING_FOR_CLICK"})(n||(n={}));const z=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup"],g=l.isServer?null:window.matchMedia("(forced-colors: active)");class p extends l.LitElement{constructor(){super(...arguments),this.disabled=!1,this.hovered=!1,this.pressed=!1,this.rippleSize="",this.rippleScale="",this.initialSize=0,this.state=n.INACTIVE,this.checkBoundsAfterContextMenu=!1,this.attachableController=new I(this,this.onControlChange.bind(this))}get htmlFor(){return this.attachableController.htmlFor}set htmlFor(t){this.attachableController.htmlFor=t}get control(){return this.attachableController.control}set control(t){this.attachableController.control=t}attach(t){this.attachableController.attach(t)}detach(){this.attachableController.detach()}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-hidden","true")}render(){const t={hovered:this.hovered,pressed:this.pressed};return l.html`<div class="surface ${k.classMap(t)}"></div>`}update(t){t.has("disabled")&&this.disabled&&(this.hovered=!1,this.pressed=!1),super.update(t)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.hovered=!1,this.state!==n.INACTIVE&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==n.HOLDING)return this.state===n.TOUCH_DELAY?(this.state=n.WAITING_FOR_CLICK,void this.startPressAnimation(this.rippleStartEvent)):void 0;this.state=n.WAITING_FOR_CLICK}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.rippleStartEvent=t,!this.isTouch(t))return this.state=n.WAITING_FOR_CLICK,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=n.TOUCH_DELAY,await new Promise(e=>{setTimeout(e,150)}),this.state===n.TOUCH_DELAY&&(this.state=n.HOLDING,this.startPressAnimation(t)))}}handleClick(){this.disabled||(this.state!==n.WAITING_FOR_CLICK?this.state===n.INACTIVE&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleContextmenu(){this.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}determineRippleSize(){const{height:t,width:e}=this.getBoundingClientRect(),i=Math.max(t,e),r=Math.max(.35*i,75),o=Math.floor(.2*i),a=Math.sqrt(e**2+t**2)+10;this.initialSize=o,this.rippleScale=""+(a+r)/o,this.rippleSize=`${o}px`}getNormalizedPointerEventCoords(t){const{scrollX:e,scrollY:i}=window,{left:r,top:o}=this.getBoundingClientRect(),a=e+r,h=i+o,{pageX:u,pageY:m}=t;return{x:u-a,y:m-h}}getTranslationCoordinates(t){const{height:e,width:i}=this.getBoundingClientRect(),r={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let o;return o=t instanceof PointerEvent?this.getNormalizedPointerEventCoords(t):{x:i/2,y:e/2},o={x:o.x-this.initialSize/2,y:o.y-this.initialSize/2},{startPoint:o,endPoint:r}}startPressAnimation(t){var a;if(!this.mdRoot)return;this.pressed=!0,(a=this.growAnimation)==null||a.cancel(),this.determineRippleSize();const{startPoint:e,endPoint:i}=this.getTranslationCoordinates(t),r=`${e.x}px, ${e.y}px`,o=`${i.x}px, ${i.y}px`;this.growAnimation=this.mdRoot.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${r}) scale(1)`,`translate(${o}) scale(${this.rippleScale})`]},{pseudoElement:"::after",duration:450,easing:F,fill:"forwards"})}async endPressAnimation(){this.rippleStartEvent=void 0,this.state=n.INACTIVE;const t=this.growAnimation;let e=1/0;typeof(t==null?void 0:t.currentTime)=="number"?e=t.currentTime:t!=null&&t.currentTime&&(e=t.currentTime.to("ms").value),e>=225?this.pressed=!1:(await new Promise(i=>{setTimeout(i,225-e)}),this.growAnimation===t&&(this.pressed=!1))}shouldReactToEvent(t){if(this.disabled||!t.isPrimary||this.rippleStartEvent&&this.rippleStartEvent.pointerId!==t.pointerId)return!1;if(t.type==="pointerenter"||t.type==="pointerleave")return!this.isTouch(t);const e=t.buttons===1;return this.isTouch(t)||e}inBounds({x:t,y:e}){const{top:i,left:r,bottom:o,right:a}=this.getBoundingClientRect();return t>=r&&t<=a&&e>=i&&e<=o}isTouch({pointerType:t}){return t==="touch"}async handleEvent(t){if(!(g!=null&&g.matches))switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t)}}onControlChange(t,e){if(!l.isServer)for(const i of z)t==null||t.removeEventListener(i,this),e==null||e.addEventListener(i,this)}}d.t([c.property({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),d.t([c.state()],p.prototype,"hovered",void 0),d.t([c.state()],p.prototype,"pressed",void 0),d.t([c.query(".surface")],p.prototype,"mdRoot",void 0);const N=l.css`:host{display:flex;margin:auto;pointer-events:none}:host([disabled]){display:none}@media(forced-colors: active){:host{display:none}}:host,.surface{border-radius:inherit;position:absolute;inset:0;overflow:hidden}.surface{-webkit-tap-highlight-color:rgba(0,0,0,0)}.surface::before,.surface::after{content:"";opacity:0;position:absolute}.surface::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));inset:0;transition:opacity 15ms linear,background-color 15ms linear}.surface::after{background:radial-gradient(closest-side, var(--md-ripple-pressed-color, var(--md-sys-color-on-surface, #1d1b20)) max(100% - 70px, 65%), transparent 100%);transform-origin:center center;transition:opacity 375ms linear}.hovered::before{background-color:var(--md-ripple-hover-color, var(--md-sys-color-on-surface, #1d1b20));opacity:var(--md-ripple-hover-opacity, 0.08)}.pressed::after{opacity:var(--md-ripple-pressed-opacity, 0.12);transition-duration:105ms}
|
|
3
|
-
`;let C=class extends p{};C.styles=[N],C=d.t([c.customElement("md-ripple")],C);const P=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText"],O=P.map(T);function y(s){return O.includes(s)}function T(s){return s.replace("aria","aria-").replace(/Elements?/g,"").toLowerCase()}const f=Symbol("privateIgnoreAttributeChangesFor");function w(s){return`data-${s}`}function x(s){return s.replace(/-\w/,t=>t[1].toUpperCase())}exports.mixinDelegatesAria=function(s){var t;if(l.isServer)return s;class e extends s{constructor(){super(...arguments),this[t]=new Set}attributeChangedCallback(r,o,a){if(!y(r))return void super.attributeChangedCallback(r,o,a);if(this[f].has(r))return;this[f].add(r),this.removeAttribute(r),this[f].delete(r);const h=x(r);a===null?delete this.dataset[h]:this.dataset[h]=a,this.requestUpdate(x(r),o)}getAttribute(r){return y(r)?super.getAttribute(w(r)):super.getAttribute(r)}removeAttribute(r){super.removeAttribute(r),y(r)&&(super.removeAttribute(w(r)),this.requestUpdate())}}return t=f,function(i){for(const r of P){const o=T(r),a=w(o),h=x(o);i.createProperty(r,{attribute:o,noAccessor:!0}),i.createProperty(Symbol(a),{attribute:a,noAccessor:!0}),Object.defineProperty(i.prototype,r,{configurable:!0,enumerable:!0,get(){return this.dataset[h]??null},set(u){const m=this.dataset[h]??null;u!==m&&(u===null?delete this.dataset[h]:this.dataset[h]=u,this.requestUpdate(r,m))}})}}(e),e},exports.redispatchEvent=function(s,t){!t.bubbles||s.shadowRoot&&!t.composed||t.stopPropagation();const e=Reflect.construct(t.constructor,[t.type,t]),i=s.dispatchEvent(e);return i||t.preventDefault(),i};
|
|
4
|
-
//# sourceMappingURL=redispatch-event-roczetCU.cjs.map
|
package/dist/select-PrgXr6zf.cjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("@floating-ui/dom"),p=require("rxjs"),f=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const m=require("./litElement.mixin-CrXwM_fu.cjs");require("./tailwind.mixin-CPvz1Npj.cjs");const v=require("./ripple-C2BHbhcS.cjs"),u=require("./theme.interface-Xg5Zi46a.cjs"),c=require("lit"),n=require("lit/decorators.js");var b=Object.defineProperty,S=Object.getOwnPropertyDescriptor,l=(t,e,i,s)=>{for(var a,o=s>1?void 0:s?S(e,i):e,r=t.length-1;r>=0;r--)(a=t[r])&&(o=(s?a(e,i,o):a(o))||o);return s&&o&&b(e,i,o),o};exports.SchmancySelect=class extends m.$LitElement(c.css`
|
|
2
|
-
:host {
|
|
3
|
-
display: block;
|
|
4
|
-
position: relative;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[role='listbox'] {
|
|
8
|
-
overflow-y: auto;
|
|
9
|
-
outline: none;
|
|
10
|
-
}
|
|
11
|
-
`){constructor(){super(),this.required=!1,this.disabled=!1,this.placeholder="",this.value="",this.multi=!1,this.label="",this.hint="",this.validateOn="touched",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage="",this.defaultValue="",this._userInteracted=!1,this._touched=!1,this._dirty=!1,this._submitted=!1,this._focusedOptionId="",this.formSubmitHandler=()=>{this._submitted=!0,this.checkValidity()},this.formResetHandler=()=>{this.reset()},this.handleKeyDown=t=>{if(this.disabled)return;if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.openDropdown(!1)));const e=Array.from(this.options||[]),i=e.findIndex(s=>s.id===this._focusedOptionId)??-1;switch(t.key){case"Escape":t.preventDefault(),this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusOption(e,Math.min(i+1,e.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(e,Math.max(i-1,0));break;case"Home":t.preventDefault(),this.focusOption(e,0);break;case"End":t.preventDefault(),this.focusOption(e,e.length-1);break;case"Enter":case" ":if(t.preventDefault(),this._focusedOptionId){const s=e.find(a=>a.id===this._focusedOptionId);s&&this.handleOptionSelect(s.value)}break;case"Tab":this.closeDropdown()}};try{this.internals=this.attachInternals()}catch{}}get form(){var t;return(t=this.internals)==null?void 0:t.form}connectedCallback(){var t;super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substring(2,9)}`),this.defaultValue=this.value,p.fromEvent(this,"keydown").pipe(p.takeUntil(this.disconnecting)).subscribe(this.handleKeyDown),(t=this.internals)!=null&&t.form&&(this.internals.form.addEventListener("submit",this.formSubmitHandler),this.internals.form.addEventListener("reset",this.formResetHandler)),this.inputRef&&(this.inputRef.error=!1)}disconnectedCallback(){var t,e;super.disconnectedCallback(),(t=this.cleanupPositioner)==null||t.call(this),(e=this.internals)!=null&&e.form&&(this.internals.form.removeEventListener("submit",this.formSubmitHandler),this.internals.form.removeEventListener("reset",this.formResetHandler))}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility(),this.options.forEach(t=>{p.fromEvent(t,"click").pipe(p.takeUntil(this.disconnecting)).subscribe(()=>this.handleOptionSelect(t.value))})}updated(t){var e,i;if(super.updated(t),t.has("value")){const s=Array.isArray(this.value)?this.value.join(","):this.value;(e=this.internals)==null||e.setFormValue(s),this.hasUpdated&&(this._dirty=!0),this.syncSelection(),this.hasUpdated&&this.checkValidity()}t.has("isOpen")&&(this.isOpen?this.positionDropdown():(i=this.cleanupPositioner)==null||i.call(this))}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}}syncSelection(){var t,e,i,s;if(this.multi){const a=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[];(t=this.options)==null||t.forEach(o=>o.selected=a.includes(o.value)),this.valueLabel=a.length>0&&((e=this.options)==null?void 0:e.filter(o=>a.includes(o.value)).map(o=>o.label).join(", "))||this.placeholder}else{const a=String(this.value);(i=this.options)==null||i.forEach(r=>{r.selected=r.value===a});const o=(s=this.options)==null?void 0:s.find(r=>r.value===a);this.valueLabel=(o==null?void 0:o.label)||this.placeholder}}setupOptionsAccessibility(){var t;(t=this.options)==null||t.forEach((e,i)=>{e.setAttribute("role","option"),e.id||(e.id=`${this.id}-option-${i}`),e.tabIndex=-1;const s=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[];e.setAttribute("aria-selected",String(this.multi?s.includes(e.value):e.value===this.value))})}async positionDropdown(){const t=this.renderRoot.querySelector(".trigger");t&&this.ul&&(this.cleanupPositioner=h.autoUpdate(t,this.ul,async()=>{const e=window.innerHeight,i=t.getBoundingClientRect(),s=e-i.bottom,a=i.top,o=Math.max(.75*Math.max(s,a),150),r=s<200&&a>s;this.ul.style.maxHeight=`${o}px`;const{x:d,y}=await h.computePosition(t,this.ul,{placement:r?"top-start":"bottom-start",middleware:[h.offset(5),h.flip(),h.shift({padding:5})]});Object.assign(this.ul.style,{left:`${d}px`,top:`${y}px`,position:"absolute",width:`${t.offsetWidth}px`})}))}focusOption(t,e){const i=t[e];if(i){i.focus(),this._focusedOptionId=i.id;const s=this.renderRoot.querySelector(".trigger");if(s&&s.setAttribute("aria-activedescendant",i.id),this.ul&&i.offsetTop!==void 0){const a=i.offsetTop,o=i.offsetHeight,r=this.ul.scrollTop,d=this.ul.clientHeight;a<r?this.ul.scrollTop=a:a+o>r+d&&(this.ul.scrollTop=a+o-d)}}}async openDropdown(t=!1){if(this.disabled)return;this.syncSelection(),this.isOpen=!0,await this.updateComplete;const e=Array.from(this.options||[]),i=this.multi?0:e.findIndex(s=>s.value===String(this.value));this.focusOption(e,Math.max(i,0)),t&&this.reportValidity()}closeDropdown(){this._userInteracted&&(this._touched=!0),this.isOpen=!1,this._focusedOptionId="";const t=this.renderRoot.querySelector(".trigger");t&&(t.removeAttribute("aria-activedescendant"),t==null||t.focus()),this._userInteracted&&this.shouldShowValidation()&&this.checkValidity()}handleOptionSelect(t){var e;if(this._userInteracted=!0,this._touched=!0,this._dirty=!0,this.multi){const i=this.options.find(a=>a.value===t);if(!i)return;let s;i.selected=!i.selected,s=Array.isArray(this.value)?[...this.value]:this.value?this.value.split(","):[],i.selected?s.includes(t)||s.push(t):s=s.filter(a=>a!==t),this.value=s,this.valueLabel=s.length>0?this.options.filter(a=>s.includes(a.value)).map(a=>a.label).join(", "):this.placeholder}else this.options.forEach(i=>{i.selected=i.value===t}),this.value=t,this.valueLabel=((e=this.options.find(i=>i.value===t))==null?void 0:e.label)||this.placeholder,this.closeDropdown();this.setupOptionsAccessibility(),this.dispatchChange(this.value)}dispatchChange(t){this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.checkValidity()}checkValidity(){var i,s;if(this.disabled)return!0;const t=this.multi&&Array.isArray(this.value)?this.value.length===0:!this.value,e=!(this.required&&t);if(this.isValid=e,this.isValid?(this.validationMessage="",(i=this.internals)==null||i.setValidity({})):(this.validationMessage="Please select an option.",(s=this.internals)==null||s.setValidity({valueMissing:!0},"Please select an option.",this.inputRef)),this.inputRef&&this.hasUpdated){const a=!this.isValid&&this.shouldShowValidation();this.inputRef.error=a,this.inputRef.hint=a?this.validationMessage:this.hint}return this.isValid}reportValidity(){const t=this.checkValidity();return this.inputRef&&(this.inputRef.error=!t,this.inputRef.hint=t?this.hint:this.validationMessage,t||this.isOpen||this.openDropdown(!1),t||this.inputRef.reportValidity()),t}setCustomValidity(t){var e,i;this.validationMessage=t,t?(this.isValid=!1,(e=this.internals)==null||e.setValidity({customError:!0},t,this.inputRef)):(this.isValid=!0,(i=this.internals)==null||i.setValidity({})),this.inputRef&&this.shouldShowValidation()&&(this.inputRef.error=!this.isValid,this.inputRef.hint=this.isValid?this.hint:this.validationMessage)}reset(){var t;this.value=this.defaultValue,this.valueLabel=this.placeholder,this.isValid=!0,this.validationMessage="",this._touched=!1,this._dirty=!1,this._submitted=!1,this._userInteracted=!1,(t=this.internals)==null||t.setValidity({}),this.syncSelection(),this.inputRef&&(this.inputRef.error=!1,this.inputRef.hint=this.hint)}render(){const t=!this.isValid&&this.shouldShowValidation()&&!this.isOpen,e=this.isOpen?c.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▲</span>`:c.html`<span class="absolute right-3 top-1/2 transform -translate-y-1/2">▼</span>`;return c.html`
|
|
12
|
-
<div class="relative ${this.disabled?"opacity-60 cursor-not-allowed":""}">
|
|
13
|
-
<sch-input
|
|
14
|
-
.name=${this.name}
|
|
15
|
-
tabIndex=${this.disabled?"-1":"0"}
|
|
16
|
-
class="trigger"
|
|
17
|
-
role="combobox"
|
|
18
|
-
aria-haspopup="listbox"
|
|
19
|
-
aria-expanded=${this.isOpen}
|
|
20
|
-
aria-controls="options"
|
|
21
|
-
aria-autocomplete="none"
|
|
22
|
-
aria-required=${this.required}
|
|
23
|
-
aria-activedescendant=${this._focusedOptionId||void 0}
|
|
24
|
-
aria-disabled=${this.disabled}
|
|
25
|
-
.label=${this.label}
|
|
26
|
-
.placeholder=${this.placeholder}
|
|
27
|
-
.value=${this.valueLabel}
|
|
28
|
-
.required=${this.required}
|
|
29
|
-
.disabled=${this.disabled}
|
|
30
|
-
.hint=${t?this.validationMessage:this.hint}
|
|
31
|
-
.error=${t}
|
|
32
|
-
.validateOn=${this.validateOn}
|
|
33
|
-
readonly
|
|
34
|
-
clickable
|
|
35
|
-
@click=${i=>{if(this.disabled)return i.preventDefault(),void i.stopPropagation();this.isOpen?(this._userInteracted=!0,this.closeDropdown()):this.openDropdown(!1)}}
|
|
36
|
-
>
|
|
37
|
-
${e}
|
|
38
|
-
</sch-input>
|
|
39
|
-
|
|
40
|
-
<!-- Overlay for capturing clicks outside when dropdown is open -->
|
|
41
|
-
${this.isOpen?c.html` <div class="fixed inset-0 z-10" @click=${this.closeDropdown} tabindex="-1" aria-hidden="true"></div> `:""}
|
|
42
|
-
|
|
43
|
-
<ul
|
|
44
|
-
id="options"
|
|
45
|
-
role="listbox"
|
|
46
|
-
aria-multiselectable=${this.multi}
|
|
47
|
-
class=${f.classMap({"absolute min-w-full w-full z-20 mt-1 rounded-md shadow-lg":!0,hidden:!this.isOpen})}
|
|
48
|
-
${v.color({bgColor:u.SchmancyTheme.sys.color.surface.low,color:u.SchmancyTheme.sys.color.surface.on})}
|
|
49
|
-
>
|
|
50
|
-
<slot
|
|
51
|
-
@slotchange=${()=>{this.syncSelection(),this.setupOptionsAccessibility()}}
|
|
52
|
-
></slot>
|
|
53
|
-
</ul>
|
|
54
|
-
</div>
|
|
55
|
-
`}},exports.SchmancySelect.formAssociated=!0,l([n.property({type:String})],exports.SchmancySelect.prototype,"name",2),l([n.property({type:Boolean,reflect:!0})],exports.SchmancySelect.prototype,"required",2),l([n.property({type:Boolean,reflect:!0})],exports.SchmancySelect.prototype,"disabled",2),l([n.property({type:String})],exports.SchmancySelect.prototype,"placeholder",2),l([n.property({type:String,reflect:!0})],exports.SchmancySelect.prototype,"value",2),l([n.property({type:Boolean})],exports.SchmancySelect.prototype,"multi",2),l([n.property({type:String})],exports.SchmancySelect.prototype,"label",2),l([n.property({type:String})],exports.SchmancySelect.prototype,"hint",2),l([n.property({type:String})],exports.SchmancySelect.prototype,"validateOn",2),l([n.state()],exports.SchmancySelect.prototype,"isOpen",2),l([n.state()],exports.SchmancySelect.prototype,"valueLabel",2),l([n.state()],exports.SchmancySelect.prototype,"isValid",2),l([n.property({type:String})],exports.SchmancySelect.prototype,"validationMessage",2),l([n.state()],exports.SchmancySelect.prototype,"defaultValue",2),l([n.query("ul")],exports.SchmancySelect.prototype,"ul",2),l([n.query("sch-input")],exports.SchmancySelect.prototype,"inputRef",2),l([n.queryAssignedElements({flatten:!0})],exports.SchmancySelect.prototype,"options",2),l([n.state()],exports.SchmancySelect.prototype,"_userInteracted",2),l([n.state()],exports.SchmancySelect.prototype,"_touched",2),l([n.state()],exports.SchmancySelect.prototype,"_dirty",2),l([n.state()],exports.SchmancySelect.prototype,"_submitted",2),l([n.state()],exports.SchmancySelect.prototype,"_focusedOptionId",2),exports.SchmancySelect=l([n.customElement("schmancy-select")],exports.SchmancySelect);
|
|
56
|
-
//# sourceMappingURL=select-PrgXr6zf.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const j=require("./context-object-CP7HbDFQ.cjs"),B=require("lit/decorators.js"),d=require("rxjs"),K=require("rxjs/operators");function N(r,e,t){try{e==="indexeddb"&&(e="local"),((o=r)===null||typeof o!="object"||Array.isArray(o)||o instanceof Map||o instanceof Set||o instanceof Date||o instanceof RegExp||Object.getPrototypeOf(o)!==Object.prototype)&&(r={...r});const i=j.SchmancyStoreObject.getInstance(e,t,r);return typeof(n=i.value)=="object"&&n!==null&&Object.keys(n).length===0&&i.set({...r}),i}catch{return j.SchmancyStoreObject.getInstance("memory",`${t}-fallback`,r)}var n,o}function q(r,e,t){try{const n=j.SchmancyArrayStore.getInstance(e,t,r);return n.value.length||n.replace([...r]),n}catch{return j.SchmancyArrayStore.getInstance("memory",`${t}-fallback`,[...r])}}function T(r,e,t){try{return r==null&&(r=t.includes("collection")||t.includes("map")?new Map:t.includes("array")||t.includes("list")?[]:{}),r instanceof Map?function(n,o,i){try{const l=j.SchmancyCollectionStore.getInstance(o,i,n);return l.value.size||l.replace(new Map(n)),l}catch{return j.SchmancyCollectionStore.getInstance("memory",`${i}-fallback`,new Map(n))}}(r,e,t):function(n){return Array.isArray(n)}(r)?q(r,e,t):N(typeof r=="object"?r:{value:r},e,t)}catch{return N(typeof r=="object"&&r!==null?{...r}:{value:r},"memory",`emergency-fallback-${t}`)}}const D=(r,e)=>{if(!e)return r;const t=e.split(".");let n=r;for(const o of t){if(n==null)return;n=n[o]}return n},U=r=>{if(!r||r.length<2)return[];const e=[];for(let t=0;t<r.length-1;t++)e.push(r.substring(t,t+2).toLowerCase());return e},V=(r,e)=>{if(!r||!e)return 0;const t=r.toLowerCase().trim(),n=e.toLowerCase().trim();if(t===n)return 1;const o=t.includes(n)?1:0,i=((s,f)=>{if(!s)return!0;if(!f)return!1;let u=0,a=0;for(;u<s.length&&a<f.length;)s[u].toLowerCase()===f[a].toLowerCase()&&u++,a++;return u===s.length})(n,t)?.8:0,l=((s,f)=>{if(!s)return!0;if(!f)return!1;const u=k=>k.toLowerCase().split("").reduce(($,A)=>($[A]=($[A]||0)+1,$),{}),a=u(s),y=u(f);return Object.keys(a).every(k=>(y[k]||0)>=a[k])})(n,t)?.7:0,h=((s,f)=>{if(!s||!f||s.length<2||f.length<2)return 0;const u=U(s),a=U(f);if(u.length===0||a.length===0)return 0;let y=0;const k=new Array(a.length).fill(!1);for(const $ of u)for(let A=0;A<a.length;A++)if(!k[A]&&a[A]===$){y++,k[A]=!0;break}return 2*y/(u.length+a.length)})(t,n),c=Math.max(t.length,n.length),p=c?1-((s,f)=>{if(s===f)return 0;const u=Array(f.length+1).fill(null).map((a,y)=>[y]);for(let a=0;a<=s.length;a++)u[0][a]=a;for(let a=1;a<=f.length;a++)for(let y=1;y<=s.length;y++)f.charAt(a-1)===s.charAt(y-1)?u[a][y]=u[a-1][y-1]:u[a][y]=Math.min(u[a-1][y]+1,u[a][y-1]+1,u[a-1][y-1]+1);return u[f.length][s.length]})(t,n)/c:0;return Math.max(o,i,l,h,p)},R=r=>r==null?"":String(r);function Z(r,e,t=.3){let n,o,i,l=!1;if(Array.isArray(e)?[n,o,i,l=!1]=e:(n=e.key,o=e.operator,i=e.value,l=e.strict||!1),!l&&(i===""||i==null||O(i)&&i.length===0))return{valid:!0,score:1};const h=D(r,n);if(l){if(o==="any"){if(typeof h!="string"||typeof i!="string")return{valid:!1,score:0};const c=V(h,i);return{valid:c>=t,score:c>=t?c:0}}{const c=E(o,h,i);return{valid:c,score:c?1:0}}}if(o==="any"){if(typeof h!="string"||typeof i!="string")return{valid:!1,score:0};const c=V(h,i);return c<t?{valid:!1,score:0}:{valid:!0,score:c}}{const c=E(o,h,i);return{valid:c,score:c?1:0}}}function z(r,e=[],t=.3){if(!e.length)return Array.from(r.values());const n=[];for(const[o,i]of r.entries()){let l=0,h=0,c=!0;for(const p of e){const s=Z(i,p,t);if(!s.valid){c=!1;break}l+=s.score,h++}c&&n.push({item:i,score:h>0?l/h:1})}return n.sort((o,i)=>i.score-o.score),n.map(o=>o.item)}function F(r,e=[],t=.3){const n=new Map;return r.forEach((o,i)=>n.set(String(i),o)),z(n,e,t)}function O(r){return Array.isArray(r)}function m(r){return typeof r=="string"}function C(r){return typeof r=="number"&&!isNaN(r)}function v(r){return r instanceof Date&&!isNaN(r.getTime())}function M(r){return r instanceof Map}function x(r){return r instanceof Set}function I(r){return r==null}function E(r,e,t){if(I(e)&&I(t))return!0;if(I(e)||I(t))return r==="=="?e===t:r==="!="&&e!==t;switch(r){case"==":return e===t;case"!=":return e!==t;case">":return C(e)&&C(t)?e>t:v(e)&&v(t)?e.getTime()>t.getTime():!(!m(e)||!m(t))&&e.localeCompare(t)>0;case"<":return C(e)&&C(t)?e<t:v(e)&&v(t)?e.getTime()<t.getTime():!(!m(e)||!m(t))&&e.localeCompare(t)<0;case">=":return C(e)&&C(t)?e>=t:v(e)&&v(t)?e.getTime()>=t.getTime():!(!m(e)||!m(t))&&e.localeCompare(t)>=0;case"<=":return C(e)&&C(t)?e<=t:v(e)&&v(t)?e.getTime()<=t.getTime():!(!m(e)||!m(t))&&e.localeCompare(t)<=0;case"includes":return m(e)?e.toLowerCase().includes(R(t).toLowerCase()):O(e)?e.includes(t):x(e)?e.has(t):!!M(e)&&Array.from(e.values()).includes(t);case"notIncludes":return m(e)?!e.toLowerCase().includes(R(t).toLowerCase()):O(e)?!e.includes(t):x(e)?!e.has(t):!M(e)||!Array.from(e.values()).includes(t);case"startsWith":return!(!m(e)||!m(t))&&e.toLowerCase().startsWith(t.toLowerCase());case"endsWith":return!(!m(e)||!m(t))&&e.toLowerCase().endsWith(t.toLowerCase());case"in":return O(t)?t.includes(e):x(t)?t.has(e):!!M(t)&&(t.has(e)||Array.from(t.values()).includes(e));case"notIn":return O(t)?!t.includes(e):x(t)?!t.has(e):!M(t)||!t.has(e)&&!Array.from(t.values()).includes(e);default:return!1}}const G=z,H=F;function L(r,e){if(r===e)return!0;if(r instanceof Map&&e instanceof Map){if(r.size!==e.size)return!1;for(const[t,n]of r)if(!e.has(t)||!L(n,e.get(t)))return!1;return!0}if(r instanceof Set&&e instanceof Set){if(r.size!==e.size)return!1;for(const t of r)if(!e.has(t))return!1;return!0}if(typeof r=="object"&&r!==null&&typeof e=="object"&&e!==null){const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!L(r[o],e[o]))return!1;return!0}return!1}function P(r,e){return r.$.pipe(d.map(e),d.distinctUntilChanged(L),d.shareReplay(1))}function g(r,e){return r.$.pipe(d.map(e),d.distinctUntilChanged(L),d.shareReplay(1))}const w=Symbol("selectorCleanup"),b=Symbol("selectorSubscriptions"),S=Symbol("selectorInitialized");function W(r,e=n=>n,t={required:!0}){return function(n,o,i){B.property({attribute:!1,type:Object})(n,o);const l=n.connectedCallback,h=n.disconnectedCallback;n.connectedCallback=function(){var f;var c;(c=this)[w]&&!c[w].closed||(c[w]=new d.Subject),c[b]||(c[b]=new Map),c[S]||(c[S]=new Set);const p=function(u){return"set"in u&&typeof u.set=="function"&&u.value instanceof Map}(r)?g(r,e):P(r,e);t.required||this[S].has(o)||(l==null||l.call(this),this[S].add(o)),this[b].has(o)&&((f=this[b].get(o))==null||f.unsubscribe(),this[b].delete(o)),t.debug;const s=p.pipe(K.takeUntil(this[w])).subscribe({next:u=>{var y;const a=t.deepClone?structuredClone(u):u;t.debug,t.updateOnly||(this[o]=a),(y=this.requestUpdate)==null||y.call(this),t.required&&!this[S].has(o)&&a!=null&&(t.debug,l==null||l.call(this),this[S].add(o))},error:u=>{this.isConnected&&setTimeout(()=>{var a;this.isConnected&&(t.debug,(a=this.connectedCallback)==null||a.call(this))},1e3)}});this[b].set(o,s)},n.disconnectedCallback=function(){var c;h==null||h.call(this),t.debug,(c=this)[w]&&(c[w].next(),c[w].complete(),c[w]=void 0),c[b]&&(c[b].forEach(p=>p.unsubscribe()),c[b].clear(),c[b]=void 0),c[S]&&(c[S].clear(),c[S]=void 0)}}}exports.compareValues=E,exports.createArrayContext=function(r=[],e,t="local"){try{return T(r,t,e)}catch{return q(r,"memory",`${e}-fallback`)}},exports.createCollectionSelector=g,exports.createCompoundSelector=function(r,e,t){const n=r.map((p,s)=>e[s](p.value)),o=t(...n),i={$:new d.BehaviorSubject(o),error$:new d.BehaviorSubject(null),ready:!0,defaultValue:o,get value(){return this.$.getValue()},set(p,s){},clear(){this.$.next(this.defaultValue)},replace(p){},delete(p){},destroy(){this.$.complete(),this.error$.complete()}},l=r.map((p,s)=>p.$),h=d.combineLatest(l).subscribe({next:p=>{try{const s=p.map((u,a)=>e[a](u)),f=t(...s);i.$.next(f)}catch(s){const f=new j.StoreError("Error in compound selector",s);i.error$.next(f)}},error:p=>{const s=new j.StoreError("Error in store subscription",p);i.error$.next(s)}}),c=i.destroy;return i.destroy=function(){h.unsubscribe(),c.call(this)},i},exports.createContext=T,exports.createCountSelector=function(r,e){return g(r,t=>e?Array.from(t.entries()).filter(([n,o])=>e(o,n)).length:t.size)},exports.createEntriesSelector=function(r){return g(r,e=>Array.from(e.entries()))},exports.createFilterSelector=function(r,e){return g(r,t=>Array.from(t.entries()).filter(([n,o])=>e(o,n)).map(([n,o])=>o))},exports.createFindSelector=function(r,e){return g(r,t=>{for(const[n,o]of t.entries())if(e(o,n))return o})},exports.createItemSelector=function(r,e){return g(r,t=>t.get(e))},exports.createItemsSelector=function(r){return g(r,e=>Array.from(e.values()))},exports.createKeysSelector=function(r){return g(r,e=>Array.from(e.keys()))},exports.createMapSelector=function(r,e){return g(r,t=>Array.from(t.entries()).map(([n,o])=>e(o,n)))},exports.createOptimizedSelector=function(r,e){return r.$.pipe(d.map(e),d.distinctUntilChanged(L),d.share({resetOnRefCountZero:!0,resetOnError:!1,resetOnComplete:!1}))},exports.createSelector=P,exports.createSortSelector=function(r,e){return g(r,t=>Array.from(t.values()).sort(e))},exports.createTestArrayContext=function(r=[],e="test-array"){try{return T(r,"memory",e)}catch{return q(r,"memory",`${e}-emergency-fallback`)}},exports.filterArray=H,exports.filterArrayItems=F,exports.filterMap=G,exports.filterMapItems=z,exports.getFieldValue=D,exports.isArray=O,exports.isDate=v,exports.isIterable=function(r){return r!=null&&typeof r=="object"&&Symbol.iterator in Object(r)&&typeof r[Symbol.iterator]=="function"},exports.isMap=M,exports.isNil=I,exports.isNumber=C,exports.isPlainObject=function(r){if(r===null||typeof r!="object")return!1;const e=Object.getPrototypeOf(r);return e===Object.prototype||e===null},exports.isSet=x,exports.isString=m,exports.select=W,exports.selectItem=function(r,e,t={required:!0}){return function(n,o,i){W(r,function(l){const h=e(this);return h?l.get(h):void 0},t)(n,o)}};
|
|
2
|
-
//# sourceMappingURL=selector-hook-CyvD9WN9.cjs.map
|
package/dist/sheet-CNvW8vrn.cjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";const c=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const v=require("./tailwind.mixin-CPvz1Npj.cjs"),m=require("lit"),a=require("lit/decorators.js"),f=require("./litElement.mixin-CrXwM_fu.cjs"),b=require("lit/directives/when.js"),d=require("./theme.component-E4gA7t5r.cjs");var g=Object.getOwnPropertyDescriptor;let y=class extends v.TailwindElement(m.css``){render(){return m.html`
|
|
2
|
-
<sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
|
|
3
|
-
<div class="block md:hidden flex-1 justify-start items-start">
|
|
4
|
-
<slot name="back">
|
|
5
|
-
<schmancy-button
|
|
6
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
|
|
7
|
-
>
|
|
8
|
-
<span class="text-[24px]">← </span>
|
|
9
|
-
</schmancy-button>
|
|
10
|
-
</slot>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div class="hidden md:block flex-1 justify-end items-end">
|
|
14
|
-
<slot name="actions">
|
|
15
|
-
<schmancy-icon-button
|
|
16
|
-
@click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
|
|
17
|
-
>
|
|
18
|
-
close
|
|
19
|
-
</schmancy-icon-button>
|
|
20
|
-
</slot>
|
|
21
|
-
</div>
|
|
22
|
-
</sch-flex>
|
|
23
|
-
`}};y=((t,e,s,i)=>{for(var h,n=i>1?void 0:i?g(e,s):e,l=t.length-1;l>=0;l--)(h=t[l])&&(n=h(n)||n);return n})([a.customElement("schmancy-sheet-header")],y);var w=Object.defineProperty,E=Object.getOwnPropertyDescriptor,r=(t,e,s,i)=>{for(var h,n=i>1?void 0:i?E(e,s):e,l=t.length-1;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&w(e,s,n),n};let o=class extends f.$LitElement(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-timing: cubic-bezier(.16, 1, .3, 1);--transition-duration: .25s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}"){constructor(){super(...arguments),this.open=!1,this.header="visible",this.position=d.SchmancySheetPosition.Side,this.persist=!1,this.lock=!1,this.handleHistory=!0,this.title="",this.focusAttribute="autofocus",this.lastFocusedElement=null,this.handleFocusIn=t=>{var e;(e=this.sheet)!=null&&e.contains(t.target)||this.focus()}}onOpenChange(t,e){var s;e?(this.lastFocusedElement=document.activeElement,this.addFocusTrap(),this.focus()):(this.removeFocusTrap(),(s=this.lastFocusedElement)==null||s.focus(),this.lastFocusedElement=null)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=this.handleHistory?c.fromEvent(window,"popstate").pipe(c.tap(i=>{i.preventDefault(),this.closeSheet()})):c.of(null).pipe(c.take(0)),e=c.fromEvent(window,"keyup").pipe(c.tap(i=>{i.key!=="Escape"||this.sheetContainsFocus()||this.lock||d.sheet.dismiss(this.uid)})),s=c.fromEvent(window,d.SheetWhereAreYouRicky).pipe(c.tap(i=>{i.detail.uid===this.uid&&this.announcePresence()}));c.merge(t,e,s).pipe(c.takeUntil(this.disconnecting)).subscribe()}sheetContainsFocus(){var t;return((t=this.sheet)==null?void 0:t.contains(document.activeElement))??!1}announcePresence(){this.dispatchEvent(new CustomEvent(d.SheetHereMorty,{detail:{sheet:this},bubbles:!0,composed:!0}))}addFocusTrap(){document.addEventListener("focusin",this.handleFocusIn)}removeFocusTrap(){document.removeEventListener("focusin",this.handleFocusIn)}setIsSheetShown(t){var e,s;(e=this.sheet)==null||e.setAttribute("aria-hidden",String(!t)),(s=this.sheet)==null||s.setAttribute("aria-modal",String(t))}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}getFocusElement(){const t=`[${this.focusAttribute}]`;return this.assignedElements.find(e=>e.matches(t)||e.querySelector(t))??null}focus(){var t;(t=this.getFocusElement())==null||t.focus()}render(){return m.html`
|
|
24
|
-
<div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden=${!this.open} aria-modal=${this.open}>
|
|
25
|
-
<div
|
|
26
|
-
class="overlay"
|
|
27
|
-
@click=${t=>{t.stopPropagation(),this.lock||d.sheet.dismiss(this.uid)}}
|
|
28
|
-
></div>
|
|
29
|
-
<schmancy-grid
|
|
30
|
-
rows=${this.header==="hidden"?"1fr":"auto 1fr"}
|
|
31
|
-
class="content w-full"
|
|
32
|
-
data-position=${this.position}
|
|
33
|
-
>
|
|
34
|
-
${b.when(this.header!=="hidden",()=>m.html`<schmancy-sheet-header
|
|
35
|
-
class="sticky top-0 z-50 w-full"
|
|
36
|
-
@dismiss=${t=>{t.stopPropagation(),d.sheet.dismiss(this.uid)}}
|
|
37
|
-
id="sheet-title"
|
|
38
|
-
title=${this.title}
|
|
39
|
-
></schmancy-sheet-header>`)}
|
|
40
|
-
|
|
41
|
-
<schmancy-surface rounded="left" fill="all" id="body" class="overflow-auto" type="surface">
|
|
42
|
-
<schmancy-scroll> <slot></slot></schmancy-scroll>
|
|
43
|
-
</schmancy-surface>
|
|
44
|
-
</schmancy-grid>
|
|
45
|
-
</div>
|
|
46
|
-
`}};var u,p;r([a.property({type:String,reflect:!0})],o.prototype,"uid",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"open",2),r([a.property({type:String,reflect:!0})],o.prototype,"header",2),r([a.property({type:String,reflect:!0})],o.prototype,"position",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"persist",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"lock",2),r([a.property({type:Boolean,reflect:!0})],o.prototype,"handleHistory",2),r([a.property({type:String,reflect:!0})],o.prototype,"title",2),r([a.query(".sheet")],o.prototype,"sheet",2),r([a.queryAssignedElements({flatten:!0})],o.prototype,"assignedElements",2),r([a.property()],o.prototype,"focusAttribute",2),r([(u="open",(t,e)=>{const{willUpdate:s}=t;p=Object.assign({waitUntilFirstUpdate:!1},p),t.willUpdate=function(i){if(s.call(this,i),i.has(u)){const h=i.get(u),n=this[u];h!==n&&(p!=null&&p.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,h,n))}}})],o.prototype,"onOpenChange",1),o=r([a.customElement("schmancy-sheet")],o);
|
|
47
|
-
//# sourceMappingURL=sheet-CNvW8vrn.cjs.map
|