@mhmo91/schmancy 0.2.131 → 0.2.132
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/{animated-text-rLaot0v2.cjs → animated-text-BA466KMo.cjs} +2 -2
- package/dist/{animated-text-rLaot0v2.cjs.map → animated-text-BA466KMo.cjs.map} +1 -1
- package/dist/{animated-text-BJXm6krF.js → animated-text-DGzNS4Kd.js} +3 -3
- package/dist/{animated-text-BJXm6krF.js.map → animated-text-DGzNS4Kd.js.map} +1 -1
- package/dist/animated-text.cjs +1 -1
- package/dist/animated-text.js +1 -1
- package/dist/area.cjs +1 -1
- package/dist/{area.component-CP5oin2j.cjs → area.component-BsTipdPH.cjs} +2 -2
- package/dist/{area.component-CP5oin2j.cjs.map → area.component-BsTipdPH.cjs.map} +1 -1
- package/dist/{area.component-DlAEUmgd.js → area.component-DqakKBYJ.js} +3 -3
- package/dist/{area.component-DlAEUmgd.js.map → area.component-DqakKBYJ.js.map} +1 -1
- package/dist/area.js +1 -1
- package/dist/autocomplete-CsePKzPw.cjs +62 -0
- package/dist/autocomplete-CsePKzPw.cjs.map +1 -0
- package/dist/autocomplete-DQKvgQXh.js +249 -0
- package/dist/autocomplete-DQKvgQXh.js.map +1 -0
- package/dist/autocomplete.cjs +1 -1
- package/dist/autocomplete.js +1 -1
- package/dist/busy.cjs +1 -1
- package/dist/busy.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{checkbox-DrrcDAjr.cjs → checkbox-B2iiLgtv.cjs} +2 -2
- package/dist/{checkbox-DrrcDAjr.cjs.map → checkbox-B2iiLgtv.cjs.map} +1 -1
- package/dist/{checkbox-N_JVa-1W.js → checkbox-CxcVktYo.js} +2 -2
- package/dist/{checkbox-N_JVa-1W.js.map → checkbox-CxcVktYo.js.map} +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/{chips-DuSV3Pg2.js → chips-BqYp-S9g.js} +15 -15
- package/dist/{chips-DuSV3Pg2.js.map → chips-BqYp-S9g.js.map} +1 -1
- package/dist/{chips-DrYrCyTG.cjs → chips-UqRrSW28.cjs} +15 -15
- package/dist/{chips-DrYrCyTG.cjs.map → chips-UqRrSW28.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/{date-range-DoZNetuD.cjs → date-range-BwgdrpOA.cjs} +3 -3
- package/dist/date-range-BwgdrpOA.cjs.map +1 -0
- package/dist/{date-range-6fQ4ypDJ.js → date-range-CdoDJ3L2.js} +16 -16
- package/dist/date-range-CdoDJ3L2.js.map +1 -0
- package/dist/date-range.cjs +1 -1
- package/dist/date-range.js +1 -1
- package/dist/{delay-CSAsNZ4k.js → delay-CS6opyMk.js} +2 -2
- package/dist/{delay-CSAsNZ4k.js.map → delay-CS6opyMk.js.map} +1 -1
- package/dist/{delay-WrR6CJK_.cjs → delay-uWrg9zzM.cjs} +2 -2
- package/dist/{delay-WrR6CJK_.cjs.map → delay-uWrg9zzM.cjs.map} +1 -1
- package/dist/delay.cjs +1 -1
- package/dist/delay.js +1 -1
- package/dist/{divider-Cl2Thq2Y.cjs → divider-2ok73Eva.cjs} +2 -2
- package/dist/{divider-Cl2Thq2Y.cjs.map → divider-2ok73Eva.cjs.map} +1 -1
- package/dist/{divider-ByXACxEQ.js → divider-7V3DrqCq.js} +3 -3
- package/dist/{divider-ByXACxEQ.js.map → divider-7V3DrqCq.js.map} +1 -1
- package/dist/divider.cjs +1 -1
- package/dist/divider.js +1 -1
- package/dist/extra.cjs +1 -1
- package/dist/extra.js +1 -1
- package/dist/{flex-BGVyAdBX.js → flex-Dl-3pfaZ.js} +2 -2
- package/dist/{flex-BGVyAdBX.js.map → flex-Dl-3pfaZ.js.map} +1 -1
- package/dist/{flex-DeB79N0h.cjs → flex-Wu22kbKr.cjs} +2 -2
- package/dist/{flex-DeB79N0h.cjs.map → flex-Wu22kbKr.cjs.map} +1 -1
- package/dist/{form-DATARECy.js → form-D3iNn8mF.js} +2 -2
- package/dist/{form-DATARECy.js.map → form-D3iNn8mF.js.map} +1 -1
- package/dist/{form-Dkh-YG_8.cjs → form-DtbsNIva.cjs} +2 -2
- package/dist/{form-Dkh-YG_8.cjs.map → form-DtbsNIva.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{icon-BbqYaRVu.cjs → icon-CcfC08Kv.cjs} +2 -2
- package/dist/{icon-BbqYaRVu.cjs.map → icon-CcfC08Kv.cjs.map} +1 -1
- package/dist/{icon-BdqEZEF8.js → icon-Daf3V5zc.js} +3 -3
- package/dist/{icon-BdqEZEF8.js.map → icon-Daf3V5zc.js.map} +1 -1
- package/dist/{icon-button-DlnuclQQ.js → icon-button-CvzPbHj1.js} +4 -4
- package/dist/icon-button-CvzPbHj1.js.map +1 -0
- package/dist/{icon-button-BUUtmKnu.cjs → icon-button-D02HHUju.cjs} +3 -3
- package/dist/icon-button-D02HHUju.cjs.map +1 -0
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +35 -35
- package/dist/{input-BDUd1ZGs.js → input-CRKlzC_n.js} +2 -2
- package/dist/{input-BDUd1ZGs.js.map → input-CRKlzC_n.js.map} +1 -1
- package/dist/{input-B_MWCRet.cjs → input-DkYfzuf_.cjs} +2 -2
- package/dist/{input-B_MWCRet.cjs.map → input-DkYfzuf_.cjs.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +1 -1
- package/dist/{list-D0J2ndMA.js → list-CIfX9HAX.js} +2 -2
- package/dist/{list-D0J2ndMA.js.map → list-CIfX9HAX.js.map} +1 -1
- package/dist/{list-UOeNjOTt.cjs → list-ClN4WGiv.cjs} +2 -2
- package/dist/{list-UOeNjOTt.cjs.map → list-ClN4WGiv.cjs.map} +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/{litElement.mixin-PXLBM6N4.js → litElement.mixin-Bc-mD_fE.js} +2 -2
- package/dist/{litElement.mixin-PXLBM6N4.js.map → litElement.mixin-Bc-mD_fE.js.map} +1 -1
- package/dist/{litElement.mixin-CfkMd-bR.cjs → litElement.mixin-S3xWZjIN.cjs} +2 -2
- package/dist/{litElement.mixin-CfkMd-bR.cjs.map → litElement.mixin-S3xWZjIN.cjs.map} +1 -1
- package/dist/{menu-D7PxtMOz.js → menu-BLHROh10.js} +3 -3
- package/dist/{menu-D7PxtMOz.js.map → menu-BLHROh10.js.map} +1 -1
- package/dist/{menu-B4k2_5rl.cjs → menu-BVIo2QsA.cjs} +2 -2
- package/dist/{menu-B4k2_5rl.cjs.map → menu-BVIo2QsA.cjs.map} +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/notification.cjs +1 -1
- package/dist/notification.js +1 -1
- package/dist/{option-vV2BM1B_.js → option-DJwUNDv1.js} +3 -3
- package/dist/option-DJwUNDv1.js.map +1 -0
- package/dist/{option-hsAZB8ji.cjs → option-DUsQh2li.cjs} +3 -3
- package/dist/option-DUsQh2li.cjs.map +1 -0
- package/dist/option.cjs +1 -1
- package/dist/option.js +1 -1
- package/dist/{outlet-DRaXjbOY.js → outlet-Ch6PcF31.js} +2 -2
- package/dist/{outlet-DRaXjbOY.js.map → outlet-Ch6PcF31.js.map} +1 -1
- package/dist/{outlet-DMOeEL6g.cjs → outlet-D0yXIpoJ.cjs} +2 -2
- package/dist/{outlet-DMOeEL6g.cjs.map → outlet-D0yXIpoJ.cjs.map} +1 -1
- package/dist/{payment-card-form-DfbqzyTv.cjs → payment-card-form-DHnv_dB5.cjs} +2 -2
- package/dist/{payment-card-form-DfbqzyTv.cjs.map → payment-card-form-DHnv_dB5.cjs.map} +1 -1
- package/dist/{payment-card-form-8oXgNTFN.js → payment-card-form-RVkRt3dw.js} +3 -3
- package/dist/{payment-card-form-8oXgNTFN.js.map → payment-card-form-RVkRt3dw.js.map} +1 -1
- package/dist/{radio-group-CLt-d-Ni.cjs → radio-group-D3GZyViJ.cjs} +2 -2
- package/dist/{radio-group-CLt-d-Ni.cjs.map → radio-group-D3GZyViJ.cjs.map} +1 -1
- package/dist/{radio-group-DRXtgyf5.js → radio-group-Pnq88mNF.js} +2 -2
- package/dist/{radio-group-DRXtgyf5.js.map → radio-group-Pnq88mNF.js.map} +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/{schmancy-steps-container-DguK5NK4.cjs → schmancy-steps-container-BfAnYBQC.cjs} +2 -2
- package/dist/{schmancy-steps-container-DguK5NK4.cjs.map → schmancy-steps-container-BfAnYBQC.cjs.map} +1 -1
- package/dist/{schmancy-steps-container-D1k0kjKI.js → schmancy-steps-container-Cxi9CAKu.js} +2 -2
- package/dist/{schmancy-steps-container-D1k0kjKI.js.map → schmancy-steps-container-Cxi9CAKu.js.map} +1 -1
- package/dist/{select-BUUelLow.cjs → select-D_vwLTzC.cjs} +2 -2
- package/dist/{select-BUUelLow.cjs.map → select-D_vwLTzC.cjs.map} +1 -1
- package/dist/{select-By_Pm8TG.js → select-Dvc0m2Du.js} +3 -3
- package/dist/{select-By_Pm8TG.js.map → select-Dvc0m2Du.js.map} +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.js +1 -1
- package/dist/{sheet-CyZB5a4W.cjs → sheet-CckiFxcM.cjs} +2 -2
- package/dist/{sheet-CyZB5a4W.cjs.map → sheet-CckiFxcM.cjs.map} +1 -1
- package/dist/{sheet-CHow9LJ8.js → sheet-Cmkb43UV.js} +3 -3
- package/dist/{sheet-CHow9LJ8.js.map → sheet-Cmkb43UV.js.map} +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/{slider-BORUoU4I.js → slider-CTOGZsFh.js} +3 -3
- package/dist/{slider-BORUoU4I.js.map → slider-CTOGZsFh.js.map} +1 -1
- package/dist/{slider-DCRfwhaP.cjs → slider-Cy4MNGb2.cjs} +2 -2
- package/dist/{slider-DCRfwhaP.cjs.map → slider-Cy4MNGb2.cjs.map} +1 -1
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-DeHbns2e.cjs → spinner-Dw4YE-LZ.cjs} +2 -2
- package/dist/{spinner-DeHbns2e.cjs.map → spinner-Dw4YE-LZ.cjs.map} +1 -1
- package/dist/{spinner-C-rMlbyB.js → spinner-nNr0i8Wf.js} +3 -3
- package/dist/{spinner-C-rMlbyB.js.map → spinner-nNr0i8Wf.js.map} +1 -1
- package/dist/steps.cjs +1 -1
- package/dist/steps.js +1 -1
- package/dist/{surface-TpxKBWnD.cjs → surface-CMTttVEi.cjs} +2 -2
- package/dist/{surface-TpxKBWnD.cjs.map → surface-CMTttVEi.cjs.map} +1 -1
- package/dist/{surface-HAEl5c8W.js → surface-CcVbJOTT.js} +2 -2
- package/dist/{surface-HAEl5c8W.js.map → surface-CcVbJOTT.js.map} +1 -1
- package/dist/surface.cjs +1 -1
- package/dist/surface.js +1 -1
- package/dist/{table-D7KL2FaN.js → table-ByZ8ut41.js} +2 -2
- package/dist/{table-D7KL2FaN.js.map → table-ByZ8ut41.js.map} +1 -1
- package/dist/{table-DXPDEHEh.cjs → table-CbQcK1h5.cjs} +2 -2
- package/dist/{table-DXPDEHEh.cjs.map → table-CbQcK1h5.cjs.map} +1 -1
- package/dist/table.cjs +1 -1
- package/dist/table.js +1 -1
- package/dist/{tabs-group-CR2cSCNr.cjs → tabs-group-BEEKbPIG.cjs} +2 -2
- package/dist/{tabs-group-CR2cSCNr.cjs.map → tabs-group-BEEKbPIG.cjs.map} +1 -1
- package/dist/{tabs-group-Dm_FCj7q.js → tabs-group-Co1gWTv7.js} +2 -2
- package/dist/{tabs-group-Dm_FCj7q.js.map → tabs-group-Co1gWTv7.js.map} +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tailwind.mixin-BpqwMTLX.js +43 -0
- package/dist/{tailwind.mixin-Cxj7n9Jd.js.map → tailwind.mixin-BpqwMTLX.js.map} +1 -1
- package/dist/tailwind.mixin-CfdJw976.cjs +2 -0
- package/dist/{tailwind.mixin-CjSVtdHt.cjs.map → tailwind.mixin-CfdJw976.cjs.map} +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-C43YKRMJ.cjs → teleport.component-Br--aL4K.cjs} +2 -2
- package/dist/{teleport.component-C43YKRMJ.cjs.map → teleport.component-Br--aL4K.cjs.map} +1 -1
- package/dist/{teleport.component-Cv7rwX-_.js → teleport.component-D98NF0fA.js} +37 -37
- package/dist/{teleport.component-Cv7rwX-_.js.map → teleport.component-D98NF0fA.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/dist/{textarea-DcSAsR60.js → textarea-4HpWvkc3.js} +2 -2
- package/dist/{textarea-DcSAsR60.js.map → textarea-4HpWvkc3.js.map} +1 -1
- package/dist/{textarea-CLlh5-HA.cjs → textarea-DIBNzSOF.cjs} +2 -2
- package/dist/{textarea-CLlh5-HA.cjs.map → textarea-DIBNzSOF.cjs.map} +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/{theme-button-B7_LXWoe.js → theme-button-ChDLKOJ8.js} +2 -2
- package/dist/{theme-button-B7_LXWoe.js.map → theme-button-ChDLKOJ8.js.map} +1 -1
- package/dist/{theme-button-53Mhj3kQ.cjs → theme-button-CrQPvn70.cjs} +2 -2
- package/dist/{theme-button-53Mhj3kQ.cjs.map → theme-button-CrQPvn70.cjs.map} +1 -1
- package/dist/theme-button.cjs +1 -1
- package/dist/theme-button.js +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/{theme.component-Drmkh4sF.cjs → theme.component-DJ8BSZaI.cjs} +2 -2
- package/dist/{theme.component-Drmkh4sF.cjs.map → theme.component-DJ8BSZaI.cjs.map} +1 -1
- package/dist/{theme.component-yFb6vlsT.js → theme.component-DhPLhwDE.js} +2 -2
- package/dist/{theme.component-yFb6vlsT.js.map → theme.component-DhPLhwDE.js.map} +1 -1
- package/dist/theme.js +1 -1
- package/dist/{timezone-enXRjPy1.cjs → timezone-BH5wNofv.cjs} +2 -2
- package/dist/{timezone-enXRjPy1.cjs.map → timezone-BH5wNofv.cjs.map} +1 -1
- package/dist/{timezone-DxkvIe7V.js → timezone-CzCyse5N.js} +3 -3
- package/dist/{timezone-DxkvIe7V.js.map → timezone-CzCyse5N.js.map} +1 -1
- package/dist/{tree-Bt4J6QVI.cjs → tree-BSKoUX-3.cjs} +2 -2
- package/dist/{tree-Bt4J6QVI.cjs.map → tree-BSKoUX-3.cjs.map} +1 -1
- package/dist/{tree-CQccoc9W.js → tree-DwEecdA9.js} +2 -2
- package/dist/{tree-CQccoc9W.js.map → tree-DwEecdA9.js.map} +1 -1
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/{typewriter-DGserMVU.js → typewriter-Cw_HKjhG.js} +4 -4
- package/dist/{typewriter-DGserMVU.js.map → typewriter-Cw_HKjhG.js.map} +1 -1
- package/dist/{typewriter-WqDo75_3.cjs → typewriter-DdhbEfaH.cjs} +2 -2
- package/dist/{typewriter-WqDo75_3.cjs.map → typewriter-DdhbEfaH.cjs.map} +1 -1
- package/dist/typewriter.cjs +1 -1
- package/dist/typewriter.js +1 -1
- package/dist/{typography-D5E46rwN.js → typography-D2EIvv42.js} +2 -2
- package/dist/{typography-D5E46rwN.js.map → typography-D2EIvv42.js.map} +1 -1
- package/dist/{typography-DbNitvGl.cjs → typography-d490P1tM.cjs} +2 -2
- package/dist/{typography-DbNitvGl.cjs.map → typography-d490P1tM.cjs.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +1 -1
- package/package.json +1 -1
- package/types/src/autocomplete/autocomplete.d.ts +102 -59
- package/types/src/chips/chip.d.ts +0 -1
- package/dist/autocomplete-ChDCoDb2.cjs +0 -59
- package/dist/autocomplete-ChDCoDb2.cjs.map +0 -1
- package/dist/autocomplete-D8HWdpyS.js +0 -296
- package/dist/autocomplete-D8HWdpyS.js.map +0 -1
- package/dist/date-range-6fQ4ypDJ.js.map +0 -1
- package/dist/date-range-DoZNetuD.cjs.map +0 -1
- package/dist/icon-button-BUUtmKnu.cjs.map +0 -1
- package/dist/icon-button-DlnuclQQ.js.map +0 -1
- package/dist/option-hsAZB8ji.cjs.map +0 -1
- package/dist/option-vV2BM1B_.js.map +0 -1
- package/dist/tailwind.mixin-CjSVtdHt.cjs +0 -2
- package/dist/tailwind.mixin-Cxj7n9Jd.js +0 -43
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import "rxjs";
|
|
2
|
+
import { classMap as d } from "lit/directives/class-map.js";
|
|
3
|
+
import "lit/directives/style-map.js";
|
|
4
|
+
import { $ as _ } from "./litElement.mixin-Bc-mD_fE.js";
|
|
5
|
+
import "./tailwind.mixin-BpqwMTLX.js";
|
|
6
|
+
import { html as c } from "lit";
|
|
7
|
+
import { property as a, state as r, query as h, queryAssignedElements as m, customElement as f } from "lit/decorators.js";
|
|
8
|
+
import { createRef as b, ref as y } from "lit/directives/ref.js";
|
|
9
|
+
var v = Object.defineProperty, g = Object.getOwnPropertyDescriptor, o = (e, t, s, n) => {
|
|
10
|
+
for (var u, l = n > 1 ? void 0 : n ? g(t, s) : t, p = e.length - 1; p >= 0; p--) (u = e[p]) && (l = (n ? u(t, s, l) : u(l)) || l);
|
|
11
|
+
return n && l && v(t, s, l), l;
|
|
12
|
+
};
|
|
13
|
+
let i = class extends _(":host{display:block;border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important}:host:focus{box-shadow:unset!important}") {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments), this.required = !1, this.placeholder = "", this.label = "", this.maxHeight = "300px", this.multi = !1, this.description = "", this.size = "md", this.autocomplete = "off", this.debounceMs = 200, this._open = !1, this._inputValue = "", this._selectedValue = "", this._selectedValues = [], this._suppressFocusOpen = !1, this._debounceTimer = null, this._inputElementRef = b(), this._documentClickHandler = this._onDocumentClick.bind(this);
|
|
16
|
+
}
|
|
17
|
+
get value() {
|
|
18
|
+
return this.multi ? this._selectedValues.join(",") : this._selectedValue;
|
|
19
|
+
}
|
|
20
|
+
set value(e) {
|
|
21
|
+
this.multi ? this._selectedValues = e ? e.split(",").map((t) => t.trim()).filter(Boolean) : [] : this._selectedValue = e, this._syncOptionsSelection(), this._updateInputDisplay(), this.isConnected && this._fireChangeEvent();
|
|
22
|
+
}
|
|
23
|
+
connectedCallback() {
|
|
24
|
+
super.connectedCallback(), this.id || (this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`);
|
|
25
|
+
}
|
|
26
|
+
disconnectedCallback() {
|
|
27
|
+
document.removeEventListener("click", this._documentClickHandler), this._debounceTimer !== null && window.clearTimeout(this._debounceTimer), super.disconnectedCallback();
|
|
28
|
+
}
|
|
29
|
+
firstUpdated() {
|
|
30
|
+
this._syncOptionsSelection(), this._setupOptionsAccessibility(), this._updateInputDisplay();
|
|
31
|
+
}
|
|
32
|
+
updated(e) {
|
|
33
|
+
super.updated(e), e.has("_open") && (this._open || document.removeEventListener("click", this._documentClickHandler));
|
|
34
|
+
}
|
|
35
|
+
_onDocumentClick(e) {
|
|
36
|
+
if (!e.composedPath().includes(this)) {
|
|
37
|
+
for (const t of this._options) if (e.composedPath().includes(t)) return;
|
|
38
|
+
this._open && (this._open = !1, this._updateInputDisplay());
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
_setupOptionsAccessibility() {
|
|
42
|
+
this._options.forEach((e, t) => {
|
|
43
|
+
e.setAttribute("role", "option"), e.tabIndex = -1, e.id || (e.id = `${this.id}-option-${t}`), e.hasAttribute("data-event-bound") || (e.addEventListener("click", (s) => {
|
|
44
|
+
s.stopPropagation(), this._selectOption(e);
|
|
45
|
+
}), e.setAttribute("data-event-bound", "true"));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
_syncOptionsSelection() {
|
|
49
|
+
var e;
|
|
50
|
+
(e = this._options) != null && e.length && this._options.forEach((t) => {
|
|
51
|
+
this.multi ? t.selected = this._selectedValues.includes(t.value) : t.selected = t.value === this._selectedValue, t.setAttribute("aria-selected", String(t.selected));
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
_filterOptions() {
|
|
55
|
+
var u;
|
|
56
|
+
const e = this._inputValue.toLowerCase().trim();
|
|
57
|
+
let t = !1;
|
|
58
|
+
this._options.forEach((l) => {
|
|
59
|
+
if (!e) return l.hidden = !1, void (t = !0);
|
|
60
|
+
const p = (l.label || l.textContent || "").toLowerCase().includes(e);
|
|
61
|
+
l.hidden = !p, p && (t = !0);
|
|
62
|
+
});
|
|
63
|
+
const s = (u = this.shadowRoot) == null ? void 0 : u.querySelector("#empty");
|
|
64
|
+
s && s.toggleAttribute("hidden", t);
|
|
65
|
+
const n = this._getVisibleOptions().length;
|
|
66
|
+
this._announceToScreenReader(n > 0 ? `${n} option${n === 1 ? "" : "s"} available.` : "No results found.");
|
|
67
|
+
}
|
|
68
|
+
_getVisibleOptions() {
|
|
69
|
+
return Array.from(this._options || []).filter((e) => !e.hidden);
|
|
70
|
+
}
|
|
71
|
+
_getSelectedLabels() {
|
|
72
|
+
return Array.from(this._options || []).filter((e) => this.multi ? this._selectedValues.includes(e.value) : e.value === this._selectedValue).map((e) => e.label || e.textContent || "");
|
|
73
|
+
}
|
|
74
|
+
_updateInputDisplay() {
|
|
75
|
+
var e;
|
|
76
|
+
if (this._inputElementRef.value) {
|
|
77
|
+
if (!this._open || !this.multi) if (this.multi) this._inputValue = this._getSelectedLabels().join(", ");
|
|
78
|
+
else {
|
|
79
|
+
const t = (e = this._options) == null ? void 0 : e.find((s) => s.value === this._selectedValue);
|
|
80
|
+
this._inputValue = t && (t.label || t.textContent) || "";
|
|
81
|
+
}
|
|
82
|
+
this._inputElementRef.value.value = this._inputValue;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
_onInputFocus(e) {
|
|
86
|
+
e.stopPropagation(), this._suppressFocusOpen || (this.multi && (this._inputValue = "", this._inputElementRef.value && (this._inputElementRef.value.value = "")), this._showDropdown());
|
|
87
|
+
}
|
|
88
|
+
_debounce(e) {
|
|
89
|
+
this._debounceTimer !== null && window.clearTimeout(this._debounceTimer), this._debounceTimer = window.setTimeout(() => {
|
|
90
|
+
e(), this._debounceTimer = null;
|
|
91
|
+
}, this.debounceMs);
|
|
92
|
+
}
|
|
93
|
+
_onInputChange(e) {
|
|
94
|
+
const t = e.target;
|
|
95
|
+
this._inputValue = t.value, this._open || this._showDropdown(), this._debounce(() => {
|
|
96
|
+
this._filterOptions();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
_showDropdown() {
|
|
100
|
+
this._open || (this._open = !0, this._filterOptions(), setTimeout(() => {
|
|
101
|
+
document.addEventListener("click", this._documentClickHandler);
|
|
102
|
+
}, 10));
|
|
103
|
+
}
|
|
104
|
+
_announceToScreenReader(e) {
|
|
105
|
+
var s;
|
|
106
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("#live-status");
|
|
107
|
+
t && (t.textContent = e);
|
|
108
|
+
}
|
|
109
|
+
_selectOption(e) {
|
|
110
|
+
if (this.multi) {
|
|
111
|
+
const t = e.value, s = this._selectedValues.indexOf(t);
|
|
112
|
+
this._selectedValues = s > -1 ? [...this._selectedValues.slice(0, s), ...this._selectedValues.slice(s + 1)] : [...this._selectedValues, t], this._inputValue = "", this._inputElementRef.value && (this._inputElementRef.value.value = ""), e.selected = !e.selected, e.setAttribute("aria-selected", String(e.selected)), this._filterOptions();
|
|
113
|
+
const n = this._getSelectedLabels();
|
|
114
|
+
this._announceToScreenReader(n.length > 0 ? `Selected: ${n.join(", ")}` : "No options selected");
|
|
115
|
+
} else this._selectedValue = e.value, this._syncOptionsSelection(), this._open = !1, this._suppressFocusOpen = !0, this._updateInputDisplay(), this._inputElementRef.value && this._inputElementRef.value.blur(), setTimeout(() => {
|
|
116
|
+
this._suppressFocusOpen = !1;
|
|
117
|
+
}, 300), this._announceToScreenReader(`Selected: ${e.label || e.textContent}`);
|
|
118
|
+
this._fireChangeEvent();
|
|
119
|
+
}
|
|
120
|
+
_onKeyDown(e) {
|
|
121
|
+
var t;
|
|
122
|
+
if (!this._open && (e.key === "ArrowDown" || e.key === "Enter")) return e.preventDefault(), this._showDropdown(), void setTimeout(() => {
|
|
123
|
+
const s = this._getVisibleOptions();
|
|
124
|
+
s.length > 0 && s[0].focus();
|
|
125
|
+
}, 10);
|
|
126
|
+
if (this._open) switch (e.key) {
|
|
127
|
+
case "Escape":
|
|
128
|
+
e.preventDefault(), this._open = !1, this._updateInputDisplay(), (t = this._inputElementRef.value) == null || t.focus();
|
|
129
|
+
break;
|
|
130
|
+
case "Tab":
|
|
131
|
+
this._open = !1, this._updateInputDisplay();
|
|
132
|
+
break;
|
|
133
|
+
case "ArrowDown":
|
|
134
|
+
e.preventDefault(), this._moveFocus(1);
|
|
135
|
+
break;
|
|
136
|
+
case "ArrowUp":
|
|
137
|
+
e.preventDefault(), this._moveFocus(-1);
|
|
138
|
+
break;
|
|
139
|
+
case "Home":
|
|
140
|
+
e.preventDefault(), this._focusFirstOption();
|
|
141
|
+
break;
|
|
142
|
+
case "End":
|
|
143
|
+
e.preventDefault(), this._focusLastOption();
|
|
144
|
+
break;
|
|
145
|
+
case "Enter":
|
|
146
|
+
case " ":
|
|
147
|
+
const s = this._getFocusedOption();
|
|
148
|
+
s && (e.preventDefault(), this._selectOption(s));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
_getFocusedOption() {
|
|
152
|
+
return this._getVisibleOptions().find((e) => e === document.activeElement) || null;
|
|
153
|
+
}
|
|
154
|
+
_moveFocus(e) {
|
|
155
|
+
const t = this._getVisibleOptions();
|
|
156
|
+
if (!t.length) return;
|
|
157
|
+
const s = this._getFocusedOption();
|
|
158
|
+
let n = s ? t.indexOf(s) : -1;
|
|
159
|
+
n = e > 0 ? n < t.length - 1 ? n + 1 : 0 : n > 0 ? n - 1 : t.length - 1, t[n].focus();
|
|
160
|
+
}
|
|
161
|
+
_focusFirstOption() {
|
|
162
|
+
const e = this._getVisibleOptions();
|
|
163
|
+
e.length > 0 && e[0].focus();
|
|
164
|
+
}
|
|
165
|
+
_focusLastOption() {
|
|
166
|
+
const e = this._getVisibleOptions();
|
|
167
|
+
e.length > 0 && e[e.length - 1].focus();
|
|
168
|
+
}
|
|
169
|
+
_fireChangeEvent() {
|
|
170
|
+
const e = { value: this.multi ? this._selectedValues : this._selectedValue };
|
|
171
|
+
this.dispatchEvent(new CustomEvent("change", { detail: e, bubbles: !0, composed: !0 }));
|
|
172
|
+
}
|
|
173
|
+
checkValidity() {
|
|
174
|
+
return !this.required || (this.multi ? this._selectedValues.length > 0 : !!this._selectedValue);
|
|
175
|
+
}
|
|
176
|
+
reportValidity() {
|
|
177
|
+
return this._inputElementRef.value ? this._inputElementRef.value.reportValidity() : this.checkValidity();
|
|
178
|
+
}
|
|
179
|
+
render() {
|
|
180
|
+
const e = `${this.id}-desc`;
|
|
181
|
+
return c`
|
|
182
|
+
<div class="schmancy-autocomplete relative z-10">
|
|
183
|
+
<!-- Screen reader live region -->
|
|
184
|
+
<div id="live-status" role="status" aria-live="polite" class="sr-only"></div>
|
|
185
|
+
|
|
186
|
+
<!-- Description (for screen readers) -->
|
|
187
|
+
${this.description ? c`<div id="${e}" class="sr-only">${this.description}</div>` : ""}
|
|
188
|
+
|
|
189
|
+
<!-- Input / trigger slot -->
|
|
190
|
+
<slot name="trigger">
|
|
191
|
+
<sch-input
|
|
192
|
+
.size=${this.size}
|
|
193
|
+
${y(this._inputElementRef)}
|
|
194
|
+
id="autocomplete-input"
|
|
195
|
+
class="w-full"
|
|
196
|
+
.label=${this.label}
|
|
197
|
+
.placeholder=${this.placeholder}
|
|
198
|
+
.required=${this.required}
|
|
199
|
+
.value=${this._inputValue}
|
|
200
|
+
type="text"
|
|
201
|
+
autocomplete=${this.autocomplete}
|
|
202
|
+
clickable
|
|
203
|
+
role="combobox"
|
|
204
|
+
aria-autocomplete="list"
|
|
205
|
+
aria-haspopup="listbox"
|
|
206
|
+
aria-controls="options"
|
|
207
|
+
aria-expanded=${this._open}
|
|
208
|
+
aria-describedby=${this.description ? e : void 0}
|
|
209
|
+
@input=${this._onInputChange}
|
|
210
|
+
@focus=${this._onInputFocus}
|
|
211
|
+
@click=${(t) => {
|
|
212
|
+
t.stopPropagation(), this._onInputFocus(new FocusEvent("focus"));
|
|
213
|
+
}}
|
|
214
|
+
@keydown=${this._onKeyDown}
|
|
215
|
+
>
|
|
216
|
+
</sch-input>
|
|
217
|
+
</slot>
|
|
218
|
+
|
|
219
|
+
<!-- Options dropdown -->
|
|
220
|
+
<ul
|
|
221
|
+
id="options"
|
|
222
|
+
class=${d({ absolute: !0, "z-30": !0, "mt-1": !0, "w-full": !0, "rounded-md": !0, "shadow-sm": !0, "overflow-auto": !0 })}
|
|
223
|
+
role="listbox"
|
|
224
|
+
aria-multiselectable=${this.multi ? "true" : "false"}
|
|
225
|
+
aria-label=${`${this.label || "Options"} dropdown`}
|
|
226
|
+
?hidden=${!this._open}
|
|
227
|
+
style="
|
|
228
|
+
max-height: ${this.maxHeight};
|
|
229
|
+
display: ${this._open ? "block" : "none"};
|
|
230
|
+
background-color: transparent;
|
|
231
|
+
"
|
|
232
|
+
@slotchange=${() => {
|
|
233
|
+
this._setupOptionsAccessibility(), this._syncOptionsSelection(), this._filterOptions();
|
|
234
|
+
}}
|
|
235
|
+
>
|
|
236
|
+
<!-- "No results" message -->
|
|
237
|
+
<li id="empty" tabindex="-1" role="option" aria-disabled="true" class="p-2 text-center" hidden>
|
|
238
|
+
<schmancy-typography type="label">No results found</schmancy-typography>
|
|
239
|
+
</li>
|
|
240
|
+
|
|
241
|
+
<!-- Options slot -->
|
|
242
|
+
<slot></slot>
|
|
243
|
+
</ul>
|
|
244
|
+
</div>
|
|
245
|
+
`;
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
o([a({ type: Boolean })], i.prototype, "required", 2), o([a({ type: String })], i.prototype, "placeholder", 2), o([a({ type: String, reflect: !0 })], i.prototype, "label", 2), o([a({ type: String })], i.prototype, "maxHeight", 2), o([a({ type: Boolean })], i.prototype, "multi", 2), o([a({ type: String })], i.prototype, "description", 2), o([a({ type: String, reflect: !0 })], i.prototype, "size", 2), o([a({ type: String })], i.prototype, "autocomplete", 2), o([a({ type: Number })], i.prototype, "debounceMs", 2), o([a({ type: String, reflect: !0 })], i.prototype, "value", 1), o([r()], i.prototype, "_open", 2), o([r()], i.prototype, "_inputValue", 2), o([r()], i.prototype, "_selectedValue", 2), o([r()], i.prototype, "_selectedValues", 2), o([r()], i.prototype, "_suppressFocusOpen", 2), o([h("#options")], i.prototype, "_listbox", 2), o([h("sch-input")], i.prototype, "_input", 2), o([m({ flatten: !0 })], i.prototype, "_options", 2), i = o([f("schmancy-autocomplete")], i);
|
|
249
|
+
//# sourceMappingURL=autocomplete-DQKvgQXh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autocomplete-DQKvgQXh.js","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize } from '@schmancy/input'\nimport SchmancyInput from '@schmancy/input/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport style from './autocomplete.scss?inline'\n\n/**\n * @fires change - When selection changes\n */\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n\tvalue: string | string[]\n}>\n\n/**\n * SchmancyAutocomplete provides an accessible autocomplete/combobox component\n * with keyboard navigation and single or multi-select capabilities.\n *\n * @element schmancy-autocomplete\n * @slot - Default slot for option elements\n * @slot trigger - Optional slot to override the default input element\n */\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n\t// Public API properties\n\t@property({ type: Boolean }) required = false\n\t@property({ type: String }) placeholder = ''\n\t@property({ type: String, reflect: true }) label = ''\n\t@property({ type: String }) maxHeight = '300px'\n\t@property({ type: Boolean }) multi = false\n\t@property({ type: String }) description = ''\n\t@property({ type: String, reflect: true }) size: InputSize = 'md'\n\t@property({ type: String }) autocomplete = 'off'\n\t@property({ type: Number }) debounceMs = 200 // Debounce delay in milliseconds\n\n\t// Value property with getter/setter\n\t@property({ type: String, reflect: true })\n\tget value() {\n\t\tif (this.multi) {\n\t\t\treturn this._selectedValues.join(',')\n\t\t}\n\t\treturn this._selectedValue\n\t}\n\tset value(val: string) {\n\t\tif (this.multi) {\n\t\t\tthis._selectedValues = val\n\t\t\t\t? val\n\t\t\t\t\t\t.split(',')\n\t\t\t\t\t\t.map(v => v.trim())\n\t\t\t\t\t\t.filter(Boolean)\n\t\t\t\t: []\n\t\t} else {\n\t\t\tthis._selectedValue = val\n\t\t}\n\t\tthis._syncOptionsSelection()\n\t\tthis._updateInputDisplay()\n\n\t\t// Dispatch change event when value is set programmatically\n\t\tif (this.isConnected) {\n\t\t\tthis._fireChangeEvent()\n\t\t}\n\t}\n\n\t// Internal state\n\t@state() private _open = false\n\t@state() private _inputValue = ''\n\t@state() private _selectedValue = ''\n\t@state() private _selectedValues: string[] = []\n\t@state() private _suppressFocusOpen = false // Flag to prevent dropdown from opening on focus after selection\n\n\t// Debounce timer reference\n\tprivate _debounceTimer: number | null = null\n\n\t// DOM references\n\t@query('#options') _listbox!: HTMLUListElement\n\t@query('sch-input') _input!: SchmancyInput\n\t@queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n\tprivate _inputElementRef = createRef<HTMLInputElement>()\n\n\t// Click outside handler reference for cleanup\n\tprivate _documentClickHandler = this._onDocumentClick.bind(this)\n\n\t// Lifecycle methods\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\t\t// Ensure component has ID for ARIA relationships\n\t\tif (!this.id) {\n\t\t\tthis.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\t// Clean up global event listeners\n\t\tdocument.removeEventListener('click', this._documentClickHandler)\n\n\t\t// Clear any pending debounce timer\n\t\tif (this._debounceTimer !== null) {\n\t\t\twindow.clearTimeout(this._debounceTimer)\n\t\t}\n\n\t\tsuper.disconnectedCallback()\n\t}\n\n\tfirstUpdated() {\n\t\t// Set up initial state and accessibility\n\t\tthis._syncOptionsSelection()\n\t\tthis._setupOptionsAccessibility()\n\t\tthis._updateInputDisplay()\n\t}\n\n\tupdated(changedProps: Map<string, unknown>) {\n\t\tsuper.updated(changedProps)\n\n\t\t// Update document click handler when dropdown state changes\n\t\tif (changedProps.has('_open')) {\n\t\t\tif (!this._open) {\n\t\t\t\tdocument.removeEventListener('click', this._documentClickHandler)\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handle document clicks to close dropdown when clicking outside\n\t */\n\tprivate _onDocumentClick(e: MouseEvent) {\n\t\t// Don't close if clicking on component or its children\n\t\tif (e.composedPath().includes(this)) {\n\t\t\treturn\n\t\t}\n\n\t\t// Don't close if clicking on one of the options (which may be in light DOM)\n\t\tfor (const option of this._options) {\n\t\t\tif (e.composedPath().includes(option)) {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\t// Otherwise close the dropdown\n\t\tif (this._open) {\n\t\t\tthis._open = false\n\t\t\tthis._updateInputDisplay()\n\t\t}\n\t}\n\n\t/**\n\t * Set up initial option accessibility attributes\n\t */\n\tprivate _setupOptionsAccessibility() {\n\t\tthis._options.forEach((option, index) => {\n\t\t\t// Set common attributes for all options\n\t\t\toption.setAttribute('role', 'option')\n\t\t\toption.tabIndex = -1\n\n\t\t\t// Ensure each option has an ID\n\t\t\tif (!option.id) {\n\t\t\t\toption.id = `${this.id}-option-${index}`\n\t\t\t}\n\n\t\t\t// Add click handler to options\n\t\t\tif (!option.hasAttribute('data-event-bound')) {\n\t\t\t\toption.addEventListener('click', e => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tthis._selectOption(option)\n\t\t\t\t})\n\t\t\t\toption.setAttribute('data-event-bound', 'true')\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * Update options' selection state based on component value\n\t */\n\tprivate _syncOptionsSelection() {\n\t\tif (!this._options?.length) return\n\n\t\tthis._options.forEach(option => {\n\t\t\tif (this.multi) {\n\t\t\t\toption.selected = this._selectedValues.includes(option.value)\n\t\t\t} else {\n\t\t\t\toption.selected = option.value === this._selectedValue\n\t\t\t}\n\n\t\t\t// Update aria-selected attribute\n\t\t\toption.setAttribute('aria-selected', String(option.selected))\n\t\t})\n\t}\n\n\t/**\n\t * Filter options based on input text - this operation can be expensive\n\t * with many options or complex filtering logic\n\t */\n\tprivate _filterOptions() {\n\t\tconsole.time('filter-options')\n\t\tconst searchTerm = this._inputValue.toLowerCase().trim()\n\n\t\t// Track if we have any matches\n\t\tlet hasMatches = false\n\n\t\tthis._options.forEach(option => {\n\t\t\t// Always show all options if search is empty\n\t\t\tif (!searchTerm) {\n\t\t\t\toption.hidden = false\n\t\t\t\thasMatches = true\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Simple substring matching\n\t\t\tconst text = (option.label || option.textContent || '').toLowerCase()\n\t\t\tconst isMatch = text.includes(searchTerm)\n\t\t\toption.hidden = !isMatch\n\n\t\t\tif (isMatch) {\n\t\t\t\thasMatches = true\n\t\t\t}\n\t\t})\n\n\t\t// Update \"No results\" visibility\n\t\tconst emptyMessage = this.shadowRoot?.querySelector('#empty')\n\t\tif (emptyMessage) {\n\t\t\temptyMessage.toggleAttribute('hidden', hasMatches)\n\t\t}\n\n\t\t// Announce results to screen readers\n\t\tconst visibleCount = this._getVisibleOptions().length\n\t\tthis._announceToScreenReader(\n\t\t\tvisibleCount > 0 ? `${visibleCount} option${visibleCount === 1 ? '' : 's'} available.` : 'No results found.',\n\t\t)\n\t\tconsole.timeEnd('filter-options')\n\t}\n\n\t/**\n\t * Get all currently visible options\n\t */\n\tprivate _getVisibleOptions(): SchmancyOption[] {\n\t\treturn Array.from(this._options || []).filter(option => !option.hidden)\n\t}\n\n\t/**\n\t * Get labels of selected options\n\t */\n\tprivate _getSelectedLabels(): string[] {\n\t\treturn Array.from(this._options || [])\n\t\t\t.filter(option =>\n\t\t\t\tthis.multi ? this._selectedValues.includes(option.value) : option.value === this._selectedValue,\n\t\t\t)\n\t\t\t.map(option => option.label || option.textContent || '')\n\t}\n\n\t/**\n\t * Update the input display based on selection state\n\t */\n\tprivate _updateInputDisplay() {\n\t\tif (!this._inputElementRef.value) return\n\n\t\t// When dropdown is closed or in single select mode, show the selection\n\t\tif (!this._open || !this.multi) {\n\t\t\tif (this.multi) {\n\t\t\t\t// Show comma-separated labels for multi-select\n\t\t\t\tthis._inputValue = this._getSelectedLabels().join(', ')\n\t\t\t} else {\n\t\t\t\t// Show selected option label for single-select\n\t\t\t\tconst selectedOption = this._options?.find(o => o.value === this._selectedValue)\n\t\t\t\tthis._inputValue = selectedOption ? selectedOption.label || selectedOption.textContent || '' : ''\n\t\t\t}\n\t\t}\n\n\t\t// Update the input value\n\t\tthis._inputElementRef.value.value = this._inputValue\n\t}\n\n\t/**\n\t * Handle input focus\n\t */\n\tprivate _onInputFocus(e: FocusEvent) {\n\t\te.stopPropagation()\n\n\t\t// If suppress flag is active, don't open dropdown\n\t\tif (this._suppressFocusOpen) {\n\t\t\treturn\n\t\t}\n\n\t\t// If multi-select mode and input is focused, clear it for new input\n\t\tif (this.multi) {\n\t\t\tthis._inputValue = ''\n\t\t\tif (this._inputElementRef.value) {\n\t\t\t\tthis._inputElementRef.value.value = ''\n\t\t\t}\n\t\t}\n\n\t\tthis._showDropdown()\n\t}\n\n\t/**\n\t * Debounce a function call\n\t * @param fn Function to debounce\n\t */\n\tprivate _debounce(fn: () => void): void {\n\t\t// Clear any existing timer\n\t\tif (this._debounceTimer !== null) {\n\t\t\twindow.clearTimeout(this._debounceTimer)\n\t\t}\n\n\t\t// Set new timer\n\t\tthis._debounceTimer = window.setTimeout(() => {\n\t\t\tfn()\n\t\t\tthis._debounceTimer = null\n\t\t}, this.debounceMs)\n\t}\n\n\t/**\n\t * Handle input text changes with debouncing\n\t */\n\tprivate _onInputChange(e: Event) {\n\t\tconst target = e.target as HTMLInputElement\n\t\tthis._inputValue = target.value\n\n\t\t// Immediate feedback - show dropdown\n\t\tif (!this._open) {\n\t\t\tthis._showDropdown()\n\t\t}\n\n\t\t// Debounce the expensive filtering operation\n\t\tthis._debounce(() => {\n\t\t\tthis._filterOptions()\n\t\t})\n\t}\n\n\t/**\n\t * Show the dropdown with filtered options\n\t */\n\tprivate _showDropdown() {\n\t\tif (this._open) return\n\n\t\tthis._open = true\n\t\tthis._filterOptions()\n\n\t\t// Add document click handler after a brief delay\n\t\t// to avoid immediate closing on the same click event\n\t\tsetTimeout(() => {\n\t\t\tdocument.addEventListener('click', this._documentClickHandler)\n\t\t}, 10)\n\t}\n\n\t/**\n\t * Announce message to screen readers\n\t */\n\tprivate _announceToScreenReader(message: string) {\n\t\tconst liveRegion = this.shadowRoot?.querySelector('#live-status')\n\t\tif (liveRegion) {\n\t\t\tliveRegion.textContent = message\n\t\t}\n\t}\n\n\t/**\n\t * Select an option (either via click or keyboard)\n\t */\n\tprivate _selectOption(option: SchmancyOption) {\n\t\tif (this.multi) {\n\t\t\t// Toggle selection in multi-select mode\n\t\t\tconst value = option.value\n\t\t\tconst index = this._selectedValues.indexOf(value)\n\n\t\t\tif (index > -1) {\n\t\t\t\t// Remove if already selected\n\t\t\t\tthis._selectedValues = [...this._selectedValues.slice(0, index), ...this._selectedValues.slice(index + 1)]\n\t\t\t} else {\n\t\t\t\t// Add if not selected\n\t\t\t\tthis._selectedValues = [...this._selectedValues, value]\n\t\t\t}\n\n\t\t\t// Clear input for more typing in multi-select mode\n\t\t\tthis._inputValue = ''\n\t\t\tif (this._inputElementRef.value) {\n\t\t\t\tthis._inputElementRef.value.value = ''\n\t\t\t}\n\n\t\t\t// Update option selection state\n\t\t\toption.selected = !option.selected\n\t\t\toption.setAttribute('aria-selected', String(option.selected))\n\n\t\t\t// Keep dropdown open in multi-select\n\t\t\tthis._filterOptions()\n\n\t\t\t// Announce selection to screen readers\n\t\t\tconst selectedLabels = this._getSelectedLabels()\n\t\t\tthis._announceToScreenReader(\n\t\t\t\tselectedLabels.length > 0 ? `Selected: ${selectedLabels.join(', ')}` : 'No options selected',\n\t\t\t)\n\t\t} else {\n\t\t\t// Single-select mode - select and close\n\t\t\tthis._selectedValue = option.value\n\n\t\t\t// Update selected state\n\t\t\tthis._syncOptionsSelection()\n\n\t\t\t// Close dropdown\n\t\t\tthis._open = false\n\n\t\t\t// Set flag to prevent reopening on focus\n\t\t\tthis._suppressFocusOpen = true\n\n\t\t\t// Update input with selected label\n\t\t\tthis._updateInputDisplay()\n\n\t\t\t// For mobile: blur input to dismiss keyboard\n\t\t\tif (this._inputElementRef.value) {\n\t\t\t\tthis._inputElementRef.value.blur()\n\t\t\t}\n\n\t\t\t// Reset suppress flag after a delay\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis._suppressFocusOpen = false\n\t\t\t}, 300)\n\n\t\t\t// Announce selection to screen readers\n\t\t\tthis._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n\t\t}\n\n\t\t// Fire change event\n\t\tthis._fireChangeEvent()\n\t}\n\n\t/**\n\t * Handle keyboard navigation\n\t */\n\tprivate _onKeyDown(e: KeyboardEvent) {\n\t\t// If dropdown is closed, open on arrow down or enter\n\t\tif (!this._open && (e.key === 'ArrowDown' || e.key === 'Enter')) {\n\t\t\te.preventDefault()\n\t\t\tthis._showDropdown()\n\n\t\t\t// Focus first visible option\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst visibleOptions = this._getVisibleOptions()\n\t\t\t\tif (visibleOptions.length > 0) {\n\t\t\t\t\tvisibleOptions[0].focus()\n\t\t\t\t}\n\t\t\t}, 10)\n\n\t\t\treturn\n\t\t}\n\n\t\t// Early return if dropdown is closed\n\t\tif (!this._open) return\n\n\t\t// Handle keyboard navigation\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis._open = false\n\t\t\t\tthis._updateInputDisplay()\n\t\t\t\tthis._inputElementRef.value?.focus()\n\t\t\t\tbreak\n\n\t\t\tcase 'Tab':\n\t\t\t\t// Natural tab behavior will move focus; just close dropdown\n\t\t\t\tthis._open = false\n\t\t\t\tthis._updateInputDisplay()\n\t\t\t\tbreak\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis._moveFocus(1)\n\t\t\t\tbreak\n\n\t\t\tcase 'ArrowUp':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis._moveFocus(-1)\n\t\t\t\tbreak\n\n\t\t\tcase 'Home':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis._focusFirstOption()\n\t\t\t\tbreak\n\n\t\t\tcase 'End':\n\t\t\t\te.preventDefault()\n\t\t\t\tthis._focusLastOption()\n\t\t\t\tbreak\n\n\t\t\tcase 'Enter':\n\t\t\tcase ' ': // Space key\n\t\t\t\t// Select currently focused option\n\t\t\t\tconst focusedOption = this._getFocusedOption()\n\t\t\t\tif (focusedOption) {\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\tthis._selectOption(focusedOption)\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\t/**\n\t * Get the currently focused option\n\t */\n\tprivate _getFocusedOption(): SchmancyOption | null {\n\t\tconst visibleOptions = this._getVisibleOptions()\n\t\treturn visibleOptions.find(opt => opt === document.activeElement) || null\n\t}\n\n\t/**\n\t * Move focus to next/previous option\n\t */\n\tprivate _moveFocus(direction: number) {\n\t\tconst visibleOptions = this._getVisibleOptions()\n\t\tif (!visibleOptions.length) return\n\n\t\tconst currentOption = this._getFocusedOption()\n\t\tlet index = currentOption ? visibleOptions.indexOf(currentOption) : -1\n\n\t\t// Calculate new index\n\t\tif (direction > 0) {\n\t\t\t// Move forward, wrap to start\n\t\t\tindex = index < visibleOptions.length - 1 ? index + 1 : 0\n\t\t} else {\n\t\t\t// Move backward, wrap to end\n\t\t\tindex = index > 0 ? index - 1 : visibleOptions.length - 1\n\t\t}\n\n\t\t// Focus the option\n\t\tvisibleOptions[index].focus()\n\t}\n\n\t/**\n\t * Focus the first visible option\n\t */\n\tprivate _focusFirstOption() {\n\t\tconst visibleOptions = this._getVisibleOptions()\n\t\tif (visibleOptions.length > 0) {\n\t\t\tvisibleOptions[0].focus()\n\t\t}\n\t}\n\n\t/**\n\t * Focus the last visible option\n\t */\n\tprivate _focusLastOption() {\n\t\tconst visibleOptions = this._getVisibleOptions()\n\t\tif (visibleOptions.length > 0) {\n\t\t\tvisibleOptions[visibleOptions.length - 1].focus()\n\t\t}\n\t}\n\n\t/**\n\t * Fire change event\n\t */\n\tprivate _fireChangeEvent() {\n\t\tconst detail = {\n\t\t\tvalue: this.multi ? this._selectedValues : this._selectedValue,\n\t\t}\n\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n\t\t\t\tdetail,\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\t/**\n\t * Check validity for form integration\n\t */\n\tpublic checkValidity(): boolean {\n\t\tif (!this.required) return true\n\t\treturn this.multi ? this._selectedValues.length > 0 : Boolean(this._selectedValue)\n\t}\n\n\t/**\n\t * Report validity for form integration\n\t */\n\tpublic reportValidity(): boolean {\n\t\tif (this._inputElementRef.value) {\n\t\t\treturn this._inputElementRef.value.reportValidity()\n\t\t}\n\t\treturn this.checkValidity()\n\t}\n\n\trender() {\n\t\tconst descriptionId = `${this.id}-desc`\n\n\t\treturn html`\n\t\t\t<div class=\"schmancy-autocomplete relative z-10\">\n\t\t\t\t<!-- Screen reader live region -->\n\t\t\t\t<div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n\t\t\t\t<!-- Description (for screen readers) -->\n\t\t\t\t${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n\t\t\t\t<!-- Input / trigger slot -->\n\t\t\t\t<slot name=\"trigger\">\n\t\t\t\t\t<sch-input\n\t\t\t\t\t\t.size=${this.size}\n\t\t\t\t\t\t${ref(this._inputElementRef)}\n\t\t\t\t\t\tid=\"autocomplete-input\"\n\t\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\t\t.label=${this.label}\n\t\t\t\t\t\t.placeholder=${this.placeholder}\n\t\t\t\t\t\t.required=${this.required}\n\t\t\t\t\t\t.value=${this._inputValue}\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautocomplete=${this.autocomplete}\n\t\t\t\t\t\tclickable\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t\taria-controls=\"options\"\n\t\t\t\t\t\taria-expanded=${this._open}\n\t\t\t\t\t\taria-describedby=${this.description ? descriptionId : undefined}\n\t\t\t\t\t\t@input=${this._onInputChange}\n\t\t\t\t\t\t@focus=${this._onInputFocus}\n\t\t\t\t\t\t@click=${(e: MouseEvent) => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tthis._onInputFocus(new FocusEvent('focus'))\n\t\t\t\t\t\t}}\n\t\t\t\t\t\t@keydown=${this._onKeyDown}\n\t\t\t\t\t>\n\t\t\t\t\t</sch-input>\n\t\t\t\t</slot>\n\n\t\t\t\t<!-- Options dropdown -->\n\t\t\t\t<ul\n\t\t\t\t\tid=\"options\"\n\t\t\t\t\tclass=${classMap({\n\t\t\t\t\t\tabsolute: true,\n\t\t\t\t\t\t'z-30': true,\n\t\t\t\t\t\t'mt-1': true,\n\t\t\t\t\t\t'w-full': true,\n\t\t\t\t\t\t'rounded-md': true,\n\t\t\t\t\t\t'shadow-sm': true,\n\t\t\t\t\t\t'overflow-auto': true,\n\t\t\t\t\t})}\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\taria-multiselectable=${this.multi ? 'true' : 'false'}\n\t\t\t\t\taria-label=${`${this.label || 'Options'} dropdown`}\n\t\t\t\t\t?hidden=${!this._open}\n\t\t\t\t\tstyle=\"\n max-height: ${this.maxHeight}; \n display: ${this._open ? 'block' : 'none'};\n background-color: transparent;\n \"\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\tthis._setupOptionsAccessibility()\n\t\t\t\t\t\tthis._syncOptionsSelection()\n\t\t\t\t\t\tthis._filterOptions()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<!-- \"No results\" message -->\n\t\t\t\t\t<li id=\"empty\" tabindex=\"-1\" role=\"option\" aria-disabled=\"true\" class=\"p-2 text-center\" hidden>\n\t\t\t\t\t\t<schmancy-typography type=\"label\">No results found</schmancy-typography>\n\t\t\t\t\t</li>\n\n\t\t\t\t\t<!-- Options slot -->\n\t\t\t\t\t<slot></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-autocomplete': SchmancyAutocomplete\n\t}\n}\n"],"names":["SchmancyAutocomplete","$LitElement","super","arguments","this","required","placeholder","label","maxHeight","multi","description","size","autocomplete","debounceMs","_open","_inputValue","_selectedValue","_selectedValues","_suppressFocusOpen","_debounceTimer","_inputElementRef","createRef","_documentClickHandler","_onDocumentClick","bind","value","join","val","split","map","v","trim","filter","Boolean","_syncOptionsSelection","_updateInputDisplay","isConnected","_fireChangeEvent","connectedCallback","id","Math","random","toString","slice","document","removeEventListener","window","clearTimeout","disconnectedCallback","_setupOptionsAccessibility","changedProps","updated","has","e","composedPath","includes","option","_options","forEach","index","setAttribute","tabIndex","hasAttribute","addEventListener","stopPropagation","_selectOption","length","selected","String","_filterOptions","searchTerm","toLowerCase","hasMatches","hidden","isMatch","textContent","emptyMessage","shadowRoot","querySelector","toggleAttribute","visibleCount","_getVisibleOptions","_announceToScreenReader","Array","from","_getSelectedLabels","selectedOption","find","o","_showDropdown","fn","setTimeout","target","_debounce","message","liveRegion","indexOf","selectedLabels","blur","key","preventDefault","visibleOptions","focus","_moveFocus","_focusFirstOption","_focusLastOption","focusedOption","_getFocusedOption","opt","activeElement","direction","currentOption","detail","dispatchEvent","CustomEvent","bubbles","composed","reportValidity","checkValidity","render","descriptionId","html","ref","_onInputChange","_onInputFocus","FocusEvent","_onKeyDown","classMap","absolute","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;AA0BA,IAAqBA,IAArB,cAAkDC,0NAAlD,EAAA;AAAA,EAAA,cAAAC;AAAAA,UAAAA,GAAAC,SAEyCC,GAAAA,KAAAC,WAAA,IACED,KAAAE,cAAA,IACSF,KAAAG,QAAA,IACXH,KAAAI,YAAA,SACHJ,KAAAK,QAAAA,IACKL,KAAAM,cAAA,IACmBN,KAAAO,OAAA,MAClBP,KAAAQ,eAAA,OACFR,KAAAS,aAAA,KA+BhCT,KAAQU,QAAAA,IACRV,KAAQW,cAAc,IACtBX,KAAQY,iBAAiB,IACzBZ,KAAQa,kBAA4B,CAAA,GACpCb,KAAQc,qBAAqB,IAGtCd,KAAQe,iBAAgC,MAMxCf,KAAQgB,mBAAmBC,EAAAA,GAG3BjB,KAAQkB,wBAAwBlB,KAAKmB,iBAAiBC,KAAKpB,IAAAA;AAAAA,EAAI;AAAA,EA3C/D,IAAIqB,QAAAA;AACH,WAAIrB,KAAKK,QACDL,KAAKa,gBAAgBS,KAAK,GAE3BtB,IAAAA,KAAKY;AAAAA,EAAA;AAAA,EAEb,IAAIS,MAAME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MG,OAAAA,CAAAA,CAAAA,GAVEtI,EAUQoI,WAAA,cAAA,IAIxBH,EAAA,CADHC,EAAS,EAAEC,MAAM/D,QAAQiE,SAAAA,QAbNrI,EAchBoI,WAAA,SAAA,CA2BaH,GAAAA,EAAA,CAAhBM,EAAAA,CAAAA,GAzCmBvI,EAyCHoI,WAAA,SAAA,IACAH,EAAA,CAAhBM,MA1CmBvI,EA0CHoI,WAAA,eAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GA3CmBvI,EA2CHoI,WAAA,kBAAA,IACAH,EAAA,CAAhBM,EA5CmBvI,CAAAA,GAAAA,EA4CHoI,WAAA,mBAAA,CAAA,GACAH,EAAA,CAAhBM,EAAAA,CAAAA,GA7CmBvI,EA6CHoI,WAAA,sBAAA,CAMEH,GAAAA,EAAA,CAAlBO,EAAM,UAAA,CAAA,GAnDaxI,EAmDDoI,WAAA,YAAA,IACCH,EAAA,CAAnBO,EAAM,WAAA,CAAA,GApDaxI,EAoDAoI,WAAA,UAAA,IAC8BH,EAAA,CAAjDQ,EAAsB,EAAEC,SAAAA,GArDL1I,CAAAA,CAAAA,GAAAA,EAqD8BoI,WAAA,YAAA,CAAA,GArD9BpI,IAArBiI,EAAA,CADCU,EAAc,uBACM3I,CAAAA,GAAAA,CAAAA;"}
|
package/dist/autocomplete.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./autocomplete-
|
|
1
|
+
"use strict";require("./autocomplete-CsePKzPw.cjs");
|
|
2
2
|
//# sourceMappingURL=autocomplete.cjs.map
|
package/dist/autocomplete.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./autocomplete-
|
|
1
|
+
import "./autocomplete-DQKvgQXh.js";
|
|
2
2
|
//# sourceMappingURL=autocomplete.js.map
|
package/dist/busy.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./spinner-
|
|
1
|
+
"use strict";require("./spinner-Dw4YE-LZ.cjs");
|
|
2
2
|
//# sourceMappingURL=busy.cjs.map
|
package/dist/busy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./spinner-
|
|
1
|
+
import "./spinner-nNr0i8Wf.js";
|
|
2
2
|
//# sourceMappingURL=busy.js.map
|
package/dist/button.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./icon-button-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./icon-button-D02HHUju.cjs");Object.defineProperty(exports,"SchmancyButton",{enumerable:!0,get:()=>e.SchmancyButton}),Object.defineProperty(exports,"SchmnacyIconButton",{enumerable:!0,get:()=>e.SchmnacyIconButton});
|
|
2
2
|
//# sourceMappingURL=button.cjs.map
|
package/dist/button.js
CHANGED
package/dist/card.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./teleport.component-
|
|
1
|
+
"use strict";require("./teleport.component-Br--aL4K.cjs");
|
|
2
2
|
//# sourceMappingURL=card.cjs.map
|
package/dist/card.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "./teleport.component-
|
|
1
|
+
import "./teleport.component-D98NF0fA.js";
|
|
2
2
|
//# sourceMappingURL=card.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("./tslib.es6-DgOcxv4s.cjs"),s=require("lit/decorators.js"),q=require("./redispatch-event-roczetCU.cjs"),d=require("lit"),M=require("lit/directives/class-map.js");require("rxjs"),require("lit/directives/style-map.js");const E=require("./tailwind.mixin-
|
|
1
|
+
"use strict";const n=require("./tslib.es6-DgOcxv4s.cjs"),s=require("lit/decorators.js"),q=require("./redispatch-event-roczetCU.cjs"),d=require("lit"),M=require("lit/directives/class-map.js");require("rxjs"),require("lit/directives/style-map.js");const E=require("./tailwind.mixin-CfdJw976.cjs");function z(i){return i.currentTarget===i.target&&i.composedPath()[0]===i.target&&!i.target.disabled&&!function(e){const t=y;return t&&(e.preventDefault(),e.stopImmediatePropagation()),async function(){y=!0,await null,y=!1}(),t}(i)}let y=!1;const h=Symbol("internals"),k=Symbol("privateInternals"),f=Symbol("createValidator"),w=Symbol("getValidityAnchor"),g=Symbol("privateValidator"),p=Symbol("privateSyncValidity"),m=Symbol("privateCustomValidationMessage"),b=Symbol("getFormValue"),C=Symbol("getFormState");class I{constructor(e){this.getCurrentState=e,this.currentValidity={validity:{},validationMessage:""}}getValidity(){const e=this.getCurrentState();if(!(!this.prevState||!this.equals(this.prevState,e)))return this.currentValidity;const{validity:t,validationMessage:r}=this.computeValidity(e);return this.prevState=this.copy(e),this.currentValidity={validationMessage:r,validity:{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing}},this.currentValidity}}class $ extends I{computeValidity(e){return this.checkboxControl||(this.checkboxControl=document.createElement("input"),this.checkboxControl.type="checkbox"),this.checkboxControl.checked=e.checked,this.checkboxControl.required=e.required,{validity:this.checkboxControl.validity,validationMessage:this.checkboxControl.validationMessage}}equals(e,t){return e.checked===t.checked&&e.required===t.required}copy({checked:e,required:t}){return{checked:e,required:t}}}const A=q.mixinDelegatesAria(function(i){var e;class t extends i{constructor(){super(...arguments),this[e]=""}get validity(){return this[p](),this[h].validity}get validationMessage(){return this[p](),this[h].validationMessage}get willValidate(){return this[p](),this[h].willValidate}checkValidity(){return this[p](),this[h].checkValidity()}reportValidity(){return this[p](),this[h].reportValidity()}setCustomValidity(o){this[m]=o,this[p]()}requestUpdate(o,a,c){super.requestUpdate(o,a,c),this[p]()}firstUpdated(o){super.firstUpdated(o),this[p]()}[(e=m,p)](){if(d.isServer)return;this[g]||(this[g]=this[f]());const{validity:o,validationMessage:a}=this[g].getValidity(),c=!!this[m],v=this[m]||a;this[h].setValidity({...o,customError:c},v,this[w]()??void 0)}[f](){throw new Error("Implement [createValidator]")}[w](){throw new Error("Implement [getValidityAnchor]")}}return t}(function(i){class e extends i{get form(){return this[h].form}get labels(){return this[h].labels}get name(){return this.getAttribute("name")??""}set name(r){this.setAttribute("name",r)}get disabled(){return this.hasAttribute("disabled")}set disabled(r){this.toggleAttribute("disabled",r)}attributeChangedCallback(r,o,a){if(r!=="name"&&r!=="disabled")super.attributeChangedCallback(r,o,a);else{const c=r==="disabled"?o!==null:o;this.requestUpdate(r,c)}}requestUpdate(r,o,a){super.requestUpdate(r,o,a),this[h].setFormValue(this[b](),this[C]())}[b](){throw new Error("Implement [getFormValue]")}[C](){return this[b]()}formDisabledCallback(r){this.disabled=r}}return e.formAssociated=!0,n.t([s.property({noAccessor:!0})],e.prototype,"name",null),n.t([s.property({type:Boolean,noAccessor:!0})],e.prototype,"disabled",null),e}((S=d.LitElement,class extends S{get[h](){return this[k]||(this[k]=this.attachInternals()),this[k]}}))));var S;class l extends A{constructor(){super(),this.checked=!1,this.indeterminate=!1,this.required=!1,this.value="on",this.prevChecked=!1,this.prevDisabled=!1,this.prevIndeterminate=!1,d.isServer||this.addEventListener("click",e=>{z(e)&&this.input&&(this.focus(),function(t){const r=new MouseEvent("click",{bubbles:!0});t.dispatchEvent(r)}(this.input))})}update(e){(e.has("checked")||e.has("disabled")||e.has("indeterminate"))&&(this.prevChecked=e.get("checked")??this.checked,this.prevDisabled=e.get("disabled")??this.disabled,this.prevIndeterminate=e.get("indeterminate")??this.indeterminate),super.update(e)}render(){const e=!this.prevChecked&&!this.prevIndeterminate,t=this.prevChecked&&!this.prevIndeterminate,r=this.prevIndeterminate,o=this.checked&&!this.indeterminate,a=this.indeterminate,c=M.classMap({disabled:this.disabled,selected:o||a,unselected:!o&&!a,checked:o,indeterminate:a,"prev-unselected":e,"prev-checked":t,"prev-indeterminate":r,"prev-disabled":this.prevDisabled}),{ariaLabel:v,ariaInvalid:V}=this;return d.html`
|
|
2
2
|
<div class="container ${c}">
|
|
3
3
|
<input
|
|
4
4
|
type="checkbox"
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
<slot></slot>
|
|
36
36
|
</label>
|
|
37
37
|
`}},exports.SchmancyCheckbox.shadowRootOptions={...d.LitElement.shadowRootOptions,delegatesFocus:!0},exports.SchmancyCheckbox.formAssociated=!0,u([s.property({type:Boolean,reflect:!0})],exports.SchmancyCheckbox.prototype,"value",2),u([s.property({type:Boolean})],exports.SchmancyCheckbox.prototype,"disabled",2),u([s.property({type:Boolean})],exports.SchmancyCheckbox.prototype,"required",2),u([s.property({type:String})],exports.SchmancyCheckbox.prototype,"name",2),u([s.property({type:String})],exports.SchmancyCheckbox.prototype,"id",2),u([s.property({type:String})],exports.SchmancyCheckbox.prototype,"size",2),exports.SchmancyCheckbox=u([s.customElement("schmancy-checkbox")],exports.SchmancyCheckbox);
|
|
38
|
-
//# sourceMappingURL=checkbox-
|
|
38
|
+
//# sourceMappingURL=checkbox-B2iiLgtv.cjs.map
|