@mhmo91/schmancy 0.6.11 → 0.6.13
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/{avatar-DN5ByP6H.js → avatar-CCwr3pAC.js} +4 -4
- package/dist/{avatar-DN5ByP6H.js.map → avatar-CCwr3pAC.js.map} +1 -1
- package/dist/{avatar-DJjqUQu5.cjs → avatar-D8kuLXpu.cjs} +2 -2
- package/dist/{avatar-DJjqUQu5.cjs.map → avatar-D8kuLXpu.cjs.map} +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{email-recipients-Dbu8EA5N.cjs → email-recipients-BRSQsglN.cjs} +2 -2
- package/dist/{email-recipients-Dbu8EA5N.cjs.map → email-recipients-BRSQsglN.cjs.map} +1 -1
- package/dist/{email-recipients-DB_Z223_.js → email-recipients-M_Id-4uD.js} +2 -2
- package/dist/{email-recipients-DB_Z223_.js.map → email-recipients-M_Id-4uD.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/mailbox.cjs +1 -1
- package/dist/mailbox.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/navigation-bar.cjs +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/sheet-BH4evGq6.cjs +15 -0
- package/dist/sheet-BH4evGq6.cjs.map +1 -0
- package/dist/{sheet-CweUW9zg.js → sheet-D74r4jeP.js} +36 -34
- package/dist/sheet-D74r4jeP.js.map +1 -0
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/sheet.service-Bn-Ea0gS.js +66 -0
- package/dist/sheet.service-Bn-Ea0gS.js.map +1 -0
- package/dist/sheet.service-CdcwIejg.cjs +2 -0
- package/dist/sheet.service-CdcwIejg.cjs.map +1 -0
- package/dist/teleport.cjs +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/src/sheet/sheet.service.d.ts +0 -5
- package/dist/sheet-BqykDP7x.cjs +0 -15
- package/dist/sheet-BqykDP7x.cjs.map +0 -1
- package/dist/sheet-CweUW9zg.js.map +0 -1
- package/dist/sheet.service-ByStIhOq.js +0 -71
- package/dist/sheet.service-ByStIhOq.js.map +0 -1
- package/dist/sheet.service-Dk3CVgtW.cjs +0 -2
- package/dist/sheet.service-Dk3CVgtW.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-D4VX-d9R.cjs");const n=require("./area.component-Dy_bNCum.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-BQTNgzWU.cjs");const r=require("./avatar-DJjqUQu5.cjs"),N=require("./boat-C_tZIBSz.cjs");require("./spinner-nEBRJu36.cjs");const p=require("./icon-button-oBh0tLNe.cjs");require("./media-CyPm58zF.cjs");const A=require("./checkbox-DjaUfANf.cjs"),i=require("./suggestion-chip-HRnLGmOl.cjs"),x=require("./input-chip-BVmNlWuq.cjs"),l=require("./code-preview-WyZg7w_7.cjs"),E=require("./payment-card-form-QlR9k4BD.cjs"),g=require("./date-range-CmKmNOnp.cjs"),B=require("./date-range-inline-DjC2j9SN.cjs"),d=require("./delay-UxAcUuZu.cjs"),F=require("./details-BxeylMkN.cjs"),h=require("./dialog-content-CN7O3ZVZ.cjs"),s=require("./dialog-service-Bdaxn2t0.cjs"),u=require("./ripple-DqQrvaTe.cjs"),H=require("lit/directives/guard.js"),f=require("./discovery.service-BpGCuXPd.cjs");require("./divider-CVwVe6Gj.cjs");const C=require("./dropdown-content-CLMuMtcs.cjs"),P=require("./timezone-C9yeppAo.cjs");require("./form-BpVLzotp.cjs"),require("./icon-D9KDm0_c.cjs");const O=require("./input-D7w4ndXi.cjs"),m=require("./flex-Bmct0fDD.cjs"),b=require("./list-D-dsHFWw.cjs"),o=require("./email-recipients-Dbu8EA5N.cjs"),L=require("./map-p0Ds9nkV.cjs");require("./menu-LDhTIPWk.cjs");const j=require("./navigation-rail-D-BOM8gm.cjs"),y=require("./notification-service-CI3DgEy_.cjs"),D=require("./notify-B4IuXbge.cjs");require("./option-BanGLIfi.cjs"),require("./progress-CiDHs_md.cjs");const q=require("./radio-button-DflI0Xw0.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const z=require("./select-CQbsbS_s.cjs"),T=require("./sheet.service-Dk3CVgtW.cjs");require("./sheet-BqykDP7x.cjs");const w=require("./slider-CGKeX2gT.cjs"),S=require("./schmancy-steps-container-CQqY3dOG.cjs"),a=require("./context-create-CA907mdD.cjs"),e=require("./selector-hook-BWMY8npH.cjs"),I=require("./surface-4lHxccmh.cjs"),R=require("./table-BMMEyi9V.cjs");require("./tabs-compatibility-BifVBxsm.cjs"),require("./textarea-8WnHuPcI.cjs");const Y=require("./theme.interface-BMeNadVb.cjs"),c=require("./theme-controller-boat-BoQZXtXm.cjs"),v=require("./theme.events-Car6U_SQ.cjs");require("./theme-button-DD6odcW3.cjs");const M=require("./tooltip-DEAW7vHx.cjs"),G=require("./tree-x4n8_wjx.cjs"),$=require("./types.cjs"),k=require("./typewriter-CMrJs0Xu.cjs"),K=require("./typography-DQd9Sd2x.cjs"),W=require("./intersection-CVvaDv96.cjs"),_=require("./number-B7aCRYnH.cjs"),Q=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>n.SchmancyRoute}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>p.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>p.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>A.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>x.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>l.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>l.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>l.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>g.SchmancyDateRange}),exports.validateInitialDateRange=g.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>B.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>F.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>h.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>h.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>h.SchmancyDialogContent}),exports.$dialog=s.$dialog,exports.DialogService=s.DialogService,exports.color=u.color,exports.fullHeight=u.fullHeight,exports.ripple=u.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>H.guard}),exports.discoverAnyComponent=f.discoverAnyComponent,exports.discoverComponent=f.discoverComponent,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>P.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>P.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>O.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>O.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>m.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>m.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>m.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>m.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>b.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>b.SchmancyListItem}),exports.SchmancyListTypeContext=b.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>o.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>o.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>o.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>o.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>o.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>L.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=y.$notify,exports.NotificationAudioService=y.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>y.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>z.SchmancySelect}),exports.SchmancySheetPosition=T.SchmancySheetPosition,exports.sheet=T.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createArrayContext=a.createArrayContext,exports.createContext=a.createContext,exports.createStorageManager=a.createStorageManager,exports.createTestArrayContext=a.createTestArrayContext,exports.compareValues=e.compareValues,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),exports.SchmancyTheme=Y.SchmancyTheme,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>c.SchmancyThemeComponent}),Object.defineProperty(exports,"SchmancyThemeController",{enumerable:!0,get:()=>c.SchmancyThemeController}),Object.defineProperty(exports,"SchmancyThemeControllerBoat",{enumerable:!0,get:()=>c.SchmancyThemeControllerBoat}),exports.createDarkTonalPaletteFromBaseColor=c.createDarkTonalPaletteFromBaseColor,exports.createLightTonalPaletteFromBaseColor=c.createLightTonalPaletteFromBaseColor,exports.formateTheme=c.formateTheme,exports.schmancyTheme=c.schmancyTheme,exports.tailwindStyles=c.tailwindStyles,exports.theme=c.theme,exports.themeContext=c.themeContext,exports.ThemeHereIAm=v.ThemeHereIAm,exports.ThemeWhereAreYou=v.ThemeWhereAreYou,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>G.SchmancyTree}),exports.SchmancyEvents=$.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>k.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>K.SchmancyTypography}),exports.intersection$=W.intersection$,exports.Numbers=_.Numbers,exports.similarity=Q.similarity;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-D4VX-d9R.cjs");const n=require("./area.component-Dy_bNCum.cjs"),t=require("./utils-C38P63L6.cjs");require("./autocomplete-BQTNgzWU.cjs");const r=require("./avatar-D8kuLXpu.cjs"),N=require("./boat-C_tZIBSz.cjs");require("./spinner-nEBRJu36.cjs");const p=require("./icon-button-oBh0tLNe.cjs");require("./media-CyPm58zF.cjs");const A=require("./checkbox-DjaUfANf.cjs"),i=require("./suggestion-chip-HRnLGmOl.cjs"),x=require("./input-chip-BVmNlWuq.cjs"),l=require("./code-preview-WyZg7w_7.cjs"),E=require("./payment-card-form-QlR9k4BD.cjs"),g=require("./date-range-CmKmNOnp.cjs"),B=require("./date-range-inline-DjC2j9SN.cjs"),d=require("./delay-UxAcUuZu.cjs"),F=require("./details-BxeylMkN.cjs"),h=require("./dialog-content-CN7O3ZVZ.cjs"),s=require("./dialog-service-Bdaxn2t0.cjs"),u=require("./ripple-DqQrvaTe.cjs"),H=require("lit/directives/guard.js"),f=require("./discovery.service-BpGCuXPd.cjs");require("./divider-CVwVe6Gj.cjs");const C=require("./dropdown-content-CLMuMtcs.cjs"),P=require("./timezone-C9yeppAo.cjs");require("./form-BpVLzotp.cjs"),require("./icon-D9KDm0_c.cjs");const O=require("./input-D7w4ndXi.cjs"),m=require("./flex-Bmct0fDD.cjs"),b=require("./list-D-dsHFWw.cjs"),o=require("./email-recipients-BRSQsglN.cjs"),L=require("./map-p0Ds9nkV.cjs");require("./menu-LDhTIPWk.cjs");const j=require("./navigation-rail-D-BOM8gm.cjs"),y=require("./notification-service-CI3DgEy_.cjs"),D=require("./notify-B4IuXbge.cjs");require("./option-BanGLIfi.cjs"),require("./progress-CiDHs_md.cjs");const q=require("./radio-button-DflI0Xw0.cjs"),V=require("./rxjs-utils.cjs");require("rxjs"),require("./index-CCi1otmh.cjs");const z=require("./select-CQbsbS_s.cjs"),T=require("./sheet.service-CdcwIejg.cjs");require("./sheet-BH4evGq6.cjs");const w=require("./slider-CGKeX2gT.cjs"),S=require("./schmancy-steps-container-CQqY3dOG.cjs"),a=require("./context-create-CA907mdD.cjs"),e=require("./selector-hook-BWMY8npH.cjs"),I=require("./surface-4lHxccmh.cjs"),R=require("./table-BMMEyi9V.cjs");require("./tabs-compatibility-BifVBxsm.cjs"),require("./textarea-8WnHuPcI.cjs");const Y=require("./theme.interface-BMeNadVb.cjs"),c=require("./theme-controller-boat-BoQZXtXm.cjs"),v=require("./theme.events-Car6U_SQ.cjs");require("./theme-button-DD6odcW3.cjs");const M=require("./tooltip-DEAW7vHx.cjs"),G=require("./tree-x4n8_wjx.cjs"),$=require("./types.cjs"),k=require("./typewriter-CMrJs0Xu.cjs"),K=require("./typography-DQd9Sd2x.cjs"),W=require("./intersection-CVvaDv96.cjs"),_=require("./number-B7aCRYnH.cjs"),Q=require("./search-DWW8IoOp.cjs");exports.FINDING_MORTIES=n.FINDING_MORTIES,exports.HERE_RICKY=n.HERE_RICKY,exports.HISTORY_STRATEGY=n.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>n.SchmancyArea}),Object.defineProperty(exports,"SchmancyRoute",{enumerable:!0,get:()=>n.SchmancyRoute}),exports.area=n.area,exports.routerHistory=n.routerHistory,exports.buildQueryString=t.buildQueryString,exports.compareActiveRoutes=t.compareActiveRoutes,exports.compareCustomElementConstructors=t.compareCustomElementConstructors,exports.compareRouteActions=t.compareRouteActions,exports.createRouteCacheKey=t.createRouteCacheKey,exports.debounce=t.debounce,exports.decodeData=t.decodeData,exports.decodeRouteState=t.decodeRouteState,exports.deepMerge=t.deepMerge,exports.encodeData=t.encodeData,exports.encodeRouteState=t.encodeRouteState,exports.extractQueryParams=t.extractQueryParams,exports.getTagName=t.getTagName,exports.isObject=t.isObject,exports.lazy=t.lazy,exports.normalizeTagName=t.normalizeTagName,exports.sanitizeRouteState=t.sanitizeRouteState,exports.$drawer=r.$drawer,exports.HereMorty=r.HereMorty,Object.defineProperty(exports,"ScBadgeV2",{enumerable:!0,get:()=>r.ScBadgeV2}),Object.defineProperty(exports,"SchmancyAvatar",{enumerable:!0,get:()=>r.SchmancyAvatar}),Object.defineProperty(exports,"SchmancyBadgeV2",{enumerable:!0,get:()=>r.SchmancyBadgeV2}),Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>r.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=r.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>r.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=r.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=r.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>r.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=r.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=r.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>r.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=r.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=r.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>r.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>r.SchmancyNavigationBarItem}),Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>r.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>r.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>r.SchmancyTeleportation}),exports.WhereAreYouRicky=r.WhereAreYouRicky,exports.schmancyContentDrawer=r.schmancyContentDrawer,exports.schmancyNavDrawer=r.schmancyNavDrawer,exports.teleport=r.teleport,Object.defineProperty(exports,"SchmancyBoat",{enumerable:!0,get:()=>N.SchmancyBoat}),Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>p.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>p.SchmnacyIconButton}),Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>A.SchmancyCheckboxElement}),Object.defineProperty(exports,"SchmancyAssistChip",{enumerable:!0,get:()=>i.SchmancyAssistChip}),exports.SchmancyChip=i.SchmancyFilterChip,exports.SchmancyFilterChip=i.SchmancyFilterChip,Object.defineProperty(exports,"SchmancySuggestionChip",{enumerable:!0,get:()=>i.SchmancySuggestionChip}),Object.defineProperty(exports,"SchmancyInputChip",{enumerable:!0,get:()=>x.SchmancyInputChip}),Object.defineProperty(exports,"SchmancyCode",{enumerable:!0,get:()=>l.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodeHighlight",{enumerable:!0,get:()=>l.SchmancyCode}),Object.defineProperty(exports,"SchmancyCodePreview",{enumerable:!0,get:()=>l.SchmancyCodePreview}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>E.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDateRange",{enumerable:!0,get:()=>g.SchmancyDateRange}),exports.validateInitialDateRange=g.validateInitialDateRange,Object.defineProperty(exports,"SchmancyDateRangeInline",{enumerable:!0,get:()=>B.SchmancyDateRangeInline}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>d.SchmancyDelay}),exports.delayContext=d.delayContext,Object.defineProperty(exports,"SchmancyDetails",{enumerable:!0,get:()=>F.SchmancyDetails}),Object.defineProperty(exports,"ConfirmDialog",{enumerable:!0,get:()=>h.ConfirmDialog}),Object.defineProperty(exports,"SchmancyDialog",{enumerable:!0,get:()=>h.SchmancyDialog}),Object.defineProperty(exports,"SchmancyDialogContent",{enumerable:!0,get:()=>h.SchmancyDialogContent}),exports.$dialog=s.$dialog,exports.DialogService=s.DialogService,exports.color=u.color,exports.fullHeight=u.fullHeight,exports.ripple=u.ripple,Object.defineProperty(exports,"guard",{enumerable:!0,get:()=>H.guard}),exports.discoverAnyComponent=f.discoverAnyComponent,exports.discoverComponent=f.discoverComponent,Object.defineProperty(exports,"SchmancyDropdown",{enumerable:!0,get:()=>C.SchmancyDropdown}),Object.defineProperty(exports,"SchmancyDropdownContent",{enumerable:!0,get:()=>C.SchmancyDropdownContent}),Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>P.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>P.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyInput",{enumerable:!0,get:()=>O.SchmancyInput}),Object.defineProperty(exports,"SchmancyInputCompat",{enumerable:!0,get:()=>O.SchmancyInputCompat}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>m.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>m.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>m.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>m.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>b.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>b.SchmancyListItem}),exports.SchmancyListTypeContext=b.SchmancyListTypeContext,Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>o.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>o.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>o.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>o.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>o.SchmancyMailbox}),Object.defineProperty(exports,"SchmancyMap",{enumerable:!0,get:()=>L.SchmancyMap}),Object.defineProperty(exports,"SchmancyNavigationRail",{enumerable:!0,get:()=>j.SchmancyNavigationRail}),Object.defineProperty(exports,"SchmancyNavigationRailItem",{enumerable:!0,get:()=>j.SchmancyNavigationRailItem}),exports.$notify=y.$notify,exports.NotificationAudioService=y.NotificationAudioService,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationContainer",{enumerable:!0,get:()=>y.SchmancyNotificationContainer}),exports.notify=D.notify,exports.notifyProgress=D.notifyProgress,Object.defineProperty(exports,"RadioButton",{enumerable:!0,get:()=>q.RadioButton}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>q.RadioGroup}),exports.mutationObserver=V.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>z.SchmancySelect}),exports.SchmancySheetPosition=T.SchmancySheetPosition,exports.sheet=T.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>w.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>w.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>S.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>S.SchmancyStepsContainer}),exports.StepsController=S.StepsController,exports.stepsContext=S.stepsContext,exports.BaseStore=a.BaseStore,exports.IndexedDBStorageManager=a.IndexedDBStorageManager,exports.LocalStorageManager=a.LocalStorageManager,exports.MemoryStorageManager=a.MemoryStorageManager,exports.SchmancyArrayStore=a.SchmancyArrayStore,exports.SchmancyStoreObject=a.SchmancyStoreObject,exports.SessionStorageManager=a.SessionStorageManager,exports.StoreError=a.StoreError,exports.createArrayContext=a.createArrayContext,exports.createContext=a.createContext,exports.createStorageManager=a.createStorageManager,exports.createTestArrayContext=a.createTestArrayContext,exports.compareValues=e.compareValues,exports.createCollectionSelector=e.createCollectionSelector,exports.createCompoundSelector=e.createCompoundSelector,exports.createCountSelector=e.createCountSelector,exports.createEntriesSelector=e.createEntriesSelector,exports.createFilterSelector=e.createFilterSelector,exports.createFindSelector=e.createFindSelector,exports.createItemSelector=e.createItemSelector,exports.createItemsSelector=e.createItemsSelector,exports.createKeysSelector=e.createKeysSelector,exports.createMapSelector=e.createMapSelector,exports.createOptimizedSelector=e.createOptimizedSelector,exports.createSelector=e.createSelector,exports.createSortSelector=e.createSortSelector,exports.filterArray=e.filterArray,exports.filterArrayItems=e.filterArrayItems,exports.filterMap=e.filterMap,exports.filterMapItems=e.filterMapItems,exports.getFieldValue=e.getFieldValue,exports.isArray=e.isArray,exports.isDate=e.isDate,exports.isIterable=e.isIterable,exports.isMap=e.isMap,exports.isNil=e.isNil,exports.isNumber=e.isNumber,exports.isPlainObject=e.isPlainObject,exports.isSet=e.isSet,exports.isString=e.isString,exports.select=e.select,exports.selectItem=e.selectItem,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>I.SchmancySurface}),exports.SchmancySurfaceTypeContext=I.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>R.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>R.SchmancyTableRow}),exports.SchmancyTheme=Y.SchmancyTheme,Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>c.SchmancyThemeComponent}),Object.defineProperty(exports,"SchmancyThemeController",{enumerable:!0,get:()=>c.SchmancyThemeController}),Object.defineProperty(exports,"SchmancyThemeControllerBoat",{enumerable:!0,get:()=>c.SchmancyThemeControllerBoat}),exports.createDarkTonalPaletteFromBaseColor=c.createDarkTonalPaletteFromBaseColor,exports.createLightTonalPaletteFromBaseColor=c.createLightTonalPaletteFromBaseColor,exports.formateTheme=c.formateTheme,exports.schmancyTheme=c.schmancyTheme,exports.tailwindStyles=c.tailwindStyles,exports.theme=c.theme,exports.themeContext=c.themeContext,exports.ThemeHereIAm=v.ThemeHereIAm,exports.ThemeWhereAreYou=v.ThemeWhereAreYou,Object.defineProperty(exports,"SchmancyTooltip",{enumerable:!0,get:()=>M.SchmancyTooltip}),exports.tooltip=M.tooltip,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>G.SchmancyTree}),exports.SchmancyEvents=$.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>k.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>K.SchmancyTypography}),exports.intersection$=W.intersection$,exports.Numbers=_.Numbers,exports.similarity=Q.similarity;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import "./animated-text-CUmecSA0.js";
|
|
|
2
2
|
import { F as d, H as g, c as u, S as D, b as T, a as b, r as w } from "./area.component-CY-wcftl.js";
|
|
3
3
|
import { p as v, k as R, c as N, j as M, m as A, b as B, d as E, h as F, a as H, e as L, f as P, o as O, g as $, i as j, l as k, n as z, s as V } from "./utils-CYOVFxSx.js";
|
|
4
4
|
import "./autocomplete-BLmTfG1M.js";
|
|
5
|
-
import { $ as G, H as W, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ta, k as ra, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar-
|
|
5
|
+
import { $ as G, H as W, a as K, v as _, S as q, g as Q, d as J, h as U, e as X, f as Z, i as aa, b as ea, c as ta, k as ra, m as oa, n as ca, r as sa, q as ma, o as na, l as Sa, p as ia, t as ha, W as ya, s as pa, j as la, u as fa } from "./avatar-CCwr3pAC.js";
|
|
6
6
|
import { S as Ca } from "./boat-DgUy8xs-.js";
|
|
7
7
|
import "./spinner-8kd9IUxN.js";
|
|
8
8
|
import { S as ga, a as ua } from "./icon-button-D-K64Mol.js";
|
|
@@ -29,7 +29,7 @@ import "./icon-D05NBa8J.js";
|
|
|
29
29
|
import { S as fe, a as xe } from "./input-BVnJlKsv.js";
|
|
30
30
|
import { S as de, c as ge, a as ue, b as De } from "./flex-Bc217dkI.js";
|
|
31
31
|
import { L as be, a as we, S as Ie } from "./list-BQ3UOtc2.js";
|
|
32
|
-
import { a as Re, d as Ne, c as Me, b as Ae, S as Be } from "./email-recipients-
|
|
32
|
+
import { a as Re, d as Ne, c as Me, b as Ae, S as Be } from "./email-recipients-M_Id-4uD.js";
|
|
33
33
|
import { S as Fe } from "./map-1TRayP2G.js";
|
|
34
34
|
import "./menu-Dura_BY4.js";
|
|
35
35
|
import { a as Le, S as Pe } from "./navigation-rail-Bu7lGEel.js";
|
|
@@ -42,8 +42,8 @@ import { mutationObserver as Qe } from "./rxjs-utils.js";
|
|
|
42
42
|
import "rxjs";
|
|
43
43
|
import "./index-CW6PhEkx.js";
|
|
44
44
|
import { S as Ue } from "./select-CsYqzyKi.js";
|
|
45
|
-
import { S as Ze, s as at } from "./sheet.service-
|
|
46
|
-
import "./sheet-
|
|
45
|
+
import { S as Ze, s as at } from "./sheet.service-Bn-Ea0gS.js";
|
|
46
|
+
import "./sheet-D74r4jeP.js";
|
|
47
47
|
import { S as tt, a as rt } from "./slider-DPggZXEs.js";
|
|
48
48
|
import { S as ct, a as st, b as mt, s as nt } from "./schmancy-steps-container-cU2g6cMS.js";
|
|
49
49
|
import { B as it, I as ht, L as yt, M as pt, S as lt, d as ft, e as xt, g as Ct, a as dt, c as gt, f as ut, b as Dt } from "./context-create-DCiujzV2.js";
|
package/dist/mailbox.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./email-recipients-BRSQsglN.cjs");Object.defineProperty(exports,"SchmancyEmailEditor",{enumerable:!0,get:()=>e.SchmancyEmailEditor}),Object.defineProperty(exports,"SchmancyEmailLayoutSelector",{enumerable:!0,get:()=>e.SchmancyEmailLayoutSelector}),Object.defineProperty(exports,"SchmancyEmailRecipients",{enumerable:!0,get:()=>e.SchmancyEmailRecipients}),Object.defineProperty(exports,"SchmancyEmailViewer",{enumerable:!0,get:()=>e.SchmancyEmailViewer}),Object.defineProperty(exports,"SchmancyMailbox",{enumerable:!0,get:()=>e.SchmancyMailbox});
|
|
2
2
|
//# sourceMappingURL=mailbox.cjs.map
|
package/dist/mailbox.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("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-D8kuLXpu.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
|
package/dist/nav-drawer.js
CHANGED
package/dist/navigation-bar.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-D8kuLXpu.cjs");Object.defineProperty(exports,"SchmancyNavigationBar",{enumerable:!0,get:()=>e.SchmancyNavigationBar}),Object.defineProperty(exports,"SchmancyNavigationBarItem",{enumerable:!0,get:()=>e.SchmancyNavigationBarItem});
|
|
2
2
|
//# sourceMappingURL=navigation-bar.cjs.map
|
package/dist/navigation-bar.js
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";const n=require("rxjs");require("rxjs/operators"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const c=require("lit/decorators.js");require("./tailwind.mixin-Wo-oNBIM.cjs");const m=require("./litElement.mixin-CJY2Cfqe.cjs"),y=require("./area.component-Dy_bNCum.cjs"),f=require("lit"),h=require("./sheet.service-CdcwIejg.cjs");var v=Object.defineProperty,E=Object.getOwnPropertyDescriptor,l=(t,e,s,o)=>{for(var i,a=o>1?void 0:o?E(e,s):e,d=t.length-1;d>=0;d--)(i=t[d])&&(a=(o?i(e,s,a):i(a))||a);return o&&a&&v(e,s,a),a};let r=class extends m.$LitElement(":host{display:block}"){constructor(){super(...arguments),this.open=!1,this.position=h.SchmancySheetPosition.Side,this.persist=!1,this.lock=!1,this.handleHistory=!0,this.lastFocusedElement=null,this.handleOverlayClick=t=>{t.stopPropagation(),this.lock||h.sheet.dismiss(this.uid)}}onOpenChange(t,e){e?(this.lastFocusedElement=document.activeElement,this.setBackgroundInert(!0),this.animateIn(),this.focus()):(this.animateOut(),this.setBackgroundInert(!1),this.lastFocusedElement?.focus(),this.lastFocusedElement=null)}animateIn(){if(!this.overlayEl||!this.contentEl)return;const t={duration:250,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"};this.overlayEl.animate([{opacity:0},{opacity:.8}],t);const e=this.position===h.SchmancySheetPosition.Side?[{transform:"translateX(100%)"},{transform:"translateX(0)"}]:[{transform:"translateY(100%)"},{transform:"translateY(0)"}];this.contentEl.animate(e,t)}animateOut(){if(!this.overlayEl||!this.contentEl)return;const t={duration:250,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"};this.overlayEl.animate([{opacity:.8},{opacity:0}],t);const e=this.position===h.SchmancySheetPosition.Side?[{transform:"translateX(0)"},{transform:"translateX(100%)"}]:[{transform:"translateY(0)"},{transform:"translateY(100%)"}];this.contentEl.animate(e,t)}connectedCallback(){super.connectedCallback(),this.setupEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.disconnecting.next(!0)}setupEventListeners(){const t=n.fromEvent(window,"popstate").pipe(n.filter(()=>this.handleHistory),n.tap(i=>{i.preventDefault(),this.closeSheet()})),e=n.fromEvent(this,"keydown").pipe(n.tap(i=>{i.key==="Escape"&&!this.lock&&this.open&&(i.preventDefault(),i.stopPropagation(),h.sheet.dismiss(this.uid))})),s=n.fromEvent(window,"schmancy-sheet-render").pipe(n.filter(i=>i.detail.uid===this.uid),n.tap(i=>{y.area.push({area:this.uid,component:i.detail.component,props:i.detail.props,historyStrategy:"silent"})})),o=n.fromEvent(window,"schmancy-sheet-dismiss").pipe(n.filter(i=>i.detail.uid===this.uid),n.tap(()=>{this.closeSheet()}));n.merge(t,e,s,o).pipe(n.takeUntil(this.disconnecting)).subscribe()}setBackgroundInert(t){const e=this.parentElement;e&&Array.from(e.children).forEach(s=>{s!==this&&s instanceof HTMLElement&&s.toggleAttribute("inert",t)})}closeSheet(){this.open=!1,this.dispatchEvent(new CustomEvent("close"))}focus(){const t=this.querySelector("[autofocus]");t instanceof HTMLElement&&t.focus()}render(){const t="fixed inset-0 z-[999] flex "+(this.open?"":"invisible pointer-events-none"),e="overlay absolute inset-0 bg-surface-container/10 backdrop-blur-xs "+(this.lock?"":"cursor-pointer"),s=this.position===h.SchmancySheetPosition.Side?"content h-full min-w-[320px] max-w-[90vw] w-fit ml-auto overflow-hidden z-10":"content w-fit max-w-full mt-auto rounded-t-2xl max-h-[90vh] overflow-hidden z-10",o=this.position===h.SchmancySheetPosition.Side?"max-h-screen":"max-h-[90vh]";return f.html`
|
|
2
|
+
<div class=${t} role="dialog" aria-hidden=${!this.open} aria-modal=${this.open} tabindex="0">
|
|
3
|
+
<div class=${e} @click=${this.handleOverlayClick}></div>
|
|
4
|
+
<div class=${s}>
|
|
5
|
+
<schmancy-surface rounded="left" fill="all" id="body" class="overflow-auto ${o}" type="surface">
|
|
6
|
+
<schmancy-scroll>
|
|
7
|
+
<schmancy-area class="h-full" name=${this.uid}>
|
|
8
|
+
<slot></slot>
|
|
9
|
+
</schmancy-area>
|
|
10
|
+
</schmancy-scroll>
|
|
11
|
+
</schmancy-surface>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
`}};var p,u;l([c.property({type:String,reflect:!0})],r.prototype,"uid",2),l([c.property({type:Boolean,reflect:!0})],r.prototype,"open",2),l([c.property({type:String,reflect:!0})],r.prototype,"position",2),l([c.property({type:Boolean,reflect:!0})],r.prototype,"persist",2),l([c.property({type:Boolean,reflect:!0})],r.prototype,"lock",2),l([c.property({type:Boolean,reflect:!0})],r.prototype,"handleHistory",2),l([c.query(".overlay")],r.prototype,"overlayEl",2),l([c.query(".content")],r.prototype,"contentEl",2),l([(p="open",(t,e)=>{const{willUpdate:s}=t;u=Object.assign({waitUntilFirstUpdate:!1},u),t.willUpdate=function(o){if(s.call(this,o),o.has(p)){const i=o.get(p),a=this[p];i!==a&&(u?.waitUntilFirstUpdate&&!this.hasUpdated||this[e].call(this,i,a))}}})],r.prototype,"onOpenChange",1),r=l([c.customElement("schmancy-sheet")],r);
|
|
15
|
+
//# sourceMappingURL=sheet-BH4evGq6.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet-BH4evGq6.cjs","sources":["../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap, filter } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport { SchmancySheetPosition, sheet } 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 }) 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\n\tprivate lastFocusedElement: HTMLElement | null = null\n\t@query('.overlay') private overlayEl!: HTMLDivElement\n\t@query('.content') private contentEl!: HTMLDivElement\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.setBackgroundInert(true)\n\t\t\tthis.animateIn()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.animateOut()\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tprivate animateIn() {\n\t\tif (!this.overlayEl || !this.contentEl) return\n\n\t\tconst timing = {\n\t\t\tduration: 250,\n\t\t\teasing: 'cubic-bezier(0.16, 1, 0.3, 1)',\n\t\t\tfill: 'forwards' as FillMode,\n\t\t}\n\n\t\t// Animate overlay\n\t\tthis.overlayEl.animate([{ opacity: 0 }, { opacity: 0.8 }], timing)\n\n\t\t// Animate content based on position\n\t\tconst transform =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? [{ transform: 'translateX(100%)' }, { transform: 'translateX(0)' }]\n\t\t\t\t: [{ transform: 'translateY(100%)' }, { transform: 'translateY(0)' }]\n\n\t\tthis.contentEl.animate(transform, timing)\n\t}\n\n\tprivate animateOut() {\n\t\tif (!this.overlayEl || !this.contentEl) return\n\n\t\tconst timing = {\n\t\t\tduration: 250,\n\t\t\teasing: 'cubic-bezier(0.16, 1, 0.3, 1)',\n\t\t\tfill: 'forwards' as FillMode,\n\t\t}\n\n\t\t// Animate overlay\n\t\tthis.overlayEl.animate([{ opacity: 0.8 }, { opacity: 0 }], timing)\n\n\t\t// Animate content based on position\n\t\tconst transform =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? [{ transform: 'translateX(0)' }, { transform: 'translateX(100%)' }]\n\t\t\t\t: [{ transform: 'translateY(0)' }, { transform: 'translateY(100%)' }]\n\n\t\tthis.contentEl.animate(transform, timing)\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\tfilter(() => this.handleHistory),\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>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\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 render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\tfilter(e => e.detail.uid === this.uid),\n\t\t\ttap(e => {\n\t\t\t\tarea.push({\n\t\t\t\t\tarea: this.uid,\n\t\t\t\t\tcomponent: e.detail.component,\n\t\t\t\t\tprops: e.detail.props,\n\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t})\n\t\t\t}),\n\t\t)\n\n\t\t// Handle dismiss events from sheet service\n\t\tconst dismiss$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-dismiss').pipe(\n\t\t\tfilter(e => e.detail.uid === this.uid),\n\t\t\ttap(() => {\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, render$, dismiss$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\tconst parent = this.parentElement\n\t\tif (!parent) return\n\n\t\tArray.from(parent.children).forEach(child => {\n\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\tchild.toggleAttribute('inert', inert)\n\t\t\t}\n\t\t})\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\toverride focus() {\n\t\t// delegatesFocus in shadowRootOptions handles automatic focus\n\t\t// Just focus first element with autofocus attribute if present\n\t\tconst element = this.querySelector('[autofocus]')\n\t\tif (element instanceof HTMLElement) {\n\t\t\telement.focus()\n\t\t}\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst sheetClasses = `fixed inset-0 z-[999] flex ${this.open ? '' : 'invisible pointer-events-none'}`\n\n\t\tconst overlayClasses = `overlay absolute inset-0 bg-surface-container/10 backdrop-blur-xs ${this.lock ? '' : 'cursor-pointer'}`\n\n\t\tconst contentClasses =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? 'content h-full min-w-[320px] max-w-[90vw] w-fit ml-auto overflow-hidden z-10'\n\t\t\t\t: 'content w-fit max-w-full mt-auto rounded-t-2xl max-h-[90vh] overflow-hidden z-10'\n\n\t\tconst bodyClasses = this.position === SchmancySheetPosition.Side ? 'max-h-screen' : 'max-h-[90vh]'\n\n\t\treturn html`\n\t\t\t<div class=${sheetClasses} role=\"dialog\" aria-hidden=${!this.open} aria-modal=${this.open} tabindex=\"0\">\n\t\t\t\t<div class=${overlayClasses} @click=${this.handleOverlayClick}></div>\n\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto ${bodyClasses}\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area class=\"h-full\" name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-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":["SchmancySheet","$LitElement","constructor","super","arguments","this","open","position","SchmancySheetPosition","Side","persist","lock","handleHistory","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","_oldValue","newValue","document","activeElement","setBackgroundInert","animateIn","focus","animateOut","overlayEl","contentEl","timing","duration","easing","fill","animate","opacity","transform","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","filter","tap","preventDefault","closeSheet","keyUp$","event","key","render$","detail","area","push","component","props","historyStrategy","dismiss$","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","toggleAttribute","dispatchEvent","CustomEvent","element","querySelector","render","sheetClasses","overlayClasses","contentClasses","bodyClasses","html","propName","options","__decorateClass","property","type","String","reflect","prototype","Boolean","query","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated","customElement"],"mappings":"ojBAUA,IAAqBA,EAArB,cAA2CC,sCAA3C,aAAAC,CAAAC,MAAAA,GAAAC,SAAAA,EAE6CC,KAAAC,KAAAA,GACDD,KAAAE,SAAkCC,EAAAA,sBAAsBC,KACvDJ,KAAAK,QAAAA,GACAL,KAAAM,KAAAA,GACAN,KAAAO,cAAAA,GAE5CP,KAAQQ,mBAAyC,KA6IjDR,KAAQS,mBAAsBC,GAAAA,CAC7BA,EAAEC,gBAAAA,EACGX,KAAKM,MACTM,QAAMC,QAAQb,KAAKc,GAAAA,CAAAA,CAErB,CA7IA,aAAaC,EAAoBC,EAAAA,CAC5BA,GACHhB,KAAKQ,mBAAqBS,SAASC,cACnClB,KAAKmB,mBAAAA,EAAmB,EACxBnB,KAAKoB,UAAAA,EACLpB,KAAKqB,MAAAA,IAELrB,KAAKsB,WAAAA,EACLtB,KAAKmB,mBAAAA,EAAmB,EACxBnB,KAAKQ,oBAAoBa,MAAAA,EACzBrB,KAAKQ,mBAAqB,KAE5B,CAEQ,WAAAY,CACP,GAAA,CAAKpB,KAAKuB,WAAAA,CAAcvB,KAAKwB,UAAW,OAExC,MAAMC,EAAS,CACdC,SAAU,IACVC,OAAQ,gCACRC,KAAM,UAAA,EAIP5B,KAAKuB,UAAUM,QAAQ,CAAC,CAAEC,QAAS,GAAK,CAAEA,QAAS,EAAA,CAAA,EAAQL,CAAAA,EAG3D,MAAMM,EACL/B,KAAKE,WAAaC,EAAAA,sBAAsBC,KACrC,CAAC,CAAE2B,UAAW,kBAAA,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AAO,CAAEC,qBAAAA,IAA+Bd,CAAAA,EAEzDS,EAAkBE,WAAa,SAAUI,EAAAA,CAGxC,GAFAJ,EAAWK,KAAKhG,KAAM+F,CAAAA,EAElBA,EAAaE,IAAIlB,GAAW,CAC/B,MAAMmB,EAAWH,EAAaI,IAAIpB,CAAAA,EAC5B/D,EAAWhB,KAAK+E,CAAAA,EAElBmB,IAAalF,IACXgE,GAASc,sBAAAA,CAAwB9F,KAAKoG,YAC1CpG,KAAK0F,CAAAA,EAAMM,KAAKhG,KAAMkG,EAAUlF,GAGnC,CACD,CAAA,EAAA,ED3BmBrB,EAapB2F,UAAA,eAAA,CAAA,EAboB3F,EAArBsF,EAAA,CADCoB,EAAAA,cAAc,gBAAA,CAAA,EACM1G,CAAAA"}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { fromEvent as
|
|
1
|
+
import { fromEvent as p, filter as u, tap as h, merge as E, takeUntil as w } from "rxjs";
|
|
2
2
|
import "rxjs/operators";
|
|
3
3
|
import "lit/directives/class-map.js";
|
|
4
4
|
import "lit/directives/style-map.js";
|
|
5
|
-
import { property as l, query as y, customElement as
|
|
5
|
+
import { property as l, query as y, customElement as g } from "lit/decorators.js";
|
|
6
6
|
import "./tailwind.mixin-Cb9Uc9-p.js";
|
|
7
7
|
import { $ as b } from "./litElement.mixin-Cv7EISwD.js";
|
|
8
8
|
import { a as k } from "./area.component-CY-wcftl.js";
|
|
9
9
|
import { html as x } from "lit";
|
|
10
|
-
import { S as c, s as v } from "./sheet.service-
|
|
11
|
-
var S = Object.defineProperty, O = Object.getOwnPropertyDescriptor,
|
|
12
|
-
for (var
|
|
13
|
-
return
|
|
10
|
+
import { S as c, s as v } from "./sheet.service-Bn-Ea0gS.js";
|
|
11
|
+
var S = Object.defineProperty, O = Object.getOwnPropertyDescriptor, r = (t, e, i, o) => {
|
|
12
|
+
for (var s, a = o > 1 ? void 0 : o ? O(e, i) : e, m = t.length - 1; m >= 0; m--) (s = t[m]) && (a = (o ? s(e, i, a) : s(a)) || a);
|
|
13
|
+
return o && a && S(e, i, a), a;
|
|
14
14
|
};
|
|
15
|
-
let
|
|
15
|
+
let n = class extends b(":host{display:block}") {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments), this.open = !1, this.position = c.Side, this.persist = !1, this.lock = !1, this.handleHistory = !0, this.lastFocusedElement = null, this.handleOverlayClick = (t) => {
|
|
18
18
|
t.stopPropagation(), this.lock || v.dismiss(this.uid);
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
onOpenChange(t,
|
|
22
|
-
|
|
21
|
+
onOpenChange(t, e) {
|
|
22
|
+
e ? (this.lastFocusedElement = document.activeElement, this.setBackgroundInert(!0), this.animateIn(), this.focus()) : (this.animateOut(), this.setBackgroundInert(!1), this.lastFocusedElement?.focus(), this.lastFocusedElement = null);
|
|
23
23
|
}
|
|
24
24
|
animateIn() {
|
|
25
25
|
if (!this.overlayEl || !this.contentEl) return;
|
|
26
26
|
const t = { duration: 250, easing: "cubic-bezier(0.16, 1, 0.3, 1)", fill: "forwards" };
|
|
27
27
|
this.overlayEl.animate([{ opacity: 0 }, { opacity: 0.8 }], t);
|
|
28
|
-
const
|
|
29
|
-
this.contentEl.animate(
|
|
28
|
+
const e = this.position === c.Side ? [{ transform: "translateX(100%)" }, { transform: "translateX(0)" }] : [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }];
|
|
29
|
+
this.contentEl.animate(e, t);
|
|
30
30
|
}
|
|
31
31
|
animateOut() {
|
|
32
32
|
if (!this.overlayEl || !this.contentEl) return;
|
|
33
33
|
const t = { duration: 250, easing: "cubic-bezier(0.16, 1, 0.3, 1)", fill: "forwards" };
|
|
34
34
|
this.overlayEl.animate([{ opacity: 0.8 }, { opacity: 0 }], t);
|
|
35
|
-
const
|
|
36
|
-
this.contentEl.animate(
|
|
35
|
+
const e = this.position === c.Side ? [{ transform: "translateX(0)" }, { transform: "translateX(100%)" }] : [{ transform: "translateY(0)" }, { transform: "translateY(100%)" }];
|
|
36
|
+
this.contentEl.animate(e, t);
|
|
37
37
|
}
|
|
38
38
|
connectedCallback() {
|
|
39
39
|
super.connectedCallback(), this.setupEventListeners();
|
|
@@ -42,18 +42,20 @@ let o = class extends b(":host{display:block}") {
|
|
|
42
42
|
super.disconnectedCallback(), this.disconnecting.next(!0);
|
|
43
43
|
}
|
|
44
44
|
setupEventListeners() {
|
|
45
|
-
const t =
|
|
46
|
-
|
|
47
|
-
})),
|
|
48
|
-
|
|
49
|
-
})), i =
|
|
50
|
-
k.push({ area: this.uid, component:
|
|
45
|
+
const t = p(window, "popstate").pipe(u(() => this.handleHistory), h((s) => {
|
|
46
|
+
s.preventDefault(), this.closeSheet();
|
|
47
|
+
})), e = p(this, "keydown").pipe(h((s) => {
|
|
48
|
+
s.key === "Escape" && !this.lock && this.open && (s.preventDefault(), s.stopPropagation(), v.dismiss(this.uid));
|
|
49
|
+
})), i = p(window, "schmancy-sheet-render").pipe(u((s) => s.detail.uid === this.uid), h((s) => {
|
|
50
|
+
k.push({ area: this.uid, component: s.detail.component, props: s.detail.props, historyStrategy: "silent" });
|
|
51
|
+
})), o = p(window, "schmancy-sheet-dismiss").pipe(u((s) => s.detail.uid === this.uid), h(() => {
|
|
52
|
+
this.closeSheet();
|
|
51
53
|
}));
|
|
52
|
-
E(t,
|
|
54
|
+
E(t, e, i, o).pipe(w(this.disconnecting)).subscribe();
|
|
53
55
|
}
|
|
54
56
|
setBackgroundInert(t) {
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
+
const e = this.parentElement;
|
|
58
|
+
e && Array.from(e.children).forEach((i) => {
|
|
57
59
|
i !== this && i instanceof HTMLElement && i.toggleAttribute("inert", t);
|
|
58
60
|
});
|
|
59
61
|
}
|
|
@@ -65,14 +67,14 @@ let o = class extends b(":host{display:block}") {
|
|
|
65
67
|
t instanceof HTMLElement && t.focus();
|
|
66
68
|
}
|
|
67
69
|
render() {
|
|
68
|
-
const t = "fixed inset-0 z-[999] flex " + (this.open ? "" : "invisible pointer-events-none"),
|
|
70
|
+
const t = "fixed inset-0 z-[999] flex " + (this.open ? "" : "invisible pointer-events-none"), e = "overlay absolute inset-0 bg-surface-container/10 backdrop-blur-xs " + (this.lock ? "" : "cursor-pointer"), i = this.position === c.Side ? "content h-full min-w-[320px] max-w-[90vw] w-fit ml-auto overflow-hidden z-10" : "content w-fit max-w-full mt-auto rounded-t-2xl max-h-[90vh] overflow-hidden z-10", o = this.position === c.Side ? "max-h-screen" : "max-h-[90vh]";
|
|
69
71
|
return x`
|
|
70
72
|
<div class=${t} role="dialog" aria-hidden=${!this.open} aria-modal=${this.open} tabindex="0">
|
|
71
|
-
<div class=${
|
|
73
|
+
<div class=${e} @click=${this.handleOverlayClick}></div>
|
|
72
74
|
<div class=${i}>
|
|
73
|
-
<schmancy-surface rounded="left" fill="all" id="body" class="overflow-auto ${
|
|
75
|
+
<schmancy-surface rounded="left" fill="all" id="body" class="overflow-auto ${o}" type="surface">
|
|
74
76
|
<schmancy-scroll>
|
|
75
|
-
<schmancy-area class="
|
|
77
|
+
<schmancy-area class="h-full" name=${this.uid}>
|
|
76
78
|
<slot></slot>
|
|
77
79
|
</schmancy-area>
|
|
78
80
|
</schmancy-scroll>
|
|
@@ -82,14 +84,14 @@ let o = class extends b(":host{display:block}") {
|
|
|
82
84
|
`;
|
|
83
85
|
}
|
|
84
86
|
};
|
|
85
|
-
var
|
|
86
|
-
|
|
87
|
+
var d, f;
|
|
88
|
+
r([l({ type: String, reflect: !0 })], n.prototype, "uid", 2), r([l({ type: Boolean, reflect: !0 })], n.prototype, "open", 2), r([l({ type: String, reflect: !0 })], n.prototype, "position", 2), r([l({ type: Boolean, reflect: !0 })], n.prototype, "persist", 2), r([l({ type: Boolean, reflect: !0 })], n.prototype, "lock", 2), r([l({ type: Boolean, reflect: !0 })], n.prototype, "handleHistory", 2), r([y(".overlay")], n.prototype, "overlayEl", 2), r([y(".content")], n.prototype, "contentEl", 2), r([(d = "open", (t, e) => {
|
|
87
89
|
const { willUpdate: i } = t;
|
|
88
|
-
|
|
89
|
-
if (i.call(this,
|
|
90
|
-
const
|
|
91
|
-
|
|
90
|
+
f = Object.assign({ waitUntilFirstUpdate: !1 }, f), t.willUpdate = function(o) {
|
|
91
|
+
if (i.call(this, o), o.has(d)) {
|
|
92
|
+
const s = o.get(d), a = this[d];
|
|
93
|
+
s !== a && (f?.waitUntilFirstUpdate && !this.hasUpdated || this[e].call(this, s, a));
|
|
92
94
|
}
|
|
93
95
|
};
|
|
94
|
-
})],
|
|
95
|
-
//# sourceMappingURL=sheet-
|
|
96
|
+
})], n.prototype, "onOpenChange", 1), n = r([g("schmancy-sheet")], n);
|
|
97
|
+
//# sourceMappingURL=sheet-D74r4jeP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet-D74r4jeP.js","sources":["../src/sheet/sheet.ts","../src/sheet/hook.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { area } from '../area'\nimport { html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { fromEvent, merge, takeUntil, tap, filter } from 'rxjs'\nimport { on } from './hook'\nimport style from './sheet.scss?inline'\nimport { SchmancySheetPosition, sheet } 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 }) 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\n\tprivate lastFocusedElement: HTMLElement | null = null\n\t@query('.overlay') private overlayEl!: HTMLDivElement\n\t@query('.content') private contentEl!: HTMLDivElement\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.setBackgroundInert(true)\n\t\t\tthis.animateIn()\n\t\t\tthis.focus()\n\t\t} else {\n\t\t\tthis.animateOut()\n\t\t\tthis.setBackgroundInert(false)\n\t\t\tthis.lastFocusedElement?.focus()\n\t\t\tthis.lastFocusedElement = null\n\t\t}\n\t}\n\n\tprivate animateIn() {\n\t\tif (!this.overlayEl || !this.contentEl) return\n\n\t\tconst timing = {\n\t\t\tduration: 250,\n\t\t\teasing: 'cubic-bezier(0.16, 1, 0.3, 1)',\n\t\t\tfill: 'forwards' as FillMode,\n\t\t}\n\n\t\t// Animate overlay\n\t\tthis.overlayEl.animate([{ opacity: 0 }, { opacity: 0.8 }], timing)\n\n\t\t// Animate content based on position\n\t\tconst transform =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? [{ transform: 'translateX(100%)' }, { transform: 'translateX(0)' }]\n\t\t\t\t: [{ transform: 'translateY(100%)' }, { transform: 'translateY(0)' }]\n\n\t\tthis.contentEl.animate(transform, timing)\n\t}\n\n\tprivate animateOut() {\n\t\tif (!this.overlayEl || !this.contentEl) return\n\n\t\tconst timing = {\n\t\t\tduration: 250,\n\t\t\teasing: 'cubic-bezier(0.16, 1, 0.3, 1)',\n\t\t\tfill: 'forwards' as FillMode,\n\t\t}\n\n\t\t// Animate overlay\n\t\tthis.overlayEl.animate([{ opacity: 0.8 }, { opacity: 0 }], timing)\n\n\t\t// Animate content based on position\n\t\tconst transform =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? [{ transform: 'translateX(0)' }, { transform: 'translateX(100%)' }]\n\t\t\t\t: [{ transform: 'translateY(0)' }, { transform: 'translateY(100%)' }]\n\n\t\tthis.contentEl.animate(transform, timing)\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\tfilter(() => this.handleHistory),\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>(this, 'keydown').pipe(\n\t\t\ttap(event => {\n\t\t\t\tif (event.key === 'Escape' && !this.lock && this.open) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\tevent.stopPropagation()\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 render events from sheet service\n\t\tconst render$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-render').pipe(\n\t\t\tfilter(e => e.detail.uid === this.uid),\n\t\t\ttap(e => {\n\t\t\t\tarea.push({\n\t\t\t\t\tarea: this.uid,\n\t\t\t\t\tcomponent: e.detail.component,\n\t\t\t\t\tprops: e.detail.props,\n\t\t\t\t\thistoryStrategy: 'silent',\n\t\t\t\t})\n\t\t\t}),\n\t\t)\n\n\t\t// Handle dismiss events from sheet service\n\t\tconst dismiss$ = fromEvent<CustomEvent>(window, 'schmancy-sheet-dismiss').pipe(\n\t\t\tfilter(e => e.detail.uid === this.uid),\n\t\t\ttap(() => {\n\t\t\t\tthis.closeSheet()\n\t\t\t}),\n\t\t)\n\n\t\tmerge(popState$, keyUp$, render$, dismiss$).pipe(takeUntil(this.disconnecting)).subscribe()\n\t}\n\n\tprivate setBackgroundInert(inert: boolean) {\n\t\tconst parent = this.parentElement\n\t\tif (!parent) return\n\n\t\tArray.from(parent.children).forEach(child => {\n\t\t\tif (child !== this && child instanceof HTMLElement) {\n\t\t\t\tchild.toggleAttribute('inert', inert)\n\t\t\t}\n\t\t})\n\t}\n\n\tcloseSheet() {\n\t\tthis.open = false\n\t\tthis.dispatchEvent(new CustomEvent('close'))\n\t}\n\n\toverride focus() {\n\t\t// delegatesFocus in shadowRootOptions handles automatic focus\n\t\t// Just focus first element with autofocus attribute if present\n\t\tconst element = this.querySelector('[autofocus]')\n\t\tif (element instanceof HTMLElement) {\n\t\t\telement.focus()\n\t\t}\n\t}\n\n\tprivate handleOverlayClick = (e: Event) => {\n\t\te.stopPropagation()\n\t\tif (!this.lock) {\n\t\t\tsheet.dismiss(this.uid)\n\t\t}\n\t}\n\n\trender() {\n\t\tconst sheetClasses = `fixed inset-0 z-[999] flex ${this.open ? '' : 'invisible pointer-events-none'}`\n\n\t\tconst overlayClasses = `overlay absolute inset-0 bg-surface-container/10 backdrop-blur-xs ${this.lock ? '' : 'cursor-pointer'}`\n\n\t\tconst contentClasses =\n\t\t\tthis.position === SchmancySheetPosition.Side\n\t\t\t\t? 'content h-full min-w-[320px] max-w-[90vw] w-fit ml-auto overflow-hidden z-10'\n\t\t\t\t: 'content w-fit max-w-full mt-auto rounded-t-2xl max-h-[90vh] overflow-hidden z-10'\n\n\t\tconst bodyClasses = this.position === SchmancySheetPosition.Side ? 'max-h-screen' : 'max-h-[90vh]'\n\n\t\treturn html`\n\t\t\t<div class=${sheetClasses} role=\"dialog\" aria-hidden=${!this.open} aria-modal=${this.open} tabindex=\"0\">\n\t\t\t\t<div class=${overlayClasses} @click=${this.handleOverlayClick}></div>\n\t\t\t\t<div class=${contentClasses}>\n\t\t\t\t\t<schmancy-surface rounded=\"left\" fill=\"all\" id=\"body\" class=\"overflow-auto ${bodyClasses}\" type=\"surface\">\n\t\t\t\t\t\t<schmancy-scroll>\n\t\t\t\t\t\t\t<schmancy-area class=\"h-full\" name=${this.uid}>\n\t\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t\t</schmancy-area>\n\t\t\t\t\t\t</schmancy-scroll>\n\t\t\t\t\t</schmancy-surface>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-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":["SchmancySheet","$LitElement","super","arguments","this","open","position","SchmancySheetPosition","Side","persist","lock","handleHistory","lastFocusedElement","handleOverlayClick","e","stopPropagation","sheet","dismiss","uid","_oldValue","newValue","document","activeElement","setBackgroundInert","animateIn","focus","animateOut","overlayEl","contentEl","timing","duration","easing","fill","animate","opacity","transform","connectedCallback","setupEventListeners","disconnectedCallback","disconnecting","next","popState$","fromEvent","window","pipe","filter","tap","preventDefault","closeSheet","keyUp$","event","key","render$","detail","area","push","component","props","historyStrategy","dismiss$","merge","takeUntil","subscribe","inert","parent","parentElement","Array","from","children","forEach","child","HTMLElement","toggleAttribute","dispatchEvent","CustomEvent","element","querySelector","render","sheetClasses","overlayClasses","contentClasses","bodyClasses","html","propName","options","__decorateClass","property","type","String","reflect","prototype","Boolean","query","protoOrDescriptor","name","willUpdate","Object","assign","waitUntilFirstUpdate","changedProps","call","has","oldValue","get","hasUpdated","customElement"],"mappings":";;;;;;;;;;;;;;AAUA,IAAqBA,IAArB,cAA2CC;EAA3C;AAAAC,UAAAA,GAAAC,SAAAA,GAE6CC,KAAAC,OAAAA,IACDD,KAAAE,WAAkCC,EAAsBC,MACvDJ,KAAAK,UAAAA,IACAL,KAAAM,WACAN,KAAAO,gBAAAA,IAE5CP,KAAQQ,qBAAyC,MA6IjDR,KAAQS,qBAAsBC,OAAAA;AAC7BA,QAAEC,gBAAAA,GACGX,KAAKM,QACTM,EAAMC,QAAQb,KAAKc,GAAAA;AAAAA,IAAAA;AAAAA,EAErB;AAAA,EA7IA,aAAaC,GAAoBC,GAAAA;AAC5BA,IAAAA,KACHhB,KAAKQ,qBAAqBS,SAASC,eACnClB,KAAKmB,mBAAAA,EAAmB,GACxBnB,KAAKoB,UAAAA,GACLpB,KAAKqB,MAAAA,MAELrB,KAAKsB,WAAAA,GACLtB,KAAKmB,mBAAAA,EAAmB,GACxBnB,KAAKQ,oBAAoBa,MAAAA,GACzBrB,KAAKQ,qBAAqB;AAAA,EAE5B;AAAA,EAEQ,YAAAY;AACP,QAAA,CAAKpB,KAAKuB,aAAAA,CAAcvB,KAAKwB,UAAW;AAExC,UAAMC,IAAS,EACdC,UAAU,KACVC,QAAQ,iCACRC,MAAM,WAAA;AAIP5B,SAAKuB,UAAUM,QAAQ,CAAC,EAAEC,SAAS,EAAA,GAAK,EAAEA,SAAS,IAAA,CAAA,GAAQL,CAAAA;AAG3D,UAAMM,IACL/B,KAAKE,aAAaC,EAAsBC,OACrC,CAAC,EAAE2B,WAAW,mBAAA,GAAsB,EAAEA,WAAW,gBAAA,CAAA,IACjD,CAAC,EAAEA,WAAW,mBAAA,GAAsB,EAAEA,WAAW,gBAAA,CAAA;AAErD/B,SAAKwB,UAAUK,QAAQE,GAAWN,CAAAA;AAAAA,EACnC;AAAA,EAEQ,aAAA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,YAAMmB,IAAWH,EAAaI,IAAIpB,IAC5B/D,IAAWhB,KAAK+E,CAAAA;AAElBmB,MAAAA,MAAalF,MACXgE,GAASc,wBAAAA,CAAwB9F,KAAKoG,cAC1CpG,KAAK0F,CAAAA,EAAMM,KAAKhG,MAAMkG,GAAUlF;IAGnC;AAAA,EACD;AAAA,EAAA,GD3BmBpB,EAapB0F,WAAA,gBAAA,CAAA,GAboB1F,IAArBqF,EAAA,CADCoB,EAAc,gBAAA,CAAA,GACMzG,CAAAA;"}
|
package/dist/sheet.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sheet.service-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./sheet.service-CdcwIejg.cjs");require("./sheet-BH4evGq6.cjs"),exports.SchmancySheetPosition=e.SchmancySheetPosition,exports.sheet=e.sheet;
|
|
2
2
|
//# sourceMappingURL=sheet.cjs.map
|
package/dist/sheet.js
CHANGED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Subject as u, switchMap as r, map as a, of as m, tap as h, delay as n, fromEvent as c, take as S } from "rxjs";
|
|
2
|
+
import { d as p } from "./tailwind.mixin-Cb9Uc9-p.js";
|
|
3
|
+
var b = ((e) => (e.Side = "side", e.Bottom = "bottom", e))(b || {});
|
|
4
|
+
const w = new class {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.bottomSheet = new u(), this.activeSheets = /* @__PURE__ */ new Set(), this.popStateListenerActive = !1, this.setupSheetOpeningLogic(), this.setupPopStateListener();
|
|
7
|
+
}
|
|
8
|
+
setupSheetOpeningLogic() {
|
|
9
|
+
this.bottomSheet.pipe(r((e) => {
|
|
10
|
+
const t = e.uid ?? `sheet-${Date.now()}`;
|
|
11
|
+
return p("schmancy-sheet").pipe(a((s) => {
|
|
12
|
+
const i = s?.getAttribute("uid") === t ? s : null;
|
|
13
|
+
return { target: e, existingSheet: i, uid: t };
|
|
14
|
+
}));
|
|
15
|
+
}), r(({ target: e, existingSheet: t, uid: s }) => t ? m({ target: e, sheet: t, uid: s }) : p("schmancy-theme").pipe(a((i) => {
|
|
16
|
+
const d = i || document.body, o = document.createElement("schmancy-sheet");
|
|
17
|
+
return o.setAttribute("uid", s), d.appendChild(o), { target: e, sheet: o, uid: s };
|
|
18
|
+
}))), h(({ target: e, sheet: t }) => {
|
|
19
|
+
e.lock && t.setAttribute("lock", "true");
|
|
20
|
+
const s = e.position || (window.innerWidth >= 768 ? "side" : "bottom");
|
|
21
|
+
t.setAttribute("position", s), e.persist && t.setAttribute("persist", String(e.persist)), document.body.style.overflow = "hidden";
|
|
22
|
+
}), n(20), h(({ target: e, uid: t }) => {
|
|
23
|
+
window.dispatchEvent(new CustomEvent("schmancy-sheet-render", { detail: { component: e.component, uid: t, props: e.props }, bubbles: !0, composed: !0 }));
|
|
24
|
+
}), n(1), h(({ sheet: e, uid: t }) => {
|
|
25
|
+
e.setAttribute("open", "true"), this.activeSheets.add(t), c(e, "close").pipe(S(1), n(300)).subscribe(() => {
|
|
26
|
+
this.activeSheets.delete(t);
|
|
27
|
+
const s = e.getAttribute("persist");
|
|
28
|
+
(!s || s === "false") && e.remove(), document.body.style.overflow = "auto";
|
|
29
|
+
});
|
|
30
|
+
})).subscribe();
|
|
31
|
+
}
|
|
32
|
+
setupPopStateListener() {
|
|
33
|
+
this.popStateListenerActive || (c(window, "popstate").subscribe((e) => {
|
|
34
|
+
if (this.activeSheets.size > 0) {
|
|
35
|
+
const t = Array.from(this.activeSheets).pop();
|
|
36
|
+
t && (this.dismiss(t), e.state && e.state.schmancySheet && history.pushState({}, "", window.location.href));
|
|
37
|
+
}
|
|
38
|
+
}), this.popStateListenerActive = !0);
|
|
39
|
+
}
|
|
40
|
+
dismiss(e) {
|
|
41
|
+
if (!e && this.activeSheets.size > 0) {
|
|
42
|
+
const t = Array.from(this.activeSheets);
|
|
43
|
+
e = t[t.length - 1];
|
|
44
|
+
}
|
|
45
|
+
e && (window.dispatchEvent(new CustomEvent("schmancy-sheet-dismiss", { detail: { uid: e }, bubbles: !0, composed: !0 })), this.activeSheets.delete(e));
|
|
46
|
+
}
|
|
47
|
+
open(e) {
|
|
48
|
+
this.bottomSheet.next(e);
|
|
49
|
+
}
|
|
50
|
+
push(e) {
|
|
51
|
+
this.bottomSheet.next(e);
|
|
52
|
+
}
|
|
53
|
+
isOpen(e) {
|
|
54
|
+
return this.activeSheets.has(e);
|
|
55
|
+
}
|
|
56
|
+
closeAll() {
|
|
57
|
+
Array.from(this.activeSheets).forEach((e) => {
|
|
58
|
+
this.dismiss(e);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}();
|
|
62
|
+
export {
|
|
63
|
+
b as S,
|
|
64
|
+
w as s
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=sheet.service-Bn-Ea0gS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.service-Bn-Ea0gS.js","sources":["../src/sheet/sheet.service.ts"],"sourcesContent":["import {\n\tdelay,\n\tfromEvent,\n\tmap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttap,\n} from 'rxjs'\nimport { ComponentType } from '../area/router.types'\nimport { discoverComponent } from '@mixins/discovery.service'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n}\n\nexport type SheetConfig = {\n\tcomponent: ComponentType\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\tonBeforeOpen?: (component: HTMLElement) => void\n\tonAfterOpen?: (component: HTMLElement) => void\n\tprops?: Record<string, unknown> // Properties to pass to the component\n}\n\n// Keep old name for backward compatibility\ntype BottomSheeetTarget = SheetConfig\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// Track currently open sheets\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.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\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\n\t\t\t\t\t// Discover existing sheet with this uid\n\t\t\t\t\treturn discoverComponent<SchmancySheet>('schmancy-sheet').pipe(\n\t\t\t\t\t\tmap(existingSheet => {\n\t\t\t\t\t\t\t// Check if discovered sheet matches our uid\n\t\t\t\t\t\t\tconst sheet = existingSheet?.getAttribute('uid') === uid ? existingSheet : null\n\t\t\t\t\t\t\treturn { target, existingSheet: sheet, uid }\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ target, existingSheet, uid }) => {\n\t\t\t\t\t// Discover theme container if creating new sheet\n\t\t\t\t\tif (existingSheet) {\n\t\t\t\t\t\treturn of({ target, sheet: existingSheet, uid })\n\t\t\t\t\t}\n\n\t\t\t\t\treturn discoverComponent<HTMLElement>('schmancy-theme').pipe(\n\t\t\t\t\t\tmap(theme => {\n\t\t\t\t\t\t\t// Determine container - use theme or fallback to body\n\t\t\t\t\t\t\tconst targetContainer = theme || document.body\n\n\t\t\t\t\t\t\t// Create new sheet\n\t\t\t\t\t\t\tconst sheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\t\tsheet.setAttribute('uid', uid)\n\t\t\t\t\t\t\ttargetContainer.appendChild(sheet)\n\n\t\t\t\t\t\t\treturn { target, sheet: sheet as SchmancySheet, uid }\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\t// Configure sheet attributes\n\t\t\t\t\tif (target.lock) sheet.setAttribute('lock', 'true')\n\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\tif (target.persist) sheet.setAttribute('persist', String(target.persist))\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\ttap(({ target, uid }) => {\n\t\t\t\t\t// Dispatch render event - area router handles duplicate prevention\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('schmancy-sheet-render', {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tcomponent: target.component,\n\t\t\t\t\t\t\t\tuid,\n\t\t\t\t\t\t\t\tprops: target.props\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet, uid }) => {\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\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Set up close event listener\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1), delay(300))\n\t\t\t\t\t\t.subscribe(() => {\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\n\t\t\t\t\t\t\t// Only keep sheet if persist is explicitly set to a truthy value\n\t\t\t\t\t\t\tconst persistAttr = sheet.getAttribute('persist')\n\t\t\t\t\t\t\tconst shouldRemove = !persistAttr || persistAttr === 'false'\n\n\t\t\t\t\t\t\tif (shouldRemove) {\n\t\t\t\t\t\t\t\tsheet.remove()\n\t\t\t\t\t\t\t}\n\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 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\t// Get the last sheet (Set maintains insertion order)\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, or dismiss the most recently opened sheet if no uid provided\n\t */\n\tdismiss(uid?: string) {\n\t\tif (!uid && this.activeSheets.size > 0) {\n\t\t\t// Get the last sheet opened (Set maintains insertion order)\n\t\t\tconst sheetsArray = Array.from(this.activeSheets)\n\t\t\tuid = sheetsArray[sheetsArray.length - 1]\n\t\t}\n\n\t\tif (uid) {\n\t\t\twindow.dispatchEvent(\n\t\t\t\tnew CustomEvent('schmancy-sheet-dismiss', {\n\t\t\t\t\tdetail: { uid },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\t\t\t)\n\t\t\tthis.activeSheets.delete(uid)\n\t\t}\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t * @deprecated Use `push` instead for consistency with area router API\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Push a component to the sheet (recommended method)\n\t * Follows the same API pattern as area.push for consistency\n\t */\n\tpush(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\t// Copy the set to avoid modification during iteration\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n\n}\nexport const sheet = new BottomSheetService()\n"],"names":["SchmancySheetPosition","sheet","constructor","this","bottomSheet","Subject","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupPopStateListener","pipe","switchMap","target","uid","Date","now","discoverComponent","map","existingSheet","getAttribute","of","theme","targetContainer","document","body","createElement","setAttribute","appendChild","tap","lock","position","window","innerWidth","persist","String","style","overflow","delay","dispatchEvent","CustomEvent","detail","component","props","bubbles","composed","add","fromEvent","take","subscribe","delete","persistAttr","remove","event","size","lastSheet","Array","from","pop","dismiss","state","schmancySheet","history","pushState","location","href","sheetsArray","length","next","has","closeAll","forEach"],"mappings":";;AAcO,IAAKA,KAAAA,CAAAA,OACXA,EAAA,OAAO,QACPA,EAAA,SAAS,UAFEA,IAAAA,KAAA,CAAA,CAAA;AAoNL,MAAMC,IAAQ,IA3LrB;EAOC,cAAAC;AANAC,SAAAC,cAAc,IAAIC,KAElBF,KAAQG,mCAAmBC,OAE3BJ,KAAQK,yBAAAA,IAGPL,KAAKM,uBAAAA,GACLN,KAAKO,sBAAAA;AAAAA,EACN;AAAA,EAKQ,yBAAAD;AACPN,SAAKC,YACHO,KACAC,EAAUC,CAAAA,MAAAA;AACT,YAAMC,IAAMD,EAAOC,OAAO,SAASC,KAAKC,IAAAA,CAAAA;AAGxC,aAA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AKC,YAAYgE,KAAKvD,CAAAA;AAAAA,EACvB;AAAA,EAMA,KAAKA;AACJV,SAAKC,YAAYgE,KAAKvD,CAAAA;AAAAA,EACvB;AAAA,EAKA,OAAOC;AACN,WAAOX,KAAKG,aAAa+D,IAAIvD,CAAAA;AAAAA,EAC9B;AAAA,EAKA,WAAAwD;AAECd,UAAMC,KAAKtD,KAAKG,cAAciE,QAAQzD,CAAAA,MAAAA;AACrCX,WAAKwD,QAAQ7C,CAAAA;AAAAA,IAAAA,CAAAA;AAAAA,EAEf;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const s=require("rxjs"),h=require("./tailwind.mixin-Wo-oNBIM.cjs");var r=(e=>(e.Side="side",e.Bottom="bottom",e))(r||{});const a=new class{constructor(){this.bottomSheet=new s.Subject,this.activeSheets=new Set,this.popStateListenerActive=!1,this.setupSheetOpeningLogic(),this.setupPopStateListener()}setupSheetOpeningLogic(){this.bottomSheet.pipe(s.switchMap(e=>{const t=e.uid??`sheet-${Date.now()}`;return h.discoverComponent("schmancy-sheet").pipe(s.map(i=>{const o=i?.getAttribute("uid")===t?i:null;return{target:e,existingSheet:o,uid:t}}))}),s.switchMap(({target:e,existingSheet:t,uid:i})=>t?s.of({target:e,sheet:t,uid:i}):h.discoverComponent("schmancy-theme").pipe(s.map(o=>{const c=o||document.body,n=document.createElement("schmancy-sheet");return n.setAttribute("uid",i),c.appendChild(n),{target:e,sheet:n,uid:i}}))),s.tap(({target:e,sheet:t})=>{e.lock&&t.setAttribute("lock","true");const i=e.position||(window.innerWidth>=768?"side":"bottom");t.setAttribute("position",i),e.persist&&t.setAttribute("persist",String(e.persist)),document.body.style.overflow="hidden"}),s.delay(20),s.tap(({target:e,uid:t})=>{window.dispatchEvent(new CustomEvent("schmancy-sheet-render",{detail:{component:e.component,uid:t,props:e.props},bubbles:!0,composed:!0}))}),s.delay(1),s.tap(({sheet:e,uid:t})=>{e.setAttribute("open","true"),this.activeSheets.add(t),s.fromEvent(e,"close").pipe(s.take(1),s.delay(300)).subscribe(()=>{this.activeSheets.delete(t);const i=e.getAttribute("persist");(!i||i==="false")&&e.remove(),document.body.style.overflow="auto"})})).subscribe()}setupPopStateListener(){this.popStateListenerActive||(s.fromEvent(window,"popstate").subscribe(e=>{if(this.activeSheets.size>0){const t=Array.from(this.activeSheets).pop();t&&(this.dismiss(t),e.state&&e.state.schmancySheet&&history.pushState({},"",window.location.href))}}),this.popStateListenerActive=!0)}dismiss(e){if(!e&&this.activeSheets.size>0){const t=Array.from(this.activeSheets);e=t[t.length-1]}e&&(window.dispatchEvent(new CustomEvent("schmancy-sheet-dismiss",{detail:{uid:e},bubbles:!0,composed:!0})),this.activeSheets.delete(e))}open(e){this.bottomSheet.next(e)}push(e){this.bottomSheet.next(e)}isOpen(e){return this.activeSheets.has(e)}closeAll(){Array.from(this.activeSheets).forEach(e=>{this.dismiss(e)})}};exports.SchmancySheetPosition=r,exports.sheet=a;
|
|
2
|
+
//# sourceMappingURL=sheet.service-CdcwIejg.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sheet.service-CdcwIejg.cjs","sources":["../src/sheet/sheet.service.ts"],"sourcesContent":["import {\n\tdelay,\n\tfromEvent,\n\tmap,\n\tof,\n\tSubject,\n\tswitchMap,\n\ttake,\n\ttap,\n} from 'rxjs'\nimport { ComponentType } from '../area/router.types'\nimport { discoverComponent } from '@mixins/discovery.service'\nimport SchmancySheet from './sheet'\n\nexport enum SchmancySheetPosition {\n\tSide = 'side',\n\tBottom = 'bottom',\n}\n\nexport type SheetConfig = {\n\tcomponent: ComponentType\n\tuid?: string\n\tposition?: SchmancySheetPosition\n\tpersist?: boolean\n\tclose?: () => void\n\tlock?: boolean // Controls both ESC and overlay click dismissal\n\tonBeforeOpen?: (component: HTMLElement) => void\n\tonAfterOpen?: (component: HTMLElement) => void\n\tprops?: Record<string, unknown> // Properties to pass to the component\n}\n\n// Keep old name for backward compatibility\ntype BottomSheeetTarget = SheetConfig\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// Track currently open sheets\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.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\tconst uid = target.uid ?? `sheet-${Date.now()}`\n\n\t\t\t\t\t// Discover existing sheet with this uid\n\t\t\t\t\treturn discoverComponent<SchmancySheet>('schmancy-sheet').pipe(\n\t\t\t\t\t\tmap(existingSheet => {\n\t\t\t\t\t\t\t// Check if discovered sheet matches our uid\n\t\t\t\t\t\t\tconst sheet = existingSheet?.getAttribute('uid') === uid ? existingSheet : null\n\t\t\t\t\t\t\treturn { target, existingSheet: sheet, uid }\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tswitchMap(({ target, existingSheet, uid }) => {\n\t\t\t\t\t// Discover theme container if creating new sheet\n\t\t\t\t\tif (existingSheet) {\n\t\t\t\t\t\treturn of({ target, sheet: existingSheet, uid })\n\t\t\t\t\t}\n\n\t\t\t\t\treturn discoverComponent<HTMLElement>('schmancy-theme').pipe(\n\t\t\t\t\t\tmap(theme => {\n\t\t\t\t\t\t\t// Determine container - use theme or fallback to body\n\t\t\t\t\t\t\tconst targetContainer = theme || document.body\n\n\t\t\t\t\t\t\t// Create new sheet\n\t\t\t\t\t\t\tconst sheet = document.createElement('schmancy-sheet')\n\t\t\t\t\t\t\tsheet.setAttribute('uid', uid)\n\t\t\t\t\t\t\ttargetContainer.appendChild(sheet)\n\n\t\t\t\t\t\t\treturn { target, sheet: sheet as SchmancySheet, uid }\n\t\t\t\t\t\t})\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\ttap(({ target, sheet }) => {\n\t\t\t\t\t// Configure sheet attributes\n\t\t\t\t\tif (target.lock) sheet.setAttribute('lock', 'true')\n\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\tif (target.persist) sheet.setAttribute('persist', String(target.persist))\n\n\t\t\t\t\tdocument.body.style.overflow = 'hidden' // lock the scroll of the host\n\t\t\t\t}),\n\t\t\t\tdelay(20),\n\t\t\t\ttap(({ target, uid }) => {\n\t\t\t\t\t// Dispatch render event - area router handles duplicate prevention\n\t\t\t\t\twindow.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('schmancy-sheet-render', {\n\t\t\t\t\t\t\tdetail: {\n\t\t\t\t\t\t\t\tcomponent: target.component,\n\t\t\t\t\t\t\t\tuid,\n\t\t\t\t\t\t\t\tprops: target.props\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tbubbles: true,\n\t\t\t\t\t\t\tcomposed: true,\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t}),\n\t\t\t\tdelay(1),\n\t\t\t\ttap(({ sheet, uid }) => {\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\tthis.activeSheets.add(uid)\n\n\t\t\t\t\t// Set up close event listener\n\t\t\t\t\tfromEvent<CustomEvent>(sheet, 'close')\n\t\t\t\t\t\t.pipe(take(1), delay(300))\n\t\t\t\t\t\t.subscribe(() => {\n\t\t\t\t\t\t\t// Remove from active sheets tracking\n\t\t\t\t\t\t\tthis.activeSheets.delete(uid)\n\n\t\t\t\t\t\t\t// Only keep sheet if persist is explicitly set to a truthy value\n\t\t\t\t\t\t\tconst persistAttr = sheet.getAttribute('persist')\n\t\t\t\t\t\t\tconst shouldRemove = !persistAttr || persistAttr === 'false'\n\n\t\t\t\t\t\t\tif (shouldRemove) {\n\t\t\t\t\t\t\t\tsheet.remove()\n\t\t\t\t\t\t\t}\n\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 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\t// Get the last sheet (Set maintains insertion order)\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, or dismiss the most recently opened sheet if no uid provided\n\t */\n\tdismiss(uid?: string) {\n\t\tif (!uid && this.activeSheets.size > 0) {\n\t\t\t// Get the last sheet opened (Set maintains insertion order)\n\t\t\tconst sheetsArray = Array.from(this.activeSheets)\n\t\t\tuid = sheetsArray[sheetsArray.length - 1]\n\t\t}\n\n\t\tif (uid) {\n\t\t\twindow.dispatchEvent(\n\t\t\t\tnew CustomEvent('schmancy-sheet-dismiss', {\n\t\t\t\t\tdetail: { uid },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t})\n\t\t\t)\n\t\t\tthis.activeSheets.delete(uid)\n\t\t}\n\t}\n\n\t/**\n\t * Open a sheet with the given target configuration\n\t * @deprecated Use `push` instead for consistency with area router API\n\t */\n\topen(target: BottomSheeetTarget) {\n\t\tthis.bottomSheet.next(target)\n\t}\n\n\t/**\n\t * Push a component to the sheet (recommended method)\n\t * Follows the same API pattern as area.push for consistency\n\t */\n\tpush(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\t// Copy the set to avoid modification during iteration\n\t\tArray.from(this.activeSheets).forEach(uid => {\n\t\t\tthis.dismiss(uid)\n\t\t})\n\t}\n\n}\nexport const sheet = new BottomSheetService()\n"],"names":["SchmancySheetPosition","sheet","constructor","this","bottomSheet","Subject","activeSheets","Set","popStateListenerActive","setupSheetOpeningLogic","setupPopStateListener","pipe","switchMap","target","uid","Date","now","discoverComponent","map","existingSheet","getAttribute","of","theme","targetContainer","document","body","createElement","setAttribute","appendChild","tap","lock","position","window","innerWidth","persist","String","style","overflow","delay","dispatchEvent","CustomEvent","detail","component","props","bubbles","composed","add","fromEvent","take","subscribe","delete","persistAttr","remove","event","size","lastSheet","Array","from","pop","dismiss","state","schmancySheet","history","pushState","location","href","sheetsArray","length","next","has","closeAll","forEach"],"mappings":"gFAcO,IAAKA,GAAAA,IACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SAFEA,IAAAA,GAAA,CAAA,CAAA,EAoNL,MAAMC,EAAQ,IA3LrB,KAAA,CAOC,aAAAC,CANAC,KAAAC,YAAc,IAAIC,UAElBF,KAAQG,iBAAmBC,IAE3BJ,KAAQK,0BAGPL,KAAKM,yBACLN,KAAKO,sBAAAA,CACN,CAKQ,yBACPP,KAAKC,YACHO,KACAC,EAAAA,UAAUC,IACT,MAAMC,EAAMD,EAAOC,KAAO,SAASC,KAAKC,I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ACJV,KAAKC,YAAYgE,KAAKvD,CAAAA,CACvB,CAKA,OAAOC,EAAAA,CACN,OAAOX,KAAKG,aAAa+D,IAAIvD,CAAAA,CAC9B,CAKA,UAAAwD,CAECd,MAAMC,KAAKtD,KAAKG,YAAAA,EAAciE,QAAQzD,GAAAA,CACrCX,KAAKwD,QAAQ7C,CAAAA,CAAAA,CAAAA,CAEf,CAAA"}
|
package/dist/teleport.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-D8kuLXpu.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
|
package/dist/teleport.js
CHANGED
package/package.json
CHANGED
|
@@ -18,7 +18,6 @@ export type SheetConfig = {
|
|
|
18
18
|
type BottomSheeetTarget = SheetConfig;
|
|
19
19
|
declare class BottomSheetService {
|
|
20
20
|
bottomSheet: Subject<SheetConfig>;
|
|
21
|
-
$dismiss: Subject<string>;
|
|
22
21
|
private activeSheets;
|
|
23
22
|
private popStateListenerActive;
|
|
24
23
|
constructor();
|
|
@@ -26,10 +25,6 @@ declare class BottomSheetService {
|
|
|
26
25
|
* Sets up the main sheet opening logic
|
|
27
26
|
*/
|
|
28
27
|
private setupSheetOpeningLogic;
|
|
29
|
-
/**
|
|
30
|
-
* Sets up the sheet closing/dismissal logic
|
|
31
|
-
*/
|
|
32
|
-
private setupSheetDismissLogic;
|
|
33
28
|
/**
|
|
34
29
|
* Sets up the popstate listener to handle browser back button
|
|
35
30
|
*/
|