@mhmo91/schmancy 0.2.37 → 0.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{animated-text-C5zM-91H.cjs → animated-text-B3UYCBgB.cjs} +2 -2
- package/dist/{animated-text-C5zM-91H.cjs.map → animated-text-B3UYCBgB.cjs.map} +1 -1
- package/dist/{animated-text-IHZ7LNnc.js → animated-text-D6s-YOrx.js} +3 -3
- package/dist/{animated-text-IHZ7LNnc.js.map → animated-text-D6s-YOrx.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-DCLLi1YA.cjs → area.component-CNHbzqRX.cjs} +2 -2
- package/dist/{area.component-DCLLi1YA.cjs.map → area.component-CNHbzqRX.cjs.map} +1 -1
- package/dist/{area.component-BrPf_qdG.js → area.component-xeDLv_CE.js} +3 -3
- package/dist/{area.component-BrPf_qdG.js.map → area.component-xeDLv_CE.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-Cz4oZQBB.js +225 -0
- package/dist/autocomplete-Cz4oZQBB.js.map +1 -0
- package/dist/autocomplete-D71XBwSj.cjs +48 -0
- package/dist/autocomplete-D71XBwSj.cjs.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-BdsGj_z6.cjs → checkbox-CQvBkjyb.cjs} +2 -2
- package/dist/{checkbox-BdsGj_z6.cjs.map → checkbox-CQvBkjyb.cjs.map} +1 -1
- package/dist/{checkbox-DV8tPYX0.js → checkbox-DCRZj150.js} +2 -2
- package/dist/{checkbox-DV8tPYX0.js.map → checkbox-DCRZj150.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-Z8e_rQtM.cjs → chips-BUDT0jpL.cjs} +12 -12
- package/dist/{chips-Z8e_rQtM.cjs.map → chips-BUDT0jpL.cjs.map} +1 -1
- package/dist/{chips-Ca-SY6mg.js → chips-DStbVgUo.js} +36 -36
- package/dist/{chips-Ca-SY6mg.js.map → chips-DStbVgUo.js.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/date-range-BjIt4Ocb.cjs +72 -0
- package/dist/date-range-BjIt4Ocb.cjs.map +1 -0
- package/dist/date-range-D_zg5C9O.js +148 -0
- package/dist/date-range-D_zg5C9O.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-DsFVHHw2.cjs → delay-D8wCtScV.cjs} +2 -2
- package/dist/{delay-DsFVHHw2.cjs.map → delay-D8wCtScV.cjs.map} +1 -1
- package/dist/{delay-BWLlCMKV.js → delay-LxXCSBHq.js} +2 -2
- package/dist/{delay-BWLlCMKV.js.map → delay-LxXCSBHq.js.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{divider-B7kWs-q5.js → divider-BSEoJ09J.js} +3 -3
- package/dist/{divider-B7kWs-q5.js.map → divider-BSEoJ09J.js.map} +1 -1
- package/dist/{divider-CjgOM462.cjs → divider-lCnFIhkp.cjs} +2 -2
- package/dist/{divider-CjgOM462.cjs.map → divider-lCnFIhkp.cjs.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/{form-DyYGOlOR.cjs → form-Bf2BlAqE.cjs} +2 -2
- package/dist/{form-DyYGOlOR.cjs.map → form-Bf2BlAqE.cjs.map} +1 -1
- package/dist/{form-BUV1hUzI.js → form-C-1W3Aqc.js} +2 -2
- package/dist/{form-BUV1hUzI.js.map → form-C-1W3Aqc.js.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-CWvUTBIP.js → icon-CXD3W__G.js} +3 -3
- package/dist/{icon-CWvUTBIP.js.map → icon-CXD3W__G.js.map} +1 -1
- package/dist/{icon-DPN7kWO0.cjs → icon-Wj9hmgVr.cjs} +2 -2
- package/dist/{icon-DPN7kWO0.cjs.map → icon-Wj9hmgVr.cjs.map} +1 -1
- package/dist/{icon-button-DHiO0w8J.cjs → icon-button-C0bTDyZI.cjs} +2 -2
- package/dist/{icon-button-DHiO0w8J.cjs.map → icon-button-C0bTDyZI.cjs.map} +1 -1
- package/dist/{icon-button-CbEs8eyS.js → icon-button-CRWWdZ-S.js} +3 -3
- package/dist/{icon-button-CbEs8eyS.js.map → icon-button-CRWWdZ-S.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +98 -97
- package/dist/input-BQtGX-Fg.js +137 -0
- package/dist/input-BQtGX-Fg.js.map +1 -0
- package/dist/input-DRhsCSxi.cjs +53 -0
- package/dist/input-DRhsCSxi.cjs.map +1 -0
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-D3m-rd6d.js → list-CUpWM7R0.js} +2 -2
- package/dist/{list-D3m-rd6d.js.map → list-CUpWM7R0.js.map} +1 -1
- package/dist/{list-Cq9RDYF_.cjs → list-bbSGS1sE.cjs} +2 -2
- package/dist/{list-Cq9RDYF_.cjs.map → list-bbSGS1sE.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-DWxwPXWQ.cjs → litElement.mixin-CYwiYZyZ.cjs} +2 -2
- package/dist/{litElement.mixin-DWxwPXWQ.cjs.map → litElement.mixin-CYwiYZyZ.cjs.map} +1 -1
- package/dist/{litElement.mixin-CjxO_zfv.js → litElement.mixin-DoKCdkhO.js} +2 -2
- package/dist/{litElement.mixin-CjxO_zfv.js.map → litElement.mixin-DoKCdkhO.js.map} +1 -1
- package/dist/menu-CXDFSHgu.cjs +29 -0
- package/dist/menu-CXDFSHgu.cjs.map +1 -0
- package/dist/{menu-CCQYHiy2.js → menu-DGFcpetb.js} +29 -27
- package/dist/menu-DGFcpetb.js.map +1 -0
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/option-BKHQU-_I.cjs +18 -0
- package/dist/option-BKHQU-_I.cjs.map +1 -0
- package/dist/option-Cr7OiYc5.js +45 -0
- package/dist/option-Cr7OiYc5.js.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{outlet-u1_Qa8Li.cjs → outlet-BZSpbcNh.cjs} +2 -2
- package/dist/{outlet-u1_Qa8Li.cjs.map → outlet-BZSpbcNh.cjs.map} +1 -1
- package/dist/{outlet-BsrhXTEg.js → outlet-D39IYQgF.js} +2 -2
- package/dist/{outlet-BsrhXTEg.js.map → outlet-D39IYQgF.js.map} +1 -1
- package/dist/{payment-card-form-CTZsSGOB.js → payment-card-form-MU2rWtCN.js} +3 -3
- package/dist/{payment-card-form-CTZsSGOB.js.map → payment-card-form-MU2rWtCN.js.map} +1 -1
- package/dist/{payment-card-form-B7tV2ttW.cjs → payment-card-form-jktK4YkR.cjs} +2 -2
- package/dist/{payment-card-form-B7tV2ttW.cjs.map → payment-card-form-jktK4YkR.cjs.map} +1 -1
- package/dist/{radio-group-dN2lWcFu.js → radio-group-Cbcn7M8H.js} +2 -2
- package/dist/{radio-group-dN2lWcFu.js.map → radio-group-Cbcn7M8H.js.map} +1 -1
- package/dist/{radio-group-m5Swl5cq.cjs → radio-group-DnpFVpBo.cjs} +2 -2
- package/dist/{radio-group-m5Swl5cq.cjs.map → radio-group-DnpFVpBo.cjs.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/scroll-DNj5rrzc.cjs +33 -0
- package/dist/scroll-DNj5rrzc.cjs.map +1 -0
- package/dist/{scroll-CYzhWpN5.js → scroll-moSwU3Ry.js} +29 -29
- package/dist/scroll-moSwU3Ry.js.map +1 -0
- package/dist/select-DEOnUayG.cjs +52 -0
- package/dist/select-DEOnUayG.cjs.map +1 -0
- package/dist/select-Dmhiq26e.js +156 -0
- package/dist/select-Dmhiq26e.js.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +4 -1
- package/dist/{sheet-BGNoewvS.js → sheet-BDPiwpWN.js} +3 -3
- package/dist/{sheet-BGNoewvS.js.map → sheet-BDPiwpWN.js.map} +1 -1
- package/dist/{sheet-DPHbRnXg.cjs → sheet-CgaQ6pVJ.cjs} +2 -2
- package/dist/{sheet-DPHbRnXg.cjs.map → sheet-CgaQ6pVJ.cjs.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-FTwWTvKi.js → slider-D-cIdjqg.js} +3 -3
- package/dist/{slider-FTwWTvKi.js.map → slider-D-cIdjqg.js.map} +1 -1
- package/dist/{slider-ds6hnN7n.cjs → slider-Dbz2ehmj.cjs} +2 -2
- package/dist/{slider-ds6hnN7n.cjs.map → slider-Dbz2ehmj.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-8GhT-bLm.cjs → spinner-COoBI2kA.cjs} +2 -2
- package/dist/{spinner-8GhT-bLm.cjs.map → spinner-COoBI2kA.cjs.map} +1 -1
- package/dist/{spinner-zxOxMm7j.js → spinner-qHgA76_k.js} +3 -3
- package/dist/{spinner-zxOxMm7j.js.map → spinner-qHgA76_k.js.map} +1 -1
- package/dist/surface-BALOUsnP.js +46 -0
- package/dist/surface-BALOUsnP.js.map +1 -0
- package/dist/surface-DI4R4vjx.cjs +13 -0
- package/dist/surface-DI4R4vjx.cjs.map +1 -0
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-6bRKgCJ9.js → table-C3YCvbyA.js} +2 -2
- package/dist/{table-6bRKgCJ9.js.map → table-C3YCvbyA.js.map} +1 -1
- package/dist/{table-BDIhXdSA.cjs → table-DVqYwon7.cjs} +2 -2
- package/dist/{table-BDIhXdSA.cjs.map → table-DVqYwon7.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-CHAAr7Wl.cjs → tabs-group-CM9Hd80d.cjs} +2 -2
- package/dist/{tabs-group-CHAAr7Wl.cjs.map → tabs-group-CM9Hd80d.cjs.map} +1 -1
- package/dist/{tabs-group-DBybIi8n.js → tabs-group-DtvVC_nM.js} +2 -2
- package/dist/{tabs-group-DBybIi8n.js.map → tabs-group-DtvVC_nM.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/{tailwind.mixin-_mD_GeAp.cjs → tailwind.mixin-BmIP1Qzo.cjs} +2 -2
- package/dist/{tailwind.mixin-_mD_GeAp.cjs.map → tailwind.mixin-BmIP1Qzo.cjs.map} +1 -1
- package/dist/{tailwind.mixin-DtR4DQvn.js → tailwind.mixin-CHPxMV8E.js} +14 -14
- package/dist/{tailwind.mixin-DtR4DQvn.js.map → tailwind.mixin-CHPxMV8E.js.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-7icDz3cN.js → teleport.component-BQTFUlsF.js} +35 -35
- package/dist/{teleport.component-7icDz3cN.js.map → teleport.component-BQTFUlsF.js.map} +1 -1
- package/dist/{teleport.component-D0RU6Zml.cjs → teleport.component-hBN2zB0w.cjs} +2 -2
- package/dist/{teleport.component-D0RU6Zml.cjs.map → teleport.component-hBN2zB0w.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-CJhi4hDu.cjs → textarea-C8bsVuSe.cjs} +2 -2
- package/dist/{textarea-CJhi4hDu.cjs.map → textarea-C8bsVuSe.cjs.map} +1 -1
- package/dist/{textarea-BchwVUAo.js → textarea-D7ZLtbVj.js} +2 -2
- package/dist/{textarea-BchwVUAo.js.map → textarea-D7ZLtbVj.js.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-dxTV0k03.js → theme-button-CcHxfORU.js} +2 -2
- package/dist/{theme-button-dxTV0k03.js.map → theme-button-CcHxfORU.js.map} +1 -1
- package/dist/{theme-button-DoIFEVSv.cjs → theme-button-fUwuhdHz.cjs} +2 -2
- package/dist/{theme-button-DoIFEVSv.cjs.map → theme-button-fUwuhdHz.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-Dhm3MpVW.cjs → theme.component-ByOov4NR.cjs} +2 -2
- package/dist/{theme.component-Dhm3MpVW.cjs.map → theme.component-ByOov4NR.cjs.map} +1 -1
- package/dist/{theme.component-DwZx0sdk.js → theme.component-D4gPoycY.js} +2 -2
- package/dist/{theme.component-DwZx0sdk.js.map → theme.component-D4gPoycY.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tree-BkhYPaz6.cjs → tree-DJQKaG-K.cjs} +2 -2
- package/dist/{tree-BkhYPaz6.cjs.map → tree-DJQKaG-K.cjs.map} +1 -1
- package/dist/{tree-C7GnGCWU.js → tree-DW_S-LL9.js} +2 -2
- package/dist/{tree-C7GnGCWU.js.map → tree-DW_S-LL9.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-DfOKVMWh.js → typewriter-_3w-aV-9.js} +4 -4
- package/dist/{typewriter-DfOKVMWh.js.map → typewriter-_3w-aV-9.js.map} +1 -1
- package/dist/{typewriter-DGIW1V_b.cjs → typewriter-jDCMhixI.cjs} +2 -2
- package/dist/{typewriter-DGIW1V_b.cjs.map → typewriter-jDCMhixI.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-DQHpwRFR.cjs → typography-BhqtMVYz.cjs} +2 -2
- package/dist/{typography-DQHpwRFR.cjs.map → typography-BhqtMVYz.cjs.map} +1 -1
- package/dist/{typography-En0tk2d5.js → typography-GzUb3OWl.js} +2 -2
- package/dist/{typography-En0tk2d5.js.map → typography-GzUb3OWl.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +2 -2
- package/types/src/autocomplete/autocomplete.d.ts +16 -93
- package/types/src/chips/chip.d.ts +0 -2
- package/types/src/date-range/date-range.d.ts +14 -15
- package/types/src/input/input.d.ts +60 -80
- package/types/src/layout/flex/flex.d.ts +24 -1
- package/types/src/option/option.d.ts +2 -2
- package/types/src/select/select.d.ts +37 -15
- package/dist/autocomplete-CcDfKbfJ.js +0 -212
- package/dist/autocomplete-CcDfKbfJ.js.map +0 -1
- package/dist/autocomplete-Dfq-Rhjy.cjs +0 -43
- package/dist/autocomplete-Dfq-Rhjy.cjs.map +0 -1
- package/dist/date-range-CDX0VlcK.cjs +0 -58
- package/dist/date-range-CDX0VlcK.cjs.map +0 -1
- package/dist/date-range-DdGaWGVn.js +0 -130
- package/dist/date-range-DdGaWGVn.js.map +0 -1
- package/dist/input-2kqgsr0S.cjs +0 -43
- package/dist/input-2kqgsr0S.cjs.map +0 -1
- package/dist/input-D3hti5wB.js +0 -124
- package/dist/input-D3hti5wB.js.map +0 -1
- package/dist/menu-CCQYHiy2.js.map +0 -1
- package/dist/menu-ifiBMg-F.cjs +0 -31
- package/dist/menu-ifiBMg-F.cjs.map +0 -1
- package/dist/option-CM24cDF6.js +0 -40
- package/dist/option-CM24cDF6.js.map +0 -1
- package/dist/option-DOBWmGE5.cjs +0 -14
- package/dist/option-DOBWmGE5.cjs.map +0 -1
- package/dist/scroll-CCExKwoj.cjs +0 -33
- package/dist/scroll-CCExKwoj.cjs.map +0 -1
- package/dist/scroll-CYzhWpN5.js.map +0 -1
- package/dist/select-BakBo7W1.js +0 -99
- package/dist/select-BakBo7W1.js.map +0 -1
- package/dist/select-ljp7-IxH.cjs +0 -46
- package/dist/select-ljp7-IxH.cjs.map +0 -1
- package/dist/surface-AT93K5Zv.cjs +0 -7
- package/dist/surface-AT93K5Zv.cjs.map +0 -1
- package/dist/surface-DJMJ2MOG.js +0 -40
- package/dist/surface-DJMJ2MOG.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";const d=require("lit"),t=require("lit/decorators.js"),k=require("lit/directives/style-map.js"),a=require("rxjs");require("lit/directives/class-map.js");const P=require("./tailwind.mixin-BmIP1Qzo.cjs");var j=Object.defineProperty,r=(s,i,n,p)=>{for(var l,o=void 0,y=s.length-1;y>=0;y--)(l=s[y])&&(o=l(i,n,o)||o);return o&&j(i,n,o),o};const g=class g extends P.TailwindElement(){constructor(){super(...arguments),this.layout=!0,this.center=void 0,this.display=void 0,this.overflow=void 0,this.overflowX=void 0,this.overflowY=void 0,this.position=void 0}connectedCallback(){super.connectedCallback(),this.style.setProperty("padding",this.padding??""),this.style.setProperty("margin",this.margin??""),this.style.setProperty("width",this.width??""),this.style.setProperty("height",this.height??""),this.style.setProperty("min-width",this.minWidth??""),this.style.setProperty("min-height",this.minHeight??""),this.style.setProperty("max-width",this.maxWidth??""),this.style.setProperty("max-height",this.maxHeight??""),this.style.setProperty("display",this.display??""),this.style.setProperty("overflow",this.overflow??""),this.style.setProperty("overflow-x",this.overflowX??""),this.style.setProperty("overflow-y",this.overflowY??""),this.style.setProperty("position",this.position??""),this.style.setProperty("top",this.top??""),this.style.setProperty("right",this.right??""),this.style.setProperty("bottom",this.bottom??""),this.style.setProperty("left",this.left??""),this.style.setProperty("inset",this.inset??""),this.style.setProperty("z-index",this.zIndex??""),this.style.setProperty("border",this.border??""),this.style.setProperty("border-top",this.borderTop??""),this.style.setProperty("border-right",this.borderRight??""),this.style.setProperty("border-bottom",this.borderBottom??""),this.style.setProperty("border-left",this.borderLeft??""),this.style.setProperty("border-color",this.borderColor??""),this.style.setProperty("border-radius",this.borderRadius??""),this.style.setProperty("border-width",this.borderWidth??""),this.style.setProperty("box-shadow",this.boxShadow??""),this.style.setProperty("opacity",this.opacity??""),this.style.setProperty("background",this.background??""),this.style.setProperty("background-image",this.backgroundImage??""),this.style.setProperty("background-position",this.backgroundPosition??""),this.style.setProperty("background-size",this.backgroundSize??""),this.style.setProperty("background-repeat",this.backgroundRepeat??""),this.style.setProperty("background-attachment",this.backgroundAttachment??""),this.style.setProperty("background-color",this.backgroundColor??""),this.style.setProperty("background-clip",this.backgroundClip??""),this.style.setProperty("background-origin",this.backgroundOrigin??""),this.style.setProperty("background-blend-mode",this.backgroundBlendMode??""),this.style.setProperty("filter",this.filter??""),this.style.setProperty("backdrop-filter",this.backdropFilter??""),this.center&&(this.style.setProperty("margin-left","auto"),this.style.setProperty("margin-right","auto"))}};g.styles=[g.styles];let e=g;r([t.property({type:Boolean})],e.prototype,"center"),r([t.property({type:String})],e.prototype,"padding"),r([t.property({type:String})],e.prototype,"margin"),r([t.property({type:String})],e.prototype,"width"),r([t.property({type:String})],e.prototype,"height"),r([t.property({type:String})],e.prototype,"minWidth"),r([t.property({type:String})],e.prototype,"minHeight"),r([t.property({type:String})],e.prototype,"maxWidth"),r([t.property({type:String})],e.prototype,"maxHeight"),r([t.property({type:String})],e.prototype,"display"),r([t.property({type:String})],e.prototype,"overflow"),r([t.property({type:String})],e.prototype,"overflowX"),r([t.property({type:String})],e.prototype,"overflowY"),r([t.property({type:String})],e.prototype,"position"),r([t.property({type:String})],e.prototype,"top"),r([t.property({type:String})],e.prototype,"right"),r([t.property({type:String})],e.prototype,"bottom"),r([t.property({type:String})],e.prototype,"left"),r([t.property({type:String})],e.prototype,"inset"),r([t.property({type:String})],e.prototype,"zIndex"),r([t.property({type:String})],e.prototype,"border"),r([t.property({type:String})],e.prototype,"borderTop"),r([t.property({type:String})],e.prototype,"borderRight"),r([t.property({type:String})],e.prototype,"borderBottom"),r([t.property({type:String})],e.prototype,"borderLeft"),r([t.property({type:String})],e.prototype,"borderColor"),r([t.property({type:String})],e.prototype,"borderRadius"),r([t.property({type:String})],e.prototype,"borderWidth"),r([t.property({type:String})],e.prototype,"boxShadow"),r([t.property({type:String})],e.prototype,"opacity"),r([t.property({type:String})],e.prototype,"background"),r([t.property({type:String})],e.prototype,"backgroundImage"),r([t.property({type:String})],e.prototype,"backgroundPosition"),r([t.property({type:String})],e.prototype,"backgroundSize"),r([t.property({type:String})],e.prototype,"backgroundRepeat"),r([t.property({type:String})],e.prototype,"backgroundAttachment"),r([t.property({type:String})],e.prototype,"backgroundColor"),r([t.property({type:String})],e.prototype,"backgroundClip"),r([t.property({type:String})],e.prototype,"backgroundOrigin"),r([t.property({type:String})],e.prototype,"backgroundBlendMode"),r([t.property({type:String})],e.prototype,"filter"),r([t.property({type:String})],e.prototype,"backdropFilter");var G=Object.defineProperty,O=Object.getOwnPropertyDescriptor,c=(s,i,n,p)=>{for(var l,o=p>1?void 0:p?O(i,n):i,y=s.length-1;y>=0;y--)(l=s[y])&&(o=(p?l(i,n,o):l(o))||o);return p&&o&&G(i,n,o),o};exports.SchmancyFlex=class extends e{constructor(){super(...arguments),this.layout=!0,this.flow="col",this.wrap="wrap",this.align="start",this.justify="start",this.gap="none"}render(){const s={flex:!0,"flex-row":this.flow==="row","flex-row-reverse":this.flow==="row-reverse","flex-col":this.flow==="col","flex-col-reverse":this.flow==="col-reverse","flex-wrap":this.wrap==="wrap","flex-nowrap":this.wrap==="nowrap","flex-wrap-reverse":this.wrap==="wrap-reverse","items-start":this.align==="start","items-center":this.align==="center","items-end":this.align==="end","items-stretch":this.align==="stretch","items-baseline":this.align==="baseline","justify-start":this.justify==="start","justify-center":this.justify==="center","justify-end":this.justify==="end","justify-between":this.justify==="between","gap-0":this.gap==="none","gap-2":this.gap==="sm","gap-4":this.gap==="md","gap-8":this.gap==="lg"};return d.html`
|
|
2
|
+
<section class=${this.classMap(s)} style=${k.styleMap({})}>
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</section>
|
|
5
|
+
`}},exports.SchmancyFlex.styles=[e.styles,d.unsafeCSS(":host{display:block;background-color:inherit}")],c([t.property({type:String,reflect:!0})],exports.SchmancyFlex.prototype,"flow",2),c([t.property({type:String,reflect:!0})],exports.SchmancyFlex.prototype,"wrap",2),c([t.property({type:String,reflect:!0})],exports.SchmancyFlex.prototype,"align",2),c([t.property({type:String,reflect:!0})],exports.SchmancyFlex.prototype,"justify",2),c([t.property({type:String,reflect:!0})],exports.SchmancyFlex.prototype,"gap",2),exports.SchmancyFlex=c([t.customElement("schmancy-flex")],exports.SchmancyFlex);var C=Object.defineProperty,F=Object.getOwnPropertyDescriptor,h=(s,i,n,p)=>{for(var l,o=p>1?void 0:p?F(i,n):i,y=s.length-1;y>=0;y--)(l=s[y])&&(o=(p?l(i,n,o):l(o))||o);return p&&o&&C(i,n,o),o};exports.SchmancyGrid=class extends e{constructor(){super(...arguments),this.layout=!0,this.flow="row",this.align="stretch",this.justify="stretch",this.content="stretch",this.gap="none",this.wrap=!1}firstUpdated(){this.rcols&&a.fromEvent(window,"resize").pipe(a.map(s=>s.target),a.startWith(1),a.map(()=>this.clientWidth?this.clientWidth:window.innerWidth),a.distinctUntilChanged(),a.takeUntil(this.disconnecting),a.debounceTime(10),a.map(s=>{var n,p,l,o,y,u,m,f,b,w,S,v;let i;return(n=this.rcols)!=null&&n["2xl"]&&s>=1536?i=(p=this.rcols)==null?void 0:p["2xl"]:(l=this.rcols)!=null&&l.xl&&s>=1280?i=(o=this.rcols)==null?void 0:o.xl:(y=this.rcols)!=null&&y.lg&&s>=1024?i=(u=this.rcols)==null?void 0:u.lg:(m=this.rcols)!=null&&m.md&&s>=768?i=(f=this.rcols)==null?void 0:f.md:(b=this.rcols)!=null&&b.sm&&s>=640?i=(w=this.rcols)==null?void 0:w.sm:(S=this.rcols)!=null&&S.xs&&s<640&&(i=(v=this.rcols)==null?void 0:v.xs),i})).subscribe(s=>{this.cols=s})}render(){const s={"h-full":!0,"grid flex-1":!0,"grid-flow-row auto-rows-max":this.flow==="row","grid-flow-col auto-cols-max":this.flow==="col","grid-flow-row-dense":this.flow==="row-dense","grid-flow-col-dense":this.flow==="col-dense","grid-flow-dense":this.flow==="dense","justify-center":this.content==="center","justify-end":this.content==="end","justify-start":this.content==="start","justify-stretch":this.content==="stretch","justify-between":this.content==="between","justify-around":this.content==="around","justify-evenly":this.content==="evenly","justify-items-center":this.justify==="center","justify-items-end":this.justify==="end","justify-items-start":this.justify==="start","justify-items-stretch":this.justify==="stretch","items-center":this.align==="center","items-end":this.align==="end","items-start":this.align==="start","items-stretch":this.align==="stretch","items-baseline":this.align==="baseline","gap-0":this.gap==="none","gap-1":this.gap==="xs","gap-2":this.gap==="sm","gap-4":this.gap==="md","gap-8":this.gap==="lg","flex-nowrap":this.wrap,"flex-wrap":!this.wrap},i={gridTemplateRows:this.rows?this.rows:void 0,gridTemplateColumns:this.cols?this.cols:void 0};return d.html`
|
|
6
|
+
<section class="${this.classMap(s)}" style=${this.styleMap(i)}>
|
|
7
|
+
<slot> </slot>
|
|
8
|
+
</section>
|
|
9
|
+
`}},exports.SchmancyGrid.styles=[e.styles,d.unsafeCSS(":host{height:max-content;width:-webkit-fill-available;display:block}")],h([t.property({type:String})],exports.SchmancyGrid.prototype,"flow",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"align",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"justify",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"content",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"gap",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"cols",2),h([t.property({type:String})],exports.SchmancyGrid.prototype,"rows",2),h([t.property({type:Object})],exports.SchmancyGrid.prototype,"rcols",2),h([t.property({type:Boolean})],exports.SchmancyGrid.prototype,"wrap",2),h([t.queryAssignedElements()],exports.SchmancyGrid.prototype,"assignedElements",2),exports.SchmancyGrid=h([t.customElement("schmancy-grid")],exports.SchmancyGrid);var E=Object.defineProperty,W=Object.getOwnPropertyDescriptor,x=(s,i,n,p)=>{for(var l,o=p>1?void 0:p?W(i,n):i,y=s.length-1;y>=0;y--)(l=s[y])&&(o=(p?l(i,n,o):l(o))||o);return p&&o&&E(i,n,o),o};exports.SchmancyScroll=class extends P.TailwindElement(d.css`
|
|
10
|
+
:host {
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 100%;
|
|
13
|
+
overflow: hidden;
|
|
14
|
+
box-sizing: border-box; /* Ensures proper sizing */
|
|
15
|
+
display: block;
|
|
16
|
+
position: relative;
|
|
17
|
+
inset: 0px;
|
|
18
|
+
}
|
|
19
|
+
.scrollbar-hide {
|
|
20
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
21
|
+
scrollbar-width: none; /* Firefox */
|
|
22
|
+
}
|
|
23
|
+
.scrollbar-hide::-webkit-scrollbar {
|
|
24
|
+
display: none; /* Chrome, Safari, and Opera */
|
|
25
|
+
}
|
|
26
|
+
`){constructor(){super(...arguments),this.hide=!1}render(){const s={"h-full w-full inset-0 overflow-x-scroll overflow-y-scroll scroll-smooth overscroll-contain":!0,"scrollbar-hide":this.hide};return d.html`
|
|
27
|
+
<div class="relative inset-0 h-full w-full overscroll-none">
|
|
28
|
+
<div class=${this.classMap(s)}>
|
|
29
|
+
<slot></slot>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`}},x([t.property({type:Boolean,reflect:!0})],exports.SchmancyScroll.prototype,"hide",2),exports.SchmancyScroll=x([t.customElement("schmancy-scroll")],exports.SchmancyScroll);
|
|
33
|
+
//# sourceMappingURL=scroll-DNj5rrzc.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-DNj5rrzc.cjs","sources":["../src/layout/layout/layout.ts","../src/layout/flex/flex.ts","../src/layout/grid/grid.ts","../src/layout/scroll/scroll.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { property } from 'lit/decorators.js'\n\nexport default class Layout extends TailwindElement() {\n\tstatic styles = [this.styles]\n\tlayout = true\n\t@property({ type: Boolean }) center: boolean | undefined = undefined\n\t@property({ type: String }) padding: string | undefined\n\t@property({ type: String }) margin: string | undefined\n\t@property({ type: String }) width: string | undefined\n\t@property({ type: String }) height: string | undefined\n\t@property({ type: String }) minWidth: string | undefined\n\t@property({ type: String }) minHeight: string | undefined\n\t@property({ type: String }) maxWidth: string | undefined\n\t@property({ type: String }) maxHeight: string | undefined\n\t@property({ type: String }) display:\n\t\t| 'block'\n\t\t| 'inline-block'\n\t\t| 'inline'\n\t\t| 'flex'\n\t\t| 'inline-flex'\n\t\t| 'grid'\n\t\t| 'inline-grid'\n\t\t| 'table'\n\t\t| 'inline-table'\n\t\t| 'flow-root'\n\t\t| 'none'\n\t\t| undefined = undefined\n\t@property({ type: String }) overflow: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) overflowX: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) overflowY: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) position: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky' | undefined = undefined\n\t@property({ type: String }) top: string | undefined\n\t@property({ type: String }) right: string | undefined\n\t@property({ type: String }) bottom: string | undefined\n\t@property({ type: String }) left: string | undefined\n\t@property({ type: String }) inset: string | undefined\n\t@property({ type: String }) zIndex: string | undefined\n\n\t@property({ type: String }) border: string | undefined\n\t@property({ type: String }) borderTop: string | undefined\n\t@property({ type: String }) borderRight: string | undefined\n\t@property({ type: String }) borderBottom: string | undefined\n\t@property({ type: String }) borderLeft: string | undefined\n\t@property({ type: String }) borderColor: string | undefined\n\t@property({ type: String }) borderRadius: string | undefined\n\t@property({ type: String }) borderWidth: string | undefined\n\n\t@property({ type: String }) boxShadow: string | undefined\n\t@property({ type: String }) opacity: string | undefined\n\t@property({ type: String }) background: string | undefined\n\t@property({ type: String }) backgroundImage: string | undefined\n\t@property({ type: String }) backgroundPosition: string | undefined\n\t@property({ type: String }) backgroundSize: string | undefined\n\t@property({ type: String }) backgroundRepeat: string | undefined\n\t@property({ type: String }) backgroundAttachment: string | undefined\n\t@property({ type: String }) backgroundColor: string | undefined\n\t@property({ type: String }) backgroundClip: string | undefined\n\t@property({ type: String }) backgroundOrigin: string | undefined\n\t@property({ type: String }) backgroundBlendMode: string | undefined\n\t@property({ type: String }) filter: string | undefined\n\t@property({ type: String }) backdropFilter: string | undefined\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tthis.style.setProperty('padding', this.padding ?? '')\n\t\tthis.style.setProperty('margin', this.margin ?? '')\n\t\tthis.style.setProperty('width', this.width ?? '')\n\t\tthis.style.setProperty('height', this.height ?? '')\n\t\tthis.style.setProperty('min-width', this.minWidth ?? '')\n\t\tthis.style.setProperty('min-height', this.minHeight ?? '')\n\t\tthis.style.setProperty('max-width', this.maxWidth ?? '')\n\t\tthis.style.setProperty('max-height', this.maxHeight ?? '')\n\t\tthis.style.setProperty('display', this.display ?? '')\n\t\tthis.style.setProperty('overflow', this.overflow ?? '')\n\t\tthis.style.setProperty('overflow-x', this.overflowX ?? '')\n\t\tthis.style.setProperty('overflow-y', this.overflowY ?? '')\n\t\tthis.style.setProperty('position', this.position ?? '')\n\t\tthis.style.setProperty('top', this.top ?? '')\n\t\tthis.style.setProperty('right', this.right ?? '')\n\t\tthis.style.setProperty('bottom', this.bottom ?? '')\n\t\tthis.style.setProperty('left', this.left ?? '')\n\t\tthis.style.setProperty('inset', this.inset ?? '')\n\t\tthis.style.setProperty('z-index', this.zIndex ?? '')\n\t\tthis.style.setProperty('border', this.border ?? '')\n\t\tthis.style.setProperty('border-top', this.borderTop ?? '')\n\t\tthis.style.setProperty('border-right', this.borderRight ?? '')\n\t\tthis.style.setProperty('border-bottom', this.borderBottom ?? '')\n\t\tthis.style.setProperty('border-left', this.borderLeft ?? '')\n\t\tthis.style.setProperty('border-color', this.borderColor ?? '')\n\t\tthis.style.setProperty('border-radius', this.borderRadius ?? '')\n\t\tthis.style.setProperty('border-width', this.borderWidth ?? '')\n\t\tthis.style.setProperty('box-shadow', this.boxShadow ?? '')\n\t\tthis.style.setProperty('opacity', this.opacity ?? '')\n\t\tthis.style.setProperty('background', this.background ?? '')\n\t\tthis.style.setProperty('background-image', this.backgroundImage ?? '')\n\t\tthis.style.setProperty('background-position', this.backgroundPosition ?? '')\n\t\tthis.style.setProperty('background-size', this.backgroundSize ?? '')\n\t\tthis.style.setProperty('background-repeat', this.backgroundRepeat ?? '')\n\t\tthis.style.setProperty('background-attachment', this.backgroundAttachment ?? '')\n\t\tthis.style.setProperty('background-color', this.backgroundColor ?? '')\n\t\tthis.style.setProperty('background-clip', this.backgroundClip ?? '')\n\t\tthis.style.setProperty('background-origin', this.backgroundOrigin ?? '')\n\t\tthis.style.setProperty('background-blend-mode', this.backgroundBlendMode ?? '')\n\t\tthis.style.setProperty('filter', this.filter ?? '')\n\t\tthis.style.setProperty('backdrop-filter', this.backdropFilter ?? '')\n\t\tif (this.center) {\n\t\t\tthis.style.setProperty('margin-left', 'auto')\n\t\t\tthis.style.setProperty('margin-right', 'auto')\n\t\t}\n\t}\n}\n","import { html, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport Layout from '../layout/layout'\nimport style from './flex.scss?inline'\n\n@customElement('schmancy-flex')\nexport class SchmancyFlex extends Layout {\n\t// Optionally, keep your global Layout styles plus this component's SCSS\n\tstatic styles = [Layout.styles, unsafeCSS(style)]\n\n\t// You mentioned \"layout = true\" in your base class; keep if needed\n\tlayout = true\n\n\t/**\n\t * The flex direction property:\n\t * - \"row\" | \"row-reverse\" | \"col\" | \"col-reverse\"\n\t */\n\t@property({ type: String, reflect: true })\n\tflow: 'row' | 'row-reverse' | 'col' | 'col-reverse' = 'col'\n\n\t/**\n\t * The flex-wrap property:\n\t * - \"wrap\" | \"nowrap\" | \"wrap-reverse\"\n\t */\n\t@property({ type: String, reflect: true })\n\twrap: 'wrap' | 'nowrap' | 'wrap-reverse' = 'wrap'\n\n\t/**\n\t * Align-items property:\n\t * - \"start\" (flex-start), \"center\", \"end\" (flex-end), \"stretch\", \"baseline\"\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'start'\n\n\t/**\n\t * Justify-content property:\n\t * - \"start\", \"center\", \"end\", \"between\"\n\t * (Note: \"stretch\" doesn't exist as a Tailwind justify- class;\n\t * for horizontal stretching, you typically rely on width or gap.)\n\t */\n\t@property({ type: String, reflect: true })\n\tjustify: 'start' | 'center' | 'end' | 'between' = 'start'\n\n\t/**\n\t * Gap sizes:\n\t * - \"none\" (0), \"sm\" (2), \"md\" (4), \"lg\" (8)\n\t * (Feel free to add more if your Tailwind config has them.)\n\t */\n\t@property({ type: String, reflect: true })\n\tgap: 'none' | 'sm' | 'md' | 'lg' = 'none'\n\n\trender() {\n\t\t// Build the Tailwind class map\n\t\tconst classes = {\n\t\t\t// Always use \"flex\"\n\t\t\tflex: true,\n\n\t\t\t// Flow (direction)\n\t\t\t'flex-row': this.flow === 'row',\n\t\t\t'flex-row-reverse': this.flow === 'row-reverse',\n\t\t\t'flex-col': this.flow === 'col',\n\t\t\t'flex-col-reverse': this.flow === 'col-reverse',\n\n\t\t\t// Wrap\n\t\t\t'flex-wrap': this.wrap === 'wrap',\n\t\t\t'flex-nowrap': this.wrap === 'nowrap',\n\t\t\t'flex-wrap-reverse': this.wrap === 'wrap-reverse',\n\n\t\t\t// Align-items\n\t\t\t'items-start': this.align === 'start',\n\t\t\t'items-center': this.align === 'center',\n\t\t\t'items-end': this.align === 'end',\n\t\t\t'items-stretch': this.align === 'stretch',\n\t\t\t'items-baseline': this.align === 'baseline',\n\n\t\t\t// Justify-content\n\t\t\t'justify-start': this.justify === 'start',\n\t\t\t'justify-center': this.justify === 'center',\n\t\t\t'justify-end': this.justify === 'end',\n\t\t\t'justify-between': this.justify === 'between',\n\t\t\t// (No standard Tailwind \"justify-stretch\".)\n\n\t\t\t// Gap\n\t\t\t'gap-0': this.gap === 'none',\n\t\t\t'gap-2': this.gap === 'sm',\n\t\t\t'gap-4': this.gap === 'md',\n\t\t\t'gap-8': this.gap === 'lg',\n\t\t}\n\n\t\t// You can use styleMap for inline style overrides if needed\n\t\tconst inlineStyles = {}\n\n\t\treturn html`\n\t\t\t<section class=${this.classMap(classes)} style=${styleMap(inlineStyles)}>\n\t\t\t\t<slot></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-flex': SchmancyFlex\n\t}\n}\n","import { html, unsafeCSS } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil } from 'rxjs'\nimport Layout from '../layout/layout'\nimport style from './grid.scss?inline'\n\n@customElement('schmancy-grid')\nexport class SchmancyGrid extends Layout {\n\tstatic styles = [Layout.styles, unsafeCSS(style)]\n\tlayout = true\n\t@property({ type: String }) flow: 'row' | 'col' | 'dense' | 'row-dense' | 'col-dense' = 'row'\n\t@property({ type: String }) align: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'stretch'\n\t@property({ type: String }) justify: 'start' | 'center' | 'end' | 'stretch' = 'stretch'\n\t@property({ type: String }) content: 'start' | 'center' | 'end' | 'stretch' | 'around' | 'evenly' | 'between' =\n\t\t'stretch'\n\t@property({ type: String }) gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' = 'none'\n\n\t@property({ type: String }) cols?: string\n\t@property({ type: String }) rows?: string\n\t@property({ type: Object }) rcols?: {\n\t\txs?: string | number\n\t\tsm?: string | number\n\t\tmd?: string | number\n\t\tlg?: string | number\n\t\txl?: string | number\n\t\t'2xl'?: string | number\n\t}\n\n\t@property({ type: Boolean }) wrap = false\n\n\t@queryAssignedElements() assignedElements!: HTMLElement[]\n\n\tfirstUpdated() {\n\t\tif (this.rcols)\n\t\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(event => event.target as Window),\n\t\t\t\t\tstartWith(1),\n\t\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\t\tdistinctUntilChanged(),\n\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\tdebounceTime(10),\n\t\t\t\t\tmap(w => {\n\t\t\t\t\t\tlet cols\n\t\t\t\t\t\tif (this.rcols?.['2xl'] && w >= 1536) cols = this.rcols?.['2xl']\n\t\t\t\t\t\telse if (this.rcols?.xl && w >= 1280) cols = this.rcols?.xl\n\t\t\t\t\t\telse if (this.rcols?.lg && w >= 1024) cols = this.rcols?.lg\n\t\t\t\t\t\telse if (this.rcols?.md && w >= 768) cols = this.rcols?.md\n\t\t\t\t\t\telse if (this.rcols?.sm && w >= 640) cols = this.rcols?.sm\n\t\t\t\t\t\telse if (this.rcols?.xs && w < 640) cols = this.rcols?.xs\n\t\t\t\t\t\treturn cols\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.subscribe(cols => {\n\t\t\t\t\tthis.cols = cols\n\t\t\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'h-full': true,\n\t\t\t'grid flex-1': true,\n\t\t\t// flow classes: https://tailwindcss.com/docs/grid-auto-flow\n\t\t\t'grid-flow-row auto-rows-max': this.flow === 'row',\n\t\t\t'grid-flow-col auto-cols-max': this.flow === 'col',\n\t\t\t'grid-flow-row-dense': this.flow === 'row-dense',\n\t\t\t'grid-flow-col-dense': this.flow === 'col-dense',\n\t\t\t'grid-flow-dense': this.flow === 'dense',\n\n\t\t\t'justify-center': this.content === 'center',\n\t\t\t'justify-end': this.content === 'end',\n\t\t\t'justify-start': this.content === 'start',\n\t\t\t'justify-stretch': this.content === 'stretch',\n\t\t\t'justify-between': this.content === 'between',\n\t\t\t'justify-around': this.content === 'around',\n\t\t\t'justify-evenly': this.content === 'evenly',\n\n\t\t\t'justify-items-center': this.justify === 'center',\n\t\t\t'justify-items-end': this.justify === 'end',\n\t\t\t'justify-items-start': this.justify === 'start',\n\t\t\t'justify-items-stretch': this.justify === 'stretch',\n\t\t\t'items-center': this.align === 'center',\n\t\t\t'items-end': this.align === 'end',\n\t\t\t'items-start': this.align === 'start',\n\t\t\t'items-stretch': this.align === 'stretch',\n\t\t\t'items-baseline': this.align === 'baseline',\n\t\t\t'gap-0': this.gap === 'none',\n\t\t\t'gap-1': this.gap === 'xs',\n\t\t\t'gap-2': this.gap === 'sm',\n\t\t\t'gap-4': this.gap === 'md',\n\t\t\t'gap-8': this.gap === 'lg',\n\t\t\t'flex-nowrap': this.wrap,\n\t\t\t'flex-wrap': !this.wrap,\n\t\t}\n\t\tconst style = {\n\t\t\tgridTemplateRows: this.rows ? this.rows : undefined,\n\t\t\tgridTemplateColumns: this.cols ? this.cols : undefined,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"${this.classMap(classes)}\" style=${this.styleMap(style)}>\n\t\t\t\t<slot> </slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-grid': SchmancyGrid\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-scroll')\nexport class SchmancyScroll extends TailwindElement(css`\n\t:host {\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t\tbox-sizing: border-box; /* Ensures proper sizing */\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0px;\n\t}\n\t.scrollbar-hide {\n\t\t-ms-overflow-style: none; /* IE and Edge */\n\t\tscrollbar-width: none; /* Firefox */\n\t}\n\t.scrollbar-hide::-webkit-scrollbar {\n\t\tdisplay: none; /* Chrome, Safari, and Opera */\n\t}\n`) {\n\t/**\n\t * Determines whether the scrollbar is hidden.\n\t *\n\t * When `hide` is true, the inner scrollable div receives the `scrollbar-hide` class,\n\t * which hides scrollbars in supported browsers.\n\t *\n\t * @attr hide\n\t * @example <schmancy-scroll hide></schmancy-scroll>\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic hide = false\n\n\trender() {\n\t\t// The classes are dynamically assigned based on the `hide` property.\n\t\tconst classes = {\n\t\t\t'h-full w-full inset-0 overflow-x-scroll overflow-y-scroll scroll-smooth overscroll-contain': true,\n\t\t\t'scrollbar-hide': this.hide,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"relative inset-0 h-full w-full overscroll-none\">\n\t\t\t\t<div class=${this.classMap(classes)}>\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-scroll': SchmancyScroll\n\t}\n}\n"],"names":["Layout","TailwindElement","constructor","super","arguments","this","layout","center","undefined","display","overflow","overflowX","overflowY","position","connectedCallback","style","setProperty","padding","margin","width","height","minWidth","minHeight","maxWidth","maxHeight","top","right","bottom","left","inset","zIndex","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","borderWidth","boxShadow","opacity","background","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundColor","backgroundClip","backgroundOrigin","backgroundBlendMode","filter","backdropFilter","styles","_n","__decorateClass","property","type","Boolean","prototype","String","SchmancyFlex","flow","wrap","align","justify","gap","classes","flex","html","classMap","styleMap","unsafeCSS","reflect","customElement","SchmancyGrid","content","rcols","fromEvent","window","pipe","map","event","target","startWith","clientWidth","innerWidth","distinctUntilChanged","takeUntil","disconnecting","debounceTime","w","cols","xl","lg","md","sm","xs","subscribe","gridTemplateRows","rows","gridTemplateColumns","Object","queryAssignedElements","SchmancyScroll","css","hide","render"],"mappings":"yVAGqB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;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAA7C,CAAA,CAAA,cAAAtG,MAAAC,GAAAA,SAAAA,EA4BNC,KAAOqG,KAAO,EAAA,CAEd,QAAAC,CAEC,MAAMxC,EAAU,CACf,gGACA,iBAAkB9D,KAAKqG,IAGjB,EAAA,OAAArC,EAAAA;AAAAA;AAAAA,iBAEQhE,KAAKiE,SAASH,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAQ,CAX/BZ,EAAAA,EAAA,CADNC,EAAAA,SAAS,CAAEC,KAAMC,QAASe,UA3Bf+B,CAAAA,CAAAA,EAAAA,uBA4BL7C,UAAA,OAAA,GA5BK6C,QAANA,eAAAjD,EAAA,CADNmB,EAAAA,cAAc,iBAAA,CAAA,EACF8B"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { unsafeCSS as C, html as
|
|
1
|
+
import { unsafeCSS as C, html as b, css as W } from "lit";
|
|
2
2
|
import { property as t, customElement as w, queryAssignedElements as B } from "lit/decorators.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { T as z } from "./tailwind.mixin-
|
|
7
|
-
var
|
|
3
|
+
import { styleMap as E } from "lit/directives/style-map.js";
|
|
4
|
+
import { fromEvent as M, map as f, startWith as R, distinctUntilChanged as T, takeUntil as I, debounceTime as $ } from "rxjs";
|
|
5
|
+
import "lit/directives/class-map.js";
|
|
6
|
+
import { T as z } from "./tailwind.mixin-CHPxMV8E.js";
|
|
7
|
+
var H = Object.defineProperty, r = (o, i, l, p) => {
|
|
8
8
|
for (var y, s = void 0, n = o.length - 1; n >= 0; n--) (y = o[n]) && (s = y(i, l, s) || s);
|
|
9
|
-
return s &&
|
|
9
|
+
return s && H(i, l, s), s;
|
|
10
10
|
};
|
|
11
11
|
const g = class g extends z() {
|
|
12
12
|
constructor() {
|
|
@@ -19,34 +19,34 @@ const g = class g extends z() {
|
|
|
19
19
|
g.styles = [g.styles];
|
|
20
20
|
let e = g;
|
|
21
21
|
r([t({ type: Boolean })], e.prototype, "center"), r([t({ type: String })], e.prototype, "padding"), r([t({ type: String })], e.prototype, "margin"), r([t({ type: String })], e.prototype, "width"), r([t({ type: String })], e.prototype, "height"), r([t({ type: String })], e.prototype, "minWidth"), r([t({ type: String })], e.prototype, "minHeight"), r([t({ type: String })], e.prototype, "maxWidth"), r([t({ type: String })], e.prototype, "maxHeight"), r([t({ type: String })], e.prototype, "display"), r([t({ type: String })], e.prototype, "overflow"), r([t({ type: String })], e.prototype, "overflowX"), r([t({ type: String })], e.prototype, "overflowY"), r([t({ type: String })], e.prototype, "position"), r([t({ type: String })], e.prototype, "top"), r([t({ type: String })], e.prototype, "right"), r([t({ type: String })], e.prototype, "bottom"), r([t({ type: String })], e.prototype, "left"), r([t({ type: String })], e.prototype, "inset"), r([t({ type: String })], e.prototype, "zIndex"), r([t({ type: String })], e.prototype, "border"), r([t({ type: String })], e.prototype, "borderTop"), r([t({ type: String })], e.prototype, "borderRight"), r([t({ type: String })], e.prototype, "borderBottom"), r([t({ type: String })], e.prototype, "borderLeft"), r([t({ type: String })], e.prototype, "borderColor"), r([t({ type: String })], e.prototype, "borderRadius"), r([t({ type: String })], e.prototype, "borderWidth"), r([t({ type: String })], e.prototype, "boxShadow"), r([t({ type: String })], e.prototype, "opacity"), r([t({ type: String })], e.prototype, "background"), r([t({ type: String })], e.prototype, "backgroundImage"), r([t({ type: String })], e.prototype, "backgroundPosition"), r([t({ type: String })], e.prototype, "backgroundSize"), r([t({ type: String })], e.prototype, "backgroundRepeat"), r([t({ type: String })], e.prototype, "backgroundAttachment"), r([t({ type: String })], e.prototype, "backgroundColor"), r([t({ type: String })], e.prototype, "backgroundClip"), r([t({ type: String })], e.prototype, "backgroundOrigin"), r([t({ type: String })], e.prototype, "backgroundBlendMode"), r([t({ type: String })], e.prototype, "filter"), r([t({ type: String })], e.prototype, "backdropFilter");
|
|
22
|
-
var
|
|
23
|
-
for (var y, s = p > 1 ? void 0 : p ?
|
|
24
|
-
return p && s &&
|
|
22
|
+
var A = Object.defineProperty, D = Object.getOwnPropertyDescriptor, c = (o, i, l, p) => {
|
|
23
|
+
for (var y, s = p > 1 ? void 0 : p ? D(i, l) : i, n = o.length - 1; n >= 0; n--) (y = o[n]) && (s = (p ? y(i, l, s) : y(s)) || s);
|
|
24
|
+
return p && s && A(i, l, s), s;
|
|
25
25
|
};
|
|
26
|
-
let
|
|
26
|
+
let d = class extends e {
|
|
27
27
|
constructor() {
|
|
28
28
|
super(...arguments), this.layout = !0, this.flow = "col", this.wrap = "wrap", this.align = "start", this.justify = "start", this.gap = "none";
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
const o = { flex: !0, "flex-
|
|
32
|
-
return
|
|
33
|
-
<section class=${
|
|
31
|
+
const o = { flex: !0, "flex-row": this.flow === "row", "flex-row-reverse": this.flow === "row-reverse", "flex-col": this.flow === "col", "flex-col-reverse": this.flow === "col-reverse", "flex-wrap": this.wrap === "wrap", "flex-nowrap": this.wrap === "nowrap", "flex-wrap-reverse": this.wrap === "wrap-reverse", "items-start": this.align === "start", "items-center": this.align === "center", "items-end": this.align === "end", "items-stretch": this.align === "stretch", "items-baseline": this.align === "baseline", "justify-start": this.justify === "start", "justify-center": this.justify === "center", "justify-end": this.justify === "end", "justify-between": this.justify === "between", "gap-0": this.gap === "none", "gap-2": this.gap === "sm", "gap-4": this.gap === "md", "gap-8": this.gap === "lg" };
|
|
32
|
+
return b`
|
|
33
|
+
<section class=${this.classMap(o)} style=${E({})}>
|
|
34
34
|
<slot></slot>
|
|
35
35
|
</section>
|
|
36
36
|
`;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
for (var y, s = p > 1 ? void 0 : p ?
|
|
42
|
-
return p && s &&
|
|
39
|
+
d.styles = [e.styles, C(":host{display:block;background-color:inherit}")], c([t({ type: String, reflect: !0 })], d.prototype, "flow", 2), c([t({ type: String, reflect: !0 })], d.prototype, "wrap", 2), c([t({ type: String, reflect: !0 })], d.prototype, "align", 2), c([t({ type: String, reflect: !0 })], d.prototype, "justify", 2), c([t({ type: String, reflect: !0 })], d.prototype, "gap", 2), d = c([w("schmancy-flex")], d);
|
|
40
|
+
var F = Object.defineProperty, U = Object.getOwnPropertyDescriptor, a = (o, i, l, p) => {
|
|
41
|
+
for (var y, s = p > 1 ? void 0 : p ? U(i, l) : i, n = o.length - 1; n >= 0; n--) (y = o[n]) && (s = (p ? y(i, l, s) : y(s)) || s);
|
|
42
|
+
return p && s && F(i, l, s), s;
|
|
43
43
|
};
|
|
44
44
|
let h = class extends e {
|
|
45
45
|
constructor() {
|
|
46
46
|
super(...arguments), this.layout = !0, this.flow = "row", this.align = "stretch", this.justify = "stretch", this.content = "stretch", this.gap = "none", this.wrap = !1;
|
|
47
47
|
}
|
|
48
48
|
firstUpdated() {
|
|
49
|
-
this.rcols &&
|
|
49
|
+
this.rcols && M(window, "resize").pipe(f((o) => o.target), R(1), f(() => this.clientWidth ? this.clientWidth : window.innerWidth), T(), I(this.disconnecting), $(10), f((o) => {
|
|
50
50
|
var l, p, y, s, n, m, S, v, P, x, k, j;
|
|
51
51
|
let i;
|
|
52
52
|
return (l = this.rcols) != null && l["2xl"] && o >= 1536 ? i = (p = this.rcols) == null ? void 0 : p["2xl"] : (y = this.rcols) != null && y.xl && o >= 1280 ? i = (s = this.rcols) == null ? void 0 : s.xl : (n = this.rcols) != null && n.lg && o >= 1024 ? i = (m = this.rcols) == null ? void 0 : m.lg : (S = this.rcols) != null && S.md && o >= 768 ? i = (v = this.rcols) == null ? void 0 : v.md : (P = this.rcols) != null && P.sm && o >= 640 ? i = (x = this.rcols) == null ? void 0 : x.sm : (k = this.rcols) != null && k.xs && o < 640 && (i = (j = this.rcols) == null ? void 0 : j.xs), i;
|
|
@@ -56,7 +56,7 @@ let h = class extends e {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
const o = { "h-full": !0, "grid flex-1": !0, "grid-flow-row auto-rows-max": this.flow === "row", "grid-flow-col auto-cols-max": this.flow === "col", "grid-flow-row-dense": this.flow === "row-dense", "grid-flow-col-dense": this.flow === "col-dense", "grid-flow-dense": this.flow === "dense", "justify-center": this.content === "center", "justify-end": this.content === "end", "justify-start": this.content === "start", "justify-stretch": this.content === "stretch", "justify-between": this.content === "between", "justify-around": this.content === "around", "justify-evenly": this.content === "evenly", "justify-items-center": this.justify === "center", "justify-items-end": this.justify === "end", "justify-items-start": this.justify === "start", "justify-items-stretch": this.justify === "stretch", "items-center": this.align === "center", "items-end": this.align === "end", "items-start": this.align === "start", "items-stretch": this.align === "stretch", "items-baseline": this.align === "baseline", "gap-0": this.gap === "none", "gap-1": this.gap === "xs", "gap-2": this.gap === "sm", "gap-4": this.gap === "md", "gap-8": this.gap === "lg", "flex-nowrap": this.wrap, "flex-wrap": !this.wrap }, i = { gridTemplateRows: this.rows ? this.rows : void 0, gridTemplateColumns: this.cols ? this.cols : void 0 };
|
|
59
|
-
return
|
|
59
|
+
return b`
|
|
60
60
|
<section class="${this.classMap(o)}" style=${this.styleMap(i)}>
|
|
61
61
|
<slot> </slot>
|
|
62
62
|
</section>
|
|
@@ -64,11 +64,11 @@ let h = class extends e {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
h.styles = [e.styles, C(":host{height:max-content;width:-webkit-fill-available;display:block}")], a([t({ type: String })], h.prototype, "flow", 2), a([t({ type: String })], h.prototype, "align", 2), a([t({ type: String })], h.prototype, "justify", 2), a([t({ type: String })], h.prototype, "content", 2), a([t({ type: String })], h.prototype, "gap", 2), a([t({ type: String })], h.prototype, "cols", 2), a([t({ type: String })], h.prototype, "rows", 2), a([t({ type: Object })], h.prototype, "rcols", 2), a([t({ type: Boolean })], h.prototype, "wrap", 2), a([B()], h.prototype, "assignedElements", 2), h = a([w("schmancy-grid")], h);
|
|
67
|
-
var
|
|
68
|
-
for (var y, s = p > 1 ? void 0 : p ?
|
|
69
|
-
return p && s &&
|
|
67
|
+
var X = Object.defineProperty, Y = Object.getOwnPropertyDescriptor, O = (o, i, l, p) => {
|
|
68
|
+
for (var y, s = p > 1 ? void 0 : p ? Y(i, l) : i, n = o.length - 1; n >= 0; n--) (y = o[n]) && (s = (p ? y(i, l, s) : y(s)) || s);
|
|
69
|
+
return p && s && X(i, l, s), s;
|
|
70
70
|
};
|
|
71
|
-
let
|
|
71
|
+
let u = class extends z(W`
|
|
72
72
|
:host {
|
|
73
73
|
height: 100%;
|
|
74
74
|
width: 100%;
|
|
@@ -91,7 +91,7 @@ let b = class extends z(W`
|
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
93
|
const o = { "h-full w-full inset-0 overflow-x-scroll overflow-y-scroll scroll-smooth overscroll-contain": !0, "scrollbar-hide": this.hide };
|
|
94
|
-
return
|
|
94
|
+
return b`
|
|
95
95
|
<div class="relative inset-0 h-full w-full overscroll-none">
|
|
96
96
|
<div class=${this.classMap(o)}>
|
|
97
97
|
<slot></slot>
|
|
@@ -100,10 +100,10 @@ let b = class extends z(W`
|
|
|
100
100
|
`;
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
O([t({ type: Boolean, reflect: !0 })],
|
|
103
|
+
O([t({ type: Boolean, reflect: !0 })], u.prototype, "hide", 2), u = O([w("schmancy-scroll")], u);
|
|
104
104
|
export {
|
|
105
|
-
|
|
105
|
+
d as S,
|
|
106
106
|
h as a,
|
|
107
|
-
b
|
|
107
|
+
u as b
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=scroll-
|
|
109
|
+
//# sourceMappingURL=scroll-moSwU3Ry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-moSwU3Ry.js","sources":["../src/layout/layout/layout.ts","../src/layout/flex/flex.ts","../src/layout/grid/grid.ts","../src/layout/scroll/scroll.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { property } from 'lit/decorators.js'\n\nexport default class Layout extends TailwindElement() {\n\tstatic styles = [this.styles]\n\tlayout = true\n\t@property({ type: Boolean }) center: boolean | undefined = undefined\n\t@property({ type: String }) padding: string | undefined\n\t@property({ type: String }) margin: string | undefined\n\t@property({ type: String }) width: string | undefined\n\t@property({ type: String }) height: string | undefined\n\t@property({ type: String }) minWidth: string | undefined\n\t@property({ type: String }) minHeight: string | undefined\n\t@property({ type: String }) maxWidth: string | undefined\n\t@property({ type: String }) maxHeight: string | undefined\n\t@property({ type: String }) display:\n\t\t| 'block'\n\t\t| 'inline-block'\n\t\t| 'inline'\n\t\t| 'flex'\n\t\t| 'inline-flex'\n\t\t| 'grid'\n\t\t| 'inline-grid'\n\t\t| 'table'\n\t\t| 'inline-table'\n\t\t| 'flow-root'\n\t\t| 'none'\n\t\t| undefined = undefined\n\t@property({ type: String }) overflow: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) overflowX: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) overflowY: 'visible' | 'hidden' | 'scroll' | 'auto' | undefined = undefined\n\t@property({ type: String }) position: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky' | undefined = undefined\n\t@property({ type: String }) top: string | undefined\n\t@property({ type: String }) right: string | undefined\n\t@property({ type: String }) bottom: string | undefined\n\t@property({ type: String }) left: string | undefined\n\t@property({ type: String }) inset: string | undefined\n\t@property({ type: String }) zIndex: string | undefined\n\n\t@property({ type: String }) border: string | undefined\n\t@property({ type: String }) borderTop: string | undefined\n\t@property({ type: String }) borderRight: string | undefined\n\t@property({ type: String }) borderBottom: string | undefined\n\t@property({ type: String }) borderLeft: string | undefined\n\t@property({ type: String }) borderColor: string | undefined\n\t@property({ type: String }) borderRadius: string | undefined\n\t@property({ type: String }) borderWidth: string | undefined\n\n\t@property({ type: String }) boxShadow: string | undefined\n\t@property({ type: String }) opacity: string | undefined\n\t@property({ type: String }) background: string | undefined\n\t@property({ type: String }) backgroundImage: string | undefined\n\t@property({ type: String }) backgroundPosition: string | undefined\n\t@property({ type: String }) backgroundSize: string | undefined\n\t@property({ type: String }) backgroundRepeat: string | undefined\n\t@property({ type: String }) backgroundAttachment: string | undefined\n\t@property({ type: String }) backgroundColor: string | undefined\n\t@property({ type: String }) backgroundClip: string | undefined\n\t@property({ type: String }) backgroundOrigin: string | undefined\n\t@property({ type: String }) backgroundBlendMode: string | undefined\n\t@property({ type: String }) filter: string | undefined\n\t@property({ type: String }) backdropFilter: string | undefined\n\n\tconnectedCallback(): void {\n\t\tsuper.connectedCallback()\n\t\tthis.style.setProperty('padding', this.padding ?? '')\n\t\tthis.style.setProperty('margin', this.margin ?? '')\n\t\tthis.style.setProperty('width', this.width ?? '')\n\t\tthis.style.setProperty('height', this.height ?? '')\n\t\tthis.style.setProperty('min-width', this.minWidth ?? '')\n\t\tthis.style.setProperty('min-height', this.minHeight ?? '')\n\t\tthis.style.setProperty('max-width', this.maxWidth ?? '')\n\t\tthis.style.setProperty('max-height', this.maxHeight ?? '')\n\t\tthis.style.setProperty('display', this.display ?? '')\n\t\tthis.style.setProperty('overflow', this.overflow ?? '')\n\t\tthis.style.setProperty('overflow-x', this.overflowX ?? '')\n\t\tthis.style.setProperty('overflow-y', this.overflowY ?? '')\n\t\tthis.style.setProperty('position', this.position ?? '')\n\t\tthis.style.setProperty('top', this.top ?? '')\n\t\tthis.style.setProperty('right', this.right ?? '')\n\t\tthis.style.setProperty('bottom', this.bottom ?? '')\n\t\tthis.style.setProperty('left', this.left ?? '')\n\t\tthis.style.setProperty('inset', this.inset ?? '')\n\t\tthis.style.setProperty('z-index', this.zIndex ?? '')\n\t\tthis.style.setProperty('border', this.border ?? '')\n\t\tthis.style.setProperty('border-top', this.borderTop ?? '')\n\t\tthis.style.setProperty('border-right', this.borderRight ?? '')\n\t\tthis.style.setProperty('border-bottom', this.borderBottom ?? '')\n\t\tthis.style.setProperty('border-left', this.borderLeft ?? '')\n\t\tthis.style.setProperty('border-color', this.borderColor ?? '')\n\t\tthis.style.setProperty('border-radius', this.borderRadius ?? '')\n\t\tthis.style.setProperty('border-width', this.borderWidth ?? '')\n\t\tthis.style.setProperty('box-shadow', this.boxShadow ?? '')\n\t\tthis.style.setProperty('opacity', this.opacity ?? '')\n\t\tthis.style.setProperty('background', this.background ?? '')\n\t\tthis.style.setProperty('background-image', this.backgroundImage ?? '')\n\t\tthis.style.setProperty('background-position', this.backgroundPosition ?? '')\n\t\tthis.style.setProperty('background-size', this.backgroundSize ?? '')\n\t\tthis.style.setProperty('background-repeat', this.backgroundRepeat ?? '')\n\t\tthis.style.setProperty('background-attachment', this.backgroundAttachment ?? '')\n\t\tthis.style.setProperty('background-color', this.backgroundColor ?? '')\n\t\tthis.style.setProperty('background-clip', this.backgroundClip ?? '')\n\t\tthis.style.setProperty('background-origin', this.backgroundOrigin ?? '')\n\t\tthis.style.setProperty('background-blend-mode', this.backgroundBlendMode ?? '')\n\t\tthis.style.setProperty('filter', this.filter ?? '')\n\t\tthis.style.setProperty('backdrop-filter', this.backdropFilter ?? '')\n\t\tif (this.center) {\n\t\t\tthis.style.setProperty('margin-left', 'auto')\n\t\t\tthis.style.setProperty('margin-right', 'auto')\n\t\t}\n\t}\n}\n","import { html, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport Layout from '../layout/layout'\nimport style from './flex.scss?inline'\n\n@customElement('schmancy-flex')\nexport class SchmancyFlex extends Layout {\n\t// Optionally, keep your global Layout styles plus this component's SCSS\n\tstatic styles = [Layout.styles, unsafeCSS(style)]\n\n\t// You mentioned \"layout = true\" in your base class; keep if needed\n\tlayout = true\n\n\t/**\n\t * The flex direction property:\n\t * - \"row\" | \"row-reverse\" | \"col\" | \"col-reverse\"\n\t */\n\t@property({ type: String, reflect: true })\n\tflow: 'row' | 'row-reverse' | 'col' | 'col-reverse' = 'col'\n\n\t/**\n\t * The flex-wrap property:\n\t * - \"wrap\" | \"nowrap\" | \"wrap-reverse\"\n\t */\n\t@property({ type: String, reflect: true })\n\twrap: 'wrap' | 'nowrap' | 'wrap-reverse' = 'wrap'\n\n\t/**\n\t * Align-items property:\n\t * - \"start\" (flex-start), \"center\", \"end\" (flex-end), \"stretch\", \"baseline\"\n\t */\n\t@property({ type: String, reflect: true })\n\talign: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'start'\n\n\t/**\n\t * Justify-content property:\n\t * - \"start\", \"center\", \"end\", \"between\"\n\t * (Note: \"stretch\" doesn't exist as a Tailwind justify- class;\n\t * for horizontal stretching, you typically rely on width or gap.)\n\t */\n\t@property({ type: String, reflect: true })\n\tjustify: 'start' | 'center' | 'end' | 'between' = 'start'\n\n\t/**\n\t * Gap sizes:\n\t * - \"none\" (0), \"sm\" (2), \"md\" (4), \"lg\" (8)\n\t * (Feel free to add more if your Tailwind config has them.)\n\t */\n\t@property({ type: String, reflect: true })\n\tgap: 'none' | 'sm' | 'md' | 'lg' = 'none'\n\n\trender() {\n\t\t// Build the Tailwind class map\n\t\tconst classes = {\n\t\t\t// Always use \"flex\"\n\t\t\tflex: true,\n\n\t\t\t// Flow (direction)\n\t\t\t'flex-row': this.flow === 'row',\n\t\t\t'flex-row-reverse': this.flow === 'row-reverse',\n\t\t\t'flex-col': this.flow === 'col',\n\t\t\t'flex-col-reverse': this.flow === 'col-reverse',\n\n\t\t\t// Wrap\n\t\t\t'flex-wrap': this.wrap === 'wrap',\n\t\t\t'flex-nowrap': this.wrap === 'nowrap',\n\t\t\t'flex-wrap-reverse': this.wrap === 'wrap-reverse',\n\n\t\t\t// Align-items\n\t\t\t'items-start': this.align === 'start',\n\t\t\t'items-center': this.align === 'center',\n\t\t\t'items-end': this.align === 'end',\n\t\t\t'items-stretch': this.align === 'stretch',\n\t\t\t'items-baseline': this.align === 'baseline',\n\n\t\t\t// Justify-content\n\t\t\t'justify-start': this.justify === 'start',\n\t\t\t'justify-center': this.justify === 'center',\n\t\t\t'justify-end': this.justify === 'end',\n\t\t\t'justify-between': this.justify === 'between',\n\t\t\t// (No standard Tailwind \"justify-stretch\".)\n\n\t\t\t// Gap\n\t\t\t'gap-0': this.gap === 'none',\n\t\t\t'gap-2': this.gap === 'sm',\n\t\t\t'gap-4': this.gap === 'md',\n\t\t\t'gap-8': this.gap === 'lg',\n\t\t}\n\n\t\t// You can use styleMap for inline style overrides if needed\n\t\tconst inlineStyles = {}\n\n\t\treturn html`\n\t\t\t<section class=${this.classMap(classes)} style=${styleMap(inlineStyles)}>\n\t\t\t\t<slot></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-flex': SchmancyFlex\n\t}\n}\n","import { html, unsafeCSS } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { debounceTime, distinctUntilChanged, fromEvent, map, startWith, takeUntil } from 'rxjs'\nimport Layout from '../layout/layout'\nimport style from './grid.scss?inline'\n\n@customElement('schmancy-grid')\nexport class SchmancyGrid extends Layout {\n\tstatic styles = [Layout.styles, unsafeCSS(style)]\n\tlayout = true\n\t@property({ type: String }) flow: 'row' | 'col' | 'dense' | 'row-dense' | 'col-dense' = 'row'\n\t@property({ type: String }) align: 'start' | 'center' | 'end' | 'stretch' | 'baseline' = 'stretch'\n\t@property({ type: String }) justify: 'start' | 'center' | 'end' | 'stretch' = 'stretch'\n\t@property({ type: String }) content: 'start' | 'center' | 'end' | 'stretch' | 'around' | 'evenly' | 'between' =\n\t\t'stretch'\n\t@property({ type: String }) gap: 'none' | 'xs' | 'sm' | 'md' | 'lg' = 'none'\n\n\t@property({ type: String }) cols?: string\n\t@property({ type: String }) rows?: string\n\t@property({ type: Object }) rcols?: {\n\t\txs?: string | number\n\t\tsm?: string | number\n\t\tmd?: string | number\n\t\tlg?: string | number\n\t\txl?: string | number\n\t\t'2xl'?: string | number\n\t}\n\n\t@property({ type: Boolean }) wrap = false\n\n\t@queryAssignedElements() assignedElements!: HTMLElement[]\n\n\tfirstUpdated() {\n\t\tif (this.rcols)\n\t\t\tfromEvent<CustomEvent>(window, 'resize')\n\t\t\t\t.pipe(\n\t\t\t\t\tmap(event => event.target as Window),\n\t\t\t\t\tstartWith(1),\n\t\t\t\t\tmap(() => (this.clientWidth ? this.clientWidth : window.innerWidth)),\n\t\t\t\t\tdistinctUntilChanged(),\n\t\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t\t\tdebounceTime(10),\n\t\t\t\t\tmap(w => {\n\t\t\t\t\t\tlet cols\n\t\t\t\t\t\tif (this.rcols?.['2xl'] && w >= 1536) cols = this.rcols?.['2xl']\n\t\t\t\t\t\telse if (this.rcols?.xl && w >= 1280) cols = this.rcols?.xl\n\t\t\t\t\t\telse if (this.rcols?.lg && w >= 1024) cols = this.rcols?.lg\n\t\t\t\t\t\telse if (this.rcols?.md && w >= 768) cols = this.rcols?.md\n\t\t\t\t\t\telse if (this.rcols?.sm && w >= 640) cols = this.rcols?.sm\n\t\t\t\t\t\telse if (this.rcols?.xs && w < 640) cols = this.rcols?.xs\n\t\t\t\t\t\treturn cols\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t\t.subscribe(cols => {\n\t\t\t\t\tthis.cols = cols\n\t\t\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'h-full': true,\n\t\t\t'grid flex-1': true,\n\t\t\t// flow classes: https://tailwindcss.com/docs/grid-auto-flow\n\t\t\t'grid-flow-row auto-rows-max': this.flow === 'row',\n\t\t\t'grid-flow-col auto-cols-max': this.flow === 'col',\n\t\t\t'grid-flow-row-dense': this.flow === 'row-dense',\n\t\t\t'grid-flow-col-dense': this.flow === 'col-dense',\n\t\t\t'grid-flow-dense': this.flow === 'dense',\n\n\t\t\t'justify-center': this.content === 'center',\n\t\t\t'justify-end': this.content === 'end',\n\t\t\t'justify-start': this.content === 'start',\n\t\t\t'justify-stretch': this.content === 'stretch',\n\t\t\t'justify-between': this.content === 'between',\n\t\t\t'justify-around': this.content === 'around',\n\t\t\t'justify-evenly': this.content === 'evenly',\n\n\t\t\t'justify-items-center': this.justify === 'center',\n\t\t\t'justify-items-end': this.justify === 'end',\n\t\t\t'justify-items-start': this.justify === 'start',\n\t\t\t'justify-items-stretch': this.justify === 'stretch',\n\t\t\t'items-center': this.align === 'center',\n\t\t\t'items-end': this.align === 'end',\n\t\t\t'items-start': this.align === 'start',\n\t\t\t'items-stretch': this.align === 'stretch',\n\t\t\t'items-baseline': this.align === 'baseline',\n\t\t\t'gap-0': this.gap === 'none',\n\t\t\t'gap-1': this.gap === 'xs',\n\t\t\t'gap-2': this.gap === 'sm',\n\t\t\t'gap-4': this.gap === 'md',\n\t\t\t'gap-8': this.gap === 'lg',\n\t\t\t'flex-nowrap': this.wrap,\n\t\t\t'flex-wrap': !this.wrap,\n\t\t}\n\t\tconst style = {\n\t\t\tgridTemplateRows: this.rows ? this.rows : undefined,\n\t\t\tgridTemplateColumns: this.cols ? this.cols : undefined,\n\t\t}\n\t\treturn html`\n\t\t\t<section class=\"${this.classMap(classes)}\" style=${this.styleMap(style)}>\n\t\t\t\t<slot> </slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-grid': SchmancyGrid\n\t}\n}\n","import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-scroll')\nexport class SchmancyScroll extends TailwindElement(css`\n\t:host {\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t\tbox-sizing: border-box; /* Ensures proper sizing */\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\tinset: 0px;\n\t}\n\t.scrollbar-hide {\n\t\t-ms-overflow-style: none; /* IE and Edge */\n\t\tscrollbar-width: none; /* Firefox */\n\t}\n\t.scrollbar-hide::-webkit-scrollbar {\n\t\tdisplay: none; /* Chrome, Safari, and Opera */\n\t}\n`) {\n\t/**\n\t * Determines whether the scrollbar is hidden.\n\t *\n\t * When `hide` is true, the inner scrollable div receives the `scrollbar-hide` class,\n\t * which hides scrollbars in supported browsers.\n\t *\n\t * @attr hide\n\t * @example <schmancy-scroll hide></schmancy-scroll>\n\t */\n\t@property({ type: Boolean, reflect: true })\n\tpublic hide = false\n\n\trender() {\n\t\t// The classes are dynamically assigned based on the `hide` property.\n\t\tconst classes = {\n\t\t\t'h-full w-full inset-0 overflow-x-scroll overflow-y-scroll scroll-smooth overscroll-contain': true,\n\t\t\t'scrollbar-hide': this.hide,\n\t\t}\n\n\t\treturn html`\n\t\t\t<div class=\"relative inset-0 h-full w-full overscroll-none\">\n\t\t\t\t<div class=${this.classMap(classes)}>\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-scroll': SchmancyScroll\n\t}\n}\n"],"names":["Layout","TailwindElement","super","arguments","this","layout","center","undefined","display","overflow","overflowX","overflowY","position","connectedCallback","style","setProperty","padding","margin","width","height","minWidth","minHeight","maxWidth","maxHeight","top","right","bottom","left","inset","zIndex","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","borderWidth","boxShadow","opacity","background","backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundColor","backgroundClip","backgroundOrigin","backgroundBlendMode","filter","backdropFilter","styles","_b","__decorateClass","property","type","Boolean","prototype","String","SchmancyFlex","flow","wrap","align","justify","gap","classes","flex","html","classMap","styleMap","unsafeCSS","reflect","customElement","SchmancyGrid","content","rcols","fromEvent","window","pipe","map","event","target","startWith","clientWidth","innerWidth","distinctUntilChanged","takeUntil","disconnecting","debounceTime","w","cols","xl","lg","md","sm","xs","subscribe","gridTemplateRows","rows","gridTemplateColumns","Object","queryAssignedElements","SchmancyScroll","css","hide","render"],"mappings":";;;;;;;;;;AAGqB,MAAAA,IAAA,MAAAA,UAAeC,EAApC,EAAA;AAAA,EAAA,cAAAC;AA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A,EAAQ;AAAA;AAX/BZ,EAAA,CADNC,EAAS,EAAEC,MAAMC,SAASe,YA3Bf+B,CAAAA,CAAAA,GAAAA,EA4BL7C,WAAA,QAAA,CAAA,GA5BK6C,IAANjD,EAAA,CADNmB,EAAc,iBACF8B,CAAAA,GAAAA,CAAAA;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";const a=require("@floating-ui/dom");require("rxjs");const p=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const u=require("./litElement.mixin-CYwiYZyZ.cjs");require("./tailwind.mixin-BmIP1Qzo.cjs");const d=require("./ripple-C2BHbhcS.cjs"),y=require("./theme.interface-Xg5Zi46a.cjs"),h=require("lit"),l=require("lit/decorators.js");var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,o=(e,s,t,i)=>{for(var c,n=i>1?void 0:i?v(s,t):s,r=e.length-1;r>=0;r--)(c=e[r])&&(n=(i?c(s,t,n):c(n))||n);return i&&n&&m(s,t,n),n};exports.SchmancySelect=class extends u.$LitElement(h.css`
|
|
2
|
+
:host {
|
|
3
|
+
display: block;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
[role='listbox'] {
|
|
8
|
+
max-height: 25vh;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
outline: none;
|
|
11
|
+
}
|
|
12
|
+
`){constructor(){super(...arguments),this.required=!1,this.placeholder="",this.value="",this.selectedValues=[],this.multi=!1,this.label="",this.isOpen=!1,this.valueLabel=""}connectedCallback(){super.connectedCallback(),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),(e=this.cleanupPositioner)==null||e.call(this)}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}syncSelection(){if(this.multi)this.selectedValues=this.options.filter(e=>e.selected).map(e=>e.value),this.valueLabel=this.selectedValues.length>0?this.options.filter(e=>this.selectedValues.includes(e.value)).map(e=>e.label).join(", "):this.placeholder;else{const e=this.options.find(s=>s.value===this.value);this.valueLabel=(e==null?void 0:e.label)||this.placeholder}}setupOptionsAccessibility(){this.options.forEach(e=>{e.setAttribute("role","option"),e.tabIndex=-1,e.setAttribute("aria-selected",String(this.multi?this.selectedValues.includes(e.value):e.value===this.value))})}async positionDropdown(){const e=this.renderRoot.querySelector(".trigger");e&&this.ul&&(this.cleanupPositioner=a.autoUpdate(e,this.ul,async()=>{const{x:s,y:t}=await a.computePosition(e,this.ul,{placement:"bottom-start",middleware:[a.offset(5),a.flip(),a.shift({padding:5})]});Object.assign(this.ul.style,{left:`${s}px`,top:`${t}px`,position:"absolute"})}))}handleKeyDown(e){if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(e.key)&&(e.preventDefault(),this.openDropdown()));const s=Array.from(this.ul.querySelectorAll('[role="option"]')),t=s.findIndex(i=>i.matches(":focus"));switch(e.key){case"Escape":case"Tab":this.closeDropdown();break;case"ArrowDown":e.preventDefault(),this.focusOption(s,Math.min(t+1,s.length-1));break;case"ArrowUp":e.preventDefault(),this.focusOption(s,Math.max(t-1,0));break;case"Enter":case" ":e.preventDefault(),t>=0&&this.handleOptionSelect(s[t].value)}}focusOption(e,s){var t;(t=e[s])==null||t.focus()}async openDropdown(){this.isOpen=!0,await this.updateComplete,this.positionDropdown(),this.setupOptionsAccessibility();const e=Array.from(this.ul.querySelectorAll('[role="option"]')),s=this.multi?0:e.findIndex(t=>t.getAttribute("value")===this.value);this.focusOption(e,Math.max(s,0))}closeDropdown(){var e,s;this.isOpen=!1,(e=this.cleanupPositioner)==null||e.call(this),this.cleanupPositioner=void 0,(s=this.renderRoot.querySelector(".trigger"))==null||s.focus()}handleOptionSelect(e){var s;if(this.multi){const t=this.options.find(i=>i.value===e);if(!t)return;t.selected=!t.selected,t.selected?this.selectedValues=[...this.selectedValues,e]:this.selectedValues=this.selectedValues.filter(i=>i!==e),this.valueLabel=this.selectedValues.length>0?this.options.filter(i=>this.selectedValues.includes(i.value)).map(i=>i.label).join(", "):this.placeholder,this.dispatchChange(this.selectedValues)}else this.options.forEach(t=>t.selected=t.value===e),this.value=e,this.valueLabel=((s=this.options.find(t=>t.value===e))==null?void 0:s.label)||this.placeholder,this.dispatchChange(e),this.closeDropdown();this.setupOptionsAccessibility()}dispatchChange(e){this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}render(){return h.html`
|
|
13
|
+
<div class="relative">
|
|
14
|
+
<!-- Some trigger (schmancy-input) -->
|
|
15
|
+
<schmancy-input
|
|
16
|
+
class="trigger"
|
|
17
|
+
role="combobox"
|
|
18
|
+
aria-haspopup="listbox"
|
|
19
|
+
aria-expanded=${this.isOpen}
|
|
20
|
+
aria-controls="options"
|
|
21
|
+
.label=${this.label}
|
|
22
|
+
.placeholder=${this.placeholder}
|
|
23
|
+
.value=${this.valueLabel}
|
|
24
|
+
readonly
|
|
25
|
+
@click=${()=>this.isOpen?this.closeDropdown():this.openDropdown()}
|
|
26
|
+
></schmancy-input>
|
|
27
|
+
|
|
28
|
+
<!-- Transparent overlay to close dropdown by clicking outside -->
|
|
29
|
+
<div
|
|
30
|
+
id="overlay"
|
|
31
|
+
class="fixed inset-0"
|
|
32
|
+
?hidden=${!this.isOpen}
|
|
33
|
+
@click=${this.closeDropdown}
|
|
34
|
+
tabindex="-1"
|
|
35
|
+
></div>
|
|
36
|
+
|
|
37
|
+
<!-- The dropdown options container -->
|
|
38
|
+
<ul
|
|
39
|
+
id="options"
|
|
40
|
+
role="listbox"
|
|
41
|
+
class=${p.classMap({"absolute z-30 mt-1 w-full rounded-md shadow-sm":!0,hidden:!this.isOpen})}
|
|
42
|
+
${d.color({bgColor:y.SchmancyTheme.sys.color.surface.container})}
|
|
43
|
+
@click=${e=>{var i;const s=e,t=(i=s.detail)==null?void 0:i.value;t&&this.handleOptionSelect(t)}}
|
|
44
|
+
>
|
|
45
|
+
<!-- The <schmancy-option> elements get slotted in here -->
|
|
46
|
+
<slot
|
|
47
|
+
@slotchange=${()=>{this.syncSelection(),this.setupOptionsAccessibility()}}
|
|
48
|
+
></slot>
|
|
49
|
+
</ul>
|
|
50
|
+
</div>
|
|
51
|
+
`}},o([l.property({type:Boolean})],exports.SchmancySelect.prototype,"required",2),o([l.property({type:String})],exports.SchmancySelect.prototype,"placeholder",2),o([l.property({type:String})],exports.SchmancySelect.prototype,"value",2),o([l.property({type:Array})],exports.SchmancySelect.prototype,"selectedValues",2),o([l.property({type:Boolean})],exports.SchmancySelect.prototype,"multi",2),o([l.property({type:String})],exports.SchmancySelect.prototype,"label",2),o([l.state()],exports.SchmancySelect.prototype,"isOpen",2),o([l.state()],exports.SchmancySelect.prototype,"valueLabel",2),o([l.query("ul")],exports.SchmancySelect.prototype,"ul",2),o([l.queryAssignedElements({flatten:!0})],exports.SchmancySelect.prototype,"options",2),exports.SchmancySelect=o([l.customElement("schmancy-select")],exports.SchmancySelect);
|
|
52
|
+
//# sourceMappingURL=select-DEOnUayG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-DEOnUayG.cjs","sources":["../src/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n@customElement('schmancy-select')\nexport class SchmancySelect extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\tmax-height: 25vh;\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`) {\n\t// API\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String }) value = '' // for single-select\n\t@property({ type: Array }) selectedValues: string[] = [] // for multi-select\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.addEventListener('keydown', this.handleKeyDown)\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.removeEventListener('keydown', this.handleKeyDown)\n\t\tthis.cleanupPositioner?.()\n\t}\n\n\tfirstUpdated() {\n\t\t// Initial sync\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\t/**\n\t * Whenever new <schmancy-option> children get slotted in,\n\t * or whenever properties change, ensure the correct .selected states\n\t * and display text are applied.\n\t */\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\t// For multi-select, figure out what's already marked selected in the DOM\n\t\t\tthis.selectedValues = this.options.filter(o => o.selected).map(o => o.value)\n\t\t\tthis.valueLabel =\n\t\t\t\tthis.selectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => this.selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\t// Single\n\t\t\tconst selectedOption = this.options.find(o => o.value === this.value)\n\t\t\tthis.valueLabel = selectedOption?.label || this.placeholder\n\t\t}\n\t}\n\n\t/**\n\t * We can also set up any ARIA attributes here.\n\t * Note that we’re toggling `aria-selected` for screen readers,\n\t * but the highlight in CSS is triggered by the option’s `selected` property.\n\t */\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options.forEach(option => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\toption.tabIndex = -1\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? this.selectedValues.includes(option.value) : option.value === this.value),\n\t\t\t)\n\t\t})\n\t}\n\n\t/**\n\t * Use @floating-ui/dom to position the <ul> under the \"trigger\" input.\n\t */\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t})\n\t\t})\n\t}\n\n\t/**\n\t * Keydown logic for opening/closing the dropdown and navigating options.\n\t */\n\tprivate handleKeyDown(e: KeyboardEvent) {\n\t\t// If dropdown is closed, certain keys will open it:\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown()\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\t// If open, handle arrow up/down, enter, escape, etc.\n\t\tconst options = Array.from(this.ul.querySelectorAll<SchmancyOption>('[role=\"option\"]'))\n\t\tconst current = options.findIndex(o => o.matches(':focus'))\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.min(current + 1, options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (current >= 0) this.handleOptionSelect(options[current].value)\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: HTMLElement[], index: number) {\n\t\toptions[index]?.focus()\n\t}\n\n\tprivate async openDropdown() {\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete // Wait for lit to render\n\n\t\tthis.positionDropdown()\n\t\tthis.setupOptionsAccessibility()\n\n\t\t// Optionally focus the currently selected item:\n\t\tconst options = Array.from(this.ul.querySelectorAll('[role=\"option\"]')) as HTMLElement[]\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.getAttribute('value') === this.value)\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\t}\n\n\tprivate closeDropdown() {\n\t\tthis.isOpen = false\n\t\tthis.cleanupPositioner?.()\n\t\tthis.cleanupPositioner = undefined\n\t\t// Return focus to the trigger (optional):\n\t\tthis.renderRoot.querySelector<HTMLButtonElement>('.trigger')?.focus()\n\t}\n\n\t/**\n\t * Main method for toggling or setting selected items.\n\t */\n\tprivate handleOptionSelect(value: string) {\n\t\tif (this.multi) {\n\t\t\t// Multi-select: Toggle the .selected property on the clicked option\n\t\t\tconst option = this.options.find(o => o.value === value)\n\t\t\tif (!option) return\n\n\t\t\toption.selected = !option.selected\n\t\t\t// Rebuild selectedValues\n\t\t\tif (option.selected) {\n\t\t\t\tthis.selectedValues = [...this.selectedValues, value]\n\t\t\t} else {\n\t\t\t\tthis.selectedValues = this.selectedValues.filter(v => v !== value)\n\t\t\t}\n\n\t\t\t// Update the visible label\n\t\t\tthis.valueLabel =\n\t\t\t\tthis.selectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => this.selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\n\t\t\t// Dispatch \"change\" event\n\t\t\tthis.dispatchChange(this.selectedValues)\n\t\t} else {\n\t\t\t// Single select: unselect all, select the clicked one\n\t\t\tthis.options.forEach(o => (o.selected = o.value === value))\n\t\t\tthis.value = value\n\t\t\tthis.valueLabel = this.options.find(o => o.value === value)?.label || this.placeholder\n\t\t\tthis.dispatchChange(value)\n\t\t\t// Close after selecting\n\t\t\tthis.closeDropdown()\n\t\t}\n\n\t\t// Also update aria-selected for accessibility\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\tprivate dispatchChange(value: string | string[]) {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<!-- Some trigger (schmancy-input) -->\n\t\t\t\t<schmancy-input\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\treadonly\n\t\t\t\t\t@click=${() => (this.isOpen ? this.closeDropdown() : this.openDropdown())}\n\t\t\t\t></schmancy-input>\n\n\t\t\t\t<!-- Transparent overlay to close dropdown by clicking outside -->\n\t\t\t\t<div\n\t\t\t\t\tid=\"overlay\"\n\t\t\t\t\tclass=\"fixed inset-0\"\n\t\t\t\t\t?hidden=${!this.isOpen}\n\t\t\t\t\t@click=${this.closeDropdown}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t></div>\n\n\t\t\t\t<!-- The dropdown options container -->\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute z-30 mt-1 w-full rounded-md shadow-sm': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({ bgColor: SchmancyTheme.sys.color.surface.container })}\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\t// If a <schmancy-option> inside was clicked, it dispatches a 'click' event\n\t\t\t\t\t\t// with detail.value. We can read that here:\n\t\t\t\t\t\tconst customEvt = e as CustomEvent\n\t\t\t\t\t\tconst detailVal = customEvt.detail?.value\n\t\t\t\t\t\tif (detailVal) {\n\t\t\t\t\t\t\tthis.handleOptionSelect(detailVal)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<!-- The <schmancy-option> elements get slotted in here -->\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t\tthis.setupOptionsAccessibility()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n"],"names":["SchmancySelect","$LitElement","css","constructor","super","arguments","this","required","placeholder","value","selectedValues","multi","label","isOpen","valueLabel","connectedCallback","addEventListener","handleKeyDown","disconnectedCallback","removeEventListener","cleanupPositioner","syncSelection","setupOptionsAccessibility","options","filter","o","selected","map","length","includes","join","selectedOption","find","forEach","option","setAttribute","tabIndex","String","reference","renderRoot","querySelector","ul","autoUpdate","async","x","y","computePosition","placement","middleware","offset","flip","shift","padding","Object","assign","style","left","top","position","e","key","preventDefault","openDropdown","Array","from","querySelectorAll","current","findIndex","matches","closeDropdown","focusOption","Math","min","max","handleOptionSelect","index","focus","updateComplete","positionDropdown","selectedIndex","getAttribute","undefined","v","dispatchChange","dispatchEvent","CustomEvent","detail","bubbles","composed","render","html","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","container","customEvt","detailVal","__decorateClass","property","type","Boolean","prototype","state","query","queryAssignedElements","flatten","customElement"],"mappings":"wjBAcaA,QAAAA,eAAN,cAA6BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAzC,aAAAC,CAAAC,MAAAC,GAAAA,SAAAA,EAakCC,KAAAC,SAAAA,GACED,KAAAE,YAAA,GACNF,KAAAG,MAAA,GACTH,KAAAI,eAA2B,CAAA,EACjBJ,KAAAK,MAAAA,GACDL,KAAAM,MAAA,GAG3BN,KAAQO,OAAAA,GACRP,KAAQQ,WAAa,EAAA,CAM9B,mBAAAC,CACCX,MAAMW,kBAAAA,EACDT,KAAAU,iBAAiB,UAAWV,KAAKW,aAAa,CAAA,CAGpD,sBAAAC,OACCd,MAAMc,qBAAAA,EACDZ,KAAAa,oBAAoB,UAAWb,KAAKW,aAAAA,GACzCX,EAAAA,KAAKc,oBAALd,MAAAA,EAAAA,UAAyB,CAG1B,cAECA,CAAAA,KAAKe,cACLf,EAAAA,KAAKgB,0BAA0B,CAAA,CAQxB,eACP,CAAA,GAAIhB,KAAKK,MAEHL,KAAAI,eAAiBJ,KAAKiB,QAAQC,OAAOC,GAAKA,EAAEC,QAAAA,EAAUC,IAASF,GAAAA,EAAEhB,KACjEH,EAAAA,KAAAQ,WACJR,KAAKI,eAAekB,OAAS,EAC1BtB,KAAKiB,QACJC,OAAYC,GAAAnB,KAAKI,eAAemB,SAASJ,EAAEhB,KAC3CkB,CAAAA,EAAAA,IAASF,GAAAA,EAAEb,KACXkB,EAAAA,KAAK,IACNxB,EAAAA,KAAKE,gBACH,CAEA,MAAAuB,EAAiBzB,KAAKiB,QAAQS,QAAUP,EAAEhB,QAAUH,KAAKG,KAC1DH,EAAAA,KAAAQ,YAAaiB,GAAAA,YAAAA,EAAgBnB,QAASN,KAAKE,WAAA,CACjD,CAQO,4BACFF,KA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6BJ,EAAAA,EAAA,CAAjDO,wBAAsB,CAAEC,QAAS,EAAA,CAAA,CAAA,EAzBtB7G,uBAyBsCyG,UAAA,UAAA,CAzBtCzG,EAAAA,QAANA,eAAAqG,EAAA,CADNS,EAAAA,cAAc,iBAAA,CAAA,EACF9G"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { autoUpdate as h, computePosition as u, offset as d, flip as y, shift as m } from "@floating-ui/dom";
|
|
2
|
+
import "rxjs";
|
|
3
|
+
import { classMap as v } from "lit/directives/class-map.js";
|
|
4
|
+
import "lit/directives/style-map.js";
|
|
5
|
+
import { $ as b } from "./litElement.mixin-DoKCdkhO.js";
|
|
6
|
+
import "./tailwind.mixin-CHPxMV8E.js";
|
|
7
|
+
import { c as f } from "./ripple-BumgqsDT.js";
|
|
8
|
+
import { S as w } from "./theme.interface-C5Kj6WjD.js";
|
|
9
|
+
import { css as g, html as O } from "lit";
|
|
10
|
+
import { property as n, state as p, query as D, queryAssignedElements as x, customElement as A } from "lit/decorators.js";
|
|
11
|
+
var S = Object.defineProperty, k = Object.getOwnPropertyDescriptor, l = (e, s, t, i) => {
|
|
12
|
+
for (var r, a = i > 1 ? void 0 : i ? k(s, t) : s, c = e.length - 1; c >= 0; c--) (r = e[c]) && (a = (i ? r(s, t, a) : r(a)) || a);
|
|
13
|
+
return i && a && S(s, t, a), a;
|
|
14
|
+
};
|
|
15
|
+
let o = class extends b(g`
|
|
16
|
+
:host {
|
|
17
|
+
display: block;
|
|
18
|
+
position: relative;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[role='listbox'] {
|
|
22
|
+
max-height: 25vh;
|
|
23
|
+
overflow-y: auto;
|
|
24
|
+
outline: none;
|
|
25
|
+
}
|
|
26
|
+
`) {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments), this.required = !1, this.placeholder = "", this.value = "", this.selectedValues = [], this.multi = !1, this.label = "", this.isOpen = !1, this.valueLabel = "";
|
|
29
|
+
}
|
|
30
|
+
connectedCallback() {
|
|
31
|
+
super.connectedCallback(), this.addEventListener("keydown", this.handleKeyDown);
|
|
32
|
+
}
|
|
33
|
+
disconnectedCallback() {
|
|
34
|
+
var e;
|
|
35
|
+
super.disconnectedCallback(), this.removeEventListener("keydown", this.handleKeyDown), (e = this.cleanupPositioner) == null || e.call(this);
|
|
36
|
+
}
|
|
37
|
+
firstUpdated() {
|
|
38
|
+
this.syncSelection(), this.setupOptionsAccessibility();
|
|
39
|
+
}
|
|
40
|
+
syncSelection() {
|
|
41
|
+
if (this.multi) this.selectedValues = this.options.filter((e) => e.selected).map((e) => e.value), this.valueLabel = this.selectedValues.length > 0 ? this.options.filter((e) => this.selectedValues.includes(e.value)).map((e) => e.label).join(", ") : this.placeholder;
|
|
42
|
+
else {
|
|
43
|
+
const e = this.options.find((s) => s.value === this.value);
|
|
44
|
+
this.valueLabel = (e == null ? void 0 : e.label) || this.placeholder;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
setupOptionsAccessibility() {
|
|
48
|
+
this.options.forEach((e) => {
|
|
49
|
+
e.setAttribute("role", "option"), e.tabIndex = -1, e.setAttribute("aria-selected", String(this.multi ? this.selectedValues.includes(e.value) : e.value === this.value));
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
async positionDropdown() {
|
|
53
|
+
const e = this.renderRoot.querySelector(".trigger");
|
|
54
|
+
e && this.ul && (this.cleanupPositioner = h(e, this.ul, async () => {
|
|
55
|
+
const { x: s, y: t } = await u(e, this.ul, { placement: "bottom-start", middleware: [d(5), y(), m({ padding: 5 })] });
|
|
56
|
+
Object.assign(this.ul.style, { left: `${s}px`, top: `${t}px`, position: "absolute" });
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
handleKeyDown(e) {
|
|
60
|
+
if (!this.isOpen) return void (["Enter", " ", "ArrowDown"].includes(e.key) && (e.preventDefault(), this.openDropdown()));
|
|
61
|
+
const s = Array.from(this.ul.querySelectorAll('[role="option"]')), t = s.findIndex((i) => i.matches(":focus"));
|
|
62
|
+
switch (e.key) {
|
|
63
|
+
case "Escape":
|
|
64
|
+
case "Tab":
|
|
65
|
+
this.closeDropdown();
|
|
66
|
+
break;
|
|
67
|
+
case "ArrowDown":
|
|
68
|
+
e.preventDefault(), this.focusOption(s, Math.min(t + 1, s.length - 1));
|
|
69
|
+
break;
|
|
70
|
+
case "ArrowUp":
|
|
71
|
+
e.preventDefault(), this.focusOption(s, Math.max(t - 1, 0));
|
|
72
|
+
break;
|
|
73
|
+
case "Enter":
|
|
74
|
+
case " ":
|
|
75
|
+
e.preventDefault(), t >= 0 && this.handleOptionSelect(s[t].value);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
focusOption(e, s) {
|
|
79
|
+
var t;
|
|
80
|
+
(t = e[s]) == null || t.focus();
|
|
81
|
+
}
|
|
82
|
+
async openDropdown() {
|
|
83
|
+
this.isOpen = !0, await this.updateComplete, this.positionDropdown(), this.setupOptionsAccessibility();
|
|
84
|
+
const e = Array.from(this.ul.querySelectorAll('[role="option"]')), s = this.multi ? 0 : e.findIndex((t) => t.getAttribute("value") === this.value);
|
|
85
|
+
this.focusOption(e, Math.max(s, 0));
|
|
86
|
+
}
|
|
87
|
+
closeDropdown() {
|
|
88
|
+
var e, s;
|
|
89
|
+
this.isOpen = !1, (e = this.cleanupPositioner) == null || e.call(this), this.cleanupPositioner = void 0, (s = this.renderRoot.querySelector(".trigger")) == null || s.focus();
|
|
90
|
+
}
|
|
91
|
+
handleOptionSelect(e) {
|
|
92
|
+
var s;
|
|
93
|
+
if (this.multi) {
|
|
94
|
+
const t = this.options.find((i) => i.value === e);
|
|
95
|
+
if (!t) return;
|
|
96
|
+
t.selected = !t.selected, t.selected ? this.selectedValues = [...this.selectedValues, e] : this.selectedValues = this.selectedValues.filter((i) => i !== e), this.valueLabel = this.selectedValues.length > 0 ? this.options.filter((i) => this.selectedValues.includes(i.value)).map((i) => i.label).join(", ") : this.placeholder, this.dispatchChange(this.selectedValues);
|
|
97
|
+
} else this.options.forEach((t) => t.selected = t.value === e), this.value = e, this.valueLabel = ((s = this.options.find((t) => t.value === e)) == null ? void 0 : s.label) || this.placeholder, this.dispatchChange(e), this.closeDropdown();
|
|
98
|
+
this.setupOptionsAccessibility();
|
|
99
|
+
}
|
|
100
|
+
dispatchChange(e) {
|
|
101
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
102
|
+
}
|
|
103
|
+
render() {
|
|
104
|
+
return O`
|
|
105
|
+
<div class="relative">
|
|
106
|
+
<!-- Some trigger (schmancy-input) -->
|
|
107
|
+
<schmancy-input
|
|
108
|
+
class="trigger"
|
|
109
|
+
role="combobox"
|
|
110
|
+
aria-haspopup="listbox"
|
|
111
|
+
aria-expanded=${this.isOpen}
|
|
112
|
+
aria-controls="options"
|
|
113
|
+
.label=${this.label}
|
|
114
|
+
.placeholder=${this.placeholder}
|
|
115
|
+
.value=${this.valueLabel}
|
|
116
|
+
readonly
|
|
117
|
+
@click=${() => this.isOpen ? this.closeDropdown() : this.openDropdown()}
|
|
118
|
+
></schmancy-input>
|
|
119
|
+
|
|
120
|
+
<!-- Transparent overlay to close dropdown by clicking outside -->
|
|
121
|
+
<div
|
|
122
|
+
id="overlay"
|
|
123
|
+
class="fixed inset-0"
|
|
124
|
+
?hidden=${!this.isOpen}
|
|
125
|
+
@click=${this.closeDropdown}
|
|
126
|
+
tabindex="-1"
|
|
127
|
+
></div>
|
|
128
|
+
|
|
129
|
+
<!-- The dropdown options container -->
|
|
130
|
+
<ul
|
|
131
|
+
id="options"
|
|
132
|
+
role="listbox"
|
|
133
|
+
class=${v({ "absolute z-30 mt-1 w-full rounded-md shadow-sm": !0, hidden: !this.isOpen })}
|
|
134
|
+
${f({ bgColor: w.sys.color.surface.container })}
|
|
135
|
+
@click=${(e) => {
|
|
136
|
+
var i;
|
|
137
|
+
const s = e, t = (i = s.detail) == null ? void 0 : i.value;
|
|
138
|
+
t && this.handleOptionSelect(t);
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<!-- The <schmancy-option> elements get slotted in here -->
|
|
142
|
+
<slot
|
|
143
|
+
@slotchange=${() => {
|
|
144
|
+
this.syncSelection(), this.setupOptionsAccessibility();
|
|
145
|
+
}}
|
|
146
|
+
></slot>
|
|
147
|
+
</ul>
|
|
148
|
+
</div>
|
|
149
|
+
`;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
l([n({ type: Boolean })], o.prototype, "required", 2), l([n({ type: String })], o.prototype, "placeholder", 2), l([n({ type: String })], o.prototype, "value", 2), l([n({ type: Array })], o.prototype, "selectedValues", 2), l([n({ type: Boolean })], o.prototype, "multi", 2), l([n({ type: String })], o.prototype, "label", 2), l([p()], o.prototype, "isOpen", 2), l([p()], o.prototype, "valueLabel", 2), l([D("ul")], o.prototype, "ul", 2), l([x({ flatten: !0 })], o.prototype, "options", 2), o = l([A("schmancy-select")], o);
|
|
153
|
+
export {
|
|
154
|
+
o as S
|
|
155
|
+
};
|
|
156
|
+
//# sourceMappingURL=select-Dmhiq26e.js.map
|