@mhmo91/schmancy 0.2.72 → 0.2.75

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.
Files changed (44) hide show
  1. package/dist/card.cjs +1 -1
  2. package/dist/card.js +1 -1
  3. package/dist/content-drawer.cjs +1 -1
  4. package/dist/content-drawer.js +1 -1
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.js +4 -4
  7. package/dist/{list-CwampsMO.cjs → list-CL31MEpb.cjs} +7 -7
  8. package/dist/list-CL31MEpb.cjs.map +1 -0
  9. package/dist/{list-CGCKKnfk.js → list-R_GzuzkY.js} +21 -18
  10. package/dist/list-R_GzuzkY.js.map +1 -0
  11. package/dist/list.cjs +1 -1
  12. package/dist/list.js +1 -1
  13. package/dist/nav-drawer.cjs +1 -1
  14. package/dist/nav-drawer.js +1 -1
  15. package/dist/select-Ba3A3DS4.js +181 -0
  16. package/dist/select-Ba3A3DS4.js.map +1 -0
  17. package/dist/select-DtJckUTa.cjs +54 -0
  18. package/dist/select-DtJckUTa.cjs.map +1 -0
  19. package/dist/select.cjs +1 -1
  20. package/dist/select.js +1 -1
  21. package/dist/{surface-CfAH2c9U.cjs → surface-BA2_6-th.cjs} +18 -18
  22. package/dist/surface-BA2_6-th.cjs.map +1 -0
  23. package/dist/{surface-Ci1xR_sr.js → surface-TFjCUP_C.js} +18 -18
  24. package/dist/surface-TFjCUP_C.js.map +1 -0
  25. package/dist/surface.cjs +1 -1
  26. package/dist/surface.js +1 -1
  27. package/dist/teleport.cjs +1 -1
  28. package/dist/{teleport.component-D2o6a-Yh.js → teleport.component-5h9nuQcu.js} +4 -4
  29. package/dist/{teleport.component-D2o6a-Yh.js.map → teleport.component-5h9nuQcu.js.map} +1 -1
  30. package/dist/{teleport.component-14_ksDPx.cjs → teleport.component-T4UtckWn.cjs} +2 -2
  31. package/dist/{teleport.component-14_ksDPx.cjs.map → teleport.component-T4UtckWn.cjs.map} +1 -1
  32. package/dist/teleport.js +1 -1
  33. package/package.json +1 -1
  34. package/types/src/list/list.d.ts +2 -0
  35. package/types/src/select/select.d.ts +1 -8
  36. package/types/src/surface/surface.d.ts +2 -1
  37. package/dist/list-CGCKKnfk.js.map +0 -1
  38. package/dist/list-CwampsMO.cjs.map +0 -1
  39. package/dist/select-BTSVFloo.cjs +0 -55
  40. package/dist/select-BTSVFloo.cjs.map +0 -1
  41. package/dist/select-Iem1gGwb.js +0 -176
  42. package/dist/select-Iem1gGwb.js.map +0 -1
  43. package/dist/surface-CfAH2c9U.cjs.map +0 -1
  44. package/dist/surface-Ci1xR_sr.js.map +0 -1
package/dist/card.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";require("./teleport.component-14_ksDPx.cjs");
1
+ "use strict";require("./teleport.component-T4UtckWn.cjs");
2
2
  //# sourceMappingURL=card.cjs.map
package/dist/card.js CHANGED
@@ -1,2 +1,2 @@
1
- import "./teleport.component-D2o6a-Yh.js";
1
+ import "./teleport.component-5h9nuQcu.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-14_ksDPx.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-T4UtckWn.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-D2o6a-Yh.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-5h9nuQcu.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-ZUEQQHIA.cjs");const r=require("./area.component-Cfvbb333.cjs");require("./autocomplete-pDDovAE3.cjs"),require("./spinner-Do8LNQoW.cjs");const o=require("./icon-button-CWUpvLIc.cjs"),e=require("./teleport.component-14_ksDPx.cjs"),S=require("./checkbox-9lpB6PGQ.cjs");require("./chips-C5BbSIAo.cjs");const u=require("./payment-card-form-BZiEUnKn.cjs");require("./date-range-J-JT-8ba.cjs");const y=require("./delay-CpKz9qoJ.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-CjeXqpY8.cjs"),require("./form-Bnzb6YbT.cjs"),require("./icon-DXyemmCt.cjs"),require("./input-DP4Mi51t.cjs");const t=require("./flex-lEIKuhdY.cjs"),m=require("./list-CwampsMO.cjs");require("./menu-Dem8Myie.cjs");const a=require("./outlet-6MP6k9wf.cjs");require("./option-C-gBYdv8.cjs");const b=require("./radio-group-B4Of8FBA.cjs"),l=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-BTSVFloo.cjs"),n=require("./sheet-BgbV6g2F.cjs"),h=require("./slider-CR2itGT0.cjs"),p=require("./surface-CfAH2c9U.cjs");require("./table-379iohVA.cjs"),require("./tabs-group-BTUwCflk.cjs"),require("./textarea-DFEdjfVW.cjs");const i=require("./theme.component-BTfo42Lo.cjs"),g=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DsGEWHcv.cjs");const f=require("./tree-DJDSDjnb.cjs"),q=require("./types.cjs"),O=require("./typewriter-BF7pgYH2.cjs"),w=require("./typography-DVm5bpVi.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>S.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>u.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>m.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>m.SchmancyListItem}),exports.$notify=a.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>a.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>a.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>b.RadioGroup}),exports.mutationObserver=l.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=g.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>f.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),require("./animated-text-ZUEQQHIA.cjs");const r=require("./area.component-Cfvbb333.cjs");require("./autocomplete-pDDovAE3.cjs"),require("./spinner-Do8LNQoW.cjs");const o=require("./icon-button-CWUpvLIc.cjs"),e=require("./teleport.component-T4UtckWn.cjs"),S=require("./checkbox-9lpB6PGQ.cjs");require("./chips-C5BbSIAo.cjs");const u=require("./payment-card-form-BZiEUnKn.cjs");require("./date-range-J-JT-8ba.cjs");const y=require("./delay-CpKz9qoJ.cjs"),c=require("./ripple-C2BHbhcS.cjs");require("./divider-CjeXqpY8.cjs"),require("./form-Bnzb6YbT.cjs"),require("./icon-DXyemmCt.cjs"),require("./input-DP4Mi51t.cjs");const t=require("./flex-lEIKuhdY.cjs"),m=require("./list-CL31MEpb.cjs");require("./menu-Dem8Myie.cjs");const a=require("./outlet-6MP6k9wf.cjs");require("./option-C-gBYdv8.cjs");const b=require("./radio-group-B4Of8FBA.cjs"),l=require("./rxjs-utils.cjs");require("rxjs"),require("./index-DyJ0oDpR.cjs");const d=require("./select-DtJckUTa.cjs"),n=require("./sheet-BgbV6g2F.cjs"),h=require("./slider-CR2itGT0.cjs"),p=require("./surface-BA2_6-th.cjs");require("./table-379iohVA.cjs"),require("./tabs-group-BTUwCflk.cjs"),require("./textarea-DFEdjfVW.cjs");const i=require("./theme.component-BTfo42Lo.cjs"),g=require("./theme.interface-Xg5Zi46a.cjs");require("./theme-button-DsGEWHcv.cjs");const f=require("./tree-DJDSDjnb.cjs"),q=require("./types.cjs"),O=require("./typewriter-BF7pgYH2.cjs"),w=require("./typography-DVm5bpVi.cjs"),D=require("./intersection-CVvaDv96.cjs");exports.FINDING_MORTIES=r.FINDING_MORTIES,exports.HERE_RICKY=r.HERE_RICKY,exports.HISTORY_STRATEGY=r.HISTORY_STRATEGY,Object.defineProperty(exports,"SchmancyArea",{enumerable:!0,get:()=>r.SchmancyArea}),exports.area=r.area,exports.routerHistory=r.routerHistory,Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>o.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>o.SchmnacyIconButton}),exports.$drawer=e.$drawer,exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.schmancyContentDrawer=e.schmancyContentDrawer,exports.schmancyNavDrawer=e.schmancyNavDrawer,exports.teleport=e.teleport,Object.defineProperty(exports,"SchmancyCheckbox",{enumerable:!0,get:()=>S.SchmancyCheckbox}),Object.defineProperty(exports,"SchmancyPaymentCardForm",{enumerable:!0,get:()=>u.SchmancyPaymentCardForm}),Object.defineProperty(exports,"SchmancyDelay",{enumerable:!0,get:()=>y.SchmancyDelay}),exports.delayContext=y.delayContext,exports.color=c.color,exports.fullHeight=c.fullHeight,exports.ripple=c.ripple,Object.defineProperty(exports,"SchmancyFlex",{enumerable:!0,get:()=>t.SchmancyFlex}),Object.defineProperty(exports,"SchmancyFlexV2",{enumerable:!0,get:()=>t.SchmancyFlexV2}),Object.defineProperty(exports,"SchmancyGrid",{enumerable:!0,get:()=>t.SchmancyGrid}),Object.defineProperty(exports,"SchmancyScroll",{enumerable:!0,get:()=>t.SchmancyScroll}),Object.defineProperty(exports,"List",{enumerable:!0,get:()=>m.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>m.SchmancyListItem}),exports.$notify=a.$notify,Object.defineProperty(exports,"SchmancyNotification",{enumerable:!0,get:()=>a.SchmancyNotification}),Object.defineProperty(exports,"SchmancyNotificationOutlet",{enumerable:!0,get:()=>a.SchmancyNotificationOutlet}),Object.defineProperty(exports,"RadioGroup",{enumerable:!0,get:()=>b.RadioGroup}),exports.mutationObserver=l.mutationObserver,Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>d.SchmancySelect}),exports.SchmancySheetPosition=n.SchmancySheetPosition,exports.SheetHereMorty=n.SheetHereMorty,exports.SheetWhereAreYouRicky=n.SheetWhereAreYouRicky,exports.sheet=n.sheet,Object.defineProperty(exports,"SchmancySlide",{enumerable:!0,get:()=>h.SchmancySlide}),Object.defineProperty(exports,"SchmancySlider",{enumerable:!0,get:()=>h.SchmancySlider}),Object.defineProperty(exports,"SchmancySurface",{enumerable:!0,get:()=>p.SchmancySurface}),Object.defineProperty(exports,"SchmancyThemeComponent",{enumerable:!0,get:()=>i.SchmancyThemeComponent}),exports.formateTheme=i.formateTheme,exports.tailwindStyles=i.tailwindStyles,exports.SchmancyTheme=g.SchmancyTheme,Object.defineProperty(exports,"SchmancyTree",{enumerable:!0,get:()=>f.SchmancyTree}),exports.SchmancyEvents=q.SchmancyEvents,Object.defineProperty(exports,"TypewriterElement",{enumerable:!0,get:()=>O.TypewriterElement}),Object.defineProperty(exports,"SchmancyTypography",{enumerable:!0,get:()=>w.SchmancyTypography}),exports.intersection$=D.intersection$;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { F as C, H as d, b as T, S as b, a as u, r as N } from "./area.component
3
3
  import "./autocomplete-CaqTiWXc.js";
4
4
  import "./spinner-BKVFC3qz.js";
5
5
  import { S as R, a as v } from "./icon-button-GJ_fOvRP.js";
6
- import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as O, i as W, k as L, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-D2o6a-Yh.js";
6
+ import { $ as M, H as g, e as E, b as A, f as F, c as Y, d as $, g as k, S as G, a as O, i as W, k as L, l as _, m as B, j as P, n as j, o as K, W as V, s as q, h as z, t as J } from "./teleport.component-5h9nuQcu.js";
7
7
  import { S as U } from "./checkbox-BClcyH7K.js";
8
8
  import "./chips-CECbQF-e.js";
9
9
  import { S as Z } from "./payment-card-form-CInoqXsW.js";
@@ -15,7 +15,7 @@ import "./form-BfV5JUNV.js";
15
15
  import "./icon-CS7L7dYv.js";
16
16
  import "./input-BOity9fs.js";
17
17
  import { S as sa, c as Sa, a as ha, b as ia } from "./flex-CLZyrhZ_.js";
18
- import { L as pa, S as fa } from "./list-CGCKKnfk.js";
18
+ import { L as pa, S as fa } from "./list-R_GzuzkY.js";
19
19
  import "./menu-BW3qO2A1.js";
20
20
  import { $ as la, S as wa, a as Da } from "./outlet-jd-bRdrF.js";
21
21
  import "./option-DCA4GidB.js";
@@ -23,10 +23,10 @@ import { R as da } from "./radio-group-C98aizGb.js";
23
23
  import { mutationObserver as ba } from "./rxjs-utils.js";
24
24
  import "rxjs";
25
25
  import "./index-CuY8m6ta.js";
26
- import { S as Na } from "./select-Iem1gGwb.js";
26
+ import { S as Na } from "./select-Ba3A3DS4.js";
27
27
  import { S as Ra, b as va, a as Ia, s as Ma } from "./sheet-WsaFx6-i.js";
28
28
  import { S as Ea, a as Aa } from "./slider-BOXmzToY.js";
29
- import { S as Ya } from "./surface-Ci1xR_sr.js";
29
+ import { S as Ya } from "./surface-TFjCUP_C.js";
30
30
  import "./table-iRPRoThv.js";
31
31
  import "./tabs-group-BYuZ4dIc.js";
32
32
  import "./textarea-C5i4amtn.js";
@@ -1,17 +1,17 @@
1
- "use strict";const y=require("./consume-Bb7_UzYd.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const u=require("./tailwind.mixin-B7_ZpVpC.cjs"),h=require("./context-CHWQnKZ-.cjs"),l=require("lit"),n=require("lit/decorators.js"),m=require("lit/directives/when.js"),p=require("./provide-DSU87U5x.cjs");var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,a=(r,t,s,i)=>{for(var o,e=i>1?void 0:i?g(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(i?o(t,s,e):o(e))||e);return i&&e&&f(t,s,e),e};exports.SchmancyListItem=class extends u.TailwindElement(){constructor(){super(...arguments),this.selected=!1}get imgClasses(){return["h-[24px]","w-[24px]","object-contain"]}firstUpdated(){var r,t;(r=this.leading)==null||r.forEach(s=>{s.classList.add(...this.imgClasses)}),(t=this.trailing)==null||t.forEach(s=>{s.classList.add(...this.imgClasses)})}render(){const r={"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden":!0,"bg-secondary-container text-secondery-onContainer":this.selected},t={"z-0 duration-500 transition-opacity":!0,"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ":!this.readonly};return l.html` <li .tabIndex=${this.readonly?-1:0} class=${this.classMap(r)}>
2
- ${m.when(!this.readonly,()=>l.html` <div class="${this.classMap(t)}"></div>`)}
1
+ "use strict";const y=require("./consume-Bb7_UzYd.cjs");require("rxjs"),require("lit/directives/class-map.js"),require("lit/directives/style-map.js");const u=require("./tailwind.mixin-B7_ZpVpC.cjs"),h=require("./context-CHWQnKZ-.cjs"),a=require("lit"),i=require("lit/decorators.js"),m=require("lit/directives/when.js"),p=require("./provide-DSU87U5x.cjs");var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,l=(r,t,s,n)=>{for(var o,e=n>1?void 0:n?g(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(n?o(t,s,e):o(e))||e);return n&&e&&f(t,s,e),e};exports.SchmancyListItem=class extends u.TailwindElement(){constructor(){super(...arguments),this.selected=!1}get imgClasses(){return["h-[24px]","w-[24px]","object-contain"]}firstUpdated(){var r,t;(r=this.leading)==null||r.forEach(s=>{s.classList.add(...this.imgClasses)}),(t=this.trailing)==null||t.forEach(s=>{s.classList.add(...this.imgClasses)})}render(){const r={"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden":!0,"bg-secondary-container text-secondery-onContainer":this.selected},t={"z-0 duration-500 transition-opacity":!0,"rounded-none":this.rounded===!1,"rounded-full":this.rounded,"hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ":!this.readonly};return a.html` <li .tabIndex=${this.readonly?-1:0} class=${this.classMap(r)}>
2
+ ${m.when(!this.readonly,()=>a.html` <div class="${this.classMap(t)}"></div>`)}
3
3
  <slot></slot>
4
- </li>`}},a([y.c({context:h.SchmancySurfaceTypeContext,subscribe:!0}),n.property()],exports.SchmancyListItem.prototype,"variant",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"rounded",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"readonly",2),a([n.property({type:Boolean})],exports.SchmancyListItem.prototype,"selected",2),a([n.queryAssignedElements({slot:"leading",flatten:!0})],exports.SchmancyListItem.prototype,"leading",2),a([n.queryAssignedElements({slot:"trailing",flatten:!0})],exports.SchmancyListItem.prototype,"trailing",2),exports.SchmancyListItem=a([n.customElement("schmancy-list-item")],exports.SchmancyListItem);const b=p.n(void 0);var x=Object.defineProperty,v=Object.getOwnPropertyDescriptor,d=(r,t,s,i)=>{for(var o,e=i>1?void 0:i?v(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(i?o(t,s,e):o(e))||e);return i&&e&&x(t,s,e),e};exports.List=class extends u.TailwindElement(l.css`
4
+ </li>`}},l([y.c({context:h.SchmancySurfaceTypeContext,subscribe:!0}),i.property()],exports.SchmancyListItem.prototype,"variant",2),l([i.property({type:Boolean})],exports.SchmancyListItem.prototype,"rounded",2),l([i.property({type:Boolean})],exports.SchmancyListItem.prototype,"readonly",2),l([i.property({type:Boolean})],exports.SchmancyListItem.prototype,"selected",2),l([i.queryAssignedElements({slot:"leading",flatten:!0})],exports.SchmancyListItem.prototype,"leading",2),l([i.queryAssignedElements({slot:"trailing",flatten:!0})],exports.SchmancyListItem.prototype,"trailing",2),exports.SchmancyListItem=l([i.customElement("schmancy-list-item")],exports.SchmancyListItem);const b=p.n(void 0);var x=Object.defineProperty,v=Object.getOwnPropertyDescriptor,d=(r,t,s,n)=>{for(var o,e=n>1?void 0:n?v(t,s):t,c=r.length-1;c>=0;c--)(o=r[c])&&(e=(n?o(t,s,e):o(e))||e);return n&&e&&x(t,s,e),e};exports.List=class extends u.TailwindElement(a.css`
5
5
  :host {
6
6
  display: block;
7
7
  padding-top: 8px;
8
8
  padding-bottom: 8px;
9
9
  }
10
- `){render(){return l.html`
11
- <schmancy-surface type=${this.surface}>
10
+ `){constructor(){super(...arguments),this.fill="auto"}render(){return a.html`
11
+ <schmancy-surface .fill=${this.fill} type=${this.surface}>
12
12
  <ul>
13
13
  <slot></slot>
14
14
  </ul>
15
15
  </schmancy-surface>
16
- `}},d([p.e({context:b}),n.property()],exports.List.prototype,"surface",2),exports.List=d([n.customElement("schmancy-list")],exports.List);
17
- //# sourceMappingURL=list-CwampsMO.cjs.map
16
+ `}},d([p.e({context:b}),i.property()],exports.List.prototype,"surface",2),d([i.property({type:String,reflect:!0})],exports.List.prototype,"fill",2),exports.List=d([i.customElement("schmancy-list")],exports.List);
17
+ //# sourceMappingURL=list-CL31MEpb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-CL31MEpb.cjs","sources":["../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\nimport { SchmancySurfaceFill } from '@schmancy/surface'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\t@property({ type: String, reflect: true })\n\tfill: SchmancySurfaceFill = 'auto'\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface .fill=${this.fill} type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListItem","TailwindElement","super","arguments","this","selected","leading","forEach","img","classList","add","imgClasses","trailing","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","SchmancySurfaceTypeContext","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","SchmancyListTypeContext","createContext","List","css","constructor","fill","render","surface","provide","String","reflect"],"mappings":"kiBAeaA,QAAAA,iBAAN,cAA+BC,EAAAA,gBAA/B,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,WAU2CC,KAAAC,SAAAA,EAAA,CAcjD,gBACQ,CAAA,MAAA,CAAC,WAAY,WAAY,iBAAgB,CAGjD,cACMD,UAAAA,EAAAA,KAAAE,UAAAF,MAAAA,EAASG,QAAeC,GAAAA,CAC5BA,EAAIC,UAAUC,OAAON,KAAKO,UAAAA,CAAU,IAEhCP,EAAAA,KAAAQ,WAAAR,MAAAA,EAAUG,QAAeC,GAAAA,CAC7BA,EAAIC,UAAUC,IAAAA,GAAON,KAAKO,UAAU,CAAA,EACpC,CAGF,SACC,MAAME,EAAU,CACf,eAAgBT,KAAKU,UAArB,GACA,eAAgBV,KAAKU,QACrB,0PACC,GACD,oDAAqDV,KAAKC,QAAAA,EAGrDU,EAAoB,CACzB,sCAAA,GACA,eAAgBX,KAAKU,UAArB,GACA,eAAgBV,KAAKU,QACrB,uEAAwEV,KAAKY,QAAAA,EAEvE,OAAAC,wBAAsBb,KAAKY,YAAgB,CAAA,UAAWZ,KAAKc,SAASL,CAAAA,CAAAA;AAAAA,KACxEM,QAAMf,KAAKY,SAAU,IAAMC,EAAoBA,oBAAAb,KAAKc,SAASH,CAAAA,CAAAA,UAAAA,CAAAA;AAAAA;AAAAA,QAA6B,CAAA,EAlD9FK,EAAA,CAFCC,EAAAA,EAAQ,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AAAA,EAAAA,aAkBZT,UAAA,OAAA,CAlBYS,EAAAA,QAANA,KAAAf,EAAA,CADNY,EAAAA,cAAc,kBACFG"}
@@ -2,17 +2,17 @@ import { c as h } from "./consume-fRVATvdE.js";
2
2
  import "rxjs";
3
3
  import "lit/directives/class-map.js";
4
4
  import "lit/directives/style-map.js";
5
- import { T as f } from "./tailwind.mixin-DxmWMnBQ.js";
5
+ import { T as m } from "./tailwind.mixin-DxmWMnBQ.js";
6
6
  import { S as g } from "./context-YZmnxxIi.js";
7
- import { html as p, css as b } from "lit";
8
- import { property as d, queryAssignedElements as u, customElement as y } from "lit/decorators.js";
7
+ import { html as u, css as b } from "lit";
8
+ import { property as c, queryAssignedElements as f, customElement as y } from "lit/decorators.js";
9
9
  import { when as v } from "lit/directives/when.js";
10
10
  import { n as x, e as O } from "./provide-BLSgVvMJ.js";
11
- var j = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (s, e, o, r) => {
12
- for (var n, t = r > 1 ? void 0 : r ? w(e, o) : e, a = s.length - 1; a >= 0; a--) (n = s[a]) && (t = (r ? n(e, o, t) : n(t)) || t);
13
- return r && t && j(e, o, t), t;
11
+ var $ = Object.defineProperty, j = Object.getOwnPropertyDescriptor, l = (s, e, o, r) => {
12
+ for (var n, t = r > 1 ? void 0 : r ? j(e, o) : e, a = s.length - 1; a >= 0; a--) (n = s[a]) && (t = (r ? n(e, o, t) : n(t)) || t);
13
+ return r && t && $(e, o, t), t;
14
14
  };
15
- let i = class extends f() {
15
+ let i = class extends m() {
16
16
  constructor() {
17
17
  super(...arguments), this.selected = !1;
18
18
  }
@@ -29,28 +29,31 @@ let i = class extends f() {
29
29
  }
30
30
  render() {
31
31
  const s = { "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden": !0, "bg-secondary-container text-secondery-onContainer": this.selected }, e = { "z-0 duration-500 transition-opacity": !0, "rounded-none": this.rounded === !1, "rounded-full": this.rounded, "hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ": !this.readonly };
32
- return p` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(s)}>
33
- ${v(!this.readonly, () => p` <div class="${this.classMap(e)}"></div>`)}
32
+ return u` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(s)}>
33
+ ${v(!this.readonly, () => u` <div class="${this.classMap(e)}"></div>`)}
34
34
  <slot></slot>
35
35
  </li>`;
36
36
  }
37
37
  };
38
- l([h({ context: g, subscribe: !0 }), d()], i.prototype, "variant", 2), l([d({ type: Boolean })], i.prototype, "rounded", 2), l([d({ type: Boolean })], i.prototype, "readonly", 2), l([d({ type: Boolean })], i.prototype, "selected", 2), l([u({ slot: "leading", flatten: !0 })], i.prototype, "leading", 2), l([u({ slot: "trailing", flatten: !0 })], i.prototype, "trailing", 2), i = l([y("schmancy-list-item")], i);
39
- const $ = x(void 0);
40
- var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor, m = (s, e, o, r) => {
38
+ l([h({ context: g, subscribe: !0 }), c()], i.prototype, "variant", 2), l([c({ type: Boolean })], i.prototype, "rounded", 2), l([c({ type: Boolean })], i.prototype, "readonly", 2), l([c({ type: Boolean })], i.prototype, "selected", 2), l([f({ slot: "leading", flatten: !0 })], i.prototype, "leading", 2), l([f({ slot: "trailing", flatten: !0 })], i.prototype, "trailing", 2), i = l([y("schmancy-list-item")], i);
39
+ const w = x(void 0);
40
+ var C = Object.defineProperty, E = Object.getOwnPropertyDescriptor, p = (s, e, o, r) => {
41
41
  for (var n, t = r > 1 ? void 0 : r ? E(e, o) : e, a = s.length - 1; a >= 0; a--) (n = s[a]) && (t = (r ? n(e, o, t) : n(t)) || t);
42
42
  return r && t && C(e, o, t), t;
43
43
  };
44
- let c = class extends f(b`
44
+ let d = class extends m(b`
45
45
  :host {
46
46
  display: block;
47
47
  padding-top: 8px;
48
48
  padding-bottom: 8px;
49
49
  }
50
50
  `) {
51
+ constructor() {
52
+ super(...arguments), this.fill = "auto";
53
+ }
51
54
  render() {
52
- return p`
53
- <schmancy-surface type=${this.surface}>
55
+ return u`
56
+ <schmancy-surface .fill=${this.fill} type=${this.surface}>
54
57
  <ul>
55
58
  <slot></slot>
56
59
  </ul>
@@ -58,9 +61,9 @@ let c = class extends f(b`
58
61
  `;
59
62
  }
60
63
  };
61
- m([O({ context: $ }), d()], c.prototype, "surface", 2), c = m([y("schmancy-list")], c);
64
+ p([O({ context: w }), c()], d.prototype, "surface", 2), p([c({ type: String, reflect: !0 })], d.prototype, "fill", 2), d = p([y("schmancy-list")], d);
62
65
  export {
63
- c as L,
66
+ d as L,
64
67
  i as S
65
68
  };
66
- //# sourceMappingURL=list-CGCKKnfk.js.map
69
+ //# sourceMappingURL=list-R_GzuzkY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-R_GzuzkY.js","sources":["../src/list/list-item.ts","../src/list/context.ts","../src/list/list.ts"],"sourcesContent":["import { consume } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { SchmancySurfaceTypeContext } from '@schmancy/surface/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { html } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\n\n/**\n * @element schmancy-list-item\n * @slot leading - leading content\n * @slot trailing - trailing content\n * @slot - default content\n */\n@customElement('schmancy-list-item')\nexport class SchmancyListItem extends TailwindElement() {\n\t@consume({ context: SchmancySurfaceTypeContext, subscribe: true })\n\t@property()\n\tvariant: TSurfaceColor\n\n\t@property({ type: Boolean })\n\trounded: boolean\n\n\t@property({ type: Boolean }) readonly: boolean\n\n\t@property({ type: Boolean }) selected: boolean = false\n\n\t@queryAssignedElements({\n\t\tslot: 'leading',\n\t\tflatten: true,\n\t})\n\tprivate leading!: HTMLElement[]\n\n\t@queryAssignedElements({\n\t\tslot: 'trailing',\n\t\tflatten: true,\n\t})\n\tprivate trailing!: HTMLElement[]\n\n\tprotected get imgClasses(): string[] {\n\t\treturn ['h-[24px]', 'w-[24px]', 'object-contain']\n\t}\n\n\tfirstUpdated() {\n\t\tthis.leading?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t\tthis.trailing?.forEach(img => {\n\t\t\timg.classList.add(...this.imgClasses)\n\t\t})\n\t}\n\n\trender() {\n\t\tconst classes = {\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'relative inset-0 w-full flex items-center min-h-[56px] py-[8px] px-[16px] duration-500 transition-colors focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:z-1 outline-secondary-default outline-hidden':\n\t\t\t\ttrue,\n\t\t\t'bg-secondary-container text-secondery-onContainer': this.selected,\n\t\t}\n\n\t\tconst stateLayerClasses = {\n\t\t\t'z-0 duration-500 transition-opacity': true,\n\t\t\t'rounded-none': this.rounded === false,\n\t\t\t'rounded-full': this.rounded,\n\t\t\t'hover:bg-surface-on opacity-[0.08] cursor-pointer absolute inset-0 ': !this.readonly,\n\t\t}\n\t\treturn html` <li .tabIndex=${this.readonly ? -1 : 0} class=${this.classMap(classes)}>\n\t\t\t${when(!this.readonly, () => html` <div class=\"${this.classMap(stateLayerClasses)}\"></div>`)}\n\t\t\t<slot></slot>\n\t\t</li>`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list-item': SchmancyListItem\n\t}\n}\n","import { createContext } from '@lit/context'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nexport const SchmancyListTypeContext = createContext<TSurfaceColor>(undefined)\n","import { provide } from '@lit/context'\nimport { TailwindElement } from '@mixins/index'\nimport { TSurfaceColor } from '@schmancy/types/surface'\nimport { css, html } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { SchmancyListTypeContext } from './context'\nimport { SchmancySurfaceFill } from '@schmancy/surface'\n\n/**\n * @slot - The default slot.\n */\n@customElement('schmancy-list')\nexport class List extends TailwindElement(css`\n\t:host {\n\t\tdisplay: block;\n\t\tpadding-top: 8px;\n\t\tpadding-bottom: 8px;\n\t}\n`) {\n\t/**\n\t * The type of list.\n\t * @attr type\n\t * @type {SchmancyListType}\n\t * @default 'surface'\n\t */\n\t@provide({ context: SchmancyListTypeContext })\n\t@property()\n\tsurface: TSurfaceColor\n\n\t@property({ type: String, reflect: true })\n\tfill: SchmancySurfaceFill = 'auto'\n\n\trender() {\n\t\treturn html`\n\t\t\t<schmancy-surface .fill=${this.fill} type=${this.surface}>\n\t\t\t\t<ul>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</ul>\n\t\t\t</schmancy-surface>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-list': List\n\t}\n}\n"],"names":["SchmancyListItem","TailwindElement","constructor","super","arguments","this","selected","imgClasses","leading","forEach","img","classList","add","trailing","classes","rounded","stateLayerClasses","readonly","html","classMap","when","__decorateClass","consume","context","SchmancySurfaceTypeContext","subscribe","property","prototype","type","Boolean","queryAssignedElements","slot","flatten","customElement","SchmancyListTypeContext","createContext","List","css","fill","surface","provide","String","reflect"],"mappings":";;;;;;;;;;;;;;AAea,IAAAA,IAAN,cAA+BC,EAAAA,EAAAA;AAAAA,EAA/B,cAAAC;AAAAC,aAAAC,SAU2CC,GAAAA,KAAAC,WAAA;AAAA,EAAA;AAAA,EAcjD,IAAcC,aAAAA;AACN,WAAA,CAAC,YAAY,YAAY,gBAAA;AAAA,EAAgB;AAAA,EAGjD;;AACMF,KAAAA,IAAAA,KAAAG,YAAAH,QAAAA,EAASI,QAAeC,CAAAA,MAAAA;AAC5BA,MAAAA,EAAIC,UAAUC,IAAAA,GAAOP,KAAKE,UAAAA;AAAAA,IAAU,KAEhCF,IAAAA,KAAAQ,aAAAR,QAAAA,EAAUI,QAAeC,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NY,EAAc,oBACFjC,CAAAA,GAAAA,CAAAA;ACbA,MAAAkC,IAA0BC,EAA6B,MAAA;;;;;ACUvD,IAAAC,IAAN,cAAmBnC,EAAgBoC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;EAAnC,cAAAnC;AAAAC,UAAAC,GAAAA,SAAAA,GAkBsBC,KAAAiC,OAAA;AAAA,EAAA;AAAA,EAE5B,SACQ;AAAA,WAAApB;AAAAA,6BACoBb,KAAKiC,aAAajC,KAAKkC,OAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,EAAO;AAAA;AAP1DlB,EAAA,CAFCmB,EAAQ,EAAEjB,SAASW,EAAAA,CAAAA,GACnBR,EAdWU,CAAAA,GAAAA,EAeZT,WAAA,WAAA,CAGAN,GAAAA,EAAA,CADCK,EAAS,EAAEE,MAAMa,QAAQC,SAAAA,GAjBdN,CAAAA,CAAAA,GAAAA,EAkBZT,WAAA,QAAA,CAlBYS,GAAAA,IAANf,EAAA,CADNY,EAAc,eAAA,CAAA,GACFG;"}
package/dist/list.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-CwampsMO.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./list-CL31MEpb.cjs");Object.defineProperty(exports,"List",{enumerable:!0,get:()=>e.List}),Object.defineProperty(exports,"SchmancyListItem",{enumerable:!0,get:()=>e.SchmancyListItem});
2
2
  //# sourceMappingURL=list.cjs.map
package/dist/list.js CHANGED
@@ -1,4 +1,4 @@
1
- import { L as a, S as m } from "./list-CGCKKnfk.js";
1
+ import { L as a, S as m } from "./list-R_GzuzkY.js";
2
2
  export {
3
3
  a as List,
4
4
  m as SchmancyListItem
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-14_ksDPx.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-T4UtckWn.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-D2o6a-Yh.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-5h9nuQcu.js";
2
2
  export {
3
3
  c as $drawer,
4
4
  e as SchmancyDrawerAppbar,
@@ -0,0 +1,181 @@
1
+ import { autoUpdate as d, computePosition as u, offset as y, flip as v, shift as m } from "@floating-ui/dom";
2
+ import "rxjs";
3
+ import { classMap as b } from "lit/directives/class-map.js";
4
+ import "lit/directives/style-map.js";
5
+ import { $ as f } from "./litElement.mixin-vAR9BIyD.js";
6
+ import "./tailwind.mixin-DxmWMnBQ.js";
7
+ import { c as g } from "./ripple-BumgqsDT.js";
8
+ import { S as w } from "./theme.interface-C5Kj6WjD.js";
9
+ import { css as O, html as A } from "lit";
10
+ import { property as r, state as p, query as c, queryAssignedElements as $, customElement as D } from "lit/decorators.js";
11
+ var x = Object.defineProperty, S = Object.getOwnPropertyDescriptor, a = (t, e, i, s) => {
12
+ for (var l, n = s > 1 ? void 0 : s ? S(e, i) : e, h = t.length - 1; h >= 0; h--) (l = t[h]) && (n = (s ? l(e, i, n) : l(n)) || n);
13
+ return s && n && x(e, i, n), n;
14
+ };
15
+ let o = class extends f(O`
16
+ :host {
17
+ display: block;
18
+ position: relative;
19
+ }
20
+
21
+ [role='listbox'] {
22
+ overflow-y: auto;
23
+ outline: none;
24
+ }
25
+ `) {
26
+ constructor() {
27
+ super(...arguments), this.required = !1, this.placeholder = "", this.value = "", this.multi = !1, this.label = "", this.isOpen = !1, this.valueLabel = "", this.isValid = !0, this.validationMessage = "";
28
+ }
29
+ connectedCallback() {
30
+ super.connectedCallback(), this.id || (this.id = `schmancy-select-${Math.random().toString(36).substr(2, 9)}`), this.addEventListener("keydown", this.handleKeyDown);
31
+ }
32
+ disconnectedCallback() {
33
+ var t;
34
+ super.disconnectedCallback(), this.removeEventListener("keydown", this.handleKeyDown), (t = this.cleanupPositioner) == null || t.call(this);
35
+ }
36
+ firstUpdated() {
37
+ this.syncSelection(), this.setupOptionsAccessibility();
38
+ }
39
+ syncSelection() {
40
+ if (this.multi) {
41
+ const t = Array.isArray(this.value) ? this.value : [];
42
+ 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;
43
+ } else {
44
+ const t = this.options.find((e) => e.value === this.value);
45
+ this.valueLabel = (t == null ? void 0 : t.label) || this.placeholder;
46
+ }
47
+ }
48
+ setupOptionsAccessibility() {
49
+ this.options.forEach((t, e) => {
50
+ t.setAttribute("role", "option"), t.id || (t.id = `${this.id}-option-${e}`), t.tabIndex = -1;
51
+ const i = Array.isArray(this.value) ? this.value : [];
52
+ t.setAttribute("aria-selected", String(this.multi ? i.includes(t.value) : t.value === this.value));
53
+ });
54
+ }
55
+ async positionDropdown() {
56
+ const t = this.renderRoot.querySelector(".trigger");
57
+ if (!t || !this.ul) return;
58
+ const e = window.innerHeight - t.getBoundingClientRect().bottom - 10;
59
+ this.ul.style.maxHeight = `${e}px`, this.cleanupPositioner = d(t, this.ul, async () => {
60
+ const { x: i, y: s } = await u(t, this.ul, { placement: "bottom-start", middleware: [y(5), v(), m({ padding: 5 })] });
61
+ Object.assign(this.ul.style, { left: `${i}px`, top: `${s}px`, position: "absolute" });
62
+ });
63
+ }
64
+ handleKeyDown(t) {
65
+ if (!this.isOpen) return void (["Enter", " ", "ArrowDown"].includes(t.key) && (t.preventDefault(), this.openDropdown(!1)));
66
+ const e = this.options.findIndex((i) => i.matches(":focus")) ?? -1;
67
+ switch (t.key) {
68
+ case "Escape":
69
+ case "Tab":
70
+ this.closeDropdown();
71
+ break;
72
+ case "ArrowDown":
73
+ t.preventDefault(), this.focusOption(this.options, Math.min(e + 1, this.options.length - 1));
74
+ break;
75
+ case "ArrowUp":
76
+ t.preventDefault(), this.focusOption(this.options, Math.max(e - 1, 0));
77
+ break;
78
+ case "Enter":
79
+ case " ":
80
+ t.preventDefault(), e >= 0 && this.handleOptionSelect(this.options[e].value);
81
+ }
82
+ }
83
+ focusOption(t, e) {
84
+ const i = t[e];
85
+ if (i) {
86
+ i.focus();
87
+ const s = this.renderRoot.querySelector(".trigger");
88
+ s == null || s.setAttribute("aria-activedescendant", i.id);
89
+ }
90
+ }
91
+ async openDropdown(t = !1) {
92
+ this.isOpen = !0, await this.updateComplete, this.positionDropdown(), this.setupOptionsAccessibility();
93
+ const e = Array.from(this.ul.querySelectorAll('[role="option"]')), i = this.multi ? 0 : e.findIndex((s) => s.getAttribute("value") === this.value);
94
+ this.focusOption(e, Math.max(i, 0)), t && this.reportValidity();
95
+ }
96
+ closeDropdown() {
97
+ var e;
98
+ this.isOpen = !1, (e = this.cleanupPositioner) == null || e.call(this);
99
+ const t = this.renderRoot.querySelector(".trigger");
100
+ t == null || t.removeAttribute("aria-activedescendant"), t == null || t.focus();
101
+ }
102
+ handleOptionSelect(t) {
103
+ var e;
104
+ if (this.multi) {
105
+ const i = this.options.find((l) => l.value === t);
106
+ if (!i) return;
107
+ i.selected = !i.selected;
108
+ let s = Array.isArray(this.value) ? [...this.value] : [];
109
+ s = i.selected ? [...s, t] : s.filter((l) => l !== t), this.value = s, this.valueLabel = s.length > 0 ? this.options.filter((l) => s.includes(l.value)).map((l) => l.label).join(", ") : this.placeholder, this.dispatchChange(s);
110
+ } 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();
111
+ this.setupOptionsAccessibility();
112
+ }
113
+ dispatchChange(t) {
114
+ this.isValid = !0, this.validationMessage = "", this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 }));
115
+ }
116
+ checkValidity() {
117
+ return this.isValid = this.multi ? Array.isArray(this.value) && this.value.length > 0 : !!this.value, this.validationMessage = this.isValid ? "" : "Please select an option.", this.isValid;
118
+ }
119
+ reportValidity() {
120
+ return !this.required || (this.checkValidity(), this.inputRef.required = !0, this.isValid ? (this.inputRef.reportValidity(), !0) : (this.openDropdown(), this.inputRef.reportValidity(), !1));
121
+ }
122
+ setCustomValidity(t) {
123
+ this.validationMessage = t;
124
+ }
125
+ render() {
126
+ return A`
127
+ <div class="relative">
128
+ <schmancy-input
129
+ .name=${this.name}
130
+ tabIndex="0"
131
+ class="trigger"
132
+ role="combobox"
133
+ aria-haspopup="listbox"
134
+ aria-expanded=${this.isOpen}
135
+ aria-controls="options"
136
+ aria-autocomplete="none"
137
+ aria-required=${this.required}
138
+ .label=${this.label}
139
+ .placeholder=${this.placeholder}
140
+ .value=${this.valueLabel}
141
+ .required=${this.required}
142
+ readonly
143
+ @click=${() => this.isOpen ? this.closeDropdown() : this.openDropdown(!0)}
144
+ ></schmancy-input>
145
+
146
+ <div
147
+ id="overlay"
148
+ class="fixed inset-0"
149
+ ?hidden=${!this.isOpen}
150
+ @click=${this.closeDropdown}
151
+ tabindex="-1"
152
+ aria-hidden="true"
153
+ ></div>
154
+
155
+ <ul
156
+ id="options"
157
+ role="listbox"
158
+ aria-multiselectable=${this.multi}
159
+ class=${b({ "absolute z-[1000] mt-1 w-full rounded-md shadow-sm": !0, hidden: !this.isOpen })}
160
+ ${g({ bgColor: w.sys.color.surface.container })}
161
+ @click=${(t) => {
162
+ var s;
163
+ const e = t, i = (s = e.detail) == null ? void 0 : s.value;
164
+ i && this.handleOptionSelect(i);
165
+ }}
166
+ >
167
+ <slot
168
+ @slotchange=${() => {
169
+ this.syncSelection(), this.setupOptionsAccessibility();
170
+ }}
171
+ ></slot>
172
+ </ul>
173
+ </div>
174
+ `;
175
+ }
176
+ };
177
+ a([r({ type: String })], o.prototype, "name", 2), a([r({ type: Boolean })], o.prototype, "required", 2), a([r({ type: String })], o.prototype, "placeholder", 2), a([r({ type: String })], o.prototype, "value", 2), a([r({ type: Boolean })], o.prototype, "multi", 2), a([r({ type: String })], o.prototype, "label", 2), a([p()], o.prototype, "isOpen", 2), a([p()], o.prototype, "valueLabel", 2), a([p()], o.prototype, "isValid", 2), a([r({ type: String })], o.prototype, "validationMessage", 2), a([c("ul")], o.prototype, "ul", 2), a([c("schmancy-input")], o.prototype, "inputRef", 2), a([$({ flatten: !0 })], o.prototype, "options", 2), o = a([D("schmancy-select")], o);
178
+ export {
179
+ o as S
180
+ };
181
+ //# sourceMappingURL=select-Ba3A3DS4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-Ba3A3DS4.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, 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// API\n\t@property({ type: String }) name: string | undefined\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String }) value: string | string[] = '' // for single-select or multi-select\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) label = ''\n\n\t// Internal states\n\t@state() private isOpen = false\n\t@state() private valueLabel = ''\n\t@state() private isValid = true\n\t@property({ type: String }) validationMessage = ''\n\n\t@query('ul') private ul!: HTMLUListElement\n\n\t@query('schmancy-input') private inputRef!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private options!: SchmancyOption[]\n\tprivate cleanupPositioner?: () => void\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\t}\n\n\tdisconnectedCallback() {\n\t\tsuper.disconnectedCallback()\n\t\tthis.removeEventListener('keydown', this.handleKeyDown)\n\t\tthis.cleanupPositioner?.()\n\t}\n\n\tfirstUpdated() {\n\t\tthis.syncSelection()\n\t\tthis.setupOptionsAccessibility()\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.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\t\tif (report) this.reportValidity()\n\t}\n\n\tprivate closeDropdown() {\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\t}\n\n\tprivate handleOptionSelect(value: string) {\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\t}\n\n\tprivate dispatchChange(value: string | string[]) {\n\t\tthis.isValid = true // Reset validation on change\n\t\tthis.validationMessage = ''\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancySelectChangeEvent['detail']>('change', {\n\t\t\t\tdetail: { value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tpublic checkValidity(): boolean {\n\t\tthis.isValid = this.multi ? Array.isArray(this.value) && this.value.length > 0 : Boolean(this.value)\n\t\tthis.validationMessage = this.isValid ? '' : 'Please select an option.'\n\t\treturn this.isValid\n\t}\n\n\tpublic reportValidity(): boolean {\n\t\tif (this.required) {\n\t\t\tthis.checkValidity()\n\t\t\tthis.inputRef.required = true\n\t\t\tif (!this.isValid) {\n\t\t\t\tthis.openDropdown()\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t\treturn false\n\t\t\t} else {\n\t\t\t\tthis.inputRef.reportValidity()\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\t\treturn true\n\t}\n\n\tpublic setCustomValidity(message: string) {\n\t\tthis.validationMessage = message\n\t}\n\n\trender(): TemplateResult {\n\t\treturn html`\n\t\t\t<div class=\"relative\">\n\t\t\t\t<schmancy-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\treadonly\n\t\t\t\t\t@click=${() => (this.isOpen ? this.closeDropdown() : this.openDropdown(true))}\n\t\t\t\t></schmancy-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","super","arguments","this","required","placeholder","value","multi","label","isOpen","valueLabel","isValid","validationMessage","connectedCallback","id","Math","random","toString","substr","addEventListener","handleKeyDown","disconnectedCallback","removeEventListener","cleanupPositioner","firstUpdated","syncSelection","setupOptionsAccessibility","selectedValues","Array","isArray","options","forEach","o","selected","includes","length","filter","map","join","selectedOption","find","option","index","setAttribute","tabIndex","String","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","e","key","preventDefault","openDropdown","current","findIndex","matches","closeDropdown","focusOption","min","max","handleOptionSelect","focus","combobox","report","updateComplete","positionDropdown","from","querySelectorAll","selectedIndex","getAttribute","reportValidity","removeAttribute","v","dispatchChange","dispatchEvent","CustomEvent","detail","bubbles","composed","Boolean","checkValidity","inputRef","message","render","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","container","customEvt","detailVal","__decorateClass","property","type","prototype","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;AAea,IAAAA,IAAN,cAA6BC,EAAYC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzC,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAakCC,GAAAA,KAAAC,eACED,KAAAE,cAAA,IACaF,KAAAG,QAAA,IAClBH,KAAAI,QAAAA,IACDJ,KAAAK,QAAA,IAG3BL,KAAQM,SAAS,IACjBN,KAAQO,aAAa,IACrBP,KAAQQ,UAAAA,IAC+BR,KAAAS,oBAAA;AAAA,EAAA;AAAA,EAQhD,oBAAAC;AACCZ,UAAMY,kBACDV,GAAAA,KAAKW,OACJX,KAAAW,KAAK,mBAAmBC,KAAKC,OAAAA,EAASC,SAAS,EAAIC,EAAAA,OAAO,GAAG,CAAA,CAAA,KAE9Df,KAAAgB,iBAAiB,WAAWhB,KAAKiB,aAAAA;AAAAA,EAAa;AAAA,EAGpD,uBAAAC;;AACCpB,UAAMoB,qBAAAA,GACDlB,KAAAmB,oBAAoB,WAAWnB,KAAKiB,aAAAA,IACzCjB,IAAAA,KAAKoB,sBAALpB,QAAAA,EAAAA;AAAAA,EAAyB;AAAA,EAG1B,eAAAqB;AACCrB,SAAKsB,cACLtB,GAAAA,KAAKuB,0BAA0B;AAAA,EAAA;AAAA,EAGxB,gBACP;AAAA,QAAIvB,KAAKI,OAAO;AACT,YAAAoB,IAAiBC,MAAMC,QAAQ1B,KAAKG,KAAAA,IAASH,KAAKG,QAAQ;AAC3DH,WAAA2B,QAAQC,QAAcC,CAAAA,MAAAA,EAAEC,WAAWN,EAAeO,SAASF,EAAE1B,SAC7DH,KAAAO,aACJiB,EAAeQ,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AA,EAgBiB6H,WAAA,SAAA,CACDH,GAAAA,EAAA,CAA3BC,EAAS,EAAEC,MAAM7E,OAjBN/C,CAAAA,CAAAA,GAAAA,EAiBgB6H,WAAA,SAAA,CAGXH,GAAAA,EAAA,CAAhBI,EApBW9H,CAAAA,GAAAA,EAoBK6H,WAAA,UAAA,CACAH,GAAAA,EAAA,CAAhBI,EAAAA,CAAAA,GArBW9H,EAqBK6H,WAAA,cAAA,CAAA,GACAH,EAAA,CAAhBI,EAtBW9H,CAAAA,GAAAA,EAsBK6H,WAAA,WAAA,CACWH,GAAAA,EAAA,CAA3BC,EAAS,EAAEC,MAAM7E,OAvBN/C,CAAAA,CAAAA,GAAAA,EAuBgB6H,WAAA,qBAAA,CAEPH,GAAAA,EAAA,CAApBK,EAAM,IAzBK/H,CAAAA,GAAAA,EAyBS6H,WAAA,MAAA,CAEYH,GAAAA,EAAA,CAAhCK,EAAM,gBA3BK/H,CAAAA,GAAAA,EA2BqB6H,WAAA,YAAA,CACiBH,GAAAA,EAAA,CAAjDM,EAAsB,EAAEC,SAAAA,GA5BbjI,CAAAA,CAAAA,GAAAA,EA4BsC6H,WAAA,WAAA,CA5BtC7H,GAAAA,IAAN0H,EAAA,CADNQ,EAAc,iBAAA,CAAA,GACFlI;"}
@@ -0,0 +1,54 @@
1
+ "use strict";const r=require("@floating-ui/dom");require("rxjs");const p=require("lit/directives/class-map.js");require("lit/directives/style-map.js");const u=require("./litElement.mixin-C-c-2rdW.cjs");require("./tailwind.mixin-B7_ZpVpC.cjs");const d=require("./ripple-C2BHbhcS.cjs"),y=require("./theme.interface-Xg5Zi46a.cjs"),h=require("lit"),o=require("lit/decorators.js");var m=Object.defineProperty,v=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var l,n=s>1?void 0:s?v(t,i):t,c=e.length-1;c>=0;c--)(l=e[c])&&(n=(s?l(t,i,n):l(n))||n);return s&&n&&m(t,i,n),n};exports.SchmancySelect=class extends u.$LitElement(h.css`
2
+ :host {
3
+ display: block;
4
+ position: relative;
5
+ }
6
+
7
+ [role='listbox'] {
8
+ overflow-y: auto;
9
+ outline: none;
10
+ }
11
+ `){constructor(){super(...arguments),this.required=!1,this.placeholder="",this.value="",this.multi=!1,this.label="",this.isOpen=!1,this.valueLabel="",this.isValid=!0,this.validationMessage=""}connectedCallback(){super.connectedCallback(),this.id||(this.id=`schmancy-select-${Math.random().toString(36).substr(2,9)}`),this.addEventListener("keydown",this.handleKeyDown)}disconnectedCallback(){var e;super.disconnectedCallback(),this.removeEventListener("keydown",this.handleKeyDown),(e=this.cleanupPositioner)==null||e.call(this)}firstUpdated(){this.syncSelection(),this.setupOptionsAccessibility()}syncSelection(){if(this.multi){const e=Array.isArray(this.value)?this.value:[];this.options.forEach(t=>t.selected=e.includes(t.value)),this.valueLabel=e.length>0?this.options.filter(t=>e.includes(t.value)).map(t=>t.label).join(", "):this.placeholder}else{const e=this.options.find(t=>t.value===this.value);this.valueLabel=(e==null?void 0:e.label)||this.placeholder}}setupOptionsAccessibility(){this.options.forEach((e,t)=>{e.setAttribute("role","option"),e.id||(e.id=`${this.id}-option-${t}`),e.tabIndex=-1;const i=Array.isArray(this.value)?this.value:[];e.setAttribute("aria-selected",String(this.multi?i.includes(e.value):e.value===this.value))})}async positionDropdown(){const e=this.renderRoot.querySelector(".trigger");if(!e||!this.ul)return;const t=window.innerHeight-e.getBoundingClientRect().bottom-10;this.ul.style.maxHeight=`${t}px`,this.cleanupPositioner=r.autoUpdate(e,this.ul,async()=>{const{x:i,y:s}=await r.computePosition(e,this.ul,{placement:"bottom-start",middleware:[r.offset(5),r.flip(),r.shift({padding:5})]});Object.assign(this.ul.style,{left:`${i}px`,top:`${s}px`,position:"absolute"})})}handleKeyDown(e){if(!this.isOpen)return void(["Enter"," ","ArrowDown"].includes(e.key)&&(e.preventDefault(),this.openDropdown(!1)));const t=this.options.findIndex(i=>i.matches(":focus"))??-1;switch(e.key){case"Escape":case"Tab":this.closeDropdown();break;case"ArrowDown":e.preventDefault(),this.focusOption(this.options,Math.min(t+1,this.options.length-1));break;case"ArrowUp":e.preventDefault(),this.focusOption(this.options,Math.max(t-1,0));break;case"Enter":case" ":e.preventDefault(),t>=0&&this.handleOptionSelect(this.options[t].value)}}focusOption(e,t){const i=e[t];if(i){i.focus();const s=this.renderRoot.querySelector(".trigger");s==null||s.setAttribute("aria-activedescendant",i.id)}}async openDropdown(e=!1){this.isOpen=!0,await this.updateComplete,this.positionDropdown(),this.setupOptionsAccessibility();const t=Array.from(this.ul.querySelectorAll('[role="option"]')),i=this.multi?0:t.findIndex(s=>s.getAttribute("value")===this.value);this.focusOption(t,Math.max(i,0)),e&&this.reportValidity()}closeDropdown(){var t;this.isOpen=!1,(t=this.cleanupPositioner)==null||t.call(this);const e=this.renderRoot.querySelector(".trigger");e==null||e.removeAttribute("aria-activedescendant"),e==null||e.focus()}handleOptionSelect(e){var t;if(this.multi){const i=this.options.find(l=>l.value===e);if(!i)return;i.selected=!i.selected;let s=Array.isArray(this.value)?[...this.value]:[];s=i.selected?[...s,e]:s.filter(l=>l!==e),this.value=s,this.valueLabel=s.length>0?this.options.filter(l=>s.includes(l.value)).map(l=>l.label).join(", "):this.placeholder,this.dispatchChange(s)}else this.options.forEach(i=>i.selected=i.value===e),this.value=e,this.valueLabel=((t=this.options.find(i=>i.value===e))==null?void 0:t.label)||this.placeholder,this.dispatchChange(e),this.closeDropdown();this.setupOptionsAccessibility()}dispatchChange(e){this.isValid=!0,this.validationMessage="",this.dispatchEvent(new CustomEvent("change",{detail:{value:e},bubbles:!0,composed:!0}))}checkValidity(){return this.isValid=this.multi?Array.isArray(this.value)&&this.value.length>0:!!this.value,this.validationMessage=this.isValid?"":"Please select an option.",this.isValid}reportValidity(){return!this.required||(this.checkValidity(),this.inputRef.required=!0,this.isValid?(this.inputRef.reportValidity(),!0):(this.openDropdown(),this.inputRef.reportValidity(),!1))}setCustomValidity(e){this.validationMessage=e}render(){return h.html`
12
+ <div class="relative">
13
+ <schmancy-input
14
+ .name=${this.name}
15
+ tabIndex="0"
16
+ class="trigger"
17
+ role="combobox"
18
+ aria-haspopup="listbox"
19
+ aria-expanded=${this.isOpen}
20
+ aria-controls="options"
21
+ aria-autocomplete="none"
22
+ aria-required=${this.required}
23
+ .label=${this.label}
24
+ .placeholder=${this.placeholder}
25
+ .value=${this.valueLabel}
26
+ .required=${this.required}
27
+ readonly
28
+ @click=${()=>this.isOpen?this.closeDropdown():this.openDropdown(!0)}
29
+ ></schmancy-input>
30
+
31
+ <div
32
+ id="overlay"
33
+ class="fixed inset-0"
34
+ ?hidden=${!this.isOpen}
35
+ @click=${this.closeDropdown}
36
+ tabindex="-1"
37
+ aria-hidden="true"
38
+ ></div>
39
+
40
+ <ul
41
+ id="options"
42
+ role="listbox"
43
+ aria-multiselectable=${this.multi}
44
+ class=${p.classMap({"absolute z-[1000] mt-1 w-full rounded-md shadow-sm":!0,hidden:!this.isOpen})}
45
+ ${d.color({bgColor:y.SchmancyTheme.sys.color.surface.container})}
46
+ @click=${e=>{var s;const t=e,i=(s=t.detail)==null?void 0:s.value;i&&this.handleOptionSelect(i)}}
47
+ >
48
+ <slot
49
+ @slotchange=${()=>{this.syncSelection(),this.setupOptionsAccessibility()}}
50
+ ></slot>
51
+ </ul>
52
+ </div>
53
+ `}},a([o.property({type:String})],exports.SchmancySelect.prototype,"name",2),a([o.property({type:Boolean})],exports.SchmancySelect.prototype,"required",2),a([o.property({type:String})],exports.SchmancySelect.prototype,"placeholder",2),a([o.property({type:String})],exports.SchmancySelect.prototype,"value",2),a([o.property({type:Boolean})],exports.SchmancySelect.prototype,"multi",2),a([o.property({type:String})],exports.SchmancySelect.prototype,"label",2),a([o.state()],exports.SchmancySelect.prototype,"isOpen",2),a([o.state()],exports.SchmancySelect.prototype,"valueLabel",2),a([o.state()],exports.SchmancySelect.prototype,"isValid",2),a([o.property({type:String})],exports.SchmancySelect.prototype,"validationMessage",2),a([o.query("ul")],exports.SchmancySelect.prototype,"ul",2),a([o.query("schmancy-input")],exports.SchmancySelect.prototype,"inputRef",2),a([o.queryAssignedElements({flatten:!0})],exports.SchmancySelect.prototype,"options",2),exports.SchmancySelect=a([o.customElement("schmancy-select")],exports.SchmancySelect);
54
+ //# sourceMappingURL=select-DtJckUTa.cjs.map