@mhmo91/schmancy 0.2.125 → 0.2.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./teleport.component-CoBmvVft.cjs");
1
+ "use strict";require("./teleport.component-Cmbvbylw.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./teleport.component-kmPwZ6q9.js";
1
+ import "./teleport.component-CrOAEYhZ.js";
2
2
  //# sourceMappingURL=card.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CoBmvVft.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-Cmbvbylw.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
2
2
  //# sourceMappingURL=content-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-kmPwZ6q9.js";
1
+ import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-CrOAEYhZ.js";
2
2
  export {
3
3
  n as SchmancyContentDrawer,
4
4
  t as SchmancyContentDrawerID,
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-C7Kwa_OI.cjs");const c=require("./area.component-AypdoH-o.cjs");require("./autocomplete-BrXYON3m.cjs"),require("./spinner-BIT7SlWT.cjs");const h=require("./icon-button-CNn-TBQr.cjs"),e=require("./teleport.component-CoBmvVft.cjs"),d=require("./checkbox-D9hGlFti.cjs");require("./chips-wP7Z-qFr.cjs");const s=require("./payment-card-form-BaysKg6Z.cjs");require("./date-range-BHtt61m5.cjs");const l=require("./delay-xd8PmM2r.cjs"),i=require("./ripple-C2BHbhcS.cjs");require("./divider-CW3prtEN.cjs");const u=require("./timezone-D14kTMKK.cjs");require("./form-GwdkWkeq.cjs"),require("./icon-DYd0ia3y.cjs"),require("./input-BDvmjqzB.cjs");const n=require("./flex-CbweZ1uz.cjs"),S=require("./list-DGZ8nQDV.cjs");require("./menu-BoAxrHvz.cjs");const y=require("./outlet-C9H_6XOK.cjs");require("./option-BOoGEXyd.cjs");const f=require("./radio-group-BV6zZQBP.cjs"),C=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const O=require("./select-dLquQtbc.cjs"),a=require("./sheet-RxCJqnwE.cjs"),b=require("./slider-Cw5jFlAO.cjs"),o=require("./schmancy-steps-container-CQp7mdgo.cjs"),t=require("./context-object-CgZ6F8E9.cjs"),r=require("./selector-hook-B5oIBdcJ.cjs"),p=require("./surface-CU_71bTu.cjs"),g=require("./table-B3lX6zue.cjs");require("./tabs-group-DKgFtkF4.cjs"),require("./textarea-BX6iD8ez.cjs");const m=require("./theme.component-DvlxAH1p.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-C8uLYaSN.cjs");const D=require("./tree-C_TPLHEo.cjs"),P=require("./types.cjs"),j=require("./typewriter-C2NQzIJ9.cjs"),w=require("./typography-f0kdRUDj.cjs"),T=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),exports.area=c.area,exports.routerHistory=c.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>d.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>s.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>l.SchmancyDelay}),exports.delayContext=l.delayContext,exports.color=i.color,exports.fullHeight=i.fullHeight,exports.ripple=i.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>u.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>u.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>n.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>n.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>n.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>n.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>S.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>S.SchmancyListItem}),exports.SchmancyListTypeContext=S.SchmancyListTypeContext,exports.$notify=y.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>y.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>f.RadioGroup}),exports.mutationObserver=C.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>O.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.sheet=a.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>b.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>b.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>o.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>o.SchmancyStepsContainer}),exports.StepsController=o.StepsController,exports.stepsContext=o.stepsContext,exports.IndexedDBStorageManager=t.IndexedDBStorageManager,exports.LocalStorageManager=t.LocalStorageManager,exports.MemoryStorageManager=t.MemoryStorageManager,exports.SchmancyStoreObject=t.SchmancyStoreObject,exports.SessionStorageManager=t.SessionStorageManager,exports.StoreError=t.StoreError,exports.createStorageManager=t.createStorageManager,exports.createCollectionSelector=r.createCollectionSelector,exports.createCompoundSelector=r.createCompoundSelector,exports.createContext=r.createContext,exports.createCountSelector=r.createCountSelector,exports.createFilterSelector=r.createFilterSelector,exports.createItemSelector=r.createItemSelector,exports.createSelector=r.createSelector,exports.filterMap=r.filterMap,exports.filterMapItems=r.filterMapItems,exports.select=r.select,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),exports.SchmancySurfaceTypeContext=p.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>g.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>g.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>m.SchmancyThemeComponent}),exports.formateTheme=m.formateTheme,exports.tailwindStyles=m.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>D.SchmancyTree}),exports.SchmancyEvents=P.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>j.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=T.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-C7Kwa_OI.cjs");const c=require("./area.component-AypdoH-o.cjs");require("./autocomplete-BrXYON3m.cjs"),require("./spinner-BIT7SlWT.cjs");const h=require("./icon-button-CNn-TBQr.cjs"),e=require("./teleport.component-Cmbvbylw.cjs"),d=require("./checkbox-D9hGlFti.cjs");require("./chips-wP7Z-qFr.cjs");const s=require("./payment-card-form-BaysKg6Z.cjs");require("./date-range-BHtt61m5.cjs");const l=require("./delay-xd8PmM2r.cjs"),i=require("./ripple-C2BHbhcS.cjs");require("./divider-CW3prtEN.cjs");const u=require("./timezone-D14kTMKK.cjs");require("./form-GwdkWkeq.cjs"),require("./icon-DYd0ia3y.cjs"),require("./input-BDvmjqzB.cjs");const n=require("./flex-CbweZ1uz.cjs"),S=require("./list-DGZ8nQDV.cjs");require("./menu-BoAxrHvz.cjs");const y=require("./outlet-C9H_6XOK.cjs");require("./option-BOoGEXyd.cjs");const f=require("./radio-group-BV6zZQBP.cjs"),C=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const O=require("./select-DUqzjckq.cjs"),a=require("./sheet-RxCJqnwE.cjs"),b=require("./slider-Cw5jFlAO.cjs"),o=require("./schmancy-steps-container-CQp7mdgo.cjs"),t=require("./context-object-CgZ6F8E9.cjs"),r=require("./selector-hook-B5oIBdcJ.cjs"),p=require("./surface-CU_71bTu.cjs"),g=require("./table-B3lX6zue.cjs");require("./tabs-group-DKgFtkF4.cjs"),require("./textarea-BX6iD8ez.cjs");const m=require("./theme.component-DvlxAH1p.cjs"),q=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-C8uLYaSN.cjs");const D=require("./tree-C_TPLHEo.cjs"),P=require("./types.cjs"),j=require("./typewriter-C2NQzIJ9.cjs"),w=require("./typography-f0kdRUDj.cjs"),T=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=c.FINDING_MORTIES,exports.HERE_RICKY=c.HERE_RICKY,exports.HISTORY_STRATEGY=c.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>c.SchmancyArea}),exports.area=c.area,exports.routerHistory=c.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>h.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>h.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>d.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>s.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>l.SchmancyDelay}),exports.delayContext=l.delayContext,exports.color=i.color,exports.fullHeight=i.fullHeight,exports.ripple=i.ripple,Object.defineProperty(exports,"SchmancyCountriesSelect",{enumerable:!0,get:()=>u.SchmancyCountriesSelect}),Object.defineProperty(exports,"SchmancyTimezonesSelect",{enumerable:!0,get:()=>u.SchmancyTimezonesSelect}),Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>n.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>n.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>n.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>n.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>S.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>S.SchmancyListItem}),exports.SchmancyListTypeContext=S.SchmancyListTypeContext,exports.$notify=y.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>y.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>y.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>f.RadioGroup}),exports.mutationObserver=C.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>O.SchmancySelect}),exports.SchmancySheetPosition=a.SchmancySheetPosition,exports.SheetHereMorty=a.SheetHereMorty,exports.SheetWhereAreYouRicky=a.SheetWhereAreYouRicky,exports.sheet=a.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>b.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>b.SchmancySlider}),Object.defineProperty(exports,"SchmancyStep",{enumerable:!0,get:()=>o.SchmancyStep}),Object.defineProperty(exports,"SchmancyStepsContainer",{enumerable:!0,get:()=>o.SchmancyStepsContainer}),exports.StepsController=o.StepsController,exports.stepsContext=o.stepsContext,exports.IndexedDBStorageManager=t.IndexedDBStorageManager,exports.LocalStorageManager=t.LocalStorageManager,exports.MemoryStorageManager=t.MemoryStorageManager,exports.SchmancyStoreObject=t.SchmancyStoreObject,exports.SessionStorageManager=t.SessionStorageManager,exports.StoreError=t.StoreError,exports.createStorageManager=t.createStorageManager,exports.createCollectionSelector=r.createCollectionSelector,exports.createCompoundSelector=r.createCompoundSelector,exports.createContext=r.createContext,exports.createCountSelector=r.createCountSelector,exports.createFilterSelector=r.createFilterSelector,exports.createItemSelector=r.createItemSelector,exports.createSelector=r.createSelector,exports.filterMap=r.filterMap,exports.filterMapItems=r.filterMapItems,exports.select=r.select,Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),exports.SchmancySurfaceTypeContext=p.SchmancySurfaceTypeContext,Object.defineProperty(exports,"SchmancyDataTable",{enumerable:!0,get:()=>g.SchmancyDataTable}),Object.defineProperty(exports,"SchmancyTableRow",{enumerable:!0,get:()=>g.SchmancyTableRow}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>m.SchmancyThemeComponent}),exports.formateTheme=m.formateTheme,exports.tailwindStyles=m.tailwindStyles,exports.SchmancyTheme=q.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>D.SchmancyTree}),exports.SchmancyEvents=P.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>j.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=T.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { F as D, H as w, b as d, S as g, a as M, r as T } from "./area.component
3
3
  import "./autocomplete-DtXL-EYa.js";
4
4
  import "./spinner-Cr6ZRUW_.js";
5
5
  import { S as u, a as I } from "./icon-button-Cb9UFHRA.js";
6
- import { $ as R, H, e as v, b as E, f as F, c as L, d as A, g as O, S as Y, a as $, i as k, k as G, l as W, m as B, j as _, n as j, o as P, W as z, s as K, h as V, t as q } from "./teleport.component-kmPwZ6q9.js";
6
+ import { $ as R, H, e as v, b as E, f as F, c as L, d as A, g as O, S as Y, a as $, i as k, k as G, l as W, m as B, j as _, n as j, o as P, W as z, s as K, h as V, t as q } from "./teleport.component-CrOAEYhZ.js";
7
7
  import { S as Q } from "./checkbox-C6z4niEj.js";
8
8
  import "./chips-De6Vldxt.js";
9
9
  import { S as X } from "./payment-card-form-DtcRjZp8.js";
@@ -24,7 +24,7 @@ import { R as Ta } from "./radio-group-BPFwj4dx.js";
24
24
  import { mutationObserver as ua } from "./rxjs-utils.js";
25
25
  import "rxjs";
26
26
  import "./index-CuY8m6ta.js";
27
- import { S as Na } from "./select-CGse8Q3B.js";
27
+ import { S as Na } from "./select-BqN9V7cw.js";
28
28
  import { S as Ha, b as va, a as Ea, s as Fa } from "./sheet-PKhdztII.js";
29
29
  import { S as Aa, a as Oa } from "./slider-DKZODC7g.js";
30
30
  import { S as $a, a as ka, b as Ga, s as Wa } from "./schmancy-steps-container-CT4W6h4t.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CoBmvVft.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-Cmbvbylw.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
2
2
  //# sourceMappingURL=nav-drawer.cjs.map
@@ -1,4 +1,4 @@
1
- import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-kmPwZ6q9.js";
1
+ import { $ as c, i as e, k as n, l as m, m as s, j as h, n as i, h as t } from "./teleport.component-CrOAEYhZ.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -148,7 +148,7 @@ let a = class extends b(V`
148
148
  this.setupOptionsAccessibility(), this.checkValidity();
149
149
  }
150
150
  dispatchChange(t) {
151
- this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.dispatchEvent(new Event("change", { bubbles: !0 })), this.checkValidity();
151
+ this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.checkValidity();
152
152
  }
153
153
  checkValidity() {
154
154
  var e, s;
@@ -231,4 +231,4 @@ a.formAssociated = !0, o([r({ type: String })], a.prototype, "name", 2), o([r({
231
231
  export {
232
232
  a as S
233
233
  };
234
- //# sourceMappingURL=select-CGse8Q3B.js.map
234
+ //# sourceMappingURL=select-BqN9V7cw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-BqN9V7cw.js","sources":["../src/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n@customElement('schmancy-select')\nexport class SchmancySelect extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`) {\n\t// Form association setup\n\tstatic formAssociated = true\n\tprivate internals?: ElementInternals\n\n\t// API\n\t@property({ type: String }) name: string | undefined\n\t@property({ type: Boolean, reflect: true }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true }) value: string | string[] = '' // for single-select or multi-select\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\t@property({ type: String }) hint = ''\n\t@property({ type: String }) validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\t@property({ type: String }) validationMessage = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\t@state() _userInteracted = false\n\t@state() private _touched = false\n\t@state() private _dirty = false\n\t@state() private _submitted = false\n\n\tconstructor() {\n\t\tsuper()\n\t\t// Initialize ElementInternals for form association\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch (e) {\n\t\t\tconsole.warn('FormAssociated elements not supported in this browser', e)\n\t\t}\n\t}\n\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substr(2, 9)}`\n\t\t}\n\t\tthis.addEventListener('keydown', this.handleKeyDown)\n\n\t\t// Listen for form submission events to mark field as submitted\n\t\tif (this.internals?.form) {\n\t\t\tthis.internals.form.addEventListener('submit', () => {\n\t\t\t\tthis._submitted = true\n\t\t\t\tthis.checkValidity()\n\t\t\t})\n\n\t\t\t// Listen for form reset\n\t\t\tthis.internals.form.addEventListener('reset', () => {\n\t\t\t\tthis.reset()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.removeEventListener('keydown', this.handleKeyDown)\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove form event listeners\n\t\tif (this.internals?.form) {\n\t\t\tthis.internals.form.removeEventListener('submit', () => {\n\t\t\t\tthis._submitted = true\n\t\t\t})\n\n\t\t\tthis.internals.form.removeEventListener('reset', () => {\n\t\t\t\tthis.reset()\n\t\t\t})\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Update form value when component value changes\n\t\t\tconst formValue = Array.isArray(this.value) ? this.value.join(',') : this.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// Mark as dirty if value changes from initial value\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis._dirty = true\n\t\t\t}\n\n\t\t\t// Check validity based on validation strategy\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this._touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this._dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this._submitted\n\t\t\tdefault:\n\t\t\t\treturn this._touched\n\t\t}\n\t}\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : []\n\t\t\tthis.options.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\tconst selectedOption = this.options.find(o => o.value === this.value)\n\t\t\tthis.valueLabel = selectedOption?.label || this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\t\t\toption.tabIndex = -1\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : []\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? selectedValues.includes(option.value) : option.value === this.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\t// Get the available height\n\t\tconst availableHeight = window.innerHeight - reference.getBoundingClientRect().bottom - 10 // 10px buffer\n\t\tthis.ul.style.maxHeight = `${availableHeight}px` // Set max height\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst current = this.options.findIndex(o => o.matches(':focus')) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(this.options, Math.min(current + 1, this.options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(this.options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (current >= 0) this.handleOptionSelect(this.options[current].value)\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: HTMLElement[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tcombobox?.setAttribute('aria-activedescendant', option.id)\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\tthis._touched = true // Mark as touched when dropdown is opened\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\tthis.positionDropdown()\n\t\tthis.setupOptionsAccessibility()\n\n\t\tconst options = Array.from(this.ul.querySelectorAll('[role=\"option\"]')) as HTMLElement[]\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.getAttribute('value') === this.value)\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\tthis._touched = true // Mark as touched when dropdown is closed\n\t\tthis.isOpen = false\n\t\tthis.cleanupPositioner?.()\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tcombobox?.removeAttribute('aria-activedescendant')\n\t\tcombobox?.focus()\n\n\t\t// Check validity when closing, respecting validation strategy\n\t\tif (this.shouldShowValidation()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\tthis._userInteracted = true\n\t\tthis._touched = true\n\t\tthis._dirty = true\n\n\t\tif (this.multi) {\n\t\t\tconst option = this.options.find(o => o.value === value)\n\t\t\tif (!option) return\n\n\t\t\toption.selected = !option.selected\n\t\t\tlet selectedValues = Array.isArray(this.value) ? [...this.value] : []\n\n\t\t\tif (option.selected) {\n\t\t\t\tselectedValues = [...selectedValues, value]\n\t\t\t} else {\n\t\t\t\tselectedValues = selectedValues.filter(v => v !== value)\n\t\t\t}\n\n\t\t\tthis.value = selectedValues\n\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\n\t\t\tthis.dispatchChange(selectedValues)\n\t\t} else {\n\t\t\tthis.options.forEach(o => (o.selected = o.value === value))\n\t\t\tthis.value = value\n\t\t\tthis.valueLabel = this.options.find(o => o.value === value)?.label || this.placeholder\n\t\t\tthis.dispatchChange(value)\n\t\t\tthis.closeDropdown()\n\t\t}\n\n\t\tthis.setupOptionsAccessibility()\n\n\t\t// Check validity respecting validation strategy\n\t\tthis.checkValidity()\n\t}\n\n\tprivate dispatchChange(value: string | string[]) {\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi ? !Array.isArray(this.value) || this.value.length === 0 : !this.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this.shouldShowValidation()\n\t\t\tthis.inputRef.error = showError\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\tpublic setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this.shouldShowValidation()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\tpublic reset() {\n\t\tthis.value = ''\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis.validationMessage = ''\n\t\tthis._touched = false\n\t\tthis._dirty = false\n\t\tthis._submitted = false\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\t\tthis.options.forEach(o => (o.selected = false))\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy\n\t\tconst showErrors = !this.isValid && this.shouldShowValidation()\n\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name}\n\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\treadonly\n\t\t\t\t\t@click=${() => (this.isOpen ? this.closeDropdown() : this.openDropdown(true))}\n\t\t\t\t></sch-input>\n\n\t\t\t\t<div\n\t\t\t\t\tid=\"overlay\"\n\t\t\t\t\tclass=\"fixed inset-0\"\n\t\t\t\t\t?hidden=${!this.isOpen}\n\t\t\t\t\t@click=${this.closeDropdown}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t></div>\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute z-[1000] mt-1 w-full rounded-md shadow-sm': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({ bgColor: SchmancyTheme.sys.color.surface.container })}\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\tconst customEvt = e as CustomEvent\n\t\t\t\t\t\tconst detailVal = customEvt.detail?.value\n\t\t\t\t\t\tif (detailVal) {\n\t\t\t\t\t\t\tthis.handleOptionSelect(detailVal)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t\tthis.setupOptionsAccessibility()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"names":["SchmancySelect","$LitElement","css","constructor","super","this","required","placeholder","value","multi","label","hint","validateOn","isOpen","valueLabel","isValid","validationMessage","_userInteracted","_touched","_dirty","_submitted","handleKeyDown","e","includes","key","preventDefault","openDropdown","current","options","findIndex","o","matches","closeDropdown","focusOption","Math","min","length","max","handleOptionSelect","internals","attachInternals","form","connectedCallback","id","random","toString","substr","addEventListener","checkValidity","reset","disconnectedCallback","removeEventListener","cleanupPositioner","syncSelection","setupOptionsAccessibility","changedProps","updated","has","formValue","Array","isArray","join","setFormValue","hasUpdated","forceValidation","selectedValues","forEach","selected","filter","map","selectedOption","find","option","index","setAttribute","tabIndex","String","positionDropdown","reference","renderRoot","querySelector","ul","availableHeight","window","innerHeight","getBoundingClientRect","bottom","style","maxHeight","autoUpdate","async","x","y","computePosition","placement","middleware","offset","flip","shift","padding","Object","assign","left","top","position","focus","combobox","report","updateComplete","from","querySelectorAll","selectedIndex","getAttribute","reportValidity","removeAttribute","shouldShowValidation","v","dispatchChange","dispatchEvent","CustomEvent","detail","bubbles","composed","isEmpty","setValidity","valueMissing","inputRef","showError","error","valid","message","customError","showErrors","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","container","customEvt","detailVal","formAssociated","__decorateClass","property","type","prototype","Boolean","reflect","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;AAea,IAAAA,IAAN,cAA6BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;EAwC/C,cAAAC;AACOC,UAxBgDC,GAAAA,KAAAC,WAAA,IACbD,KAAAE,cAAA,IAC4BF,KAAAG,QAAA,IACjCH,KAAAI,YACDJ,KAAAK,QAAA,IACDL,KAAAM,OAAA,IACoDN,KAAAO,aAAA,WAG9EP,KAAQQ,SAAS,IACjBR,KAAQS,aAAa,IACrBT,KAAQU,UAAAA,IAC+BV,KAAAW,oBAAA,IAMrBX,KAAAY,kBAAA,IAClBZ,KAAQa,WAAAA,IACRb,KAAQc,SAAAA,IACRd,KAAQe,aAAa,IA2JtBf,KAAAgB,gBAAiBC,OACpB;AAAA,UAAA,CAACjB,KAAKQ,OAKT,QAJI,MAAA,CAAC,SAAS,KAAK,WAAA,EAAaU,SAASD,EAAEE,GAC1CF,MAAAA,EAAEG,kBACFpB,KAAKqB,aAAAA,EAKD;AAAA,YAAAC,IAAUtB,KAAKuB,QAAQC,iBAAeC,EAAEC,QAAQ,QAAc,CAAA,KAAA;AAEpE,cAAQT,EAAEE,KACT;AAAA,QAAA,KAAK;AAAA,QAgBL,KAAK;AACJnB,eAAK2B;AACL;AAAA,QAfD,KAAK;AACJV,YAAEG,eACGpB,GAAAA,KAAA4B,YAAY5B,KAAKuB,SAASM,KAAKC,IAAIR,IAAU,GAAGtB,KAAKuB,QAAQQ,SAAS,CAC3E,CAAA;AAAA;AAAA,QACD,KAAK;AACJd,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A,qBAAA,CAAA,GAEPH,EAAA,CAApBO,EAAM,QA/BKzJ,EA+BSqJ,WAAA,MAAA,CACOH,GAAAA,EAAA,CAA3BO,EAAM,WAAA,CAAA,GAhCKzJ,EAgCgBqJ,WAAA,YAAA,CACsBH,GAAAA,EAAA,CAAjDQ,EAAsB,EAAEC,YAjCb3J,CAAAA,CAAAA,GAAAA,EAiCsCqJ,WAAA,WAAA,CAAA,GAEzCH,EAAA,CAARM,EAAAA,CAAAA,GAnCWxJ,EAmCHqJ,WAAA,mBAAA,IACQH,EAAA,CAAhBM,MApCWxJ,EAoCKqJ,WAAA,YAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GArCWxJ,EAqCKqJ,WAAA,UAAA,IACAH,EAAA,CAAhBM,MAtCWxJ,EAsCKqJ,WAAA,cAAA,CAtCLrJ,GAAAA,IAANkJ,EAAA,CADNU,EAAc,qBACF5J;"}
@@ -8,7 +8,7 @@
8
8
  overflow-y: auto;
9
9
  outline: none;
10
10
  }
11
- `){constructor(){super(),this.required=!1,this.placeholder="",this.value="",this.multi=!1,this.label="",this.hint="",this.validateOn="touched",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage="",this._userInteracted=!1,this._touched=!1,this._dirty=!1,this._submitted=!1,this.handleKeyDown=t=>{if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.openDropdown(!1)));const e=this.options.findIndex(i=>i.matches(":focus"))??-1;switch(t.key){case"Escape":case"Tab":this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusOption(this.options,Math.min(e+1,this.options.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(this.options,Math.max(e-1,0));break;case"Enter":case" ":t.preventDefault(),e>=0&&this.handleOptionSelect(this.options[e].value)}};try{this.internals=this.attachInternals()}catch{}}get form(){var t;return(t=this.internals)==null?void 0:t.form}connectedCallback(){var t;super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substr(2,9)}`),this.addEventListener("keydown",this.handleKeyDown),(t=this.internals)!=null&&t.form&&(this.internals.form.addEventListener("submit",()=>{this._submitted=!0,this.checkValidity()}),this.internals.form.addEventListener("reset",()=>{this.reset()}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),(t=this.cleanupPositioner)==null||t.call(this),(e=this.internals)!=null&&e.form&&(this.internals.form.removeEventListener("submit",()=>{this._submitted=!0}),this.internals.form.removeEventListener("reset",()=>{this.reset()}))}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}updated(t){var e;if(super.updated(t),t.has("value")){const i=Array.isArray(this.value)?this.value.join(","):this.value;(e=this.internals)==null||e.setFormValue(i),this.hasUpdated&&(this._dirty=!0),this.hasUpdated&&this.checkValidity()}}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this._touched;case"dirty":return this._dirty;case"submitted":return this._submitted}}syncSelection(){if(this.multi){const t=Array.isArray(this.value)?this.value:[];this.options.forEach(e=>e.selected=t.includes(e.value)),this.valueLabel=t.length>0?this.options.filter(e=>t.includes(e.value)).map(e=>e.label).join(", "):this.placeholder}else{const t=this.options.find(e=>e.value===this.value);this.valueLabel=(t==null?void 0:t.label)||this.placeholder}}setupOptionsAccessibility(){this.options.forEach((t,e)=>{t.setAttribute("role","option"),t.id||(t.id=`${this.id}-option-${e}`),t.tabIndex=-1;const i=Array.isArray(this.value)?this.value:[];t.setAttribute("aria-selected",String(this.multi?i.includes(t.value):t.value===this.value))})}async positionDropdown(){const t=this.renderRoot.querySelector(".trigger");if(!t||!this.ul)return;const e=window.innerHeight-t.getBoundingClientRect().bottom-10;this.ul.style.maxHeight=`${e}px`,this.cleanupPositioner=l.autoUpdate(t,this.ul,async()=>{const{x:i,y:s}=await l.computePosition(t,this.ul,{placement:"bottom-start",middleware:[l.offset(5),l.flip(),l.shift({padding:5})]});Object.assign(this.ul.style,{left:`${i}px`,top:`${s}px`,position:"absolute"})})}focusOption(t,e){const i=t[e];if(i){i.focus();const s=this.renderRoot.querySelector(".trigger");s==null||s.setAttribute("aria-activedescendant",i.id)}}async openDropdown(t=!1){this._touched=!0,this.isOpen=!0,await this.updateComplete,this.positionDropdown(),this.setupOptionsAccessibility();const e=Array.from(this.ul.querySelectorAll('[role="option"]')),i=this.multi?0:e.findIndex(s=>s.getAttribute("value")===this.value);this.focusOption(e,Math.max(i,0)),t&&this.reportValidity()}closeDropdown(){var e;this._touched=!0,this.isOpen=!1,(e=this.cleanupPositioner)==null||e.call(this);const t=this.renderRoot.querySelector(".trigger");t==null||t.removeAttribute("aria-activedescendant"),t==null||t.focus(),this.shouldShowValidation()&&this.checkValidity()}handleOptionSelect(t){var e;if(this._userInteracted=!0,this._touched=!0,this._dirty=!0,this.multi){const i=this.options.find(o=>o.value===t);if(!i)return;i.selected=!i.selected;let s=Array.isArray(this.value)?[...this.value]:[];s=i.selected?[...s,t]:s.filter(o=>o!==t),this.value=s,this.valueLabel=s.length>0?this.options.filter(o=>s.includes(o.value)).map(o=>o.label).join(", "):this.placeholder,this.dispatchChange(s)}else this.options.forEach(i=>i.selected=i.value===t),this.value=t,this.valueLabel=((e=this.options.find(i=>i.value===t))==null?void 0:e.label)||this.placeholder,this.dispatchChange(t),this.closeDropdown();this.setupOptionsAccessibility(),this.checkValidity()}dispatchChange(t){this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0})),this.checkValidity()}checkValidity(){var i,s;const t=this.multi?!Array.isArray(this.value)||this.value.length===0:!this.value,e=!(this.required&&t);if(this.isValid=e,this.isValid?(this.validationMessage="",(i=this.internals)==null||i.setValidity({})):(this.validationMessage="Please select an option.",(s=this.internals)==null||s.setValidity({valueMissing:!0},"Please select an option.",this.inputRef)),this.inputRef&&this.hasUpdated){const o=!this.isValid&&this.shouldShowValidation();this.inputRef.error=o}return this.isValid}reportValidity(){const t=this.checkValidity();return this.inputRef&&(this.inputRef.error=!t,this.inputRef.hint=t?this.hint:this.validationMessage,t||this.inputRef.reportValidity()),t}setCustomValidity(t){var e,i;this.validationMessage=t,t?(this.isValid=!1,(e=this.internals)==null||e.setValidity({customError:!0},t,this.inputRef)):(this.isValid=!0,(i=this.internals)==null||i.setValidity({})),this.inputRef&&this.shouldShowValidation()&&(this.inputRef.error=!this.isValid,this.inputRef.hint=this.isValid?this.hint:this.validationMessage)}reset(){var t;this.value="",this.valueLabel=this.placeholder,this.isValid=!0,this.validationMessage="",this._touched=!1,this._dirty=!1,this._submitted=!1,this._userInteracted=!1,(t=this.internals)==null||t.setValidity({}),this.options.forEach(e=>e.selected=!1),this.inputRef&&(this.inputRef.error=!1,this.inputRef.hint=this.hint)}render(){const t=!this.isValid&&this.shouldShowValidation();return c.html`
11
+ `){constructor(){super(),this.required=!1,this.placeholder="",this.value="",this.multi=!1,this.label="",this.hint="",this.validateOn="touched",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage="",this._userInteracted=!1,this._touched=!1,this._dirty=!1,this._submitted=!1,this.handleKeyDown=t=>{if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(t.key)&&(t.preventDefault(),this.openDropdown(!1)));const e=this.options.findIndex(i=>i.matches(":focus"))??-1;switch(t.key){case"Escape":case"Tab":this.closeDropdown();break;case"ArrowDown":t.preventDefault(),this.focusOption(this.options,Math.min(e+1,this.options.length-1));break;case"ArrowUp":t.preventDefault(),this.focusOption(this.options,Math.max(e-1,0));break;case"Enter":case" ":t.preventDefault(),e>=0&&this.handleOptionSelect(this.options[e].value)}};try{this.internals=this.attachInternals()}catch{}}get form(){var t;return(t=this.internals)==null?void 0:t.form}connectedCallback(){var t;super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substr(2,9)}`),this.addEventListener("keydown",this.handleKeyDown),(t=this.internals)!=null&&t.form&&(this.internals.form.addEventListener("submit",()=>{this._submitted=!0,this.checkValidity()}),this.internals.form.addEventListener("reset",()=>{this.reset()}))}disconnectedCallback(){var t,e;super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),(t=this.cleanupPositioner)==null||t.call(this),(e=this.internals)!=null&&e.form&&(this.internals.form.removeEventListener("submit",()=>{this._submitted=!0}),this.internals.form.removeEventListener("reset",()=>{this.reset()}))}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}updated(t){var e;if(super.updated(t),t.has("value")){const i=Array.isArray(this.value)?this.value.join(","):this.value;(e=this.internals)==null||e.setFormValue(i),this.hasUpdated&&(this._dirty=!0),this.hasUpdated&&this.checkValidity()}}shouldShowValidation(t=!1){if(t)return!0;switch(this.validateOn){case"always":return!0;case"touched":default:return this._touched;case"dirty":return this._dirty;case"submitted":return this._submitted}}syncSelection(){if(this.multi){const t=Array.isArray(this.value)?this.value:[];this.options.forEach(e=>e.selected=t.includes(e.value)),this.valueLabel=t.length>0?this.options.filter(e=>t.includes(e.value)).map(e=>e.label).join(", "):this.placeholder}else{const t=this.options.find(e=>e.value===this.value);this.valueLabel=(t==null?void 0:t.label)||this.placeholder}}setupOptionsAccessibility(){this.options.forEach((t,e)=>{t.setAttribute("role","option"),t.id||(t.id=`${this.id}-option-${e}`),t.tabIndex=-1;const i=Array.isArray(this.value)?this.value:[];t.setAttribute("aria-selected",String(this.multi?i.includes(t.value):t.value===this.value))})}async positionDropdown(){const t=this.renderRoot.querySelector(".trigger");if(!t||!this.ul)return;const e=window.innerHeight-t.getBoundingClientRect().bottom-10;this.ul.style.maxHeight=`${e}px`,this.cleanupPositioner=l.autoUpdate(t,this.ul,async()=>{const{x:i,y:s}=await l.computePosition(t,this.ul,{placement:"bottom-start",middleware:[l.offset(5),l.flip(),l.shift({padding:5})]});Object.assign(this.ul.style,{left:`${i}px`,top:`${s}px`,position:"absolute"})})}focusOption(t,e){const i=t[e];if(i){i.focus();const s=this.renderRoot.querySelector(".trigger");s==null||s.setAttribute("aria-activedescendant",i.id)}}async openDropdown(t=!1){this._touched=!0,this.isOpen=!0,await this.updateComplete,this.positionDropdown(),this.setupOptionsAccessibility();const e=Array.from(this.ul.querySelectorAll('[role="option"]')),i=this.multi?0:e.findIndex(s=>s.getAttribute("value")===this.value);this.focusOption(e,Math.max(i,0)),t&&this.reportValidity()}closeDropdown(){var e;this._touched=!0,this.isOpen=!1,(e=this.cleanupPositioner)==null||e.call(this);const t=this.renderRoot.querySelector(".trigger");t==null||t.removeAttribute("aria-activedescendant"),t==null||t.focus(),this.shouldShowValidation()&&this.checkValidity()}handleOptionSelect(t){var e;if(this._userInteracted=!0,this._touched=!0,this._dirty=!0,this.multi){const i=this.options.find(o=>o.value===t);if(!i)return;i.selected=!i.selected;let s=Array.isArray(this.value)?[...this.value]:[];s=i.selected?[...s,t]:s.filter(o=>o!==t),this.value=s,this.valueLabel=s.length>0?this.options.filter(o=>s.includes(o.value)).map(o=>o.label).join(", "):this.placeholder,this.dispatchChange(s)}else this.options.forEach(i=>i.selected=i.value===t),this.value=t,this.valueLabel=((e=this.options.find(i=>i.value===t))==null?void 0:e.label)||this.placeholder,this.dispatchChange(t),this.closeDropdown();this.setupOptionsAccessibility(),this.checkValidity()}dispatchChange(t){this.dispatchEvent(new CustomEvent("change",{detail:{value:t},bubbles:!0,composed:!0})),this.checkValidity()}checkValidity(){var i,s;const t=this.multi?!Array.isArray(this.value)||this.value.length===0:!this.value,e=!(this.required&&t);if(this.isValid=e,this.isValid?(this.validationMessage="",(i=this.internals)==null||i.setValidity({})):(this.validationMessage="Please select an option.",(s=this.internals)==null||s.setValidity({valueMissing:!0},"Please select an option.",this.inputRef)),this.inputRef&&this.hasUpdated){const o=!this.isValid&&this.shouldShowValidation();this.inputRef.error=o}return this.isValid}reportValidity(){const t=this.checkValidity();return this.inputRef&&(this.inputRef.error=!t,this.inputRef.hint=t?this.hint:this.validationMessage,t||this.inputRef.reportValidity()),t}setCustomValidity(t){var e,i;this.validationMessage=t,t?(this.isValid=!1,(e=this.internals)==null||e.setValidity({customError:!0},t,this.inputRef)):(this.isValid=!0,(i=this.internals)==null||i.setValidity({})),this.inputRef&&this.shouldShowValidation()&&(this.inputRef.error=!this.isValid,this.inputRef.hint=this.isValid?this.hint:this.validationMessage)}reset(){var t;this.value="",this.valueLabel=this.placeholder,this.isValid=!0,this.validationMessage="",this._touched=!1,this._dirty=!1,this._submitted=!1,this._userInteracted=!1,(t=this.internals)==null||t.setValidity({}),this.options.forEach(e=>e.selected=!1),this.inputRef&&(this.inputRef.error=!1,this.inputRef.hint=this.hint)}render(){const t=!this.isValid&&this.shouldShowValidation();return c.html`
12
12
  <div class="relative">
13
13
  <sch-input
14
14
  .name=${this.name}
@@ -54,4 +54,4 @@
54
54
  </ul>
55
55
  </div>
56
56
  `}},exports.SchmancySelect.formAssociated=!0,n([a.property({type:String})],exports.SchmancySelect.prototype,"name",2),n([a.property({type:Boolean,reflect:!0})],exports.SchmancySelect.prototype,"required",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"placeholder",2),n([a.property({type:String,reflect:!0})],exports.SchmancySelect.prototype,"value",2),n([a.property({type:Boolean})],exports.SchmancySelect.prototype,"multi",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"label",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"hint",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"validateOn",2),n([a.state()],exports.SchmancySelect.prototype,"isOpen",2),n([a.state()],exports.SchmancySelect.prototype,"valueLabel",2),n([a.state()],exports.SchmancySelect.prototype,"isValid",2),n([a.property({type:String})],exports.SchmancySelect.prototype,"validationMessage",2),n([a.query("ul")],exports.SchmancySelect.prototype,"ul",2),n([a.query("sch-input")],exports.SchmancySelect.prototype,"inputRef",2),n([a.queryAssignedElements({flatten:!0})],exports.SchmancySelect.prototype,"options",2),n([a.state()],exports.SchmancySelect.prototype,"_userInteracted",2),n([a.state()],exports.SchmancySelect.prototype,"_touched",2),n([a.state()],exports.SchmancySelect.prototype,"_dirty",2),n([a.state()],exports.SchmancySelect.prototype,"_submitted",2),exports.SchmancySelect=n([a.customElement("schmancy-select")],exports.SchmancySelect);
57
- //# sourceMappingURL=select-dLquQtbc.cjs.map
57
+ //# sourceMappingURL=select-DUqzjckq.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-DUqzjckq.cjs","sources":["../src/select/select.ts"],"sourcesContent":["import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom'\nimport { $LitElement } from '@mixins/index'\nimport { color } from '@schmancy/directives'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { SchmancyTheme } from '@schmancy/theme/theme.interface'\nimport { css, html, PropertyValues, TemplateResult } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\n\nexport type SchmancySelectChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n@customElement('schmancy-select')\nexport class SchmancySelect extends $LitElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t}\n\n\t[role='listbox'] {\n\t\toverflow-y: auto;\n\t\toutline: none;\n\t}\n`) {\n\t// Form association setup\n\tstatic formAssociated = true\n\tprivate internals?: ElementInternals\n\n\t// API\n\t@property({ type: String }) name: string | undefined\n\t@property({ type: Boolean, reflect: true }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true }) value: string | string[] = '' // for single-select or multi-select\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\t@property({ type: String }) hint = ''\n\t@property({ type: String }) validateOn: 'always' | 'touched' | 'dirty' | 'submitted' = 'touched'\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\t@property({ type: String }) validationMessage = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\t@query('sch-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\n\t@state() _userInteracted = false\n\t@state() private _touched = false\n\t@state() private _dirty = false\n\t@state() private _submitted = false\n\n\tconstructor() {\n\t\tsuper()\n\t\t// Initialize ElementInternals for form association\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch (e) {\n\t\t\tconsole.warn('FormAssociated elements not supported in this browser', e)\n\t\t}\n\t}\n\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\tif (!this.id) {\n\t\t\tthis.id = `schmancy-select-${Math.random().toString(36).substr(2, 9)}`\n\t\t}\n\t\tthis.addEventListener('keydown', this.handleKeyDown)\n\n\t\t// Listen for form submission events to mark field as submitted\n\t\tif (this.internals?.form) {\n\t\t\tthis.internals.form.addEventListener('submit', () => {\n\t\t\t\tthis._submitted = true\n\t\t\t\tthis.checkValidity()\n\t\t\t})\n\n\t\t\t// Listen for form reset\n\t\t\tthis.internals.form.addEventListener('reset', () => {\n\t\t\t\tthis.reset()\n\t\t\t})\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.removeEventListener('keydown', this.handleKeyDown)\n\t\tthis.cleanupPositioner?.()\n\n\t\t// Remove form event listeners\n\t\tif (this.internals?.form) {\n\t\t\tthis.internals.form.removeEventListener('submit', () => {\n\t\t\t\tthis._submitted = true\n\t\t\t})\n\n\t\t\tthis.internals.form.removeEventListener('reset', () => {\n\t\t\t\tthis.reset()\n\t\t\t})\n\t\t}\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\n\t}\n\n\tupdated(changedProps: PropertyValues) {\n\t\tsuper.updated(changedProps)\n\n\t\tif (changedProps.has('value')) {\n\t\t\t// Update form value when component value changes\n\t\t\tconst formValue = Array.isArray(this.value) ? this.value.join(',') : this.value\n\t\t\tthis.internals?.setFormValue(formValue)\n\n\t\t\t// Mark as dirty if value changes from initial value\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis._dirty = true\n\t\t\t}\n\n\t\t\t// Check validity based on validation strategy\n\t\t\tif (this.hasUpdated) {\n\t\t\t\tthis.checkValidity()\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Determines if validation errors should be shown based on current state\n\t * and validation strategy\n\t */\n\tprivate shouldShowValidation(forceValidation = false): boolean {\n\t\tif (forceValidation) return true\n\n\t\tswitch (this.validateOn) {\n\t\t\tcase 'always':\n\t\t\t\treturn true\n\t\t\tcase 'touched':\n\t\t\t\treturn this._touched\n\t\t\tcase 'dirty':\n\t\t\t\treturn this._dirty\n\t\t\tcase 'submitted':\n\t\t\t\treturn this._submitted\n\t\t\tdefault:\n\t\t\t\treturn this._touched\n\t\t}\n\t}\n\n\tprivate syncSelection() {\n\t\tif (this.multi) {\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : []\n\t\t\tthis.options.forEach(o => (o.selected = selectedValues.includes(o.value))) // Update option selected state\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\t\t} else {\n\t\t\tconst selectedOption = this.options.find(o => o.value === this.value)\n\t\t\tthis.valueLabel = selectedOption?.label || this.placeholder\n\t\t}\n\t}\n\n\tprivate setupOptionsAccessibility() {\n\t\tthis.options.forEach((option, index) => {\n\t\t\toption.setAttribute('role', 'option')\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\t\t\toption.tabIndex = -1\n\t\t\tconst selectedValues = Array.isArray(this.value) ? this.value : []\n\n\t\t\toption.setAttribute(\n\t\t\t\t'aria-selected',\n\t\t\t\tString(this.multi ? selectedValues.includes(option.value) : option.value === this.value),\n\t\t\t)\n\t\t})\n\t}\n\n\tprivate async positionDropdown() {\n\t\tconst reference = this.renderRoot.querySelector('.trigger') as HTMLElement\n\t\tif (!reference || !this.ul) return\n\n\t\t// Get the available height\n\t\tconst availableHeight = window.innerHeight - reference.getBoundingClientRect().bottom - 10 // 10px buffer\n\t\tthis.ul.style.maxHeight = `${availableHeight}px` // Set max height\n\n\t\tthis.cleanupPositioner = autoUpdate(reference, this.ul, async () => {\n\t\t\tconst { x, y } = await computePosition(reference, this.ul, {\n\t\t\t\tplacement: 'bottom-start',\n\t\t\t\tmiddleware: [offset(5), flip(), shift({ padding: 5 })],\n\t\t\t})\n\n\t\t\tObject.assign(this.ul.style, {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t\tposition: 'absolute',\n\t\t\t})\n\t\t})\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (!this.isOpen) {\n\t\t\tif (['Enter', ' ', 'ArrowDown'].includes(e.key)) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.openDropdown(false)\n\t\t\t}\n\t\t\treturn\n\t\t}\n\n\t\tconst current = this.options.findIndex(o => o.matches(':focus')) ?? -1\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(this.options, Math.min(current + 1, this.options.length - 1))\n\t\t\t\tbreak\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.focusOption(this.options, Math.max(current - 1, 0))\n\t\t\t\tbreak\n\t\t\tcase 'Enter':\n\t\t\tcase ' ':\n\t\t\t\te.preventDefault()\n\t\t\t\tif (current >= 0) this.handleOptionSelect(this.options[current].value)\n\t\t\t\tbreak\n\t\t\tcase 'Tab':\n\t\t\t\tthis.closeDropdown()\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\tprivate focusOption(options: HTMLElement[], index: number) {\n\t\tconst option = options[index]\n\t\tif (option) {\n\t\t\toption.focus()\n\t\t\tconst combobox = this.renderRoot.querySelector('.trigger')\n\t\t\tcombobox?.setAttribute('aria-activedescendant', option.id)\n\t\t}\n\t}\n\n\tprivate async openDropdown(report = false) {\n\t\tthis._touched = true // Mark as touched when dropdown is opened\n\t\tthis.isOpen = true\n\t\tawait this.updateComplete\n\n\t\tthis.positionDropdown()\n\t\tthis.setupOptionsAccessibility()\n\n\t\tconst options = Array.from(this.ul.querySelectorAll('[role=\"option\"]')) as HTMLElement[]\n\t\tconst selectedIndex = this.multi ? 0 : options.findIndex(o => o.getAttribute('value') === this.value)\n\t\tthis.focusOption(options, Math.max(selectedIndex, 0))\n\n\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\n\t\tthis._touched = true // Mark as touched when dropdown is closed\n\t\tthis.isOpen = false\n\t\tthis.cleanupPositioner?.()\n\t\tconst combobox = this.renderRoot.querySelector<HTMLElement>('.trigger')\n\t\tcombobox?.removeAttribute('aria-activedescendant')\n\t\tcombobox?.focus()\n\n\t\t// Check validity when closing, respecting validation strategy\n\t\tif (this.shouldShowValidation()) {\n\t\t\tthis.checkValidity()\n\t\t}\n\t}\n\n\tprivate handleOptionSelect(value: string) {\n\t\tthis._userInteracted = true\n\t\tthis._touched = true\n\t\tthis._dirty = true\n\n\t\tif (this.multi) {\n\t\t\tconst option = this.options.find(o => o.value === value)\n\t\t\tif (!option) return\n\n\t\t\toption.selected = !option.selected\n\t\t\tlet selectedValues = Array.isArray(this.value) ? [...this.value] : []\n\n\t\t\tif (option.selected) {\n\t\t\t\tselectedValues = [...selectedValues, value]\n\t\t\t} else {\n\t\t\t\tselectedValues = selectedValues.filter(v => v !== value)\n\t\t\t}\n\n\t\t\tthis.value = selectedValues\n\n\t\t\tthis.valueLabel =\n\t\t\t\tselectedValues.length > 0\n\t\t\t\t\t? this.options\n\t\t\t\t\t\t\t.filter(o => selectedValues.includes(o.value))\n\t\t\t\t\t\t\t.map(o => o.label)\n\t\t\t\t\t\t\t.join(', ')\n\t\t\t\t\t: this.placeholder\n\n\t\t\tthis.dispatchChange(selectedValues)\n\t\t} else {\n\t\t\tthis.options.forEach(o => (o.selected = o.value === value))\n\t\t\tthis.value = value\n\t\t\tthis.valueLabel = this.options.find(o => o.value === value)?.label || this.placeholder\n\t\t\tthis.dispatchChange(value)\n\t\t\tthis.closeDropdown()\n\t\t}\n\n\t\tthis.setupOptionsAccessibility()\n\n\t\t// Check validity respecting validation strategy\n\t\tthis.checkValidity()\n\t}\n\n\tprivate dispatchChange(value: string | string[]) {\n\t\t// Dispatch only one change event with the value in detail\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\n\t\t// Then check validity (only show error if validation should be shown)\n\t\tthis.checkValidity()\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\t// Determine if the select is empty based on whether it's multi-select or single-select\n\t\tconst isEmpty = this.multi ? !Array.isArray(this.value) || this.value.length === 0 : !this.value\n\n\t\t// Check if the value is valid (not empty when required)\n\t\tconst isValid = !(this.required && isEmpty)\n\n\t\t// Set the validity state\n\t\tthis.isValid = isValid\n\n\t\tif (!this.isValid) {\n\t\t\tthis.validationMessage = 'Please select an option.'\n\t\t\tthis.internals?.setValidity({ valueMissing: true }, 'Please select an option.', this.inputRef)\n\t\t} else {\n\t\t\t// Clear validation message\n\t\t\tthis.validationMessage = ''\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update the input component to reflect our validation state\n\t\tif (this.inputRef && this.hasUpdated) {\n\t\t\tconst showError = !this.isValid && this.shouldShowValidation()\n\t\t\tthis.inputRef.error = showError\n\t\t}\n\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\t// Force validation display regardless of validation strategy\n\t\tconst valid = this.checkValidity()\n\n\t\t// Force the input to show validation errors\n\t\tif (this.inputRef) {\n\t\t\t// Set the input's error state\n\t\t\tthis.inputRef.error = !valid\n\t\t\tthis.inputRef.hint = !valid ? this.validationMessage : this.hint\n\n\t\t\t// Only call reportValidity on the input if invalid to show the native popup\n\t\t\tif (!valid) {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t}\n\t\t}\n\n\t\treturn valid\n\t}\n\n\tpublic setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t\tif (message) {\n\t\t\tthis.isValid = false\n\t\t\tthis.internals?.setValidity({ customError: true }, message, this.inputRef)\n\t\t} else {\n\t\t\tthis.isValid = true\n\t\t\tthis.internals?.setValidity({})\n\t\t}\n\n\t\t// Update input if needed\n\t\tif (this.inputRef && this.shouldShowValidation()) {\n\t\t\tthis.inputRef.error = !this.isValid\n\t\t\tthis.inputRef.hint = !this.isValid ? this.validationMessage : this.hint\n\t\t}\n\t}\n\n\tpublic reset() {\n\t\tthis.value = ''\n\t\tthis.valueLabel = this.placeholder\n\t\tthis.isValid = true\n\t\tthis.validationMessage = ''\n\t\tthis._touched = false\n\t\tthis._dirty = false\n\t\tthis._submitted = false\n\t\tthis._userInteracted = false\n\t\tthis.internals?.setValidity({})\n\t\tthis.options.forEach(o => (o.selected = false))\n\n\t\tif (this.inputRef) {\n\t\t\tthis.inputRef.error = false\n\t\t\tthis.inputRef.hint = this.hint\n\t\t}\n\t}\n\n\trender(): TemplateResult {\n\t\t// Determine if we should show errors based on the validation strategy\n\t\tconst showErrors = !this.isValid && this.shouldShowValidation()\n\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<sch-input\n\t\t\t\t\t.name=${this.name}\n\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\tclass=\"trigger\"\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-expanded=${this.isOpen}\n\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\taria-required=${this.required}\n\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t.value=${this.valueLabel}\n\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t.hint=${showErrors ? this.validationMessage : this.hint}\n\t\t\t\t\t.error=${showErrors}\n\t\t\t\t\t.validateOn=${this.validateOn}\n\t\t\t\t\treadonly\n\t\t\t\t\t@click=${() => (this.isOpen ? this.closeDropdown() : this.openDropdown(true))}\n\t\t\t\t></sch-input>\n\n\t\t\t\t<div\n\t\t\t\t\tid=\"overlay\"\n\t\t\t\t\tclass=\"fixed inset-0\"\n\t\t\t\t\t?hidden=${!this.isOpen}\n\t\t\t\t\t@click=${this.closeDropdown}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t></div>\n\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi}\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\t'absolute z-[1000] mt-1 w-full rounded-md shadow-sm': true,\n\t\t\t\t\t\thidden: !this.isOpen,\n\t\t\t\t\t})}\n\t\t\t\t\t${color({ bgColor: SchmancyTheme.sys.color.surface.container })}\n\t\t\t\t\t@click=${(e: Event) => {\n\t\t\t\t\t\tconst customEvt = e as CustomEvent\n\t\t\t\t\t\tconst detailVal = customEvt.detail?.value\n\t\t\t\t\t\tif (detailVal) {\n\t\t\t\t\t\t\tthis.handleOptionSelect(detailVal)\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t\tthis.syncSelection()\n\t\t\t\t\t\t\tthis.setupOptionsAccessibility()\n\t\t\t\t\t\t}}\n\t\t\t\t\t></slot>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-select': SchmancySelect\n\t}\n}\n"],"names":["SchmancySelect","$LitElement","css","constructor","super","this","required","placeholder","value","multi","label","hint","validateOn","isOpen","valueLabel","isValid","validationMessage","_userInteracted","_touched","_dirty","_submitted","handleKeyDown","e","includes","key","preventDefault","openDropdown","current","options","findIndex","o","matches","closeDropdown","focusOption","Math","min","length","max","handleOptionSelect","internals","attachInternals","form","connectedCallback","id","random","toString","substr","addEventListener","checkValidity","reset","disconnectedCallback","removeEventListener","cleanupPositioner","firstUpdated","syncSelection","setupOptionsAccessibility","changedProps","updated","has","formValue","Array","isArray","join","setFormValue","hasUpdated","forceValidation","selectedValues","forEach","selected","filter","map","selectedOption","find","option","index","setAttribute","tabIndex","String","positionDropdown","reference","renderRoot","querySelector","ul","availableHeight","window","innerHeight","getBoundingClientRect","bottom","style","maxHeight","autoUpdate","async","x","y","computePosition","placement","middleware","offset","flip","shift","padding","Object","assign","left","top","position","focus","combobox","report","updateComplete","from","querySelectorAll","selectedIndex","getAttribute","reportValidity","removeAttribute","shouldShowValidation","v","dispatchChange","dispatchEvent","CustomEvent","detail","bubbles","composed","isEmpty","setValidity","valueMissing","inputRef","showError","error","valid","message","customError","render","showErrors","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","container","customEvt","detailVal","formAssociated","__decorateClass","property","type","prototype","Boolean","reflect","state","query","queryAssignedElements","flatten","customElement"],"mappings":"wjBAeaA,QAAAA,eAAN,cAA6BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,GAwC/C,aAAAC,CACOC,MAxBgDC,EAAAA,KAAAC,SAAA,GACbD,KAAAE,YAAA,GAC4BF,KAAAG,MAAA,GACjCH,KAAAI,SACDJ,KAAAK,MAAA,GACDL,KAAAM,KAAA,GACoDN,KAAAO,WAAA,UAG9EP,KAAQQ,OAAAA,GACRR,KAAQS,WAAa,GACrBT,KAAQU,QAAU,GACqBV,KA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,EAAMA,MA1BK1J,CAAAA,EAAAA,uBA0BKuJ,UAAA,SAAA,GACAH,EAAA,CAAhBM,EAAMA,MA3BK1J,CAAAA,EAAAA,uBA2BKuJ,UAAA,aAAA,CAAA,EACAH,EAAA,CAAhBM,EAAMA,MA5BK1J,CAAAA,EAAAA,uBA4BKuJ,UAAA,UAAA,CACWH,EAAAA,EAAA,CAA3BC,WAAS,CAAEC,KAAMzE,MA7BN7E,CAAAA,CAAAA,EAAAA,uBA6BgBuJ,UAAA,oBAAA,CAAA,EAEPH,EAAA,CAApBO,EAAAA,MAAM,IAAA,CAAA,EA/BK3J,uBA+BSuJ,UAAA,KAAA,CAAA,EACOH,EAAA,CAA3BO,EAAAA,MAAM,cAhCK3J,uBAgCgBuJ,UAAA,WAAA,CACsBH,EAAAA,EAAA,CAAjDQ,wBAAsB,CAAEC,QAAAA,EAjCb7J,CAAAA,CAAAA,EAAAA,uBAiCsCuJ,UAAA,UAAA,CAEzCH,EAAAA,EAAA,CAARM,EAAMA,SAnCK1J,uBAmCHuJ,UAAA,kBAAA,CACQH,EAAAA,EAAA,CAAhBM,EAAMA,MAAAA,CAAAA,EApCK1J,uBAoCKuJ,UAAA,WAAA,GACAH,EAAA,CAAhBM,EAAMA,MAAAA,CAAAA,EArCK1J,uBAqCKuJ,UAAA,SAAA,CAAA,EACAH,EAAA,CAAhBM,EAAMA,MAAAA,CAAAA,EAtCK1J,uBAsCKuJ,UAAA,aAAA,CAAA,EAtCLvJ,QAANA,eAAAoJ,EAAA,CADNU,EAAAA,cAAc,iBAAA,CAAA,EACF9J"}
package/dist/select.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-dLquQtbc.cjs");Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>e.SchmancySelect});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-DUqzjckq.cjs");Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>e.SchmancySelect});
2
2
  //# sourceMappingURL=select.cjs.map
package/dist/select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S } from "./select-CGse8Q3B.js";
1
+ import { S } from "./select-BqN9V7cw.js";
2
2
  export {
3
3
  S as SchmancySelect
4
4
  };
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-CoBmvVft.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-Cmbvbylw.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
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-C7Kwa_OI.cjs");const O=require("./area.component-AypdoH-o.cjs");require("./autocomplete-BrXYON3m.cjs"),require("./spinner-BIT7SlWT.cjs"),require("./icon-button-CNn-TBQr.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./tailwind.mixin-BAMa8YNR.cjs"),$=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-D9hGlFti.cjs"),require("./chips-wP7Z-qFr.cjs"),require("./payment-card-form-BaysKg6Z.cjs");const p=require("./types.cjs"),l=require("./provide-DSU87U5x.cjs"),w=require("./litElement.mixin-CsMY3rsN.cjs"),d=require("./consume-Bb7_UzYd.cjs");require("./date-range-BHtt61m5.cjs"),require("./delay-xd8PmM2r.cjs");const b=require("./ripple-C2BHbhcS.cjs");require("./divider-CW3prtEN.cjs"),require("./timezone-D14kTMKK.cjs"),require("./form-GwdkWkeq.cjs"),require("./icon-DYd0ia3y.cjs"),require("./input-BDvmjqzB.cjs"),require("./flex-CbweZ1uz.cjs"),require("./list-DGZ8nQDV.cjs"),require("./menu-BoAxrHvz.cjs");const I=require("lit/directives/when.js");require("./outlet-C9H_6XOK.cjs"),require("./option-BOoGEXyd.cjs"),require("./radio-group-BV6zZQBP.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-dLquQtbc.cjs");const U=require("./sheet-RxCJqnwE.cjs");require("./slider-Cw5jFlAO.cjs"),require("./schmancy-steps-container-CQp7mdgo.cjs"),require("./context-object-CgZ6F8E9.cjs");const T=require("rxjs/operators");require("./surface-CU_71bTu.cjs"),require("./table-B3lX6zue.cjs"),require("./tabs-group-DKgFtkF4.cjs"),require("./textarea-BX6iD8ez.cjs"),require("./theme.component-DvlxAH1p.cjs"),require("./theme-button-C8uLYaSN.cjs"),require("./tree-C_TPLHEo.cjs"),require("./typewriter-C2NQzIJ9.cjs"),require("./typography-f0kdRUDj.cjs");var Y=Object.getOwnPropertyDescriptor;let H=class extends S.TailwindElement(h.css`
1
+ "use strict";const h=require("lit"),c=require("lit/decorators.js"),n=require("rxjs");require("./animated-text-C7Kwa_OI.cjs");const O=require("./area.component-AypdoH-o.cjs");require("./autocomplete-BrXYON3m.cjs"),require("./spinner-BIT7SlWT.cjs"),require("./icon-button-CNn-TBQr.cjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const S=require("./tailwind.mixin-BAMa8YNR.cjs"),$=require("./theme.interface-Xg5Zi46a.cjs");require("./checkbox-D9hGlFti.cjs"),require("./chips-wP7Z-qFr.cjs"),require("./payment-card-form-BaysKg6Z.cjs");const p=require("./types.cjs"),l=require("./provide-DSU87U5x.cjs"),w=require("./litElement.mixin-CsMY3rsN.cjs"),d=require("./consume-Bb7_UzYd.cjs");require("./date-range-BHtt61m5.cjs"),require("./delay-xd8PmM2r.cjs");const b=require("./ripple-C2BHbhcS.cjs");require("./divider-CW3prtEN.cjs"),require("./timezone-D14kTMKK.cjs"),require("./form-GwdkWkeq.cjs"),require("./icon-DYd0ia3y.cjs"),require("./input-BDvmjqzB.cjs"),require("./flex-CbweZ1uz.cjs"),require("./list-DGZ8nQDV.cjs"),require("./menu-BoAxrHvz.cjs");const I=require("lit/directives/when.js");require("./outlet-C9H_6XOK.cjs"),require("./option-BOoGEXyd.cjs"),require("./radio-group-BV6zZQBP.cjs"),require("./index-DyJ0oDpR.cjs"),require("./select-DUqzjckq.cjs");const U=require("./sheet-RxCJqnwE.cjs");require("./slider-Cw5jFlAO.cjs"),require("./schmancy-steps-container-CQp7mdgo.cjs"),require("./context-object-CgZ6F8E9.cjs");const T=require("rxjs/operators");require("./surface-CU_71bTu.cjs"),require("./table-B3lX6zue.cjs"),require("./tabs-group-DKgFtkF4.cjs"),require("./textarea-BX6iD8ez.cjs"),require("./theme.component-DvlxAH1p.cjs"),require("./theme-button-C8uLYaSN.cjs"),require("./tree-C_TPLHEo.cjs"),require("./typewriter-C2NQzIJ9.cjs"),require("./typography-f0kdRUDj.cjs");var Y=Object.getOwnPropertyDescriptor;let H=class extends S.TailwindElement(h.css`
2
2
  :host {
3
3
  display: block;
4
4
  }
@@ -147,4 +147,4 @@
147
147
  class="${this.classMap({"fixed inset-0 z-49 hidden":!0})}"
148
148
  ></div>
149
149
  `}},u([d.c({context:W,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"mode",2),u([d.c({context:j,subscribe:!0}),c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"drawerState",2),u([c.query("#overlay")],exports.SchmancyNavigationDrawerSidebar.prototype,"overlay",2),u([c.query("nav")],exports.SchmancyNavigationDrawerSidebar.prototype,"nav",2),u([c.property({type:String})],exports.SchmancyNavigationDrawerSidebar.prototype,"width",2),u([c.state()],exports.SchmancyNavigationDrawerSidebar.prototype,"_initialized",2),exports.SchmancyNavigationDrawerSidebar=u([c.customElement("schmancy-nav-drawer-navbar")],exports.SchmancyNavigationDrawerSidebar);const _="whereAreYouRicky",A="hereMorty",f=new class{constructor(){this.activeTeleportations=new Map,this.flipRequests=new n.Subject,this.find=e=>n.zip([n.fromEvent(window,A).pipe(n.filter(t=>!!t.detail.component.uuid&&!!e.id&&t.detail.component.id===e.id&&t.detail.component.uuid!==e.uuid),n.map(t=>t.detail.component),n.take(1)),n.of(e).pipe(n.tap(()=>{window.dispatchEvent(new CustomEvent(_,{detail:{id:e.id,callerID:e.uuid}}))}))]).pipe(n.map(([t])=>t),n.timeout(0)),this.flip=e=>{const{from:t,to:i}=e,s=i.element.style.zIndex;i.element.style.transformOrigin="top left",i.element.style.setProperty("visibility","visible"),i.element.style.zIndex="1000";const a=[{transform:`translate(${t.rect.left-i.rect.left}px, ${t.rect.top-i.rect.top}px) scale(${t.rect.width/i.rect.width}, ${t.rect.height/i.rect.height})`},{transform:"translate(0, 0) scale(1, 1)"}];i.element.animate(a,{duration:250,delay:10,easing:"cubic-bezier(0.455, 0.03, 0.515, 0.955)"}).onfinish=()=>{i.element.style.zIndex=s,i.element.style.transformOrigin=""}},this.flipRequests.pipe(n.bufferTime(1),n.map(e=>e.map(({from:t,to:i,host:s},a)=>({from:t,to:i,host:s,i:a}))),n.concatMap(e=>n.zip(e.map(t=>n.of(this.flip(t)))))).subscribe()}};function B(e){return n.interval(50).pipe(T.map(()=>e.getBoundingClientRect()),T.distinctUntilChanged((t,i)=>t.width===i.width&&t.height===i.height&&t.top===i.top&&t.right===i.right&&t.bottom===i.bottom&&t.left===i.left),T.take(1))}var ye=Object.defineProperty,ue=Object.getOwnPropertyDescriptor,q=(e,t,i,s)=>{for(var a,r=s>1?void 0:s?ue(t,i):t,o=e.length-1;o>=0;o--)(a=e[o])&&(r=(s?a(t,i,r):a(r))||r);return s&&r&&ye(t,i,r),r};exports.SchmancyTeleportation=class extends w.$LitElement(h.css``){constructor(){super(...arguments),this.uuid=Math.floor(Math.random()*Date.now()),this.delay=0,this.debugging=!1}get _slottedChildren(){return this.shadowRoot.querySelector("slot").assignedElements({flatten:!0})}connectedCallback(){if(this.id===void 0)throw new Error("id is required");super.connectedCallback(),n.merge(n.fromEvent(window,O.FINDING_MORTIES).pipe(n.tap({next:()=>{this.dispatchEvent(new CustomEvent(O.HERE_RICKY,{detail:{component:this},bubbles:!0,composed:!0}))}})),n.fromEvent(window,_).pipe(n.tap({next:e=>{e.detail.id===this.id&&this.uuid&&e.detail.callerID!==this.uuid&&this.dispatchEvent(new CustomEvent(A,{detail:{component:this},bubbles:!0,composed:!0}))}}))).pipe(n.takeUntil(this.disconnecting)).subscribe()}async firstUpdated(){n.of(f.activeTeleportations.get(this.id)).pipe(n.filter(e=>!!e),n.takeUntil(this.disconnecting),n.throwIfEmpty()).subscribe({next:e=>{this.style.setProperty("visibility","hidden"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:t=>{f.activeTeleportations.set(this.id,t),f.flipRequests.next({from:{rect:e},to:{rect:t,element:this._slottedChildren[0]},host:this})}})},error:()=>{this.style.setProperty("visibility","visible"),B(this).pipe(n.takeUntil(this.disconnecting)).subscribe({next:e=>{f.activeTeleportations.set(this.id,e)}})},complete:()=>{}})}render(){return h.html`<slot></slot>`}},q([c.property({type:Number,reflect:!0})],exports.SchmancyTeleportation.prototype,"uuid",2),q([c.property({type:String})],exports.SchmancyTeleportation.prototype,"id",2),q([c.property({type:Number})],exports.SchmancyTeleportation.prototype,"delay",2),exports.SchmancyTeleportation=q([c.customElement("schmancy-teleport")],exports.SchmancyTeleportation),exports.$drawer=ae,exports.HereMorty=A,exports.SchmancyContentDrawerID=X,exports.SchmancyContentDrawerMaxHeight=k,exports.SchmancyContentDrawerMinWidth=N,exports.SchmancyContentDrawerSheetMode=M,exports.SchmancyContentDrawerSheetState=R,exports.SchmancyDrawerNavbarMode=W,exports.SchmancyDrawerNavbarState=j,exports.WhereAreYouRicky=_,exports.schmancyContentDrawer=Z,exports.schmancyNavDrawer=K,exports.teleport=f;
150
- //# sourceMappingURL=teleport.component-CoBmvVft.cjs.map
150
+ //# sourceMappingURL=teleport.component-Cmbvbylw.cjs.map