@mhmo91/schmancy 0.2.117 → 0.2.118

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/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./teleport.component-CHl-4cYz.cjs");
1
+ "use strict";require("./teleport.component-DElxiimP.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./teleport.component-MPE8PARx.js";
1
+ import "./teleport.component-Cf9BZUyf.js";
2
2
  //# sourceMappingURL=card.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CHl-4cYz.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-DElxiimP.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
@@ -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-MPE8PARx.js";
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-Cf9BZUyf.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-C2EvhDmf.cjs");const r=require("./area.component-X-1ZwgJL.cjs");require("./autocomplete-BIJ9G0y1.cjs"),require("./spinner-DVEN9TFJ.cjs");const o=require("./icon-button-BefimCfp.cjs"),e=require("./teleport.component-CHl-4cYz.cjs"),b=require("./checkbox-BkGLOzBe.cjs");require("./chips-B4X5PxUQ.cjs");const l=require("./payment-card-form-Cm_-ul4G.cjs");require("./date-range-CCsKoZUV.cjs");const y=require("./delay-ttYmIqo7.cjs"),p=require("./color-D8r6dpWm.cjs"),m=require("./ripple-B_wT0zgD.cjs");require("./divider-2AVp1yWB.cjs");const S=require("./timezone-FYjFkh4S.cjs");require("./form-DPRTjp4Q.cjs"),require("./icon-BfUZ5ZBV.cjs"),require("./input-CqYkuOF4.cjs");const t=require("./flex-CfGGWirm.cjs"),c=require("./list-C78nnFIZ.cjs");require("./menu-DqLKbEXx.cjs");const a=require("./outlet-mNvq9oaA.cjs");require("./option-BaOmCXP8.cjs");const d=require("./radio-group-RChAvIUM.cjs"),f=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const g=require("./select-Gbo-xjwq.cjs"),n=require("./sheet-CrlIJTBl.cjs"),h=require("./slider-rumGp8Bz.cjs"),u=require("./surface-CZayNjQ8.cjs");require("./table-BzJFv5qf.cjs"),require("./tabs-group-BWmuXV1M.cjs"),require("./textarea-DtP4CN8S.cjs");const i=require("./theme.component-Df85q2pE.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-XUBpRyVd.cjs");const O=require("./tree-k_BipeY0.cjs"),s=require("./types.cjs"),w=require("./typewriter-B3B8JBRl.cjs"),P=require("./typography-Cs7PQACq.cjs"),D=require("./intersection-CVvaDv96.cjs"),C=require("./input-Dq3dT_7p.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,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,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:()=>b.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>l.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=p.color,exports.fullHeight=m.fullHeight,exports.ripple=m.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>S.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>S.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>c.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>c.SchmancyListItem}),exports.SchmancyListTypeContext=c.SchmancyListTypeContext,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:()=>d.RadioGroup}),exports.mutationObserver=f.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>g.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.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:()=>u.SchmancySurface}),exports.SchmancySurfaceTypeContext=u.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>O.SchmancyTree}),exports.SchmancyEvents=s.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>w.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>P.SchmancyTypography}),exports.intersection$=D.intersection$,Object.defineProperty(exports,"SchForm",{enumerable:!0,get:()=>C.SchForm});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-C2EvhDmf.cjs");const r=require("./area.component-X-1ZwgJL.cjs");require("./autocomplete-BIJ9G0y1.cjs"),require("./spinner-DVEN9TFJ.cjs");const o=require("./icon-button-BefimCfp.cjs"),e=require("./teleport.component-DElxiimP.cjs"),b=require("./checkbox-BkGLOzBe.cjs");require("./chips-B4X5PxUQ.cjs");const l=require("./payment-card-form-Cm_-ul4G.cjs");require("./date-range-CCsKoZUV.cjs");const y=require("./delay-ttYmIqo7.cjs"),p=require("./color-D8r6dpWm.cjs"),m=require("./ripple-B_wT0zgD.cjs");require("./divider-2AVp1yWB.cjs");const S=require("./timezone-FYjFkh4S.cjs");require("./form-DPRTjp4Q.cjs"),require("./icon-BfUZ5ZBV.cjs"),require("./input-CqYkuOF4.cjs");const t=require("./flex-CfGGWirm.cjs"),c=require("./list-C78nnFIZ.cjs");require("./menu-DqLKbEXx.cjs");const a=require("./outlet-mNvq9oaA.cjs");require("./option-BaOmCXP8.cjs");const d=require("./radio-group-RChAvIUM.cjs"),f=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const g=require("./select-Gbo-xjwq.cjs"),n=require("./sheet-OQg2AgBP.cjs"),h=require("./slider-rumGp8Bz.cjs"),u=require("./surface-CZayNjQ8.cjs");require("./table-BzJFv5qf.cjs"),require("./tabs-group-BWmuXV1M.cjs"),require("./textarea-DtP4CN8S.cjs");const i=require("./theme.component-Df85q2pE.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-XUBpRyVd.cjs");const O=require("./tree-k_BipeY0.cjs"),s=require("./types.cjs"),w=require("./typewriter-B3B8JBRl.cjs"),P=require("./typography-Cs7PQACq.cjs"),D=require("./intersection-CVvaDv96.cjs"),C=require("./input-Dq3dT_7p.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,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,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:()=>b.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>l.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=p.color,exports.fullHeight=m.fullHeight,exports.ripple=m.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>S.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>S.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>c.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>c.SchmancyListItem}),exports.SchmancyListTypeContext=c.SchmancyListTypeContext,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:()=>d.RadioGroup}),exports.mutationObserver=f.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>g.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.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:()=>u.SchmancySurface}),exports.SchmancySurfaceTypeContext=u.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>O.SchmancyTree}),exports.SchmancyEvents=s.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>w.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>P.SchmancyTypography}),exports.intersection$=D.intersection$,Object.defineProperty(exports,"SchForm",{enumerable:!0,get:()=>C.SchForm});
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { F as C, H as T, b as d, S as u, a as b, r as N } from "./area.component
3
3
  import "./autocomplete-C_QyhPJw.js";
4
4
  import "./spinner-C3JUT7Lx.js";
5
5
  import { S as R, a as v } from "./icon-button-OidywZ1U.js";
6
- import { $ as M, H as g, e as E, b as F, f as A, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as z, W as K, s as V, h as q, t as J } from "./teleport.component-MPE8PARx.js";
6
+ import { $ as M, H as g, e as E, b as F, f as A, c as Y, d as $, g as k, S as G, a as L, i as O, k as W, l as _, m as B, j as P, n as j, o as z, W as K, s as V, h as q, t as J } from "./teleport.component-Cf9BZUyf.js";
7
7
  import { S as U } from "./checkbox-CTRhgYJB.js";
8
8
  import "./chips-DjX_Zznh.js";
9
9
  import { S as Z } from "./payment-card-form-DHmtfa_H.js";
@@ -26,7 +26,7 @@ import { mutationObserver as va } from "./rxjs-utils.js";
26
26
  import "rxjs";
27
27
  import "./index-CuY8m6ta.js";
28
28
  import { S as Ma } from "./select-CHXdCR-t.js";
29
- import { S as Ea, b as Fa, a as Aa, s as Ya } from "./sheet-CHFWbG_0.js";
29
+ import { S as Ea, b as Fa, a as Aa, s as Ya } from "./sheet-DcDDkPRG.js";
30
30
  import { S as ka, a as Ga } from "./slider-njrfDqrk.js";
31
31
  import { a as Oa, S as Wa } from "./surface-BpQasVOW.js";
32
32
  import "./table-CWRqwAtQ.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CHl-4cYz.cjs");exports.$drawer=e.$drawer,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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-DElxiimP.cjs");exports.$drawer=e.$drawer,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
@@ -1,4 +1,4 @@
1
- import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-MPE8PARx.js";
1
+ import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-Cf9BZUyf.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -1,15 +1,15 @@
1
- import { Subject as S, switchMap as $, forkJoin as E, fromEvent as l, of as x, takeUntil as b, timer as A, map as m, defaultIfEmpty as k, tap as c, delay as y, filter as L, take as D, mergeMap as P, merge as j } from "rxjs";
1
+ import { Subject as E, switchMap as O, forkJoin as x, fromEvent as p, of as b, takeUntil as f, timer as k, map as m, defaultIfEmpty as A, tap as c, delay as y, filter as P, take as F, mergeMap as j, merge as B } from "rxjs";
2
2
  import "lit/directives/class-map.js";
3
3
  import "lit/directives/style-map.js";
4
- import { T as U } from "./tailwind.mixin-C2MUeArS.js";
5
- import { css as B, html as f } from "lit";
6
- import { customElement as F, property as h, query as z, queryAssignedElements as I } from "lit/decorators.js";
7
- import { $ as N } from "./litElement.mixin-B1ZP2iG4.js";
8
- import { when as T } from "lit/directives/when.js";
9
- var q = Object.getOwnPropertyDescriptor;
10
- let C = class extends U(B``) {
4
+ import { T as H } from "./tailwind.mixin-C2MUeArS.js";
5
+ import { css as T, html as g } from "lit";
6
+ import { customElement as $, property as h, query as U, queryAssignedElements as z } from "lit/decorators.js";
7
+ import { $ as D } from "./litElement.mixin-B1ZP2iG4.js";
8
+ import { when as I } from "lit/directives/when.js";
9
+ var N = Object.getOwnPropertyDescriptor;
10
+ let C = class extends H(T``) {
11
11
  render() {
12
- return f`
12
+ return g`
13
13
  <sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
14
14
  <div class="block md:hidden flex-1 justify-start items-start">
15
15
  <slot name="back">
@@ -39,22 +39,22 @@ let C = class extends U(B``) {
39
39
  }
40
40
  };
41
41
  C = ((t, e, s, i) => {
42
- for (var r, o = i > 1 ? void 0 : i ? q(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = r(o) || o);
42
+ for (var r, o = i > 1 ? void 0 : i ? N(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = r(o) || o);
43
43
  return o;
44
- })([F("schmancy-sheet-header")], C);
45
- var O = ((t) => (t.Side = "side", t.Bottom = "bottom", t.BottomCenter = "bottom-center", t.TopRight = "top-right", t.BottomRight = "bottom-right", t))(O || {});
46
- const g = "are-you-there-sheet", w = "yes-here", v = new class {
44
+ })([$("schmancy-sheet-header")], C);
45
+ var L = ((t) => (t.Side = "side", t.Bottom = "bottom", t.BottomCenter = "bottom-center", t.TopRight = "top-right", t.BottomRight = "bottom-right", t))(L || {});
46
+ const w = "are-you-there-sheet", S = "yes-here", v = new class {
47
47
  constructor() {
48
- this.bottomSheet = new S(), this.$dismiss = new S(), this.activeSheets = /* @__PURE__ */ new Set(), this.popStateListenerActive = !1, this.setupSheetOpeningLogic(), this.setupSheetDismissLogic(), this.setupPopStateListener();
48
+ this.bottomSheet = new E(), this.$dismiss = new E(), this.activeSheets = /* @__PURE__ */ new Set(), this.popStateListenerActive = !1, this.setupSheetOpeningLogic(), this.setupSheetDismissLogic(), this.setupPopStateListener();
49
49
  }
50
50
  setupSheetOpeningLogic() {
51
- this.bottomSheet.pipe($((t) => E([l(window, w).pipe(b(A(100)), m((e) => e.detail.sheet), k(void 0)), x(t).pipe(c(() => {
52
- window.dispatchEvent(new CustomEvent(g, { detail: { uid: t.uid ?? t.component.tagName } }));
51
+ this.bottomSheet.pipe(O((t) => x([p(window, S).pipe(f(k(100)), m((e) => e.detail.sheet), A(void 0)), b(t).pipe(c(() => {
52
+ window.dispatchEvent(new CustomEvent(w, { detail: { uid: t.uid ?? t.component.tagName } }));
53
53
  }))])), m(([t, e]) => {
54
- t || (t = document.createElement("schmancy-sheet"), document.body.appendChild(t)), t.setAttribute("uid", e.uid ?? e.component.tagName);
54
+ t || (t = document.createElement("schmancy-sheet"), document.body.appendChild(t)), t.setAttribute("uid", e.uid ?? e.component.tagName), e.lock && t.setAttribute("lock", "true");
55
55
  const s = e.position || (window.innerWidth >= 768 ? "side" : "bottom");
56
- return t.setAttribute("position", s), t.setAttribute("allowOverlyDismiss", e.allowOverlyDismiss === !1 ? "false" : "true"), e.title && t.setAttribute("title", e.title), e.persist && t.setAttribute("persist", e.persist.toString()), e.header && t.setAttribute("header", e.header), document.body.style.overflow = "hidden", { target: e, sheet: t };
57
- }), y(20), L(({ target: t, sheet: e }) => {
56
+ return t.setAttribute("position", s), e.title && t.setAttribute("title", e.title), e.persist && t.setAttribute("persist", e.persist ?? !1), e.header && t.setAttribute("header", e.header), e.handleHistory !== void 0 && t.setAttribute("handleHistory", String(e.handleHistory)), document.body.style.overflow = "hidden", { target: e, sheet: t };
57
+ }), y(20), P(({ target: t, sheet: e }) => {
58
58
  var s, i;
59
59
  return !t.persist || !((i = (s = e == null ? void 0 : e.shadowRoot) == null ? void 0 : s.querySelector("slot")) != null && i.assignedElements().find((r) => r.tagName === t.component.tagName)) || (e == null || e.setAttribute("open", "true"), !1);
60
60
  }), c(({ target: t, sheet: e }) => {
@@ -67,21 +67,21 @@ const g = "are-you-there-sheet", w = "yes-here", v = new class {
67
67
  history.pushState(i, "", window.location.href);
68
68
  }
69
69
  }), c(({ sheet: t }) => {
70
- l(t, "close").pipe(D(1)).pipe(y(300)).subscribe((e) => {
70
+ p(t, "close").pipe(F(1)).pipe(y(300)).subscribe((e) => {
71
71
  const s = e.target, i = s.getAttribute("uid");
72
72
  i && this.activeSheets.delete(i), s != null && s.persist || (s == null || s.remove()), document.body.style.overflow = "auto";
73
73
  });
74
74
  })).subscribe();
75
75
  }
76
76
  setupSheetDismissLogic() {
77
- this.$dismiss.pipe(P((t) => E([l(window, w).pipe(b(A(100)), m((e) => e.detail.sheet), k(void 0)), x(t).pipe(c(() => {
78
- window.dispatchEvent(new CustomEvent(g, { detail: { uid: t } }));
77
+ this.$dismiss.pipe(j((t) => x([p(window, S).pipe(f(k(100)), m((e) => e.detail.sheet), A(void 0)), b(t).pipe(c(() => {
78
+ window.dispatchEvent(new CustomEvent(w, { detail: { uid: t } }));
79
79
  }))])), c(([t, e]) => {
80
80
  t && (t.closeSheet(), this.activeSheets.delete(e));
81
81
  })).subscribe();
82
82
  }
83
83
  setupPopStateListener() {
84
- this.popStateListenerActive || (l(window, "popstate").subscribe((t) => {
84
+ this.popStateListenerActive || (p(window, "popstate").subscribe((t) => {
85
85
  if (this.activeSheets.size > 0) {
86
86
  const e = Array.from(this.activeSheets).pop();
87
87
  e && (this.dismiss(e), t.state && t.state.schmancySheet && history.pushState({}, "", window.location.href));
@@ -103,13 +103,13 @@ const g = "are-you-there-sheet", w = "yes-here", v = new class {
103
103
  });
104
104
  }
105
105
  }();
106
- var R = Object.defineProperty, M = Object.getOwnPropertyDescriptor, a = (t, e, s, i) => {
107
- for (var r, o = i > 1 ? void 0 : i ? M(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = (i ? r(e, s, o) : r(o)) || o);
108
- return i && o && R(e, s, o), o;
106
+ var q = Object.defineProperty, R = Object.getOwnPropertyDescriptor, a = (t, e, s, i) => {
107
+ for (var r, o = i > 1 ? void 0 : i ? R(e, s) : e, d = t.length - 1; d >= 0; d--) (r = t[d]) && (o = (i ? r(e, s, o) : r(o)) || o);
108
+ return i && o && q(e, s, o), o;
109
109
  };
110
- let n = class extends N(':host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-duration: .2s;--transition-timing: ease-in-out;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}[data-position=bottom]:before{content:"";position:absolute;top:8px;left:50%;transform:translate(-50%);width:36px;height:4px;background-color:var(--schmancy-sys-color-surface-onVariant);opacity:.3;border-radius:2px;z-index:10}') {
110
+ let n = class extends D(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-timing: cubic-bezier(.16, 1, .3, 1);--transition-duration: .25s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}") {
111
111
  constructor() {
112
- super(...arguments), this.open = !1, this.header = "visible", this.position = O.Side, this.persist = !1, this.allowOverlayDismiss = !0, this.title = "", this.focusAttribute = "autofocus", this.lastFocusedElement = null, this.handleFocusIn = (t) => {
112
+ super(...arguments), this.open = !1, this.header = "visible", this.position = L.Side, this.persist = !1, this.lock = !1, this.handleHistory = !0, this.title = "", this.focusAttribute = "autofocus", this.lastFocusedElement = null, this.handleFocusIn = (t) => {
113
113
  var e;
114
114
  (e = this.sheet) != null && e.contains(t.target) || this.focus();
115
115
  };
@@ -125,19 +125,21 @@ let n = class extends N(':host{--overlay-color: var(--schmancy-sys-color-surface
125
125
  super.disconnectedCallback(), this.disconnecting.next(!0);
126
126
  }
127
127
  setupEventListeners() {
128
- const t = l(window, "keyup").pipe(c((s) => {
129
- s.key !== "Escape" || this.sheetContainsFocus() || this.uid && v.dismiss(this.uid);
130
- })), e = l(window, g).pipe(c((s) => {
131
- s.detail.uid === this.uid && this.announcePresence();
128
+ const t = this.handleHistory ? p(window, "popstate").pipe(c((i) => {
129
+ i.preventDefault(), this.closeSheet();
130
+ })) : b(null).pipe(F(0)), e = p(window, "keyup").pipe(c((i) => {
131
+ i.key !== "Escape" || this.sheetContainsFocus() || this.lock || v.dismiss(this.uid);
132
+ })), s = p(window, w).pipe(c((i) => {
133
+ i.detail.uid === this.uid && this.announcePresence();
132
134
  }));
133
- j(t, e).pipe(b(this.disconnecting)).subscribe();
135
+ B(t, e, s).pipe(f(this.disconnecting)).subscribe();
134
136
  }
135
137
  sheetContainsFocus() {
136
138
  var t;
137
139
  return ((t = this.sheet) == null ? void 0 : t.contains(document.activeElement)) ?? !1;
138
140
  }
139
141
  announcePresence() {
140
- this.dispatchEvent(new CustomEvent(w, { detail: { sheet: this }, bubbles: !0, composed: !0 }));
142
+ this.dispatchEvent(new CustomEvent(S, { detail: { sheet: this }, bubbles: !0, composed: !0 }));
141
143
  }
142
144
  addFocusTrap() {
143
145
  document.addEventListener("focusin", this.handleFocusIn);
@@ -161,12 +163,12 @@ let n = class extends N(':host{--overlay-color: var(--schmancy-sys-color-surface
161
163
  (t = this.getFocusElement()) == null || t.focus();
162
164
  }
163
165
  render() {
164
- return f`
166
+ return g`
165
167
  <div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden=${!this.open} aria-modal=${this.open}>
166
168
  <div
167
169
  class="overlay"
168
170
  @click=${(t) => {
169
- t.stopPropagation(), this.allowOverlayDismiss && v.dismiss(this.uid);
171
+ t.stopPropagation(), this.lock || v.dismiss(this.uid);
170
172
  }}
171
173
  ></div>
172
174
  <schmancy-grid
@@ -174,7 +176,7 @@ let n = class extends N(':host{--overlay-color: var(--schmancy-sys-color-surface
174
176
  class="content w-full"
175
177
  data-position=${this.position}
176
178
  >
177
- ${T(this.header !== "hidden", () => f`<schmancy-sheet-header
179
+ ${I(this.header !== "hidden", () => g`<schmancy-sheet-header
178
180
  class="sticky top-0 z-50 w-full"
179
181
  @dismiss=${(t) => {
180
182
  t.stopPropagation(), v.dismiss(this.uid);
@@ -191,20 +193,20 @@ let n = class extends N(':host{--overlay-color: var(--schmancy-sys-color-surface
191
193
  `;
192
194
  }
193
195
  };
194
- var u, p;
195
- a([h({ type: String, reflect: !0 })], n.prototype, "uid", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "open", 2), a([h({ type: String, reflect: !0 })], n.prototype, "header", 2), a([h({ type: String, reflect: !0 })], n.prototype, "position", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "persist", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "allowOverlayDismiss", 2), a([h({ type: String, reflect: !0 })], n.prototype, "title", 2), a([z(".sheet")], n.prototype, "sheet", 2), a([I({ flatten: !0 })], n.prototype, "assignedElements", 2), a([h()], n.prototype, "focusAttribute", 2), a([(u = "open", (t, e) => {
196
+ var u, l;
197
+ a([h({ type: String, reflect: !0 })], n.prototype, "uid", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "open", 2), a([h({ type: String, reflect: !0 })], n.prototype, "header", 2), a([h({ type: String, reflect: !0 })], n.prototype, "position", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "persist", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "lock", 2), a([h({ type: Boolean, reflect: !0 })], n.prototype, "handleHistory", 2), a([h({ type: String, reflect: !0 })], n.prototype, "title", 2), a([U(".sheet")], n.prototype, "sheet", 2), a([z({ flatten: !0 })], n.prototype, "assignedElements", 2), a([h()], n.prototype, "focusAttribute", 2), a([(u = "open", (t, e) => {
196
198
  const { willUpdate: s } = t;
197
- p = Object.assign({ waitUntilFirstUpdate: !1 }, p), t.willUpdate = function(i) {
199
+ l = Object.assign({ waitUntilFirstUpdate: !1 }, l), t.willUpdate = function(i) {
198
200
  if (s.call(this, i), i.has(u)) {
199
201
  const r = i.get(u), o = this[u];
200
- r !== o && (p != null && p.waitUntilFirstUpdate && !this.hasUpdated || this[e].call(this, r, o));
202
+ r !== o && (l != null && l.waitUntilFirstUpdate && !this.hasUpdated || this[e].call(this, r, o));
201
203
  }
202
204
  };
203
- })], n.prototype, "onOpenChange", 1), n = a([F("schmancy-sheet")], n);
205
+ })], n.prototype, "onOpenChange", 1), n = a([$("schmancy-sheet")], n);
204
206
  export {
205
- O as S,
206
- g as a,
207
- w as b,
207
+ L as S,
208
+ w as a,
209
+ S as b,
208
210
  v as s
209
211
  };
210
- //# sourceMappingURL=sheet-CHFWbG_0.js.map
212
+ //# sourceMappingURL=sheet-DcDDkPRG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-DcDDkPRG.js","sources":["../src/sheet/header.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\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\tlock?: boolean // Controls both ESC and overlay click dismissal\n\thandleHistory?: boolean // Controls browser back button behavior\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'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets by uid\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\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(100)),\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\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\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\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\n\t\t\t\t\t// Handle history logic if the property exists\n\t\t\t\t\tif (target.handleHistory !== undefined) {\n\t\t\t\t\t\tsheet.setAttribute('handleHistory', String(target.handleHistory))\n\t\t\t\t\t}\n\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(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = target.uid ?? target.component.tagName\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Handle history integration - default to true if not specified\n\t\t\t\t\tconst shouldHandleHistory = target.handleHistory !== false\n\n\t\t\t\t\tif (shouldHandleHistory) {\n\t\t\t\t\t\t// Use history state to track this specific sheet\n\t\t\t\t\t\tconst historyState = {\n\t\t\t\t\t\t\tschmancySheet: true,\n\t\t\t\t\t\t\tuid: uid,\n\t\t\t\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Push a new history state\n\t\t\t\t\t\thistory.pushState(historyState, '', window.location.href)\n\t\t\t\t\t}\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\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tconst uid = target.getAttribute('uid')\n\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t}\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\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\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)),\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, uid]) => {\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\tsheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid\n\t */\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\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 { when } from 'lit/directives/when.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } 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 }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = 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@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\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 - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - respect allowOverlayDismiss\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\t// Only handle ESC key dismissal if allowOverlayDismiss is true\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus() && !this.lock) {\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=${!this.open} aria-modal=${this.open}>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (!this.lock) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.header !== 'hidden',\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\thtml`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`,\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\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","// @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\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","render","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","lock","position","innerWidth","title","persist","header","handleHistory","String","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","add","historyState","schmancySheet","timestamp","Date","now","history","pushState","location","href","take","subscribe","getAttribute","delete","remove","mergeMap","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","next","has","forEach","SchmancySheet","$LitElement","super","arguments","open","Side","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","newValue","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","key","sheetContainsFocus","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","getFocusElement","selector","el","matches","stopPropagation","when","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","query","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","oldValue","get","hasUpdated"],"mappings":";;;;;;;;;AAKA,IAAqBA,IAArB,cAAiDC,EAAgBC;EAChE,SAAAC;AACQ,WAAAC;AAAAA;AAAAA;A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AAA,CAIZJ,GAAAA,EAAA,ECfkBF,IDcd,QCbG,CAACW,GAAwBC,MAAAA;AACzB,UAAAC,YAAEA,EAAAA,IAAeF;AAEvBV,EAAAA,IAAUa,OAAOC,OAAO,EAAEC,sBAAAA,MAA+Bf,CAEvCU,GAAAA,EAAAE,aAAa,SAAUI,GAAAA;AAGpC,QAFOJ,EAAAK,KAAK5I,MAAM2I,CAElBA,GAAAA,EAAaxD,IAAIuC,CAAW,GAAA;AACzB,YAAAmB,IAAWF,EAAaG,IAAIpB,CAC5BzB,GAAAA,IAAWjG,KAAK0H,CAElBmB;AAAAA,MAAAA,MAAa5C,MACX0B,KAAAA,QAAAA,EAASe,wBAAAA,CAAwB1I,KAAK+I,cAC1C/I,KAAKsI,GAAMM,KAAK5I,MAAM6I,GAAU5C,CAElC;AAAA,IAAA;AAAA,EAEF;AAAA,EDrBmBZ,GAAAA,EAiBpB2C,WAAA,gBAAA,CAAA,GAjBoB3C,IAArBuC,EAAA,CADCvH,EAAc,gBACMgF,CAAAA,GAAAA,CAAAA;"}
@@ -0,0 +1,47 @@
1
+ "use strict";const i=require("rxjs");require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const g=require("./tailwind.mixin-UzdLTEsN.cjs"),m=require("lit"),h=require("lit/decorators.js"),w=require("./litElement.mixin-DGx3SrGX.cjs"),S=require("lit/directives/when.js");var E=Object.getOwnPropertyDescriptor;let b=class extends g.TailwindElement(m.css``){render(){return m.html`
2
+ <sch-flex class="absolute top-0 left-0 md:left-[unset] md:right-0">
3
+ <div class="block md:hidden flex-1 justify-start items-start">
4
+ <slot name="back">
5
+ <schmancy-button
6
+ @click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
7
+ >
8
+ <span class="text-[24px]">&#8592; </span>
9
+ </schmancy-button>
10
+ </slot>
11
+ </div>
12
+
13
+ <div class="hidden md:block flex-1 justify-end items-end">
14
+ <slot name="actions">
15
+ <schmancy-icon-button
16
+ @click=${()=>{this.dispatchEvent(new CustomEvent("dismiss",{bubbles:!0,composed:!0}))}}
17
+ >
18
+ close
19
+ </schmancy-icon-button>
20
+ </slot>
21
+ </div>
22
+ </sch-flex>
23
+ `}};b=((t,e,s,o)=>{for(var c,n=o>1?void 0:o?E(e,s):e,d=t.length-1;d>=0;d--)(c=t[d])&&(n=c(n)||n);return n})([h.customElement("schmancy-sheet-header")],b);var f=(t=>(t.Side="side",t.Bottom="bottom",t.BottomCenter="bottom-center",t.TopRight="top-right",t.BottomRight="bottom-right",t))(f||{});const y="are-you-there-sheet",v="yes-here",u=new class{constructor(){this.bottomSheet=new i.Subject,this.$dismiss=new i.Subject,this.activeSheets=new Set,this.popStateListenerActive=!1,this.setupSheetOpeningLogic(),this.setupSheetDismissLogic(),this.setupPopStateListener()}setupSheetOpeningLogic(){this.bottomSheet.pipe(i.switchMap(t=>i.forkJoin([i.fromEvent(window,v).pipe(i.takeUntil(i.timer(100)),i.map(e=>e.detail.sheet),i.defaultIfEmpty(void 0)),i.of(t).pipe(i.tap(()=>{window.dispatchEvent(new CustomEvent(y,{detail:{uid:t.uid??t.component.tagName}}))}))])),i.map(([t,e])=>{t||(t=document.createElement("schmancy-sheet"),document.body.appendChild(t)),t.setAttribute("uid",e.uid??e.component.tagName),e.lock&&t.setAttribute("lock","true");const s=e.position||(window.innerWidth>=768?"side":"bottom");return t.setAttribute("position",s),e.title&&t.setAttribute("title",e.title),e.persist&&t.setAttribute("persist",e.persist??!1),e.header&&t.setAttribute("header",e.header),e.handleHistory!==void 0&&t.setAttribute("handleHistory",String(e.handleHistory)),document.body.style.overflow="hidden",{target:e,sheet:t}}),i.delay(20),i.filter(({target:t,sheet:e})=>{var s,o;return!t.persist||!((o=(s=e==null?void 0:e.shadowRoot)==null?void 0:s.querySelector("slot"))!=null&&o.assignedElements().find(c=>c.tagName===t.component.tagName))||(e==null||e.setAttribute("open","true"),!1)}),i.tap(({target:t,sheet:e})=>{e==null||e.appendChild(t.component)}),i.delay(1),i.tap(({target:t,sheet:e})=>{e==null||e.setAttribute("open","true");const s=t.uid??t.component.tagName;if(this.activeSheets.add(s),t.handleHistory!==!1){const o={schmancySheet:!0,uid:s,timestamp:Date.now()};history.pushState(o,"",window.location.href)}}),i.tap(({sheet:t})=>{i.fromEvent(t,"close").pipe(i.take(1)).pipe(i.delay(300)).subscribe(e=>{const s=e.target,o=s.getAttribute("uid");o&&this.activeSheets.delete(o),s!=null&&s.persist||(s==null||s.remove()),document.body.style.overflow="auto"})})).subscribe()}setupSheetDismissLogic(){this.$dismiss.pipe(i.mergeMap(t=>i.forkJoin([i.fromEvent(window,v).pipe(i.takeUntil(i.timer(100)),i.map(e=>e.detail.sheet),i.defaultIfEmpty(void 0)),i.of(t).pipe(i.tap(()=>{window.dispatchEvent(new CustomEvent(y,{detail:{uid:t}}))}))])),i.tap(([t,e])=>{t&&(t.closeSheet(),this.activeSheets.delete(e))})).subscribe()}setupPopStateListener(){this.popStateListenerActive||(i.fromEvent(window,"popstate").subscribe(t=>{if(this.activeSheets.size>0){const e=Array.from(this.activeSheets).pop();e&&(this.dismiss(e),t.state&&t.state.schmancySheet&&history.pushState({},"",window.location.href))}}),this.popStateListenerActive=!0)}dismiss(t){this.$dismiss.next(t)}open(t){this.bottomSheet.next(t)}isOpen(t){return this.activeSheets.has(t)}closeAll(){Array.from(this.activeSheets).forEach(t=>{this.dismiss(t)})}};var k=Object.defineProperty,x=Object.getOwnPropertyDescriptor,a=(t,e,s,o)=>{for(var c,n=o>1?void 0:o?x(e,s):e,d=t.length-1;d>=0;d--)(c=t[d])&&(n=(o?c(e,s,n):c(n))||n);return o&&n&&k(e,s,n),n};let r=class extends w.$LitElement(":host{--overlay-color: var(--schmancy-sys-color-surface-dim);--transition-timing: cubic-bezier(.16, 1, .3, 1);--transition-duration: .25s;--sheet-radius: 0;--max-height: 100vh}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;display:flex;visibility:visible;transition:visibility var(--transition-duration) var(--transition-timing)}.sheet[aria-hidden=true]{visibility:hidden;pointer-events:none}.sheet[aria-hidden=true] .content{transform:translateY(100%)}.sheet[aria-hidden=true] .content[data-position=side]{transform:translate(100%)}.sheet[aria-hidden=true] .overlay{opacity:0}.overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--overlay-color);opacity:.8;transition:opacity var(--transition-duration) var(--transition-timing)}.content{z-index:1;transition:transform var(--transition-duration) var(--transition-timing);overflow:hidden}.content[data-position=side]{height:100vh;height:100%;min-width:320px;max-width:90vw;width:fit-content;margin-left:auto}.content[data-position=side] #body{max-height:100vh}.content[data-position=bottom]{width:100%;margin-top:auto;border-radius:16px 16px 0 0;max-height:90vh}.content[data-position=bottom] #body{max-height:90vh}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}"){constructor(){super(...arguments),this.open=!1,this.header="visible",this.position=f.Side,this.persist=!1,this.lock=!1,this.handleHistory=!0,this.title="",this.focusAttribute="autofocus",this.lastFocusedElement=null,this.handleFocusIn=t=>{var e;(e=this.sheet)!=null&&e.contains(t.target)||this.focus()}}onOpenChange(t,e){var s;e?(this.lastFocusedElement=document.activeElement,this.addFocusTrap(),this.focus()):(this.removeFocusTrap(),(s=this.lastFocusedElement)==null||s.focus(),this.lastFocusedElement=null)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=this.handleHistory?i.fromEvent(window,"popstate").pipe(i.tap(o=>{o.preventDefault(),this.closeSheet()})):i.of(null).pipe(i.take(0)),e=i.fromEvent(window,"keyup").pipe(i.tap(o=>{o.key!=="Escape"||this.sheetContainsFocus()||this.lock||u.dismiss(this.uid)})),s=i.fromEvent(window,y).pipe(i.tap(o=>{o.detail.uid===this.uid&&this.announcePresence()}));i.merge(t,e,s).pipe(i.takeUntil(this.disconnecting)).subscribe()}sheetContainsFocus(){var t;return((t=this.sheet)==null?void 0:t.contains(document.activeElement))??!1}announcePresence(){this.dispatchEvent(new CustomEvent(v,{detail:{sheet:this},bubbles:!0,composed:!0}))}addFocusTrap(){document.addEventListener("focusin",this.handleFocusIn)}removeFocusTrap(){document.removeEventListener("focusin",this.handleFocusIn)}setIsSheetShown(t){var e,s;(e=this.sheet)==null||e.setAttribute("aria-hidden",String(!t)),(s=this.sheet)==null||s.setAttribute("aria-modal",String(t))}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}getFocusElement(){const t=`[${this.focusAttribute}]`;return this.assignedElements.find(e=>e.matches(t)||e.querySelector(t))??null}focus(){var t;(t=this.getFocusElement())==null||t.focus()}render(){return m.html`
24
+ <div class="sheet" role="dialog" aria-labelledby="sheet-title" aria-hidden=${!this.open} aria-modal=${this.open}>
25
+ <div
26
+ class="overlay"
27
+ @click=${t=>{t.stopPropagation(),this.lock||u.dismiss(this.uid)}}
28
+ ></div>
29
+ <schmancy-grid
30
+ rows=${this.header==="hidden"?"1fr":"auto 1fr"}
31
+ class="content w-full"
32
+ data-position=${this.position}
33
+ >
34
+ ${S.when(this.header!=="hidden",()=>m.html`<schmancy-sheet-header
35
+ class="sticky top-0 z-50 w-full"
36
+ @dismiss=${t=>{t.stopPropagation(),u.dismiss(this.uid)}}
37
+ id="sheet-title"
38
+ title=${this.title}
39
+ ></schmancy-sheet-header>`)}
40
+
41
+ <schmancy-surface rounded="left" fill="all" id="body" class="overflow-auto" type="surface">
42
+ <schmancy-scroll> <slot></slot></schmancy-scroll>
43
+ </schmancy-surface>
44
+ </schmancy-grid>
45
+ </div>
46
+ `}};var l,p;a([h.property({type:String,reflect:!0})],r.prototype,"uid",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"open",2),a([h.property({type:String,reflect:!0})],r.prototype,"header",2),a([h.property({type:String,reflect:!0})],r.prototype,"position",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"persist",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"lock",2),a([h.property({type:Boolean,reflect:!0})],r.prototype,"handleHistory",2),a([h.property({type:String,reflect:!0})],r.prototype,"title",2),a([h.query(".sheet")],r.prototype,"sheet",2),a([h.queryAssignedElements({flatten:!0})],r.prototype,"assignedElements",2),a([h.property()],r.prototype,"focusAttribute",2),a([(l="open",(t,e)=>{const{willUpdate:s}=t;p=Object.assign({waitUntilFirstUpdate:!1},p),t.willUpdate=function(o){if(s.call(this,o),o.has(l)){const c=o.get(l),n=this[l];c!==n&&(p!=null&&p.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,c,n))}}})],r.prototype,"onOpenChange",1),r=a([h.customElement("schmancy-sheet")],r),exports.SchmancySheetPosition=f,exports.SheetHereMorty=v,exports.SheetWhereAreYouRicky=y,exports.sheet=u;
47
+ //# sourceMappingURL=sheet-OQg2AgBP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet-OQg2AgBP.cjs","sources":["../src/sheet/header.ts","../src/sheet/sheet.service.ts","../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/index'\nimport { css, html } from 'lit'\nimport { customElement } from 'lit/decorators.js'\n\n@customElement('schmancy-sheet-header')\nexport default class SchmancySheetHeader extends TailwindElement(css``) {\n\trender() {\n\t\treturn html`\n\t\t\t<sch-flex class=\"absolute top-0 left-0 md:left-[unset] md:right-0\">\n\t\t\t\t<div class=\"block md:hidden flex-1 justify-start items-start\">\n\t\t\t\t\t<slot name=\"back\">\n\t\t\t\t\t\t<schmancy-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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\t\t<span class=\"text-[24px]\">&#8592; </span>\n\t\t\t\t\t\t</schmancy-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"hidden md:block flex-1 justify-end items-end\">\n\t\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t\t<schmancy-icon-button\n\t\t\t\t\t\t\t@click=${() => {\n\t\t\t\t\t\t\t\tthis.dispatchEvent(\n\t\t\t\t\t\t\t\t\tnew CustomEvent('dismiss', {\n\t\t\t\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\t\t\t\tcomposed: true,\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\t\tclose\n\t\t\t\t\t\t</schmancy-icon-button>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</sch-flex>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-sheet-header': SchmancySheetHeader\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\tlock?: boolean // Controls both ESC and overlay click dismissal\n\thandleHistory?: boolean // Controls browser back button behavior\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'\n\n// Function to determine the position based on screen size\nconst getPosition = (): SchmancySheetPosition => {\n\treturn window.innerWidth >= 768 ? SchmancySheetPosition.Side : SchmancySheetPosition.Bottom // Adjust 768 as needed for your breakpoint\n}\n\nclass BottomSheetService {\n\tbottomSheet = new Subject<BottomSheeetTarget>()\n\t$dismiss = new Subject<string>()\n\t// Track currently open sheets by uid\n\tprivate activeSheets = new Set<string>()\n\t// To track if we've set up the popstate listener\n\tprivate popStateListenerActive = false\n\n\tconstructor() {\n\t\tthis.setupSheetOpeningLogic()\n\t\tthis.setupSheetDismissLogic()\n\t\tthis.setupPopStateListener()\n\t}\n\n\t/**\n\t * Sets up the main sheet opening logic\n\t */\n\tprivate setupSheetOpeningLogic() {\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(100)),\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\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\n\t\t\t\t\ttarget.lock && sheet.setAttribute('lock', 'true')\n\n\t\t\t\t\t// Use the dynamic position function here\n\t\t\t\t\tconst position = target.position || getPosition()\n\t\t\t\t\tsheet.setAttribute('position', position)\n\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\n\t\t\t\t\t// Handle history logic if the property exists\n\t\t\t\t\tif (target.handleHistory !== undefined) {\n\t\t\t\t\t\tsheet.setAttribute('handleHistory', String(target.handleHistory))\n\t\t\t\t\t}\n\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(({ target, sheet }) => {\n\t\t\t\t\tsheet?.setAttribute('open', 'true')\n\n\t\t\t\t\t// Add to active sheets tracking\n\t\t\t\t\tconst uid = target.uid ?? target.component.tagName\n\t\t\t\t\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Handle history integration - default to true if not specified\n\t\t\t\t\tconst shouldHandleHistory = target.handleHistory !== false\n\n\t\t\t\t\tif (shouldHandleHistory) {\n\t\t\t\t\t\t// Use history state to track this specific sheet\n\t\t\t\t\t\tconst historyState = {\n\t\t\t\t\t\t\tschmancySheet: true,\n\t\t\t\t\t\t\tuid: uid,\n\t\t\t\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Push a new history state\n\t\t\t\t\t\thistory.pushState(historyState, '', window.location.href)\n\t\t\t\t\t}\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\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tconst uid = target.getAttribute('uid')\n\t\t\t\t\t\t\tif (uid) {\n\t\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t\t\t}\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\t}\n\n\t/**\n\t * Sets up the sheet closing/dismissal logic\n\t */\n\tprivate setupSheetDismissLogic() {\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)),\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, uid]) => {\n\t\t\t\t\tif (sheet) {\n\t\t\t\t\t\tsheet.closeSheet()\n\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe()\n\t}\n\n\t/**\n\t * Sets up the popstate listener to handle browser back button\n\t */\n\tprivate setupPopStateListener() {\n\t\tif (this.popStateListenerActive) return\n\n\t\tfromEvent<PopStateEvent>(window, 'popstate').subscribe(event => {\n\t\t\t// If we have active sheets, close the most recently opened one\n\t\t\tif (this.activeSheets.size > 0) {\n\t\t\t\tconst lastSheet = Array.from(this.activeSheets).pop()\n\t\t\t\tif (lastSheet) {\n\t\t\t\t\tthis.dismiss(lastSheet)\n\n\t\t\t\t\t// Prevent default navigation behavior by pushing a new state\n\t\t\t\t\t// This effectively cancels out the back navigation\n\t\t\t\t\tif (event.state && event.state.schmancySheet) {\n\t\t\t\t\t\thistory.pushState({}, '', window.location.href)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tthis.popStateListenerActive = true\n\t}\n\n\t/**\n\t * Dismiss a sheet by uid\n\t */\n\tdismiss(uid: string) {\n\t\tthis.$dismiss.next(uid)\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Check if a sheet is currently open by uid\n\t */\n\tisOpen(uid: string): boolean {\n\t\treturn this.activeSheets.has(uid)\n\t}\n\n\t/**\n\t * Close all open sheets\n\t */\n\tcloseAll() {\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\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 { when } from 'lit/directives/when.js'\nimport { fromEvent, merge, of, take, takeUntil, tap } from 'rxjs'\nimport { on } 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 }) lock = false\n\t@property({ type: Boolean, reflect: true }) handleHistory = 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@on('open')\n\tonOpenChange(_oldValue: boolean, newValue: boolean) {\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 - only if handleHistory is true\n\t\tconst popState$ = this.handleHistory\n\t\t\t? fromEvent<PopStateEvent>(window, 'popstate').pipe(\n\t\t\t\t\ttap(e => {\n\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\tthis.closeSheet()\n\t\t\t\t\t}),\n\t\t\t\t)\n\t\t\t: of(null).pipe(take(0)) // Empty observable if handleHistory is false\n\n\t\t// Handle ESC key - respect allowOverlayDismiss\n\t\tconst keyUp$ = fromEvent<KeyboardEvent>(window, 'keyup').pipe(\n\t\t\ttap(event => {\n\t\t\t\t// Only handle ESC key dismissal if allowOverlayDismiss is true\n\t\t\t\tif (event.key === 'Escape' && !this.sheetContainsFocus() && !this.lock) {\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=${!this.open} aria-modal=${this.open}>\n\t\t\t\t<div\n\t\t\t\t\tclass=\"overlay\"\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\tif (!this.lock) sheet.dismiss(this.uid)\n\t\t\t\t\t}}\n\t\t\t\t></div>\n\t\t\t\t<schmancy-grid\n\t\t\t\t\trows=${this.header === 'hidden' ? '1fr' : 'auto 1fr'}\n\t\t\t\t\tclass=\"content w-full\"\n\t\t\t\t\tdata-position=${this.position}\n\t\t\t\t>\n\t\t\t\t\t${when(\n\t\t\t\t\t\tthis.header !== 'hidden',\n\t\t\t\t\t\t() =>\n\t\t\t\t\t\t\thtml`<schmancy-sheet-header\n\t\t\t\t\t\t\t\tclass=\"sticky top-0 z-50 w-full\"\n\t\t\t\t\t\t\t\t@dismiss=${(e: CustomEvent) => {\n\t\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\t\tsheet.dismiss(this.uid)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tid=\"sheet-title\"\n\t\t\t\t\t\t\t\ttitle=${this.title}\n\t\t\t\t\t\t\t></schmancy-sheet-header>`,\n\t\t\t\t\t)}\n\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll> <slot></slot></schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</schmancy-grid>\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","// @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\twaitUntilFirstUpdate?: boolean\n}\n\nexport function on(propName: string, options?: WatchOptions) {\n\treturn (protoOrDescriptor: any, name: string): any => {\n\t\tconst { willUpdate } = protoOrDescriptor\n\n\t\toptions = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions\n\n\t\tprotoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n\t\t\twillUpdate.call(this, changedProps)\n\n\t\t\tif (changedProps.has(propName)) {\n\t\t\t\tconst oldValue = changedProps.get(propName)\n\t\t\t\tconst newValue = this[propName]\n\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tif (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n\t\t\t\t\t\tthis[name].call(this, oldValue, newValue)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],"names":["SchmancySheetHeader","TailwindElement","css","html","this","dispatchEvent","CustomEvent","bubbles","composed","customElement","SchmancySheetPosition","SheetWhereAreYouRicky","SheetHereMorty","sheet","bottomSheet","Subject","$dismiss","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupSheetDismissLogic","setupPopStateListener","pipe","switchMap","forkJoin","fromEvent","window","takeUntil","timer","map","e","detail","defaultIfEmpty","of","target","tap","uid","component","tagName","document","createElement","body","appendChild","setAttribute","lock","position","innerWidth","title","persist","header","handleHistory","String","style","overflow","delay","filter","shadowRoot","querySelector","assignedElements","find","add","historyState","schmancySheet","timestamp","Date","now","history","pushState","location","href","take","subscribe","getAttribute","delete","remove","mergeMap","closeSheet","event","size","lastSheet","Array","from","pop","dismiss","state","next","has","forEach","SchmancySheet","$LitElement","super","arguments","open","Side","focusAttribute","lastFocusedElement","handleFocusIn","contains","focus","_oldValue","newValue","activeElement","addFocusTrap","removeFocusTrap","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","popState$","preventDefault","keyUp$","key","sheetContainsFocus","rickyComm$","announcePresence","merge","addEventListener","removeEventListener","isShown","getFocusElement","selector","el","matches","render","stopPropagation","when","propName","options","__decorateClass","property","type","reflect","prototype","Boolean","query","queryAssignedElements","flatten","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","oldValue","get","hasUpdated"],"mappings":"2UAKA,IAAqBA,EAArB,cAAiDC,EAAAA,gBAAgBC,EAAAA,KAAA,CAAA,CAChE,QACQ,CAAA,OAAAC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,gBAKO,IACHC,CAAAA,KAAAC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAWQ,IACHJ,CAAAA,KAAAC,cACJ,IAAIC,YAAY,UAAW,CAC1BC,QAAAA,GACAC,SAAAA,EAEF,CAAA,CAAA,CAAA,CAAA;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I,CAAMM,EAAAA,KAAK7I,KAAM8I,EAAU7C,GAElC,CAEF,CAAA,IDrBmBZ,EAiBpB4C,UAAA,eAAA,CAjBoB5C,EAAAA,EAArBwC,EAAA,CADCxH,EAAAA,cAAc,mBACMgF"}
package/dist/sheet.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sheet-CrlIJTBl.cjs");exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.SheetHereMorty=e.SheetHereMorty,exports.SheetWhereAreYouRicky=e.SheetWhereAreYouRicky,exports.sheet=e.sheet;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sheet-OQg2AgBP.cjs");exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.SheetHereMorty=e.SheetHereMorty,exports.SheetWhereAreYouRicky=e.SheetWhereAreYouRicky,exports.sheet=e.sheet;
2
2
  //# sourceMappingURL=sheet.cjs.map
package/dist/sheet.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as t, b as a, a as h, s as o } from "./sheet-CHFWbG_0.js";
1
+ import { S as t, b as a, a as h, s as o } from "./sheet-DcDDkPRG.js";
2
2
  export {
3
3
  t as SchmancySheetPosition,
4
4
  a as SheetHereMorty,
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CHl-4cYz.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-DElxiimP.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
2
2
  //# sourceMappingURL=teleport.cjs.map
@@ -35,7 +35,7 @@ import "./option-DleJMgj-.js";
35
35
  import "./radio-group-CSKgiPxL.js";
36
36
  import "./index-CuY8m6ta.js";
37
37
  import "./select-CHXdCR-t.js";
38
- import { s as G } from "./sheet-CHFWbG_0.js";
38
+ import { s as G } from "./sheet-DcDDkPRG.js";
39
39
  import "./slider-njrfDqrk.js";
40
40
  import "./surface-BpQasVOW.js";
41
41
  import "./table-CWRqwAtQ.js";
@@ -530,4 +530,4 @@ export {
530
530
  Ge as s,
531
531
  H as t
532
532
  };
533
- //# sourceMappingURL=teleport.component-MPE8PARx.js.map
533
+ //# sourceMappingURL=teleport.component-Cf9BZUyf.js.map