@mhmo91/schmancy 0.10.22 → 0.10.24
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/custom-elements.json +0 -106
- package/dist/agent/{overlay.confirm-body-xfOh5Q28.js → overlay.confirm-body-CvdVfCnN.js} +1 -1
- package/dist/agent/{overlay.confirm-body-xfOh5Q28.js.map → overlay.confirm-body-CvdVfCnN.js.map} +1 -1
- package/dist/agent/schmancy.agent.js +1844 -1961
- package/dist/agent/schmancy.agent.js.map +1 -1
- package/dist/agent/schmancy.manifest.json +1 -89
- package/dist/{area-Ddk7P5wD.js → area-A_oUP4P1.js} +1 -1
- package/dist/{area-Ddk7P5wD.js.map → area-A_oUP4P1.js.map} +1 -1
- package/dist/{area-Cbkt0NX4.cjs → area-BuqdaUpQ.cjs} +1 -1
- package/dist/{area-Cbkt0NX4.cjs.map → area-BuqdaUpQ.cjs.map} +1 -1
- package/dist/area.cjs +1 -1
- package/dist/area.js +1 -1
- package/dist/{autocomplete-Ds3Q2cwR.js → autocomplete-BoCWO26L.js} +2 -2
- package/dist/{autocomplete-Ds3Q2cwR.js.map → autocomplete-BoCWO26L.js.map} +1 -1
- package/dist/{autocomplete-CfBFDSc3.cjs → autocomplete-Cy46gJxK.cjs} +1 -1
- package/dist/{autocomplete-CfBFDSc3.cjs.map → autocomplete-Cy46gJxK.cjs.map} +1 -1
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/{boat-BF5P6p_f.js → boat-B0h5fuAA.js} +1 -1
- package/dist/{boat-BF5P6p_f.js.map → boat-B0h5fuAA.js.map} +1 -1
- package/dist/{boat-BPN8HLzZ.cjs → boat-RRtBhD3x.cjs} +1 -1
- package/dist/{boat-BPN8HLzZ.cjs.map → boat-RRtBhD3x.cjs.map} +1 -1
- package/dist/boat.cjs +1 -1
- package/dist/boat.js +1 -1
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/{busy-C7ejPa-Q.cjs → busy-Bn6Pioo8.cjs} +1 -1
- package/dist/{busy-C7ejPa-Q.cjs.map → busy-Bn6Pioo8.cjs.map} +1 -1
- package/dist/{busy-BuACDJy6.js → busy-DObY7lfu.js} +1 -1
- package/dist/{busy-BuACDJy6.js.map → busy-DObY7lfu.js.map} +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button-DEi3M2nV.js +446 -0
- package/dist/button-DEi3M2nV.js.map +1 -0
- package/dist/button-XfdPzfZQ.cjs +120 -0
- package/dist/button-XfdPzfZQ.cjs.map +1 -0
- package/dist/button.cjs +1 -120
- package/dist/button.js +2 -447
- package/dist/{card-BIzaLuEg.cjs → card-BjUgRzFh.cjs} +1 -1
- package/dist/{card-BIzaLuEg.cjs.map → card-BjUgRzFh.cjs.map} +1 -1
- package/dist/{card-CgQwXO8L.js → card-jzUQK0EQ.js} +1 -1
- package/dist/{card-CgQwXO8L.js.map → card-jzUQK0EQ.js.map} +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BNdg57Om.js → checkbox-CfCm1vGN.js} +1 -1
- package/dist/{checkbox-BNdg57Om.js.map → checkbox-CfCm1vGN.js.map} +1 -1
- package/dist/{checkbox-BAqE3sTx.cjs → checkbox-rskgUBxQ.cjs} +1 -1
- package/dist/{checkbox-BAqE3sTx.cjs.map → checkbox-rskgUBxQ.cjs.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DS3y4Lbn.cjs → chips-BiNZKu0J.cjs} +1 -1
- package/dist/{chips-DS3y4Lbn.cjs.map → chips-BiNZKu0J.cjs.map} +1 -1
- package/dist/{chips-DnqLaOb1.js → chips-Dfim_tQv.js} +2 -2
- package/dist/{chips-DnqLaOb1.js.map → chips-Dfim_tQv.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +2 -2
- package/dist/connectivity.cjs +1 -1
- package/dist/connectivity.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-CAqB-B0M.js → date-range-B8zoj6Cj.js} +2 -2
- package/dist/{date-range-CAqB-B0M.js.map → date-range-B8zoj6Cj.js.map} +1 -1
- package/dist/{date-range-VA1mi1N7.cjs → date-range-em7OwhlK.cjs} +1 -1
- package/dist/{date-range-VA1mi1N7.cjs.map → date-range-em7OwhlK.cjs.map} +1 -1
- package/dist/{date-range-inline-PeRt1iIF.js → date-range-inline-BfUL8_vX.js} +1 -1
- package/dist/{date-range-inline-PeRt1iIF.js.map → date-range-inline-BfUL8_vX.js.map} +1 -1
- package/dist/{date-range-inline-CAa0_4EI.cjs → date-range-inline-DYeqoBIO.cjs} +1 -1
- package/dist/{date-range-inline-CAa0_4EI.cjs.map → date-range-inline-DYeqoBIO.cjs.map} +1 -1
- package/dist/date-range-inline.cjs +1 -1
- package/dist/date-range-inline.js +1 -1
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{details-BnXbDpt7.cjs → details-CNM1tuma.cjs} +1 -1
- package/dist/{details-BnXbDpt7.cjs.map → details-CNM1tuma.cjs.map} +1 -1
- package/dist/{details-BpFjVclg.js → details-D246xN83.js} +1 -1
- package/dist/{details-BpFjVclg.js.map → details-D246xN83.js.map} +1 -1
- package/dist/details.cjs +1 -1
- package/dist/details.js +1 -1
- package/dist/{divider-D8cBBkdG.js → divider-CbIp1je9.js} +1 -1
- package/dist/{divider-D8cBBkdG.js.map → divider-CbIp1je9.js.map} +1 -1
- package/dist/{divider-B84lt1A3.cjs → divider-DaKsGNW-.cjs} +1 -1
- package/dist/{divider-B84lt1A3.cjs.map → divider-DaKsGNW-.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{expand-DK-O37-j.cjs → expand-CQDm3BF3.cjs} +1 -1
- package/dist/{expand-DK-O37-j.cjs.map → expand-CQDm3BF3.cjs.map} +1 -1
- package/dist/{expand-BJiKggfg.js → expand-DRkiO4vw.js} +2 -2
- package/dist/{expand-BJiKggfg.js.map → expand-DRkiO4vw.js.map} +1 -1
- package/dist/expand.cjs +1 -1
- package/dist/expand.js +1 -1
- package/dist/{float-RWR6Q1Hh.cjs → float-5O26zNRh.cjs} +1 -1
- package/dist/{float-RWR6Q1Hh.cjs.map → float-5O26zNRh.cjs.map} +1 -1
- package/dist/{float-B4FDN40h.js → float-CZtu8FnO.js} +1 -1
- package/dist/{float-B4FDN40h.js.map → float-CZtu8FnO.js.map} +1 -1
- package/dist/float.cjs +1 -1
- package/dist/float.js +1 -1
- package/dist/{form-ha3df3K7.cjs → form-B90CMeqs.cjs} +1 -1
- package/dist/{form-ha3df3K7.cjs.map → form-B90CMeqs.cjs.map} +1 -1
- package/dist/{form-B-Sm6u25.js → form-CE6Gwz4r.js} +8 -8
- package/dist/{form-B-Sm6u25.js.map → form-CE6Gwz4r.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +6 -6
- package/dist/handover/agent-runtime-followups.md +1 -1
- package/dist/handover/agent-runtime-v1.md +3 -3
- package/dist/icons-B7ppo07M.cjs +33 -0
- package/dist/icons-B7ppo07M.cjs.map +1 -0
- package/dist/icons-CGhozJ5v.js +48 -0
- package/dist/icons-CGhozJ5v.js.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/{iframe-CByrVlZy.js → iframe-C3PMj1MD.js} +1 -1
- package/dist/{iframe-CByrVlZy.js.map → iframe-C3PMj1MD.js.map} +1 -1
- package/dist/{iframe-BXe1TPx1.cjs → iframe-D98csbEo.cjs} +1 -1
- package/dist/{iframe-BXe1TPx1.cjs.map → iframe-D98csbEo.cjs.map} +1 -1
- package/dist/iframe.cjs +1 -1
- package/dist/iframe.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +27 -27
- package/dist/{input-Q0fm34Co.js → input-CCOkeeVM.js} +1 -1
- package/dist/{input-Q0fm34Co.js.map → input-CCOkeeVM.js.map} +1 -1
- package/dist/{input-BY9OCQWr.cjs → input-_y92Pzon.cjs} +1 -1
- package/dist/{input-BY9OCQWr.cjs.map → input-_y92Pzon.cjs.map} +1 -1
- package/dist/{input-chip-CytUirVS.js → input-chip-Bzwr5-XL.js} +1 -1
- package/dist/{input-chip-CytUirVS.js.map → input-chip-Bzwr5-XL.js.map} +1 -1
- package/dist/{input-chip-BwNf3GD0.cjs → input-chip-CR66MWml.cjs} +1 -1
- package/dist/{input-chip-BwNf3GD0.cjs.map → input-chip-CR66MWml.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/json.cjs +2 -2
- package/dist/json.cjs.map +1 -1
- package/dist/json.js +3 -3
- package/dist/json.js.map +1 -1
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{lightbox-p2E0oVR0.cjs → lightbox-Bk3ovcVu.cjs} +1 -1
- package/dist/{lightbox-p2E0oVR0.cjs.map → lightbox-Bk3ovcVu.cjs.map} +1 -1
- package/dist/{lightbox-Ckvn5YNF.js → lightbox-Dl--fEbP.js} +1 -1
- package/dist/{lightbox-Ckvn5YNF.js.map → lightbox-Dl--fEbP.js.map} +1 -1
- package/dist/lightbox.cjs +1 -1
- package/dist/lightbox.js +1 -1
- package/dist/{list-CsrPVvmm.js → list-B3WI_Nfs.js} +1 -1
- package/dist/{list-CsrPVvmm.js.map → list-B3WI_Nfs.js.map} +1 -1
- package/dist/{list-r57UFHu3.cjs → list-DWngbP2X.cjs} +1 -1
- package/dist/{list-r57UFHu3.cjs.map → list-DWngbP2X.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{menu-DBuZiPyW.cjs → menu-CdYjxJqm.cjs} +1 -1
- package/dist/{menu-DBuZiPyW.cjs.map → menu-CdYjxJqm.cjs.map} +1 -1
- package/dist/{menu-Csm6Fg88.js → menu-IDhVp6zm.js} +2 -2
- package/dist/{menu-Csm6Fg88.js.map → menu-IDhVp6zm.js.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/{mixins-DTCHPEd4.cjs → mixins-BPUR4Kc4.cjs} +1 -1
- package/dist/{mixins-DTCHPEd4.cjs.map → mixins-BPUR4Kc4.cjs.map} +1 -1
- package/dist/{mixins-pU53qf6R.js → mixins-C42OILRS.js} +1 -1
- package/dist/{mixins-pU53qf6R.js.map → mixins-C42OILRS.js.map} +1 -1
- package/dist/mixins.cjs +1 -1
- package/dist/mixins.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/navigation-rail.cjs +1 -1
- package/dist/navigation-rail.js +1 -1
- package/dist/{notification-58tkVys8.cjs → notification-B3wVUC8l.cjs} +1 -1
- package/dist/{notification-58tkVys8.cjs.map → notification-B3wVUC8l.cjs.map} +1 -1
- package/dist/{notification-CgTBiAdf.js → notification-CllYkvlR.js} +2 -2
- package/dist/{notification-CgTBiAdf.js.map → notification-CllYkvlR.js.map} +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-Bicf6xpI.js → option-CPOL0nHL.js} +1 -1
- package/dist/{option-Bicf6xpI.js.map → option-CPOL0nHL.js.map} +1 -1
- package/dist/{option-61YE3gub.cjs → option-cRsdshy8.cjs} +1 -1
- package/dist/{option-61YE3gub.cjs.map → option-cRsdshy8.cjs.map} +1 -1
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{overlay-CpvmytrQ.cjs → overlay-BnTvnNDc.cjs} +1 -1
- package/dist/{overlay-CpvmytrQ.cjs.map → overlay-BnTvnNDc.cjs.map} +1 -1
- package/dist/{overlay-CAI2FAp7.js → overlay-DJ-vlwtR.js} +3 -3
- package/dist/{overlay-CAI2FAp7.js.map → overlay-DJ-vlwtR.js.map} +1 -1
- package/dist/overlay.cjs +1 -1
- package/dist/{overlay.confirm-body-QD-5cj3_.cjs → overlay.confirm-body-CQ-FwySO.cjs} +1 -1
- package/dist/{overlay.confirm-body-QD-5cj3_.cjs.map → overlay.confirm-body-CQ-FwySO.cjs.map} +1 -1
- package/dist/{overlay.confirm-body-Cq25CkTw.js → overlay.confirm-body-DEb9xw5N.js} +1 -1
- package/dist/{overlay.confirm-body-Cq25CkTw.js.map → overlay.confirm-body-DEb9xw5N.js.map} +1 -1
- package/dist/overlay.js +3 -3
- package/dist/{overlay.service-BG0bqPwJ.cjs → overlay.service-CKBCIP2f.cjs} +1 -1
- package/dist/{overlay.service-BG0bqPwJ.cjs.map → overlay.service-CKBCIP2f.cjs.map} +1 -1
- package/dist/{overlay.service-Bpjrhaxh.js → overlay.service-XM1YHkTk.js} +2 -2
- package/dist/{overlay.service-Bpjrhaxh.js.map → overlay.service-XM1YHkTk.js.map} +1 -1
- package/dist/{progress-D8XZJVl5.cjs → progress-CcfLfHOE.cjs} +1 -1
- package/dist/{progress-D8XZJVl5.cjs.map → progress-CcfLfHOE.cjs.map} +1 -1
- package/dist/{progress-Zqx-S9NZ.js → progress-CnMPp-9a.js} +1 -1
- package/dist/{progress-Zqx-S9NZ.js.map → progress-CnMPp-9a.js.map} +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-group-D9MU1Mxz.js → radio-group-BUJgfQFi.js} +1 -1
- package/dist/{radio-group-D9MU1Mxz.js.map → radio-group-BUJgfQFi.js.map} +1 -1
- package/dist/{radio-group-bl8K4Gls.cjs → radio-group-D97hflrE.cjs} +1 -1
- package/dist/{radio-group-bl8K4Gls.cjs.map → radio-group-D97hflrE.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/range.cjs +1 -1
- package/dist/range.js +1 -1
- package/dist/{select-CMwkl-D6.js → select-BWEh5nRM.js} +1 -1
- package/dist/{select-CMwkl-D6.js.map → select-BWEh5nRM.js.map} +1 -1
- package/dist/{select-COIfVtZl.cjs → select-Cv5Oev6d.cjs} +1 -1
- package/dist/{select-COIfVtZl.cjs.map → select-Cv5Oev6d.cjs.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skills/overlay.md +4 -0
- package/dist/skills/schmancy/overlay.md +4 -0
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{splash-screen-xrMNpzkm.js → splash-screen-B6w7X2z9.js} +1 -1
- package/dist/{splash-screen-xrMNpzkm.js.map → splash-screen-B6w7X2z9.js.map} +1 -1
- package/dist/{splash-screen-2hxq8Sft.cjs → splash-screen-DFtxtO2D.cjs} +1 -1
- package/dist/{splash-screen-2hxq8Sft.cjs.map → splash-screen-DFtxtO2D.cjs.map} +1 -1
- package/dist/splash-screen.cjs +1 -1
- package/dist/splash-screen.js +1 -1
- package/dist/{src-BoHs3kDi.cjs → src-Asw6A018.cjs} +3 -3
- package/dist/src-Asw6A018.cjs.map +1 -0
- package/dist/{src-DhbXaOrS.js → src-D_NK-vMA.js} +40 -40
- package/dist/src-D_NK-vMA.js.map +1 -0
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-BkQ44Wuo.cjs → surface-B94ka2LY.cjs} +1 -1
- package/dist/{surface-BkQ44Wuo.cjs.map → surface-B94ka2LY.cjs.map} +1 -1
- package/dist/{surface-3nnvlxeE.js → surface-ctBcRGSZ.js} +1 -1
- package/dist/{surface-3nnvlxeE.js.map → surface-ctBcRGSZ.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.cjs +2 -2
- package/dist/table.cjs.map +1 -1
- package/dist/table.js +2 -2
- package/dist/table.js.map +1 -1
- package/dist/{tabs-Dql0rcqZ.cjs → tabs-B7kaZIom.cjs} +1 -1
- package/dist/{tabs-Dql0rcqZ.cjs.map → tabs-B7kaZIom.cjs.map} +1 -1
- package/dist/{tabs-CnLIe8nE.js → tabs-CrMx5z_y.js} +1 -1
- package/dist/{tabs-CnLIe8nE.js.map → tabs-CrMx5z_y.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-CGD6lAEe.cjs → textarea-D1crj8JD.cjs} +1 -1
- package/dist/{textarea-CGD6lAEe.cjs.map → textarea-D1crj8JD.cjs.map} +1 -1
- package/dist/{textarea-BAogS_Ff.js → textarea-DeHFl80i.js} +1 -1
- package/dist/{textarea-BAogS_Ff.js.map → textarea-DeHFl80i.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-CUK0HrS3.js → theme-C7Yo33nh.js} +2 -2
- package/dist/{theme-CUK0HrS3.js.map → theme-C7Yo33nh.js.map} +1 -1
- package/dist/{theme-button-CmTwFm3l.cjs → theme-button-CXSM5We4.cjs} +1 -1
- package/dist/{theme-button-CmTwFm3l.cjs.map → theme-button-CXSM5We4.cjs.map} +1 -1
- package/dist/{theme-button-Bb8qW2IH.js → theme-button-Cpc_hs2O.js} +1 -1
- package/dist/{theme-button-Bb8qW2IH.js.map → theme-button-Cpc_hs2O.js.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/{theme-DKrrQ-ic.cjs → theme-wE2N7Yu9.cjs} +2 -2
- package/dist/{theme-DKrrQ-ic.cjs.map → theme-wE2N7Yu9.cjs.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/dist/visually-hidden.cjs +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/{window-BbWlaPZv.cjs → window-Ck_zS4bb.cjs} +1 -1
- package/dist/{window-BbWlaPZv.cjs.map → window-Ck_zS4bb.cjs.map} +1 -1
- package/dist/{window-DuDAQa6y.js → window-JtkeHoxS.js} +1 -1
- package/dist/{window-DuDAQa6y.js.map → window-JtkeHoxS.js.map} +1 -1
- package/dist/window.cjs +1 -1
- package/dist/window.js +1 -1
- package/package.json +1 -1
- package/skills/schmancy/overlay.md +4 -0
- package/src/badge/badge.ts +7 -11
- package/src/button/icon-button.ts +3 -4
- package/src/icons/icon.ts +43 -293
- package/src/json/json.ts +1 -1
- package/src/table/table.ts +2 -2
- package/src/theme/theme-audio-player.ts +1 -1
- package/types/src/badge/badge.d.ts +1 -1
- package/types/src/icons/icon.d.ts +0 -81
- package/dist/button.cjs.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/context-6oXCZmZN.js +0 -3
- package/dist/context-6oXCZmZN.js.map +0 -1
- package/dist/context-CRZeiCqq.cjs +0 -1
- package/dist/context-CRZeiCqq.cjs.map +0 -1
- package/dist/icons-BgUbHwy8.js +0 -169
- package/dist/icons-BgUbHwy8.js.map +0 -1
- package/dist/icons-morK4hHz.cjs +0 -52
- package/dist/icons-morK4hHz.cjs.map +0 -1
- package/dist/src-BoHs3kDi.cjs.map +0 -1
- package/dist/src-DhbXaOrS.js.map +0 -1
package/dist/button.js
CHANGED
|
@@ -1,447 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { t as n } from "./magnetic-DxvoEz8_.js";
|
|
4
|
-
import { t as r } from "./context-6oXCZmZN.js";
|
|
5
|
-
import { provide as i } from "@lit/context";
|
|
6
|
-
import { customElement as a, property as o, query as s, queryAssignedElements as c, state as l } from "lit/decorators.js";
|
|
7
|
-
import { LitElement as u, css as d, html as f } from "lit";
|
|
8
|
-
import { ifDefined as p } from "lit/directives/if-defined.js";
|
|
9
|
-
import { when as m } from "lit/directives/when.js";
|
|
10
|
-
var h = class extends e {
|
|
11
|
-
static {
|
|
12
|
-
this.styles = [d`:host{
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
position: relative;
|
|
16
|
-
touch-action: manipulation;
|
|
17
|
-
border-radius: 1rem;
|
|
18
|
-
transition:
|
|
19
|
-
box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
20
|
-
transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
21
|
-
}
|
|
22
|
-
:host([width="full"]) {
|
|
23
|
-
display: flex;
|
|
24
|
-
width: 100%;
|
|
25
|
-
}
|
|
26
|
-
:host(:hover:not([disabled])) {
|
|
27
|
-
box-shadow: 0 4px 16px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 20%, transparent);
|
|
28
|
-
}
|
|
29
|
-
:host(:active:not([disabled])) {
|
|
30
|
-
transform: scale(0.97);
|
|
31
|
-
box-shadow: 0 1px 4px -2px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);
|
|
32
|
-
transition-duration: 100ms;
|
|
33
|
-
}
|
|
34
|
-
@media (prefers-reduced-motion: reduce) {
|
|
35
|
-
:host { transition: none; }
|
|
36
|
-
:host(:hover:not([disabled])) { box-shadow: none; }
|
|
37
|
-
:host(:active:not([disabled])) { transform: none; box-shadow: none; }
|
|
38
|
-
}
|
|
39
|
-
:host *,
|
|
40
|
-
* {
|
|
41
|
-
touch-action: manipulation;
|
|
42
|
-
}`];
|
|
43
|
-
}
|
|
44
|
-
static {
|
|
45
|
-
this.shadowRootOptions = {
|
|
46
|
-
...u.shadowRootOptions,
|
|
47
|
-
mode: "open",
|
|
48
|
-
delegatesFocus: !0
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
static {
|
|
52
|
-
this.formAssociated = !0;
|
|
53
|
-
}
|
|
54
|
-
constructor() {
|
|
55
|
-
super(), this.variant = "text", this.width = "auto", this.size = "md", this.type = "button", this.disabled = !1;
|
|
56
|
-
try {
|
|
57
|
-
this.internals = this.attachInternals();
|
|
58
|
-
} catch {
|
|
59
|
-
this.internals = void 0;
|
|
60
|
-
}
|
|
61
|
-
this.addEventListener("click", (e) => {
|
|
62
|
-
if (this.disabled) return e.preventDefault(), void e.stopImmediatePropagation();
|
|
63
|
-
let t = this.internals?.form;
|
|
64
|
-
t && (this.type === "submit" ? (e.preventDefault(), t.requestSubmit()) : this.type === "reset" && (e.preventDefault(), t.reset()));
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
get form() {
|
|
68
|
-
return this.internals?.form ?? null;
|
|
69
|
-
}
|
|
70
|
-
formDisabledCallback(e) {
|
|
71
|
-
this.disabled = e;
|
|
72
|
-
}
|
|
73
|
-
connectedCallback() {
|
|
74
|
-
if (super.connectedCallback(), this.type !== "submit") return;
|
|
75
|
-
let e = this.closest("schmancy-form");
|
|
76
|
-
if (!e) return;
|
|
77
|
-
let t = () => {
|
|
78
|
-
e.getAttribute("aria-busy") === "true" ? (this.setAttribute("aria-busy", "true"), this.internals?.states.add("submitting")) : (this.removeAttribute("aria-busy"), this.internals?.states.delete("submitting"));
|
|
79
|
-
};
|
|
80
|
-
t(), this._formBusyObserver = new MutationObserver(t), this._formBusyObserver.observe(e, {
|
|
81
|
-
attributes: !0,
|
|
82
|
-
attributeFilter: ["aria-busy"]
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
disconnectedCallback() {
|
|
86
|
-
this._formBusyObserver?.disconnect(), this._formBusyObserver = void 0, super.disconnectedCallback();
|
|
87
|
-
}
|
|
88
|
-
set ariaLabel(e) {
|
|
89
|
-
let t = this._ariaLabel;
|
|
90
|
-
this._ariaLabel = e, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", t);
|
|
91
|
-
}
|
|
92
|
-
get ariaLabel() {
|
|
93
|
-
return this._ariaLabel;
|
|
94
|
-
}
|
|
95
|
-
focus(e) {
|
|
96
|
-
this.nativeElement.focus(e);
|
|
97
|
-
}
|
|
98
|
-
blur() {
|
|
99
|
-
this.nativeElement.blur();
|
|
100
|
-
}
|
|
101
|
-
get effectiveColor() {
|
|
102
|
-
return this.color ? this.color : (this.variant === "tonal" ? "filled tonal" : this.variant) === "filled tonal" ? "secondary" : "primary";
|
|
103
|
-
}
|
|
104
|
-
get imgClasses() {
|
|
105
|
-
return [{
|
|
106
|
-
xxs: "w-3 h-3",
|
|
107
|
-
xs: "w-4 h-4",
|
|
108
|
-
sm: "w-5 h-5",
|
|
109
|
-
md: "w-6 h-6",
|
|
110
|
-
lg: "w-7 h-7"
|
|
111
|
-
}[this.size], "object-contain"];
|
|
112
|
-
}
|
|
113
|
-
firstUpdated() {
|
|
114
|
-
this.prefixImgs?.forEach((e) => {
|
|
115
|
-
e.classList.add(...this.imgClasses), e.hasAttribute("alt") || e.setAttribute("alt", "");
|
|
116
|
-
}), this.suffixImgs?.forEach((e) => {
|
|
117
|
-
e.classList.add(...this.imgClasses), e.hasAttribute("alt") || e.setAttribute("alt", "");
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
click() {
|
|
121
|
-
this.dispatchEvent(new Event("click", {
|
|
122
|
-
bubbles: !0,
|
|
123
|
-
composed: !0
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
_preventDefault(e) {
|
|
127
|
-
e.preventDefault(), e.stopPropagation();
|
|
128
|
-
}
|
|
129
|
-
render() {
|
|
130
|
-
let e = this.variant === "tonal" ? "filled tonal" : this.variant, t = {
|
|
131
|
-
"z-0 transition-all duration-200 relative rounded-2xl flex justify-center items-center outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden flex-1 overflow-hidden": !0,
|
|
132
|
-
"h-6": this.size === "xxs",
|
|
133
|
-
"h-8": this.size === "xs",
|
|
134
|
-
"h-10": this.size === "sm",
|
|
135
|
-
"h-12": this.size === "md",
|
|
136
|
-
"h-14": this.size === "lg",
|
|
137
|
-
"py-1 px-2": this.size === "xxs",
|
|
138
|
-
"py-2 px-4": this.size === "xs",
|
|
139
|
-
"py-2.5 px-5": this.size === "sm",
|
|
140
|
-
"py-3 px-6": this.size === "md",
|
|
141
|
-
"py-4 px-7": this.size === "lg",
|
|
142
|
-
"text-[10px] font-medium leading-3": this.size === "xxs",
|
|
143
|
-
"text-xs font-medium leading-4": this.size === "xs",
|
|
144
|
-
"text-sm font-medium leading-5": this.size === "sm" || this.size === "md",
|
|
145
|
-
"text-base font-medium leading-6": this.size === "lg",
|
|
146
|
-
"tracking-[0.1px]": !0,
|
|
147
|
-
"gap-0.5": this.size === "xxs",
|
|
148
|
-
"gap-1": this.size === "xs",
|
|
149
|
-
"gap-1.5": this.size === "sm",
|
|
150
|
-
"gap-2": this.size === "md",
|
|
151
|
-
"gap-2.5": this.size === "lg",
|
|
152
|
-
"cursor-pointer": !this.disabled,
|
|
153
|
-
"opacity-[0.38]": this.disabled,
|
|
154
|
-
"hover:shadow-sm": !this.disabled && e === "elevated",
|
|
155
|
-
"w-full tex-center": this.width === "full",
|
|
156
|
-
"bg-surface-low shadow-xs": e === "elevated",
|
|
157
|
-
"bg-transparent border-1 border-solid": e === "outlined",
|
|
158
|
-
"border-outline": e === "outlined" && this.effectiveColor === "primary",
|
|
159
|
-
"border-success-default": e === "outlined" && this.effectiveColor === "success",
|
|
160
|
-
"border-error-default": e === "outlined" && this.effectiveColor === "error",
|
|
161
|
-
"border-warning-default": e === "outlined" && this.effectiveColor === "warning",
|
|
162
|
-
"border-info-default": e === "outlined" && this.effectiveColor === "info",
|
|
163
|
-
"border-secondary-default": e === "outlined" && this.effectiveColor === "secondary",
|
|
164
|
-
"border-outline-variant": e === "outlined" && this.effectiveColor === "neutral",
|
|
165
|
-
"bg-primary-default": e === "filled" && this.effectiveColor === "primary",
|
|
166
|
-
"bg-secondary-default": e === "filled" && this.effectiveColor === "secondary",
|
|
167
|
-
"bg-success-default": e === "filled" && this.effectiveColor === "success",
|
|
168
|
-
"bg-error-default": e === "filled" && this.effectiveColor === "error",
|
|
169
|
-
"bg-warning-default": e === "filled" && this.effectiveColor === "warning",
|
|
170
|
-
"bg-info-default": e === "filled" && this.effectiveColor === "info",
|
|
171
|
-
"bg-surface-containerHighest": e === "filled" && this.effectiveColor === "neutral",
|
|
172
|
-
"text-primary-on": e === "filled" && this.effectiveColor === "primary",
|
|
173
|
-
"text-secondary-on": e === "filled" && this.effectiveColor === "secondary",
|
|
174
|
-
"text-success-on": e === "filled" && this.effectiveColor === "success",
|
|
175
|
-
"text-error-on": e === "filled" && this.effectiveColor === "error",
|
|
176
|
-
"text-warning-on": e === "filled" && this.effectiveColor === "warning",
|
|
177
|
-
"text-info-on": e === "filled" && this.effectiveColor === "info",
|
|
178
|
-
"text-surface-on": e === "filled" && this.effectiveColor === "neutral",
|
|
179
|
-
"bg-primary-container": e === "filled tonal" && this.effectiveColor === "primary",
|
|
180
|
-
"bg-secondary-container": e === "filled tonal" && this.effectiveColor === "secondary",
|
|
181
|
-
"bg-success-container": e === "filled tonal" && this.effectiveColor === "success",
|
|
182
|
-
"bg-error-container": e === "filled tonal" && this.effectiveColor === "error",
|
|
183
|
-
"bg-warning-container": e === "filled tonal" && this.effectiveColor === "warning",
|
|
184
|
-
"bg-info-container": e === "filled tonal" && this.effectiveColor === "info",
|
|
185
|
-
"bg-surface-containerLow": e === "filled tonal" && this.effectiveColor === "neutral",
|
|
186
|
-
"text-primary-onContainer": e === "filled tonal" && this.effectiveColor === "primary",
|
|
187
|
-
"text-secondary-onContainer": e === "filled tonal" && this.effectiveColor === "secondary",
|
|
188
|
-
"text-success-onContainer": e === "filled tonal" && this.effectiveColor === "success",
|
|
189
|
-
"text-error-onContainer": e === "filled tonal" && this.effectiveColor === "error",
|
|
190
|
-
"text-warning-onContainer": e === "filled tonal" && this.effectiveColor === "warning",
|
|
191
|
-
"text-info-onContainer": e === "filled tonal" && this.effectiveColor === "info",
|
|
192
|
-
"text-primary-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "primary",
|
|
193
|
-
"text-secondary-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "secondary",
|
|
194
|
-
"text-success-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "success",
|
|
195
|
-
"text-error-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "error",
|
|
196
|
-
"text-warning-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "warning",
|
|
197
|
-
"text-info-default": (e === "text" || e === "elevated" || e === "outlined") && this.effectiveColor === "info",
|
|
198
|
-
"text-surface-onVariant": (e === "text" || e === "elevated" || e === "outlined" || e === "filled tonal") && this.effectiveColor === "neutral"
|
|
199
|
-
}, r = {
|
|
200
|
-
"absolute inset-0 hover:opacity-[0.08] z-0 rounded-2xl": !0,
|
|
201
|
-
"focus-visible:opacity-[0.10]": !0,
|
|
202
|
-
"active:opacity-[0.10]": !0,
|
|
203
|
-
"hover:bg-primary-on": e === "filled" && this.effectiveColor === "primary",
|
|
204
|
-
"hover:bg-secondary-on": e === "filled" && this.effectiveColor === "secondary",
|
|
205
|
-
"hover:bg-success-on": e === "filled" && this.effectiveColor === "success",
|
|
206
|
-
"hover:bg-error-on": e === "filled" && this.effectiveColor === "error",
|
|
207
|
-
"hover:bg-warning-on": e === "filled" && this.effectiveColor === "warning",
|
|
208
|
-
"hover:bg-info-on": e === "filled" && this.effectiveColor === "info",
|
|
209
|
-
"hover:bg-surface-on": e === "filled" && this.effectiveColor === "neutral",
|
|
210
|
-
"hover:bg-primary-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "primary",
|
|
211
|
-
"hover:bg-secondary-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "secondary",
|
|
212
|
-
"hover:bg-success-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "success",
|
|
213
|
-
"hover:bg-error-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "error",
|
|
214
|
-
"hover:bg-warning-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "warning",
|
|
215
|
-
"hover:bg-info-default": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "info",
|
|
216
|
-
"hover:bg-surface-onVariant": (e === "outlined" || e === "elevated" || e === "text") && this.effectiveColor === "neutral",
|
|
217
|
-
"hover:bg-primary-container": e === "filled tonal" && this.effectiveColor === "primary",
|
|
218
|
-
"hover:bg-secondary-container": e === "filled tonal" && this.effectiveColor === "secondary",
|
|
219
|
-
"hover:bg-success-container": e === "filled tonal" && this.effectiveColor === "success",
|
|
220
|
-
"hover:bg-error-container": e === "filled tonal" && this.effectiveColor === "error",
|
|
221
|
-
"hover:bg-warning-container": e === "filled tonal" && this.effectiveColor === "warning",
|
|
222
|
-
"hover:bg-info-container": e === "filled tonal" && this.effectiveColor === "info",
|
|
223
|
-
"hover:bg-surface-containerLow": e === "filled tonal" && this.effectiveColor === "neutral"
|
|
224
|
-
};
|
|
225
|
-
return this.href ? f`
|
|
226
|
-
<a
|
|
227
|
-
${n({
|
|
228
|
-
strength: 3,
|
|
229
|
-
radius: 60
|
|
230
|
-
})}
|
|
231
|
-
part="base"
|
|
232
|
-
href=${p(this.disabled ? void 0 : this.href)}
|
|
233
|
-
aria-label=${p(this.ariaLabel)}
|
|
234
|
-
class="${this.classMap(t)}"
|
|
235
|
-
tabindex=${this.disabled ? "-1" : "0"}
|
|
236
|
-
aria-disabled=${this.disabled}
|
|
237
|
-
@click=${this.disabled ? this._preventDefault : void 0}
|
|
238
|
-
>
|
|
239
|
-
${m(!this.disabled, () => f`<div class="${this.classMap(r)}"></div>`)}
|
|
240
|
-
<slot name="prefix"></slot>
|
|
241
|
-
<slot></slot>
|
|
242
|
-
<slot name="suffix"></slot>
|
|
243
|
-
</a>
|
|
244
|
-
` : f`
|
|
245
|
-
<button
|
|
246
|
-
${n({
|
|
247
|
-
strength: 3,
|
|
248
|
-
radius: 60
|
|
249
|
-
})}
|
|
250
|
-
part="base"
|
|
251
|
-
aria-label=${p(this.ariaLabel)}
|
|
252
|
-
?disabled=${this.disabled}
|
|
253
|
-
class="${this.classMap(t)}"
|
|
254
|
-
type=${p(this.type)}
|
|
255
|
-
tabindex=${p(this.disabled ? "-1" : void 0)}
|
|
256
|
-
>
|
|
257
|
-
${m(!this.disabled, () => f`<div class="${this.classMap(r)}"></div>`)}
|
|
258
|
-
<slot name="prefix"></slot>
|
|
259
|
-
<slot></slot>
|
|
260
|
-
<slot name="suffix"></slot>
|
|
261
|
-
</button>
|
|
262
|
-
`;
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
t([s("[part=\"base\"]", !0)], h.prototype, "nativeElement", void 0), t([o({
|
|
266
|
-
reflect: !0,
|
|
267
|
-
type: String
|
|
268
|
-
})], h.prototype, "variant", void 0), t([o({
|
|
269
|
-
reflect: !0,
|
|
270
|
-
type: String
|
|
271
|
-
})], h.prototype, "color", void 0), t([o({ reflect: !0 })], h.prototype, "width", void 0), t([i({ context: r }), o({ type: String })], h.prototype, "size", void 0), t([o({
|
|
272
|
-
reflect: !0,
|
|
273
|
-
type: String
|
|
274
|
-
})], h.prototype, "type", void 0), t([o()], h.prototype, "href", void 0), t([o({
|
|
275
|
-
type: Boolean,
|
|
276
|
-
reflect: !0
|
|
277
|
-
})], h.prototype, "disabled", void 0), t([o({ attribute: "aria-label" })], h.prototype, "ariaLabel", null), t([c({
|
|
278
|
-
slot: "prefix",
|
|
279
|
-
flatten: !0,
|
|
280
|
-
selector: "img"
|
|
281
|
-
})], h.prototype, "prefixImgs", void 0), t([c({
|
|
282
|
-
slot: "suffix",
|
|
283
|
-
flatten: !0,
|
|
284
|
-
selector: "img"
|
|
285
|
-
})], h.prototype, "suffixImgs", void 0), h = t([a("schmancy-button")], h);
|
|
286
|
-
var g = class extends e {
|
|
287
|
-
constructor(...e) {
|
|
288
|
-
super(...e), this.size = "md", this.variant = "text", this.width = "auto", this.type = "button", this.disabled = !1, this.text = !1;
|
|
289
|
-
}
|
|
290
|
-
static {
|
|
291
|
-
this.styles = [d`
|
|
292
|
-
:host {
|
|
293
|
-
display: inline-flex;
|
|
294
|
-
border-radius: 9999px;
|
|
295
|
-
transition:
|
|
296
|
-
box-shadow 300ms cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
297
|
-
transform 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
298
|
-
}
|
|
299
|
-
:host([width="full"]) {
|
|
300
|
-
display: flex;
|
|
301
|
-
width: 100%;
|
|
302
|
-
}
|
|
303
|
-
:host(:hover:not([disabled])) {
|
|
304
|
-
box-shadow: 0 2px 12px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 18%, transparent);
|
|
305
|
-
}
|
|
306
|
-
:host(:active:not([disabled])) {
|
|
307
|
-
transform: scale(0.92);
|
|
308
|
-
box-shadow: none;
|
|
309
|
-
transition-duration: 100ms;
|
|
310
|
-
}
|
|
311
|
-
@media (prefers-reduced-motion: reduce) {
|
|
312
|
-
:host { transition: none; }
|
|
313
|
-
:host(:hover:not([disabled])) { box-shadow: none; }
|
|
314
|
-
:host(:active:not([disabled])) { transform: none; box-shadow: none; }
|
|
315
|
-
}
|
|
316
|
-
`];
|
|
317
|
-
}
|
|
318
|
-
static {
|
|
319
|
-
this.shadowRootOptions = {
|
|
320
|
-
...u.shadowRootOptions,
|
|
321
|
-
mode: "open",
|
|
322
|
-
delegatesFocus: !0
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
connectedCallback() {
|
|
326
|
-
super.connectedCallback(), this._captureIconFromChildren();
|
|
327
|
-
}
|
|
328
|
-
_captureIconFromChildren() {
|
|
329
|
-
if (!this.icon && !this.text) {
|
|
330
|
-
for (let e of this.childNodes) if (e.nodeType === Node.TEXT_NODE) {
|
|
331
|
-
let t = e.textContent?.trim();
|
|
332
|
-
if (t) return void (this._capturedIcon = t);
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
_handleSlotChange(e) {
|
|
337
|
-
if (this.icon || this.text) return;
|
|
338
|
-
let t = e.target.assignedNodes({ flatten: !0 });
|
|
339
|
-
for (let e of t) if (e.nodeType === Node.TEXT_NODE) {
|
|
340
|
-
let t = e.textContent?.trim();
|
|
341
|
-
if (t) return void (this._capturedIcon = t);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
set ariaLabel(e) {
|
|
345
|
-
let t = this._ariaLabel;
|
|
346
|
-
this._ariaLabel = e, this.hasAttribute("aria-label") && this.removeAttribute("aria-label"), this.requestUpdate("ariaLabel", t);
|
|
347
|
-
}
|
|
348
|
-
get ariaLabel() {
|
|
349
|
-
return this._ariaLabel;
|
|
350
|
-
}
|
|
351
|
-
focus(e) {
|
|
352
|
-
this.nativeElement.focus(e);
|
|
353
|
-
}
|
|
354
|
-
blur() {
|
|
355
|
-
this.nativeElement.blur();
|
|
356
|
-
}
|
|
357
|
-
click() {
|
|
358
|
-
this.dispatchEvent(new Event("click", {
|
|
359
|
-
bubbles: !0,
|
|
360
|
-
composed: !0
|
|
361
|
-
}));
|
|
362
|
-
}
|
|
363
|
-
_preventDefault(e) {
|
|
364
|
-
e.preventDefault(), e.stopPropagation();
|
|
365
|
-
}
|
|
366
|
-
firstUpdated(e) {}
|
|
367
|
-
render() {
|
|
368
|
-
let e = this.variant === "tonal" ? "filled tonal" : this.variant, t = {
|
|
369
|
-
"z-0 h-full transition-all duration-200 relative rounded-full inline-flex justify-center items-center gap-[8px] outline-secondary-default focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 outline-hidden": !0,
|
|
370
|
-
"opacity-[0.38]": this.disabled,
|
|
371
|
-
"cursor-pointer": !this.disabled,
|
|
372
|
-
"hover:shadow-xs": !this.disabled && (e === "outlined" || e === "text" || e === "filled" || e === "filled tonal"),
|
|
373
|
-
"hover:shadow-sm": !this.disabled && e === "elevated",
|
|
374
|
-
"flex-1 text-center": this.width === "full",
|
|
375
|
-
"bg-surface-low text-primary-default shadow-xs": e === "elevated",
|
|
376
|
-
"bg-transparent text-primary-default border-1 border-outline": e === "outlined",
|
|
377
|
-
"bg-primary-default text-primary-on": e === "filled",
|
|
378
|
-
"bg-secondary-container text-secondary-onContainer": e === "filled tonal",
|
|
379
|
-
"text-primary-default": e === "text",
|
|
380
|
-
"p-1.5": this.size === "xxs",
|
|
381
|
-
"p-2": this.size === "xs",
|
|
382
|
-
"p-2.5": this.size === "sm",
|
|
383
|
-
"p-3": this.size === "md",
|
|
384
|
-
"p-4": this.size === "lg",
|
|
385
|
-
"p-5": this.size === "xl"
|
|
386
|
-
}, r = {
|
|
387
|
-
"hover:opacity-[0.08] rounded-full z-0": !0,
|
|
388
|
-
"hover:bg-primary-on": e === "filled",
|
|
389
|
-
"hover:bg-primary-default": e === "outlined" || e === "elevated" || e === "text",
|
|
390
|
-
"hover:bg-secondary-container": e === "filled tonal"
|
|
391
|
-
}, i = this.size === "xxs" ? "12px" : this.size === "xs" ? "16px" : this.size === "sm" ? "20px" : this.size === "md" || this.size === "lg" ? "24px" : "40px";
|
|
392
|
-
return this.href ? f`
|
|
393
|
-
<a
|
|
394
|
-
${n({
|
|
395
|
-
strength: 3,
|
|
396
|
-
radius: 50
|
|
397
|
-
})}
|
|
398
|
-
part="base"
|
|
399
|
-
href=${p(this.disabled ? void 0 : this.href)}
|
|
400
|
-
aria-label=${p(this.ariaLabel)}
|
|
401
|
-
class="${this.classMap(t)}"
|
|
402
|
-
tabindex=${this.disabled ? "-1" : "0"}
|
|
403
|
-
aria-disabled=${this.disabled}
|
|
404
|
-
@click=${this.disabled ? this._preventDefault : void 0}
|
|
405
|
-
>
|
|
406
|
-
${m(!this.disabled, () => f`<div class="absolute inset-0 ${this.classMap(r)}"></div>`)}
|
|
407
|
-
${this.text ? f`<slot></slot>` : f`
|
|
408
|
-
<slot style="display:none" @slotchange=${this._handleSlotChange}></slot>
|
|
409
|
-
<schmancy-icon size=${i} icon=${p(this.icon || this._capturedIcon)}></schmancy-icon>
|
|
410
|
-
`}
|
|
411
|
-
</a>
|
|
412
|
-
` : f`
|
|
413
|
-
<button
|
|
414
|
-
${n({
|
|
415
|
-
strength: 3,
|
|
416
|
-
radius: 50
|
|
417
|
-
})}
|
|
418
|
-
part="base"
|
|
419
|
-
aria-label=${p(this.ariaLabel)}
|
|
420
|
-
?disabled=${this.disabled}
|
|
421
|
-
class="${this.classMap(t)}"
|
|
422
|
-
type=${p(this.type)}
|
|
423
|
-
tabindex=${p(this.disabled ? "-1" : void 0)}
|
|
424
|
-
>
|
|
425
|
-
${m(!this.disabled, () => f`<div class="absolute inset-0 ${this.classMap(r)}"></div>`)}
|
|
426
|
-
${this.text ? f`<slot></slot>` : f`
|
|
427
|
-
<slot style="display:none" @slotchange=${this._handleSlotChange}></slot>
|
|
428
|
-
<schmancy-icon size=${i} icon=${p(this.icon || this._capturedIcon)}></schmancy-icon>
|
|
429
|
-
`}
|
|
430
|
-
</button>
|
|
431
|
-
`;
|
|
432
|
-
}
|
|
433
|
-
};
|
|
434
|
-
t([s("[part=\"base\"]", !0)], g.prototype, "nativeElement", void 0), t([o({ type: String })], g.prototype, "size", void 0), t([o({
|
|
435
|
-
reflect: !0,
|
|
436
|
-
type: String
|
|
437
|
-
})], g.prototype, "variant", void 0), t([o({ reflect: !0 })], g.prototype, "width", void 0), t([o({
|
|
438
|
-
reflect: !0,
|
|
439
|
-
type: String
|
|
440
|
-
})], g.prototype, "type", void 0), t([o()], g.prototype, "href", void 0), t([o({
|
|
441
|
-
type: Boolean,
|
|
442
|
-
reflect: !0
|
|
443
|
-
})], g.prototype, "disabled", void 0), t([o({
|
|
444
|
-
type: Boolean,
|
|
445
|
-
reflect: !0
|
|
446
|
-
})], g.prototype, "text", void 0), t([o({ type: String })], g.prototype, "icon", void 0), t([l()], g.prototype, "_capturedIcon", void 0), t([o({ attribute: "aria-label" })], g.prototype, "ariaLabel", null), g = t([a("schmancy-icon-button")], g);
|
|
447
|
-
export { h as SchmancyButton, g as SchmnacyIconButton };
|
|
1
|
+
import { n as e, t } from "./button-DEi3M2nV.js";
|
|
2
|
+
export { e as SchmancyButton, t as SchmnacyIconButton };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-
|
|
1
|
+
require(`./chunk-CncqDLb2.cjs`);const e=require(`./mixins-BPUR4Kc4.cjs`),t=require(`./active-host-jH3iloCR.cjs`),n=require(`./cursor-glow-C8LgCxpI.cjs`);let r=require(`lit/decorators.js`),i=require(`lit`),a=require(`lit/directives/if-defined.js`);var o=class extends e.c{static{this.styles=[i.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: flex;
|
|
4
4
|
gap: 0.5rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-BIzaLuEg.cjs","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, unknown>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":"uPASe,IAAA,EAAA,cAAiC,EAAA,CAAA,CAAA,OAAA,KAAA,OAC/B,CAAC,EAAA,GAAG;;;;;;;;GASpB,QAAA,CACC,MAAO,GAAA,IAAI,kBAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAZE,uBAAA,CAAA,CAAuB,EAAA,CCDvB,IAAA,EAAA,cAA2B,EAAA,CAAA,CAAA,YAAA,GAAA,EAAA,CAAA,MAAA,GAAA,EAAA,CAAA,KAAA,KAgGE,WAAA,KAAA,YAAA,CAO7B,EAAA,KAAA,SAAA,CAOH,EAAA,KAAA,QAAA,CAOD,EAAA,KAAA,KAkBM,UAAA,KAAA,UAMa,GAAA,KAAA,QAAA,CAGV,EAAA,KAAA,QACqD,EAAA,CAAA,KAAA,aAEjD,EAAA,KAAA,YAmEA,GAAA,CACtB,GAAI,KAAK,UAAA,CAAa,KAAK,YAAa,OAExC,IAAM,EAAO,KAAK,uBAAA,CAClB,KAAK,eAAe,EAAE,QAAU,EAAK,KAAM,EAAE,QAAU,EAAK,IAAA,EAAA,KAAA,cAGpC,GAAA,CACxB,GAAA,CAAI,KAAK,UAAa,KAAK,cAEvB,EAAE,MAAQ,SAAW,EAAE,MAAQ,KAAK,CACvC,EAAE,gBAAA,CACF,KAAK,YAAA,CAAY,EAAA,CAGjB,IAAM,EAAO,KAAK,uBAAA,CAClB,KAAK,eAAe,EAAK,MAAQ,EAAG,EAAK,OAAS,EAAA,GAAA,KAAA,YAI7B,GAAA,CAClB,EAAE,MAAQ,SAAW,EAAE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,OAAQ,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAQ,QAAA,CAAS,EAAA,CAAA,CAAA,CAAO,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAtDb,sBAAA,CAAA,CAAsB,EAAA"}
|
|
1
|
+
{"version":3,"file":"card-BjUgRzFh.cjs","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, unknown>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`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AAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,UAGhC,CAAE,KAAM,OAAA,CAAA,CAAA,CAAS,EAAA,UAAA,MAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,eAtDb,sBAAA,CAAA,CAAsB,EAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as e } from "./mixins-
|
|
1
|
+
import { c as e } from "./mixins-C42OILRS.js";
|
|
2
2
|
import { a as t } from "./active-host-BP0zy_Y9.js";
|
|
3
3
|
import { t as n } from "./cursor-glow-Cs2XLDB9.js";
|
|
4
4
|
import { customElement as r, property as i, state as a } from "lit/decorators.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-CgQwXO8L.js","names":[],"sources":["../src/card/actions.ts","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, unknown>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\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","../src/card/card.ts","../src/card/content.ts","../src/card/media.ts"],"sourcesContent":["import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-action\n * @slot - The content of the action\n */\n@customElement('schmancy-card-action')\nexport default class SchmancyCardAction extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: flex;\n\t\tgap: 0.5rem;\n\t\tpadding: 0.5rem 1rem;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-action': SchmancyCardAction\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { cursorGlow } from '../directives/cursor-glow'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\n@customElement('schmancy-card')\nexport default class SchmancyCard extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tborder-radius: var(--schmancy-sys-shape-corner-medium);\n\t\ttransition:\n\t\t\tbox-shadow var(--schmancy-sys-motion-duration-short4) var(--schmancy-sys-motion-easing-standard),\n\t\t\ttransform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);\n\t\toutline: none;\n\t}\n\n\t/* Type variants */\n\t:host([type='elevated']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-low);\n\t\tbox-shadow: var(--schmancy-sys-elevation-1);\n\t}\n\t:host([type='filled']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-highest);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\t:host([type='outlined']) {\n\t\tbackground-color: var(--schmancy-sys-color-surface-default);\n\t\tborder: 1px solid var(--schmancy-sys-color-outlineVariant);\n\t\tbox-shadow: var(--schmancy-sys-elevation-0);\n\t}\n\n\t/* Interactive states */\n\t:host([interactive]) {\n\t\tcursor: pointer;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t:host([interactive]:focus-visible:not([disabled])) {\n\t\toutline: 2px solid var(--schmancy-sys-color-primary-default);\n\t\toutline-offset: 2px;\n\t}\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\t/* Hover elevations — luminous glow + lift */\n\t:host([type='elevated'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-2),\n\t\t\t0 4px 24px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 12%, transparent);\n\t\ttransform: translateY(-2px);\n\t}\n\t:host([type='filled'][interactive]:hover:not([disabled])),\n\t:host([type='outlined'][interactive]:hover:not([disabled])) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-1),\n\t\t\t0 4px 20px -6px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 10%, transparent);\n\t\ttransform: translateY(-1px);\n\t}\n\n\t/* Active state — kinetic compress */\n\t:host([interactive]:active:not([disabled])) {\n\t\ttransform: scale(0.98);\n\t\ttransition-duration: 100ms;\n\t}\n\n\t/* Dragged state */\n\t:host([dragged]) {\n\t\tbox-shadow:\n\t\t\tvar(--schmancy-sys-elevation-3),\n\t\t\t0 8px 32px -4px color-mix(in srgb, var(--schmancy-sys-color-primary-default) 15%, transparent);\n\t\ttransform: translateY(-4px);\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host([interactive]:hover:not([disabled])),\n\t\t:host([interactive]:active:not([disabled])),\n\t\t:host([dragged]) {\n\t\t\ttransform: none;\n\t\t}\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n`];\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tmode: 'open',\n\t\tdelegatesFocus: true,\n\t}\n\n\t/**\n\t * The visual style of the card.\n\t * @default 'elevated'\n\t */\n\t@property({ reflect: true })\n\ttype: 'elevated' | 'filled' | 'outlined' = 'elevated'\n\n\t/**\n\t * Makes the card interactive (clickable).\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tinteractive = false\n\n\t/**\n\t * Disables the card.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled = false\n\n\t/**\n\t * Indicates the card is being dragged.\n\t * @default false\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tdragged = false\n\n\t/**\n\t * URL to navigate to when card is clicked (makes it act like a link).\n\t */\n\t@property()\n\thref?: string\n\n\t/**\n\t * Target for the link navigation.\n\t */\n\t@property()\n\ttarget?: string\n\n\t/**\n\t * ARIA role for accessibility.\n\t */\n\t@property({ attribute: 'role' })\n\toverride role = 'article'\n\n\t/**\n\t * ARIA label for accessibility.\n\t */\n\t@property({ attribute: 'aria-label' })\n\toverride ariaLabel: string = ''\n\n\t// Internal state for interaction feedback\n\t@state() pressed = false\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis._updateAriaAttributes()\n\t}\n\n\tupdated(changedProperties: Map<string, unknown>) {\n\t\tsuper.updated(changedProperties)\n\t\tif (changedProperties.has('interactive') || changedProperties.has('disabled')) {\n\t\t\tthis._updateAriaAttributes()\n\t\t}\n\t}\n\n\t// Consolidate ARIA attribute updates\n\tprivate _updateAriaAttributes() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\tif (isInteractive) {\n\t\t\tthis.setAttribute('tabindex', '0')\n\t\t\tif (!this.role || this.role === 'article') {\n\t\t\t\tthis.role = this.href ? 'link' : 'button'\n\t\t\t}\n\t\t} else {\n\t\t\tthis.removeAttribute('tabindex')\n\t\t\tif (this.role === 'button' || this.role === 'link') {\n\t\t\t\tthis.role = 'article'\n\t\t\t}\n\t\t}\n\t}\n\n\t// Shared ripple creation logic\n\tprivate _addRipple(x: number, y: number) {\n\t\tconst id = this.nextRippleId++\n\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t// Remove ripple after animation completes\n\t\tsetTimeout(() => {\n\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t}, 600) // M3 medium duration\n\t}\n\n\t// Shared navigation logic\n\tprivate _navigate() {\n\t\tif (!this.href) return\n\n\t\tif (this.target === '_blank') {\n\t\t\twindow.open(this.href, '_blank')\n\t\t} else {\n\t\t\twindow.location.href = this.href\n\t\t}\n\t}\n\n\t// Combined action trigger (ripple + navigate + event)\n\tprivate _triggerAction(x: number, y: number) {\n\t\tthis._addRipple(x, y)\n\t\tthis._navigate()\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('schmancy-click', {\n\t\t\t\tdetail: { value: this.type },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tconst rect = this.getBoundingClientRect()\n\t\tthis._triggerAction(e.clientX - rect.left, e.clientY - rect.top)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled || !this.interactive) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis._setPressed(true)\n\n\t\t\t// Simulate click at center\n\t\t\tconst rect = this.getBoundingClientRect()\n\t\t\tthis._triggerAction(rect.width / 2, rect.height / 2)\n\t\t}\n\t}\n\n\tprivate handleKeyUp = (e: KeyboardEvent) => {\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\tthis._setPressed(false)\n\t\t}\n\t}\n\n\t// Consolidate pressed state management\n\tprivate _setPressed(pressed: boolean) {\n\t\tthis.pressed = pressed\n\t\tif (pressed) {\n\t\t\tthis.setAttribute('pressed', '')\n\t\t} else {\n\t\t\tthis.removeAttribute('pressed')\n\t\t}\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tif (this.disabled || !this.interactive) return\n\t\tthis._setPressed(true)\n\t}\n\n\tprivate handleMouseUp = () => this._setPressed(false)\n\tprivate handleMouseLeave = () => this._setPressed(false)\n\n\tprotected render() {\n\t\tconst isInteractive = this.interactive && !this.disabled\n\n\t\treturn html`\n\t\t\t<div\n\t\t\t\t${isInteractive ? cursorGlow({ radius: 200, intensity: 0.1 }) : ''}\n\t\t\t\tclass=\"relative w-full h-full rounded-xl ${isInteractive ? 'cursor-pointer' : ''}\"\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@keyup=${this.handleKeyUp}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\taria-label=${ifDefined(this.ariaLabel)}\n\t\t\t\taria-disabled=${this.disabled ? 'true' : 'false'}\n\t\t\t>\n\t\t\t\t<!-- State layer -->\n\t\t\t\t<div\n\t\t\t\t\tclass=\"absolute inset-0 rounded-xl pointer-events-none transition-opacity duration-200 bg-surface-on ${!isInteractive\n\t\t\t\t\t\t? 'opacity-0'\n\t\t\t\t\t\t: this.pressed\n\t\t\t\t\t\t\t? 'opacity-[var(--schmancy-sys-state-pressed-opacity)]'\n\t\t\t\t\t\t\t: 'opacity-0 hover:opacity-[var(--schmancy-sys-state-hover-opacity)] focus-visible:opacity-[var(--schmancy-sys-state-focus-opacity)]'}\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- Ripples -->\n\t\t\t\t${this.interactive && this.ripples.length\n\t\t\t\t\t? html`\n\t\t\t\t\t\t\t<div class=\"absolute inset-0 rounded-xl overflow-hidden pointer-events-none\">\n\t\t\t\t\t\t\t\t${this.ripples.map(\n\t\t\t\t\t\t\t\t\tr => html`\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclass=\"absolute rounded-full scale-0 animate-[ripple_600ms_linear] bg-surface-on opacity-[0.12] w-5 h-5 -ml-2.5 -mt-2.5\"\n\t\t\t\t\t\t\t\t\t\t\tstyle=\"left: ${r.x}px; top: ${r.y}px\"\n\t\t\t\t\t\t\t\t\t\t></span>\n\t\t\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t`\n\t\t\t\t\t: ''}\n\n\t\t\t\t<!-- Content -->\n\t\t\t\t<div class=\"relative h-full w-full rounded-xl\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card': SchmancyCard\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-content\n */\n@customElement('schmancy-card-content')\nexport default class SchmancyCardContent extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding: 1rem;\n\t}\n`];\n\tprotected render(): unknown {\n\t\treturn html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-content': SchmancyCardContent\n\t}\n}\n","import { SchmancyElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n/**\n * @element schmancy-card-media\n */\n@customElement('schmancy-card-media')\nexport default class SchmancyCardMedia extends SchmancyElement {\n\tstatic styles = [css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\theight: 200px;\n\t\toverflow: hidden;\n\t}\n\t\n\t/* Allow height to be overridden when used in flex/grid layouts */\n\t:host-context(.h-full) {\n\t\theight: 100%;\n\t}\n\t\n\t::slotted(img),\n\timg {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tobject-position: center;\n\t}\n\t\n\t/* Object fit styles based on fit attribute */\n\t:host([fit=\"contain\"]) img,\n\t:host([fit=\"contain\"]) ::slotted(img) {\n\t\tobject-fit: contain;\n\t}\n\t\n\t:host([fit=\"cover\"]) img,\n\t:host([fit=\"cover\"]) ::slotted(img) {\n\t\tobject-fit: cover;\n\t}\n\t\n\t:host([fit=\"fill\"]) img,\n\t:host([fit=\"fill\"]) ::slotted(img) {\n\t\tobject-fit: fill;\n\t}\n\t\n\t:host([fit=\"none\"]) img,\n\t:host([fit=\"none\"]) ::slotted(img) {\n\t\tobject-fit: none;\n\t}\n\t\n\t:host([fit=\"scale-down\"]) img,\n\t:host([fit=\"scale-down\"]) ::slotted(img) {\n\t\tobject-fit: scale-down;\n\t}\n`];\n\t@property({ type: String, reflect: true })\n\tsrc: string = ''\n\n\t@property({ type: String, reflect: true })\n\tfit: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down' = 'contain'\n\t\n\t@property({ type: String })\n\talt: string = ''\n\n\tprotected render(): unknown {\n\t\t// If src is provided, render an img element\n\t\t// Otherwise, allow users to slot their own content\n\t\treturn this.src \n\t\t\t? html`<img src=\"${this.src}\" alt=\"${this.alt}\" />` \n\t\t\t: html`<slot></slot>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-card-media': SchmancyCardMedia\n\t}\n}\n"],"mappings":";;;;;;AASe,IAAA,IAAA,cAAiC,EAAA;CAAA;EAAA,KAAA,SAC/B,CAAC,CAAG;;;;;;;;;;CASpB,SAAA;EACC,OAAO,CAAI;;;AAAA,IAAA,EAAA,CAZZ,EAAc,uBAAA,CAAA,EAAuB,EAAA;ACDvB,IAAA,IAAA,cAA2B,EAAA;CAAA,YAAA,GAAA,GAAA;EAAA,MAAA,GAAA,EAAA,EAAA,KAAA,OAgGE,YAAA,KAAA,cAAA,CAO7B,GAAA,KAAA,WAAA,CAOH,GAAA,KAAA,UAAA,CAOD,GAAA,KAAA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