@mhmo91/schmancy 0.2.71 → 0.2.74
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 +1 -1
- package/dist/card.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/select-Ba3A3DS4.js +181 -0
- package/dist/select-Ba3A3DS4.js.map +1 -0
- package/dist/select-DtJckUTa.cjs +54 -0
- package/dist/select-DtJckUTa.cjs.map +1 -0
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-D2o6a-Yh.js → teleport.component-BDjpvS8u.js} +2 -2
- package/dist/{teleport.component-D2o6a-Yh.js.map → teleport.component-BDjpvS8u.js.map} +1 -1
- package/dist/{teleport.component-14_ksDPx.cjs → teleport.component-RUW2q1dl.cjs} +2 -2
- package/dist/{teleport.component-14_ksDPx.cjs.map → teleport.component-RUW2q1dl.cjs.map} +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +2 -3
- package/types/src/select/select.d.ts +1 -8
- package/dist/select-BTSVFloo.cjs +0 -55
- package/dist/select-BTSVFloo.cjs.map +0 -1
- package/dist/select-Iem1gGwb.js +0 -176
- package/dist/select-Iem1gGwb.js.map +0 -1
package/dist/card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./teleport.component-
|
|
1
|
+
"use strict";require("./teleport.component-RUW2q1dl.cjs");
|
|
2
2
|
//# sourceMappingURL=card.cjs.map
|
package/dist/card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./teleport.component-
|
|
1
|
+
import "./teleport.component-BDjpvS8u.js";
|
|
2
2
|
//# sourceMappingURL=card.js.map
|
package/dist/content-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-RUW2q1dl.cjs");Object.defineProperty(exports,"SchmancyContentDrawer",{enumerable:!0,get:()=>e.SchmancyContentDrawer}),exports.SchmancyContentDrawerID=e.SchmancyContentDrawerID,Object.defineProperty(exports,"SchmancyContentDrawerMain",{enumerable:!0,get:()=>e.SchmancyContentDrawerMain}),exports.SchmancyContentDrawerMaxHeight=e.SchmancyContentDrawerMaxHeight,exports.SchmancyContentDrawerMinWidth=e.SchmancyContentDrawerMinWidth,Object.defineProperty(exports,"SchmancyContentDrawerSheet",{enumerable:!0,get:()=>e.SchmancyContentDrawerSheet}),exports.SchmancyContentDrawerSheetMode=e.SchmancyContentDrawerSheetMode,exports.SchmancyContentDrawerSheetState=e.SchmancyContentDrawerSheetState,exports.schmancyContentDrawer=e.schmancyContentDrawer;
|
|
2
2
|
//# sourceMappingURL=content-drawer.cjs.map
|
package/dist/content-drawer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-
|
|
1
|
+
import { e as n, b as t, f as r, c, d as h, g as S, S as o, a as s, s as m } from "./teleport.component-BDjpvS8u.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-
|
|
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-RUW2q1dl.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-DtJckUTa.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$;
|
|
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-
|
|
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-BDjpvS8u.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";
|
|
@@ -23,7 +23,7 @@ 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-
|
|
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
29
|
import { S as Ya } from "./surface-Ci1xR_sr.js";
|
package/dist/nav-drawer.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-RUW2q1dl.cjs");exports.$drawer=e.$drawer,Object.defineProperty(exports,"SchmancyDrawerAppbar",{enumerable:!0,get:()=>e.SchmancyDrawerAppbar}),exports.SchmancyDrawerNavbarMode=e.SchmancyDrawerNavbarMode,exports.SchmancyDrawerNavbarState=e.SchmancyDrawerNavbarState,Object.defineProperty(exports,"SchmancyNavigationDrawer",{enumerable:!0,get:()=>e.SchmancyNavigationDrawer}),Object.defineProperty(exports,"SchmancyNavigationDrawerContent",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerContent}),Object.defineProperty(exports,"SchmancyNavigationDrawerSidebar",{enumerable:!0,get:()=>e.SchmancyNavigationDrawerSidebar}),exports.schmancyNavDrawer=e.schmancyNavDrawer;
|
|
2
2
|
//# sourceMappingURL=nav-drawer.cjs.map
|
package/dist/nav-drawer.js
CHANGED
|
@@ -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-
|
|
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-BDjpvS8u.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;A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,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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-DtJckUTa.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, 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","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","html","name","classMap","hidden","color","bgColor","SchmancyTheme","sys","surface","container","customEvt","detailVal","__decorateClass","property","type","prototype","state","query","queryAssignedElements","flatten","customElement"],"mappings":"wjBAeaA,QAAAA,eAAN,cAA6BC,EAAAA,YAAYC,EAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAzC,CAAA,CAAA,aAAAC,CAAAA,MAAAA,GAAAC,SAakCC,EAAAA,KAAAC,YACED,KAAAE,YAAA,GACaF,KAAAG,MAAA,GAClBH,KAAAI,MAAAA,GACDJ,KAAAK,MAAA,GAG3BL,KAAQM,UACRN,KAAQO,WAAa,GACrBP,KAAQQ,QAAU,GACqBR,KAAAS,kBAAA,EAAA,CAQhD,mBACCX,CAAAA,MAAMY,oBACDV,KAAKW,KACJX,KAAAW,GAAK,mBAAmBC,KAAKC,OAASC,EAAAA,SAAS,IAAIC,OAAO,EAAG,CAE9Df,CAAAA,IAAAA,KAAAgB,iBAAiB,UAAWhB,KAAKiB,aAAa,CAAA,CAGpD,sBACCnB,OAAAA,MAAMoB,qBACDlB,EAAAA,KAAAmB,oBAAoB,UAAWnB,KAAKiB,aACzCjB,GAAAA,EAAAA,KAAKoB,oBAALpB,MAAAA,EAAAA,UAAyB,CAG1B,cACCA,CAAAA,KAAKqB,gBACLrB,KAAKsB,0BAAAA,CAA0B,CAGxB,gBACP,GAAItB,KAAKI,MAAO,CACT,MAAAmB,EAAiBC,MAAMC,QAAQzB,KAAKG,KAASH,EAAAA,KAAKG,MAAQ,CAAA,EAC3DH,KAAA0B,QAAQC,QAAcC,GAAAA,EA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AA,EAAAA,uBAoBK2H,UAAA,SAAA,CAAA,EACAH,EAAA,CAAhBI,EAAMA,MArBK5H,CAAAA,EAAAA,uBAqBK2H,UAAA,aAAA,CACAH,EAAAA,EAAA,CAAhBI,EAAMA,MAAAA,CAAAA,EAtBK5H,uBAsBK2H,UAAA,UAAA,CACWH,EAAAA,EAAA,CAA3BC,WAAS,CAAEC,KAAM5E,UAvBN9C,uBAuBgB2H,UAAA,oBAAA,GAEPH,EAAA,CAApBK,EAAAA,MAAM,IAzBK7H,CAAAA,EAAAA,uBAyBS2H,UAAA,KAAA,CAEYH,EAAAA,EAAA,CAAhCK,EAAAA,MAAM,gBA3BK7H,CAAAA,EAAAA,uBA2BqB2H,UAAA,WAAA,CACiBH,EAAAA,EAAA,CAAjDM,wBAAsB,CAAEC,QAAAA,EA5Bb/H,CAAAA,CAAAA,EAAAA,uBA4BsC2H,UAAA,UAAA,CA5BtC3H,EAAAA,QAANA,eAAAwH,EAAA,CADNQ,EAAAA,cAAc,oBACFhI"}
|
package/dist/select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./select-DtJckUTa.cjs");Object.defineProperty(exports,"SchmancySelect",{enumerable:!0,get:()=>e.SchmancySelect});
|
|
2
2
|
//# sourceMappingURL=select.cjs.map
|
package/dist/select.js
CHANGED
package/dist/teleport.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./teleport.component-RUW2q1dl.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
|
|
@@ -32,7 +32,7 @@ import "./outlet-jd-bRdrF.js";
|
|
|
32
32
|
import "./option-DCA4GidB.js";
|
|
33
33
|
import "./radio-group-C98aizGb.js";
|
|
34
34
|
import "./index-CuY8m6ta.js";
|
|
35
|
-
import "./select-
|
|
35
|
+
import "./select-Ba3A3DS4.js";
|
|
36
36
|
import { s as G } from "./sheet-WsaFx6-i.js";
|
|
37
37
|
import "./slider-BOXmzToY.js";
|
|
38
38
|
import "./surface-Ci1xR_sr.js";
|
|
@@ -527,4 +527,4 @@ export {
|
|
|
527
527
|
Ve as s,
|
|
528
528
|
H as t
|
|
529
529
|
};
|
|
530
|
-
//# sourceMappingURL=teleport.component-
|
|
530
|
+
//# sourceMappingURL=teleport.component-BDjpvS8u.js.map
|