@mhmo91/schmancy 0.2.17 → 0.2.19
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/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/{list-CbrHXdaH.cjs → list-DOnYlCys.cjs} +3 -7
- package/dist/list-DOnYlCys.cjs.map +1 -0
- package/dist/{list-C_X_z_54.js → list-fbJSJN44.js} +14 -18
- package/dist/list-fbJSJN44.js.map +1 -0
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/{sheet-DQ6oo0bV.cjs → sheet-CUTDrhww.cjs} +17 -15
- package/dist/{sheet-DQ6oo0bV.cjs.map → sheet-CUTDrhww.cjs.map} +1 -1
- package/dist/{sheet-CcUHOsPu.js → sheet-DQxsDc4a.js} +17 -15
- package/dist/{sheet-CcUHOsPu.js.map → sheet-DQxsDc4a.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{spinner--_IQN93k.js → spinner-Qncx6I22.js} +2 -2
- package/dist/{spinner--_IQN93k.js.map → spinner-Qncx6I22.js.map} +1 -1
- package/dist/{spinner-CMxdYix8.cjs → spinner-vK7ZLqSI.cjs} +2 -2
- package/dist/{spinner-CMxdYix8.cjs.map → spinner-vK7ZLqSI.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-Bq8AON2R.js → teleport.component-DRNVI8FU.js} +5 -5
- package/dist/{teleport.component-Bq8AON2R.js.map → teleport.component-DRNVI8FU.js.map} +1 -1
- package/dist/{teleport.component-B4GC8Z5F.cjs → teleport.component-DeXpYHXV.cjs} +2 -2
- package/dist/{teleport.component-B4GC8Z5F.cjs.map → teleport.component-DeXpYHXV.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.component-CbQ3s3hX.cjs +3 -0
- package/dist/theme.component-CbQ3s3hX.cjs.map +1 -0
- package/dist/{theme.component-VDofRNDt.js → theme.component-wMpGPTus.js} +106 -104
- package/dist/theme.component-wMpGPTus.js.map +1 -0
- package/dist/theme.js +1 -1
- package/package.json +1 -1
- package/types/src/theme/context.d.ts +64 -0
- package/dist/list-C_X_z_54.js.map +0 -1
- package/dist/list-CbrHXdaH.cjs.map +0 -1
- package/dist/theme.component-C6K_02NA.cjs +0 -3
- package/dist/theme.component-C6K_02NA.cjs.map +0 -1
- package/dist/theme.component-VDofRNDt.js.map +0 -1
package/dist/busy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./spinner-
|
|
1
|
+
"use strict";require("./spinner-vK7ZLqSI.cjs");
|
|
2
2
|
//# sourceMappingURL=busy.cjs.map
|
package/dist/busy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./spinner
|
|
1
|
+
import "./spinner-Qncx6I22.js";
|
|
2
2
|
//# sourceMappingURL=busy.js.map
|
package/dist/card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./teleport.component-
|
|
1
|
+
"use strict";require("./teleport.component-DeXpYHXV.cjs");
|
|
2
2
|
//# sourceMappingURL=card.cjs.map
|
package/dist/card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./teleport.component-
|
|
1
|
+
import "./teleport.component-DRNVI8FU.js";
|
|
2
2
|
//# sourceMappingURL=card.js.map
|
package/dist/content-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-DeXpYHXV.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
|
|
2
2
|
//# sourceMappingURL=content-drawer.cjs.map
|
package/dist/content-drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-
|
|
1
|
+
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-DRNVI8FU.js";
|
|
2
2
|
export {
|
|
3
3
|
n as SchmancyContentDrawer,
|
|
4
4
|
t as SchmancyContentDrawerID,
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-VuDSGmJu.cjs");const r=require("./area.component-qqTF9Cwv.cjs");require("./autocomplete-B0fc_Nh_.cjs"),require("./spinner-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-VuDSGmJu.cjs");const r=require("./area.component-qqTF9Cwv.cjs");require("./autocomplete-B0fc_Nh_.cjs"),require("./spinner-vK7ZLqSI.cjs");const o=require("./icon-button-BnakhpuT.cjs"),e=require("./teleport.component-DeXpYHXV.cjs"),S=require("./checkbox-CFRY_WA9.cjs");require("./chips-DK1t1fX8.cjs");const u=require("./payment-card-form-DT2MgPCZ.cjs");require("./date-range-ojNc9Onw.cjs");const y=require("./delay-BdpZfHDc.cjs"),n=require("./ripple-C2BHbhcS.cjs");require("./divider-_i9O2PBo.cjs"),require("./form-CqnEVlhB.cjs"),require("./icon-CpZBVkRH.cjs"),require("./input-B2rV3JCi.cjs");const c=require("./scroll-CD1V-q-_.cjs"),m=require("./list-DOnYlCys.cjs");require("./menu-BZyh3Omd.cjs");const a=require("./outlet-B1D2BYCl.cjs");require("./option-DC1BiTB1.cjs");const b=require("./radio-group-WV66V12S.cjs"),l=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs"),require("./select-BP6OE_lC.cjs");const t=require("./sheet-CUTDrhww.cjs"),h=require("./slider-BEGG7odV.cjs"),d=require("./surface-pByMeeQt.cjs");require("./table-DduFFvUh.cjs"),require("./tabs-group-BBByN_wj.cjs"),require("./textarea-DnIefaLe.cjs");const i=require("./theme.component-CbQ3s3hX.cjs"),p=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-B0kxPZka.cjs");const g=require("./tree-BKd26LdC.cjs"),f=require("./types.cjs"),q=require("./typewriter-jklG56Kf.cjs"),D=require("./typography-D5hY_euh.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmnacyButton",{enumerable:!0,get:()=>o.SchmnacyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>S.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>u.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=n.color,exports.fullHeight=n.fullHeight,exports.ripple=n.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>c.SchmancyFlex}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>c.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>c.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>m.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>m.SchmancyListItem}),exports.$notify=a.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>a.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>a.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>b.RadioGroup}),exports.mutationObserver=l.mutationObserver,exports.SchmancySheetPosition=t.SchmancySheetPosition,exports.SheetHereMorty=t.SheetHereMorty,exports.SheetWhereAreYouRicky=t.SheetWhereAreYouRicky,exports.hook=t.hook,exports.sheet=t.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>d.SchmancySurface}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=p.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>g.SchmancyTree}),exports.SchmancyEvents=f.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>q.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>D.SchmancyTypography});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./animated-text-DrjiBStC.js";
|
|
2
2
|
import { F as d, H as T, b, S as u, a as N, r as H } from "./area.component-BLglMVqv.js";
|
|
3
3
|
import "./autocomplete-cGKAFBi1.js";
|
|
4
|
-
import "./spinner
|
|
4
|
+
import "./spinner-Qncx6I22.js";
|
|
5
5
|
import { S as v, a as I } from "./icon-button-DX3Zm-2u.js";
|
|
6
|
-
import { H as g, e as E, b as k, f as A, c as Y, d as F, g as G, S as O, a as W, i as L, k as _, l as B, m as P, j as $, n as j, o as K, W as q, s as z, h as J, t as Q } from "./teleport.component-
|
|
6
|
+
import { H as g, e as E, b as k, f as A, c as Y, d as F, g as G, S as O, a as W, i as L, k as _, l as B, m as P, j as $, n as j, o as K, W as q, s as z, h as J, t as Q } from "./teleport.component-DRNVI8FU.js";
|
|
7
7
|
import { S as V } from "./checkbox-D9M3J9G8.js";
|
|
8
8
|
import "./chips-CCQq31in.js";
|
|
9
9
|
import { S as Z } from "./payment-card-form-D2wNtJk-.js";
|
|
@@ -15,7 +15,7 @@ import "./form-Cmp0Zkgn.js";
|
|
|
15
15
|
import "./icon-DMpNiWR7.js";
|
|
16
16
|
import "./input-UMM0G3kS.js";
|
|
17
17
|
import { S as sa, a as Sa, b as ha } from "./scroll-BxE0fD2e.js";
|
|
18
|
-
import { L as ya, S as pa } from "./list-
|
|
18
|
+
import { L as ya, S as pa } from "./list-fbJSJN44.js";
|
|
19
19
|
import "./menu-BXkQgdTe.js";
|
|
20
20
|
import { $ as xa, S as Da, a as la } from "./outlet-DuNsi1ZI.js";
|
|
21
21
|
import "./option-DLU4N2ZE.js";
|
|
@@ -24,13 +24,13 @@ import { mutationObserver as Ta } from "./rxjs-utils.js";
|
|
|
24
24
|
import "rxjs";
|
|
25
25
|
import "./index-CuY8m6ta.js";
|
|
26
26
|
import "./select-CV8IdXQf.js";
|
|
27
|
-
import { S as ua, b as Na, a as Ha, h as Ra, s as va } from "./sheet-
|
|
27
|
+
import { S as ua, b as Na, a as Ha, h as Ra, s as va } from "./sheet-DQxsDc4a.js";
|
|
28
28
|
import { S as Ma, a as ga } from "./slider-B12L6AxV.js";
|
|
29
29
|
import { S as ka } from "./surface-DYJn8g9F.js";
|
|
30
30
|
import "./table-DvOkIhMb.js";
|
|
31
31
|
import "./tabs-group-Wohd6x3I.js";
|
|
32
32
|
import "./textarea-BfzMpFnt.js";
|
|
33
|
-
import { S as Ya, f as Fa, t as Ga } from "./theme.component-
|
|
33
|
+
import { S as Ya, f as Fa, t as Ga } from "./theme.component-wMpGPTus.js";
|
|
34
34
|
import { S as Wa } from "./theme.interface-C5Kj6WjD.js";
|
|
35
35
|
import "./theme-button-C5ReoqDx.js";
|
|
36
36
|
import { S as _a } from "./tree-DN5gv8hS.js";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
"use strict";const y=require("./consume-Di0U0iBU.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const u=require("./tailwind.mixin-bRVZL2lY.cjs"),h=require("./context-BATZj31H.cjs"),l=require("lit"),n=require("lit/decorators.js"),m=require("lit/directives/when.js"),p=require("./provide-_VUNOf1R.cjs");var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(r,t,s,i)=>{for(var o,e=i>1?void 0:i?g(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(i?o(t,s,e):o(e))||e);return i&&e&&f(t,s,e),e};exports.SchmancyListItem=class extends u.TailwindElement(l.
|
|
2
|
-
|
|
3
|
-
display: block;
|
|
4
|
-
}
|
|
5
|
-
`){constructor(){super(...arguments),this.selected=!1}get imgClasses(){return["h-[24px]","w-[24px]","object-contain"]}firstUpdated(){var r,t;(r=this.leading)==null||r.forEach(s=>{s.classList.add(...this.imgClasses)}),(t=this.trailing)==null||t.forEach(s=>{s.classList.add(...this.imgClasses)})}render(){const r={"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"w-full min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden":!0,"bg-secondary-container text-secondery-onContainer":this.selected},t={"z-0 duration-500 transition-opacity":!0,"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ":!this.readonly};return l.html`<li .tabIndex=${this.readonly?-1:0} class=${this.classMap(r)}>
|
|
6
|
-
${m.when(!this.readonly,()=>l.html` <div class="${this.classMap(t)}"></div> `)}
|
|
1
|
+
"use strict";const y=require("./consume-Di0U0iBU.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const u=require("./tailwind.mixin-bRVZL2lY.cjs"),h=require("./context-BATZj31H.cjs"),l=require("lit"),n=require("lit/decorators.js"),m=require("lit/directives/when.js"),p=require("./provide-_VUNOf1R.cjs");var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(r,t,s,i)=>{for(var o,e=i>1?void 0:i?g(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(i?o(t,s,e):o(e))||e);return i&&e&&f(t,s,e),e};exports.SchmancyListItem=class extends u.TailwindElement(){constructor(){super(...arguments),this.selected=!1}get imgClasses(){return["h-[24px]","w-[24px]","object-contain"]}firstUpdated(){var r,t;(r=this.leading)==null||r.forEach(s=>{s.classList.add(...this.imgClasses)}),(t=this.trailing)==null||t.forEach(s=>{s.classList.add(...this.imgClasses)})}render(){const r={"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden":!0,"bg-secondary-container text-secondery-onContainer":this.selected},t={"z-0 duration-500 transition-opacity":!0,"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ":!this.readonly};return l.html` <li .tabIndex=${this.readonly?-1:0} class=${this.classMap(r)}>
|
|
2
|
+
${m.when(!this.readonly,()=>l.html` <div class="${this.classMap(t)}"></div>`)}
|
|
7
3
|
<slot></slot>
|
|
8
4
|
</li>`}},a([y.c({context:h.SchmancySurfaceTypeContext,subscribe:!0}),n.property()],exports.SchmancyListItem.prototype,"variant",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"rounded",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"readonly",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"selected",2),a([n.queryAssignedElements({slot:"leading",flatten:!0})],exports.SchmancyListItem.prototype,"leading",2),a([n.queryAssignedElements({slot:"trailing",flatten:!0})],exports.SchmancyListItem.prototype,"trailing",2),exports.SchmancyListItem=a([n.customElement("schmancy-list-item")],exports.SchmancyListItem);const b=p.n(void 0);var x=Object.defineProperty,v=Object.getOwnPropertyDescriptor,d=(r,t,s,i)=>{for(var o,e=i>1?void 0:i?v(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(i?o(t,s,e):o(e))||e);return i&&e&&x(t,s,e),e};exports.List=class extends u.TailwindElement(l.css`
|
|
9
5
|
:host {
|
|
@@ -18,4 +14,4 @@
|
|
|
18
14
|
</ul>
|
|
19
15
|
</schmancy-surface>
|
|
20
16
|
`}},d([p.e({context:b}),n.property()],exports.List.prototype,"surface",2),exports.List=d([n.customElement("schmancy-list")],exports.List);
|
|
21
|
-
//# sourceMappingURL=list-
|
|
17
|
+
//# sourceMappingURL=list-DOnYlCys.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-DOnYlCys.cjs","sources":["../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListItem","TailwindElement","super","arguments","this","selected","leading","forEach","img","classList","add","imgClasses","trailing","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","SchmancySurfaceTypeContext","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","SchmancyListTypeContext","createContext","List","css","render","surface","provide"],"mappings":"kiBAeaA,QAAAA,iBAAN,cAA+BC,EAAAA,gBAA/B,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,WAU2CC,KAAAC,SAAAA,EAAA,CAcjD,gBACQ,CAAA,MAAA,CAAC,WAAY,WAAY,iBAAgB,CAGjD,cACMD,UAAAA,EAAAA,KAAAE,UAAAF,MAAAA,EAASG,QAAeC,GAAAA,CAC5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0B,UAAA,WAAA,CAAA,EAtBI1B,QAANA,iBAAAoB,EAAA,CADNY,EAAAA,cAAc,oBAAA,CAAA,EACFhC,wBCbA,EAAA,MAAAiC,EAA0BC,4MCS1BC,QAAAA,KAAN,cAAmBlC,EAAAA,gBAAgBmC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAiBzC,QAAAC,CACQ,OAAApB,EAAAA;AAAAA,4BACmBb,KAAKkC,OAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAAO,CAJvClB,EAAAA,EAAA,CAFCmB,IAAQ,CAAEjB,QAASW,CAAAA,CAAAA,EACnBR,EAASA,SAdEU,CAAAA,EAAAA,aAeZT,UAAA,UAAA,GAfYS,QAANA,KAAAf,EAAA,CADNY,EAAAA,cAAc,eAAA,CAAA,EACFG"}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
import { c as
|
|
1
|
+
import { c as h } from "./consume-DSKPc5vj.js";
|
|
2
2
|
import "rxjs";
|
|
3
3
|
import "lit/directives/class-map.js";
|
|
4
4
|
import "lit/directives/style-map.js";
|
|
5
|
-
import { T as
|
|
6
|
-
import { S as
|
|
7
|
-
import {
|
|
8
|
-
import { property as d, queryAssignedElements as u, customElement as
|
|
5
|
+
import { T as f } from "./tailwind.mixin-jeUK-Doz.js";
|
|
6
|
+
import { S as g } from "./context-5nmahssp.js";
|
|
7
|
+
import { html as p, css as b } from "lit";
|
|
8
|
+
import { property as d, queryAssignedElements as u, customElement as y } from "lit/decorators.js";
|
|
9
9
|
import { when as v } from "lit/directives/when.js";
|
|
10
10
|
import { n as x, e as O } from "./provide-kj6-udep.js";
|
|
11
11
|
var j = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (s, e, o, r) => {
|
|
12
12
|
for (var n, t = r > 1 ? void 0 : r ? w(e, o) : e, a = s.length - 1; a >= 0; a--) (n = s[a]) && (t = (r ? n(e, o, t) : n(t)) || t);
|
|
13
13
|
return r && t && j(e, o, t), t;
|
|
14
14
|
};
|
|
15
|
-
let i = class extends
|
|
16
|
-
:host {
|
|
17
|
-
display: block;
|
|
18
|
-
}
|
|
19
|
-
`) {
|
|
15
|
+
let i = class extends f() {
|
|
20
16
|
constructor() {
|
|
21
17
|
super(...arguments), this.selected = !1;
|
|
22
18
|
}
|
|
@@ -32,20 +28,20 @@ let i = class extends h(m`
|
|
|
32
28
|
});
|
|
33
29
|
}
|
|
34
30
|
render() {
|
|
35
|
-
const s = { "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "w-full min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden": !0, "bg-secondary-container text-secondery-onContainer": this.selected }, e = { "z-0 duration-500 transition-opacity": !0, "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ": !this.readonly };
|
|
36
|
-
return p
|
|
37
|
-
${v(!this.readonly, () => p` <div class="${this.classMap(e)}"></div
|
|
31
|
+
const s = { "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden": !0, "bg-secondary-container text-secondery-onContainer": this.selected }, e = { "z-0 duration-500 transition-opacity": !0, "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ": !this.readonly };
|
|
32
|
+
return p` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(s)}>
|
|
33
|
+
${v(!this.readonly, () => p` <div class="${this.classMap(e)}"></div>`)}
|
|
38
34
|
<slot></slot>
|
|
39
35
|
</li>`;
|
|
40
36
|
}
|
|
41
37
|
};
|
|
42
|
-
l([
|
|
38
|
+
l([h({ context: g, subscribe: !0 }), d()], i.prototype, "variant", 2), l([d({ type: Boolean })], i.prototype, "rounded", 2), l([d({ type: Boolean })], i.prototype, "readonly", 2), l([d({ type: Boolean })], i.prototype, "selected", 2), l([u({ slot: "leading", flatten: !0 })], i.prototype, "leading", 2), l([u({ slot: "trailing", flatten: !0 })], i.prototype, "trailing", 2), i = l([y("schmancy-list-item")], i);
|
|
43
39
|
const $ = x(void 0);
|
|
44
|
-
var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor,
|
|
40
|
+
var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor, m = (s, e, o, r) => {
|
|
45
41
|
for (var n, t = r > 1 ? void 0 : r ? E(e, o) : e, a = s.length - 1; a >= 0; a--) (n = s[a]) && (t = (r ? n(e, o, t) : n(t)) || t);
|
|
46
42
|
return r && t && C(e, o, t), t;
|
|
47
43
|
};
|
|
48
|
-
let c = class extends
|
|
44
|
+
let c = class extends f(b`
|
|
49
45
|
:host {
|
|
50
46
|
display: block;
|
|
51
47
|
padding-top: 8px;
|
|
@@ -62,9 +58,9 @@ let c = class extends h(m`
|
|
|
62
58
|
`;
|
|
63
59
|
}
|
|
64
60
|
};
|
|
65
|
-
|
|
61
|
+
m([O({ context: $ }), d()], c.prototype, "surface", 2), c = m([y("schmancy-list")], c);
|
|
66
62
|
export {
|
|
67
63
|
c as L,
|
|
68
64
|
i as S
|
|
69
65
|
};
|
|
70
|
-
//# sourceMappingURL=list-
|
|
66
|
+
//# sourceMappingURL=list-fbJSJN44.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-fbJSJN44.js","sources":["../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListItem","TailwindElement","constructor","super","arguments","this","selected","imgClasses","leading","forEach","img","classList","add","trailing","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","SchmancySurfaceTypeContext","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","SchmancyListTypeContext","createContext","undefined","List","css","render","surface","provide"],"mappings":";;;;;;;;;;;;;;AAea,IAAAA,IAAN,cAA+BC,EAAAA,EAAAA;AAAAA,EAA/B,cAAAC;AAAAC,aAAAC,SAU2CC,GAAAA,KAAAC,WAAA;AAAA,EAAA;AAAA,EAcjD,IAAcC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WAAA,YAAA,CAMrBN,GAAAA,EAAA,CAJPS,EAAsB,EACtBC,MAAM,WACNC,SAAS,GAAA,CAAA,CAAA,GAdEhC,EAgBJ2B,WAAA,WAAA,CAAA,GAMAN,EAAA,CAJPS,EAAsB,EACtBC,MAAM,YACNC,SAAAA,GApBWhC,CAAAA,CAAAA,GAAAA,EAsBJ2B,WAAA,YAAA,CAAA,GAtBI3B,IAANqB,EAAA,CADNY,EAAc,oBACFjC,CAAAA,GAAAA,CAAAA;ACbA,MAAAkC,IAA0BC,EAA6BC,MAAAA;;;;;ACSvD,IAAAC,IAAN,cAAmBpC,EAAgBqC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;EAiBzC,SAAAC;AACQ,WAAArB;AAAAA,4BACmBb,KAAKmC,OAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAAO;AAAA;AAJvCnB,EAAA,CAFCoB,EAAQ,EAAElB,SAASW,MACnBR,EAdWW,CAAAA,GAAAA,EAeZV,WAAA,WAAA,IAfYU,IAANhB,EAAA,CADNY,EAAc,eAAA,CAAA,GACFI;"}
|
package/dist/list.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-DOnYlCys.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem});
|
|
2
2
|
//# sourceMappingURL=list.cjs.map
|
package/dist/list.js
CHANGED
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-DeXpYHXV.cjs");Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as c, k as n, l as e, m, j as h, n as i, h as s } from "./teleport.component-
|
|
1
|
+
import { i as c, k as n, l as e, m, j as h, n as i, h as s } from "./teleport.component-DRNVI8FU.js";
|
|
2
2
|
export {
|
|
3
3
|
c as SchmancyDrawerAppbar,
|
|
4
4
|
n as SchmancyDrawerNavbarMode,
|
|
@@ -27,21 +27,23 @@
|
|
|
27
27
|
<slot></slot>
|
|
28
28
|
</div>
|
|
29
29
|
`}};w=((t,e,i,n)=>{for(var r,o=n>1?void 0:n?F(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&C(e,i,o),o})([c.customElement("schmancy-sheet-content")],w);var b=(t=>(t.Side="side",t.Bottom="bottom",t.BottomCenter="bottom-center",t.TopRight="top-right",t.BottomRight="bottom-right",t))(b||{});const u="are-you-there-sheet",m="yes-here",p=new class{constructor(){this.bottomSheet=new s.Subject,this.$dismiss=new s.Subject,this.bottomSheet.pipe(s.switchMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(0)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t.uid??t.component.tagName}}))}))])),s.map(([t,e])=>(t||(t=document.createElement("schmancy-sheet"),document.body.appendChild(t)),t.setAttribute("uid",e.uid??e.component.tagName),t.setAttribute("position",e.position??"bottom"),t.setAttribute("allowOverlyDismiss",e.allowOverlyDismiss===!1?"false":"true"),e.title&&t.setAttribute("title",e.title),e.persist&&t.setAttribute("persist",e.persist??!1),e.header&&t.setAttribute("header",e.header),document.body.style.overflow="hidden",{target:e,sheet:t})),s.delay(20),s.filter(({target:t,sheet:e})=>{var i,n;return!t.persist||!((n=(i=e==null?void 0:e.shadowRoot)==null?void 0:i.querySelector("slot"))!=null&&n.assignedElements().find(r=>r.tagName===t.component.tagName))||(e==null||e.setAttribute("open","true"),!1)}),s.tap(({target:t,sheet:e})=>{e==null||e.appendChild(t.component)}),s.delay(1),s.tap(({sheet:t})=>{t==null||t.setAttribute("open","true")}),s.tap(({sheet:t})=>{s.fromEvent(t,"close").pipe(s.take(1)).pipe(s.delay(300)).subscribe(e=>{const i=e.target;i!=null&&i.persist||(i==null||i.remove()),document.body.style.overflow="auto"})})).subscribe(),this.$dismiss.pipe(s.mergeMap(t=>s.forkJoin([s.fromEvent(window,m).pipe(s.takeUntil(s.timer(100)),s.map(e=>e.detail.sheet),s.defaultIfEmpty(void 0)),s.of(t).pipe(s.tap(()=>{window.dispatchEvent(new CustomEvent(u,{detail:{uid:t}}))}))])),s.tap(([t])=>{t==null||t.closeSheet()})).subscribe()}dismiss(t){this.$dismiss.next(t)}open(t){this.bottomSheet.next(t)}};var O=Object.defineProperty,A=Object.getOwnPropertyDescriptor,h=(t,e,i,n)=>{for(var r,o=n>1?void 0:n?A(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(o=(n?r(e,i,o):r(o))||o);return n&&o&&O(e,i,o),o};let l=class extends S.$LitElement(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-duration: .2s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) ease-in-out}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.4;transition:opacity var(--transition-duration) ease-in-out}.content{position:relative;z-index:1;display:flex;flex-direction:column;background:#fff;transition:transform var(--transition-duration) ease-in-out}.content[data-position=side]{height:100%;margin-left:auto;min-width:320px;max-width:90vw}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content-body{flex:1;overflow-y:auto;padding:1rem}"){constructor(){super(...arguments),this.open=!1,this.header="visible",this.position=b.Side,this.persist=!1,this.allowOverlayDismiss=!0,this.title="",this.focusAttribute="autofocus",this.lastFocusedElement=null,this.handleFocusIn=t=>{var e;(e=this.sheet)!=null&&e.contains(t.target)||this.focus()}}onOpenChange(t,e){var i;this.setIsSheetShown(e),e?(this.lastFocusedElement=document.activeElement,this.addFocusTrap(),this.focus()):(this.removeFocusTrap(),(i=this.lastFocusedElement)==null||i.focus(),this.lastFocusedElement=null)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=s.fromEvent(window,"popstate").pipe(s.tap(n=>{n.preventDefault(),this.closeSheet()})),e=s.fromEvent(window,"keyup").pipe(s.tap(n=>{n.key!=="Escape"||this.sheetContainsFocus()||p.dismiss(this.uid)})),i=s.fromEvent(window,u).pipe(s.tap(n=>{n.detail.uid===this.uid&&this.announcePresence()}));s.merge(t,e,i).pipe(s.takeUntil(this.disconnecting)).subscribe()}sheetContainsFocus(){var t;return((t=this.sheet)==null?void 0:t.contains(document.activeElement))??!1}announcePresence(){this.dispatchEvent(new CustomEvent(m,{detail:{sheet:this},bubbles:!0,composed:!0}))}addFocusTrap(){document.addEventListener("focusin",this.handleFocusIn)}removeFocusTrap(){document.removeEventListener("focusin",this.handleFocusIn)}setIsSheetShown(t){var e,i;(e=this.sheet)==null||e.setAttribute("aria-hidden",String(!t)),(i=this.sheet)==null||i.setAttribute("aria-modal",String(t))}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}getFocusElement(){const t=`[${this.focusAttribute}]`;return this.assignedElements.find(e=>e.matches(t)||e.querySelector(t))??null}focus(){var t;(t=this.getFocusElement())==null||t.focus()}render(){return d.html`
|
|
30
|
-
<
|
|
31
|
-
<div class="
|
|
30
|
+
<schmancy-theme>
|
|
31
|
+
<div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden="true" aria-modal="false">
|
|
32
|
+
<div class="overlay" @click=${()=>this.allowOverlayDismiss&&p.dismiss(this.uid)}></div>
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
<schmancy-sheet-content class="content" data-position=${this.position}>
|
|
35
|
+
<schmancy-sheet-header
|
|
36
|
+
@dismiss=${t=>{t.stopPropagation(),p.dismiss(this.uid)}}
|
|
37
|
+
id="sheet-title"
|
|
38
|
+
.hidden=${this.header==="hidden"}
|
|
39
|
+
title=${this.title}
|
|
40
|
+
></schmancy-sheet-header>
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
<section class="content-body">
|
|
43
|
+
<slot></slot>
|
|
44
|
+
</section>
|
|
45
|
+
</schmancy-sheet-content>
|
|
46
|
+
</div>
|
|
47
|
+
</schmancy-theme>
|
|
46
48
|
`}};h([c.property({type:String,reflect:!0})],l.prototype,"uid",2),h([c.property({type:Boolean,reflect:!0})],l.prototype,"open",2),h([c.property({type:String,reflect:!0})],l.prototype,"header",2),h([c.property({type:String,reflect:!0})],l.prototype,"position",2),h([c.property({type:Boolean,reflect:!0})],l.prototype,"persist",2),h([c.property({type:Boolean,reflect:!0})],l.prototype,"allowOverlayDismiss",2),h([c.property({type:String,reflect:!0})],l.prototype,"title",2),h([c.query(".sheet")],l.prototype,"sheet",2),h([c.queryAssignedElements({flatten:!0})],l.prototype,"assignedElements",2),h([c.property()],l.prototype,"focusAttribute",2),h([g("open")],l.prototype,"onOpenChange",1),l=h([c.customElement("schmancy-sheet")],l),exports.SchmancySheetPosition=b,exports.SheetHereMorty=m,exports.SheetWhereAreYouRicky=u,exports.hook=g,exports.sheet=p;
|
|
47
|
-
//# sourceMappingURL=sheet-
|
|
49
|
+
//# sourceMappingURL=sheet-CUTDrhww.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet-DQ6oo0bV.cjs","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t<div class=\"overlay\" @click=${() => this.allowOverlayDismiss && sheet.dismiss(this.uid)}></div>\n\n\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t></schmancy-sheet-header>\n\n\t\t\t\t\t<section class=\"content-body\">\n\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t</section>\n\t\t\t\t</schmancy-sheet-content>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","undefined","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":"icAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,CAAA,CAAA,SACC,MAAMC,EAAU,CACfC,SAAUC,KAAKC,MAAMC,SAAW,EAChCC,SAAUH,KAAKC,MAAMC,OAAS,CAExB,EAAA,OAAAE,EAAAA;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,IACHE,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,e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AA,EAZUoD,EAYRnD,UAAA,iBAAA,CAIZF,EAAAA,EAAA,CADChB,EAAK,SAfcqE,EAgBpBnD,UAAA,eAAA,CAAA,EAhBoBmD,EAArBrD,EAAA,CADCG,EAAAA,cAAc,gBACMkD,CAAAA,EAAAA,CAAAA"}
|
|
1
|
+
{"version":3,"file":"sheet-CUTDrhww.cjs","sources":["../src/sheet/header.ts","../src/sheet/hook.ts","../src/sheet/sheet-content.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css`\n\t:host {\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\tpadding-bottom: 16px;\n\t}\n`) {\n\t@property() title: string\n\trender() {\n\t\tconst classes = {\n\t\t\tabsolute: this.title.length === 0,\n\t\t\trelative: this.title.length > 0,\n\t\t}\n\t\treturn html`\n\t\t\t<schmancy-grid class=\"${this.classMap(classes)}\" align=\"center\" justify=\"stretch\" cols=\"auto 1fr auto\">\n\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">← </span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t\t<schmancy-typography transform=\"capitalize\" type=\"headline\" token=\"lg\"> ${this.title} </schmancy-typography>\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"text-[24px]\">✕</span>\n\t\t\t\t\t</schmancy-button>\n\t\t\t\t</slot>\n\t\t\t</schmancy-grid>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\n\t}\n}\n","// @watch decorator\n//\n// Runs when an observed property changes, e.g. @property or @state, but before the component updates.\n//\n// To wait for an update to complete after a change occurs, use `await this.updateComplete` in the handler. To start\n// watching after the initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.\n//\n// Usage:\n//\n// @watch('propName')\n// handlePropChange(oldValue, newValue) {\n// ...\n// }\n//\ninterface WatchOptions {\n waitUntilFirstUpdate?: boolean\n}\n\nexport function hook(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps)\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName)\n const newValue = this[propName]\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue)\n }\n }\n }\n }\n }\n}\n","import { TailwindElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-content')\nexport default class SchmancySheetContent extends TailwindElement() {\n\trender() {\n\t\treturn html`\n\t\t\t<div tabindex=\"0\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t`\n\t}\n}\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-content': SchmancySheetContent\n\t}\n}\n","import {\n\tdefaultIfEmpty,\n\tdelay,\n\tfilter,\n\tforkJoin,\n\tfromEvent,\n\tmap,\n\tmergeMap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttakeUntil,\n\ttap,\n\ttimer,\n} from 'rxjs'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n\t/**\n\t * @deprecated use bottom instead\n\t */\n\tBottomCenter = 'bottom-center',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tTopRight = 'top-right',\n\t/**\n\t * @deprecated use side instead\n\t */\n\tBottomRight = 'bottom-right',\n}\n\ntype BottomSheeetTarget = {\n\tcomponent: HTMLElement\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tallowOverlyDismiss?: boolean\n\ttitle?: string\n\theader?: 'hidden' | 'visible'\n}\n\n// Events for communication between bottom-sheet component and bottom-sheet.service\nexport type SheetWhereAreYouRickyEvent = CustomEvent<{\n\tuid: string\n}>\nexport const SheetWhereAreYouRicky = 'are-you-there-sheet'\n\nexport type SheetHereMortyEvent = CustomEvent<{\n\tsheet: SchmancySheet\n}>\nexport const SheetHereMorty = 'yes-here'\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\tconstructor() {\n\t\tthis.bottomSheet\n\t\t\t.pipe(\n\t\t\t\tswitchMap(target =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(0)),\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(target).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent(SheetWhereAreYouRicky, {\n\t\t\t\t\t\t\t\t\t\tdetail: { uid: target.uid ?? target.component.tagName },\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\tmap(([sheet, target]) => {\n\t\t\t\t\tconsole.log(sheet, target)\n\t\t\t\t\tif (!sheet) {\n\t\t\t\t\t\t// if sheet is not found, create it\n\t\t\t\t\t\tsheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\tdocument.body.appendChild(sheet)\n\t\t\t\t\t}\n\t\t\t\t\tsheet.setAttribute('uid', target.uid ?? target.component.tagName)\n\t\t\t\t\tsheet.setAttribute('position', target.position ?? SchmancySheetPosition.Bottom)\n\t\t\t\t\tsheet.setAttribute('allowOverlyDismiss', target.allowOverlyDismiss === false ? 'false' : 'true')\n\t\t\t\t\ttarget.title && sheet.setAttribute('title', target.title)\n\t\t\t\t\ttarget.persist && sheet.setAttribute('persist', target.persist ?? false)\n\t\t\t\t\ttarget.header && sheet.setAttribute('header', target.header)\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t\treturn { target, sheet }\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\tfilter(({ target, sheet }) => {\n\t\t\t\t\t// if the sheet has already the component, just show it\n\t\t\t\t\tif (\n\t\t\t\t\t\ttarget.persist &&\n\t\t\t\t\t\tsheet?.shadowRoot\n\t\t\t\t\t\t\t?.querySelector('slot')\n\t\t\t\t\t\t\t?.assignedElements()\n\t\t\t\t\t\t\t.find(e => e.tagName === target.component.tagName)\n\t\t\t\t\t) {\n\t\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t\t\treturn false\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true // if the sheet does not have the component, continue to the next step\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\tsheet?.appendChild(target.component)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\t\t\t\t}),\n\t\t\t\ttap(({ sheet }) => {\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1))\n\t\t\t\t\t\t.pipe(delay(300))\n\t\t\t\t\t\t.subscribe(e => {\n\t\t\t\t\t\t\tconst target = e.target as SchmancySheet\n\t\t\t\t\t\t\tconsole.log(target)\n\n\t\t\t\t\t\t\tif (!target?.persist) target?.remove()\n\t\t\t\t\t\t\tdocument.body.style.overflow = 'auto' // unlock the scroll of the host\n\t\t\t\t\t\t})\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\n\t\tthis.$dismiss\n\t\t\t.pipe(\n\t\t\t\tmergeMap(uid =>\n\t\t\t\t\tforkJoin([\n\t\t\t\t\t\tfromEvent<SheetHereMortyEvent>(window, SheetHereMorty).pipe(\n\t\t\t\t\t\t\ttakeUntil(timer(100)), // Some people say why 10? I say why not?\n\t\t\t\t\t\t\tmap(e => e.detail.sheet),\n\t\t\t\t\t\t\tdefaultIfEmpty(undefined),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tof(uid).pipe(\n\t\t\t\t\t\t\ttap(() => {\n\t\t\t\t\t\t\t\twindow.dispatchEvent(new CustomEvent(SheetWhereAreYouRicky, { detail: { uid } }))\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t),\n\t\t\t\t\t]),\n\t\t\t\t),\n\t\t\t\ttap(([sheet]) => {\n\t\t\t\t\tsheet?.closeSheet()\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n}\nexport const sheet = new BottomSheetService()\n","import { $LitElement } from '@mixins/index'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap } from 'rxjs'\nimport { hook } from './hook'\nimport style from './sheet.scss?inline'\nimport {\n\tSchmancySheetPosition,\n\tSheetHereMorty,\n\tSheetWhereAreYouRicky,\n\tSheetWhereAreYouRickyEvent,\n\tsheet,\n} from './sheet.service'\n\n@customElement('schmancy-sheet')\nexport default class SchmancySheet extends $LitElement(style) {\n\t@property({ type: String, reflect: true }) uid!: string\n\t@property({ type: Boolean, reflect: true }) open = false\n\t@property({ type: String, reflect: true }) header: 'hidden' | 'visible' = 'visible'\n\t@property({ type: String, reflect: true }) position: SchmancySheetPosition = SchmancySheetPosition.Side\n\t@property({ type: Boolean, reflect: true }) persist = false\n\t@property({ type: Boolean, reflect: true }) allowOverlayDismiss = true\n\t@property({ type: String, reflect: true }) title = ''\n\n\t@query('.sheet') private sheet!: HTMLElement\n\t@queryAssignedElements({ flatten: true }) private assignedElements!: HTMLElement[]\n\n\t@property() focusAttribute = 'autofocus'\n\tprivate lastFocusedElement: HTMLElement | null = null\n\n\t@hook('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\n\t\tthis.setIsSheetShown(newValue)\n\n\t\tif (newValue) {\n\t\t\tthis.lastFocusedElement = document.activeElement as HTMLElement\n\t\t\tthis.addFocusTrap()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.removeFocusTrap()\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tthis.setupEventListeners()\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.disconnecting.next(true)\n\t}\n\n\tprivate setupEventListeners() {\n\t\t// Handle browser back button\n\t\tconst popState$ = fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\ttap(e => {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\t// Handle ESC key\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus()) {\n\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\n\t\t// Handle inter-component communication\n\t\tconst rickyComm$ = fromEvent<SheetWhereAreYouRickyEvent>(window, SheetWhereAreYouRicky).pipe(\n\t\t\ttap(e => {\n\t\t\t\tif (e.detail.uid === this.uid) this.announcePresence()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, rickyComm$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate sheetContainsFocus(): boolean {\n\t\treturn this.sheet?.contains(document.activeElement) ?? false\n\t}\n\n\tprivate announcePresence() {\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent(SheetHereMorty, {\n\t\t\t\tdetail: { sheet: this },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate addFocusTrap() {\n\t\tdocument.addEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate removeFocusTrap() {\n\t\tdocument.removeEventListener('focusin', this.handleFocusIn)\n\t}\n\n\tprivate handleFocusIn = (e: Event) => {\n\t\tif (!this.sheet?.contains(e.target as Node)) {\n\t\t\tthis.focus()\n\t\t}\n\t}\n\n\tsetIsSheetShown(isShown: boolean) {\n\t\tthis.sheet?.setAttribute('aria-hidden', String(!isShown))\n\t\tthis.sheet?.setAttribute('aria-modal', String(isShown))\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\tprivate getFocusElement(): HTMLElement | null {\n\t\tconst selector = `[${this.focusAttribute}]`\n\t\treturn (this.assignedElements.find(el => el.matches(selector) || el.querySelector(selector)) as HTMLElement) ?? null\n\t}\n\n\toverride focus() {\n\t\tthis.getFocusElement()?.focus()\n\t}\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-theme>\n\t\t\t\t<div class=\"sheet\" role=\"dialog\" aria-labelledby=\"sheet-title\" aria-hidden=\"true\" aria-modal=\"false\">\n\t\t\t\t\t<div class=\"overlay\" @click=${() => this.allowOverlayDismiss && sheet.dismiss(this.uid)}></div>\n\n\t\t\t\t\t<schmancy-sheet-content class=\"content\" data-position=${this.position}>\n\t\t\t\t\t\t<schmancy-sheet-header\n\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t.hidden=${this.header === 'hidden'}\n\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t></schmancy-sheet-header>\n\n\t\t\t\t\t\t<section class=\"content-body\">\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</schmancy-sheet-content>\n\t\t\t\t</div>\n\t\t\t</schmancy-theme>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet': SchmancySheet\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","classes","absolute","this","title","length","relative","html","classMap","dispatchEvent","CustomEvent","bubbles","composed","hook","propName","options","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","newValue","hasUpdated","__decorateClass","property","prototype","customElement","SchmancySheetContent","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","undefined","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","position","allowOverlyDismiss","persist","header","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","take","subscribe","remove","mergeMap","closeSheet","next","SchmancySheet","$LitElement","super","arguments","open","Side","allowOverlayDismiss","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","setIsSheetShown","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","event","key","sheetContainsFocus","dismiss","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","String","selector","el","matches","getFocusElement","stopPropagation","type","reflect","Boolean","query","queryAssignedElements","flatten"],"mappings":"icAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAQhE,CAAA,CAAA,SACC,MAAMC,EAAU,CACfC,SAAUC,KAAKC,MAAMC,SAAW,EAChCC,SAAUH,KAAKC,MAAMC,OAAS,CAExB,EAAA,OAAAE,EAAAA;AAAAA,2BACkBJ,KAAKK,SAASP,CAAAA,CAAAA;AAAAA;AAAAA;AAAAA,eAG1B,IACHE,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8EAMuET,KAAKC,KAAAA;AAAAA;AAAAA;AAAAA,eAGpE,IACHD,CAAAA,KAAAM,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GACA,CAAA,EC1BS,SAAAC,EAAKC,EAAkBC,GAC9B,MAAA,CAACC,EAAwBC,IACxB,CAAA,KAAA,CAAAC,WAAEA,CAA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-color-surface
|
|
|
160
160
|
}
|
|
161
161
|
render() {
|
|
162
162
|
return g`
|
|
163
|
-
<
|
|
164
|
-
<div class="
|
|
163
|
+
<schmancy-theme>
|
|
164
|
+
<div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden="true" aria-modal="false">
|
|
165
|
+
<div class="overlay" @click=${() => this.allowOverlayDismiss && y.dismiss(this.uid)}></div>
|
|
165
166
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
<schmancy-sheet-content class="content" data-position=${this.position}>
|
|
168
|
+
<schmancy-sheet-header
|
|
169
|
+
@dismiss=${(t) => {
|
|
169
170
|
t.stopPropagation(), y.dismiss(this.uid);
|
|
170
171
|
}}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
id="sheet-title"
|
|
173
|
+
.hidden=${this.header === "hidden"}
|
|
174
|
+
title=${this.title}
|
|
175
|
+
></schmancy-sheet-header>
|
|
175
176
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
<section class="content-body">
|
|
178
|
+
<slot></slot>
|
|
179
|
+
</section>
|
|
180
|
+
</schmancy-sheet-content>
|
|
181
|
+
</div>
|
|
182
|
+
</schmancy-theme>
|
|
181
183
|
`;
|
|
182
184
|
}
|
|
183
185
|
};
|
|
@@ -189,4 +191,4 @@ export {
|
|
|
189
191
|
R as h,
|
|
190
192
|
y as s
|
|
191
193
|
};
|
|
192
|
-
//# sourceMappingURL=sheet-
|
|
194
|
+
//# sourceMappingURL=sheet-DQxsDc4a.js.map
|