@mhmo91/schmancy 0.5.27 → 0.5.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{autocomplete-BlhAOtex.js → autocomplete-CeB2VvCm.js} +24 -24
  2. package/dist/autocomplete-CeB2VvCm.js.map +1 -0
  3. package/dist/{autocomplete-GW91jVqw.cjs → autocomplete-ChRZ5y2p.cjs} +2 -2
  4. package/dist/autocomplete-ChRZ5y2p.cjs.map +1 -0
  5. package/dist/autocomplete.cjs +1 -1
  6. package/dist/autocomplete.js +1 -1
  7. package/dist/{avatar-q32dkyky.cjs → avatar-B44Yq_7I.cjs} +2 -2
  8. package/dist/{avatar-q32dkyky.cjs.map → avatar-B44Yq_7I.cjs.map} +1 -1
  9. package/dist/{avatar-4sGidVGe.js → avatar-ByCv3NzJ.js} +3 -3
  10. package/dist/{avatar-4sGidVGe.js.map → avatar-ByCv3NzJ.js.map} +1 -1
  11. package/dist/badge.cjs +1 -1
  12. package/dist/badge.js +1 -1
  13. package/dist/chips.cjs +1 -1
  14. package/dist/chips.js +1 -1
  15. package/dist/content-drawer.cjs +1 -1
  16. package/dist/content-drawer.js +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.js +3 -3
  19. package/dist/nav-drawer.cjs +1 -1
  20. package/dist/nav-drawer.js +1 -1
  21. package/dist/navigation-bar.cjs +1 -1
  22. package/dist/navigation-bar.js +1 -1
  23. package/dist/{suggestion-chip-C1n2VYBG.cjs → suggestion-chip-BPCzI7GW.cjs} +18 -28
  24. package/dist/suggestion-chip-BPCzI7GW.cjs.map +1 -0
  25. package/dist/{suggestion-chip-Cl0cPTKV.js → suggestion-chip-CASXKYnD.js} +66 -84
  26. package/dist/suggestion-chip-CASXKYnD.js.map +1 -0
  27. package/dist/teleport.cjs +1 -1
  28. package/dist/teleport.js +1 -1
  29. package/package.json +1 -1
  30. package/types/src/autocomplete/autocomplete.d.ts +2 -0
  31. package/types/src/chips/chips.d.ts +6 -1
  32. package/dist/autocomplete-BlhAOtex.js.map +0 -1
  33. package/dist/autocomplete-GW91jVqw.cjs.map +0 -1
  34. package/dist/suggestion-chip-C1n2VYBG.cjs.map +0 -1
  35. package/dist/suggestion-chip-Cl0cPTKV.js.map +0 -1
@@ -1,17 +1,17 @@
1
1
  import { T as w } from "./tailwind.mixin-CZKT1dUr.js";
2
- import { css as g, html as r, LitElement as x } from "lit";
3
- import { property as l, state as O, customElement as k, queryAssignedElements as S } from "lit/decorators.js";
4
- import { classMap as B } from "lit/directives/class-map.js";
5
- import { BehaviorSubject as c, combineLatest as _ } from "rxjs";
6
- import { takeUntil as y, distinctUntilChanged as C, debounceTime as E } from "rxjs/operators";
2
+ import { css as $, html as r, LitElement as k } from "lit";
3
+ import { property as a, state as E, customElement as _, queryAssignedElements as S } from "lit/decorators.js";
4
+ import { classMap as M } from "lit/directives/class-map.js";
5
+ import { BehaviorSubject as c, combineLatest as g } from "rxjs";
6
+ import { takeUntil as x, distinctUntilChanged as C, debounceTime as O } from "rxjs/operators";
7
7
  import "lit/directives/style-map.js";
8
- import { $ as M } from "./litElement.mixin-B0Rsd4Km.js";
8
+ import { $ as B } from "./litElement.mixin-B0Rsd4Km.js";
9
9
  import { when as R } from "lit/directives/when.js";
10
10
  var D = Object.defineProperty, j = Object.getOwnPropertyDescriptor, u = (t, e, s, o) => {
11
- for (var n, i = o > 1 ? void 0 : o ? j(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
11
+ for (var l, i = o > 1 ? void 0 : o ? j(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
12
12
  return o && i && D(e, s, i), i;
13
13
  };
14
- let d = class extends w(g`
14
+ let d = class extends w($`
15
15
  :host {
16
16
  display: inline-block;
17
17
  outline: none;
@@ -66,9 +66,9 @@ let d = class extends w(g`
66
66
  if (this.disabled) return;
67
67
  const e = this.shadowRoot?.querySelector("button");
68
68
  if (e) {
69
- const s = e.getBoundingClientRect(), o = t.clientX - s.left, n = t.clientY - s.top, i = this.nextRippleId++;
70
- this.ripples = [...this.ripples, { x: o, y: n, id: i }], setTimeout(() => {
71
- this.ripples = this.ripples.filter((a) => a.id !== i);
69
+ const s = e.getBoundingClientRect(), o = t.clientX - s.left, l = t.clientY - s.top, i = this.nextRippleId++;
70
+ this.ripples = [...this.ripples, { x: o, y: l, id: i }], setTimeout(() => {
71
+ this.ripples = this.ripples.filter((n) => n.id !== i);
72
72
  }, 600);
73
73
  }
74
74
  this.href && (this.target === "_blank" ? window.open(this.href, "_blank") : window.location.href = this.href), this.dispatchEvent(new CustomEvent("action", { detail: { value: this.value }, bubbles: !0, composed: !0 }));
@@ -85,14 +85,14 @@ let d = class extends w(g`
85
85
  };
86
86
  }
87
87
  connectedCallback() {
88
- super.connectedCallback(), _([this.hover$, this.pressed$, this.focused$]).pipe(y(this.disconnecting)).subscribe();
88
+ super.connectedCallback(), g([this.hover$, this.pressed$, this.focused$]).pipe(x(this.disconnecting)).subscribe();
89
89
  }
90
90
  render() {
91
91
  const t = !!this.icon, e = { relative: !0, "inline-flex": !0, "items-center": !0, "gap-2": !0, "h-8": !0, "min-h-[32px]": !0, "rounded-full": !0, "cursor-pointer": !this.disabled, "transition-all": !0, "duration-200": !0, "select-none": !0, "overflow-hidden": !0, "pl-2": t, "pl-4": !t, "pr-4": !0, "bg-surface-containerLow": !0, "text-surface-onVariant": !0, "shadow-sm": this.elevated && !this.disabled, "hover:shadow-md": this.elevated && !this.disabled, "focus-visible:outline": !this.disabled, "focus-visible:outline-2": !this.disabled, "focus-visible:outline-primary": !this.disabled, "focus-visible:outline-offset-2": !this.disabled, "opacity-38": this.disabled, "cursor-not-allowed": this.disabled };
92
92
  return r`
93
93
  <button
94
94
  type="button"
95
- class=${B(e)}
95
+ class=${M(e)}
96
96
  ?disabled=${this.disabled}
97
97
  @click=${this.handleClick}
98
98
  @keydown=${this.handleKeyDown}
@@ -128,38 +128,26 @@ let d = class extends w(g`
128
128
  `;
129
129
  }
130
130
  };
131
- d.shadowRootOptions = { ...x.shadowRootOptions, delegatesFocus: !0 }, u([l({ reflect: !0 })], d.prototype, "value", 2), u([l({ reflect: !0 })], d.prototype, "icon", 2), u([l({ reflect: !0 })], d.prototype, "href", 2), u([l({ reflect: !0 })], d.prototype, "target", 2), u([l({ type: Boolean, reflect: !0 })], d.prototype, "disabled", 2), u([l({ type: Boolean, reflect: !0 })], d.prototype, "elevated", 2), u([O()], d.prototype, "ripples", 2), d = u([k("schmancy-assist-chip")], d);
132
- var F = Object.defineProperty, P = Object.getOwnPropertyDescriptor, v = (t, e, s, o) => {
133
- for (var n, i = o > 1 ? void 0 : o ? P(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
131
+ d.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, u([a({ reflect: !0 })], d.prototype, "value", 2), u([a({ reflect: !0 })], d.prototype, "icon", 2), u([a({ reflect: !0 })], d.prototype, "href", 2), u([a({ reflect: !0 })], d.prototype, "target", 2), u([a({ type: Boolean, reflect: !0 })], d.prototype, "disabled", 2), u([a({ type: Boolean, reflect: !0 })], d.prototype, "elevated", 2), u([E()], d.prototype, "ripples", 2), d = u([_("schmancy-assist-chip")], d);
132
+ var F = Object.defineProperty, P = Object.getOwnPropertyDescriptor, f = (t, e, s, o) => {
133
+ for (var l, i = o > 1 ? void 0 : o ? P(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
134
134
  return o && i && F(e, s, i), i;
135
135
  };
136
- let f = class extends M(g`
137
- :host {
138
- display: block;
139
- }
140
-
141
- :host([wrap]) section {
142
- flex-wrap: wrap;
136
+ let v = class extends B($`
137
+ :host{
138
+ display:block;
143
139
  }
144
140
 
145
- :host(:not([wrap])) section {
146
- overflow-x: auto;
141
+ .scrollbar-hide {
147
142
  -ms-overflow-style: none; /* IE and Edge */
148
143
  scrollbar-width: none; /* Firefox */
149
144
  }
150
-
151
- :host(:not([wrap])) section::-webkit-scrollbar {
145
+ .scrollbar-hide::-webkit-scrollbar {
152
146
  display: none; /* Chrome, Safari, and Opera */
153
147
  }
154
-
155
- section {
156
- display: flex;
157
- align-items: center;
158
- gap: 0.5rem;
159
- }
160
148
  `) {
161
149
  constructor() {
162
- super(...arguments), this.value$ = new c(""), this.values$ = new c([]), this._value = "", this._values = [], this._multi = !1, this.wrap = !1;
150
+ super(...arguments), this.value$ = new c(""), this.values$ = new c([]), this._value = "", this._values = [], this._multi = !1, this._valueSet = !1, this._valuesSet = !1, this.wrap = !1;
163
151
  }
164
152
  get multi() {
165
153
  return this._multi;
@@ -168,66 +156,60 @@ let f = class extends M(g`
168
156
  this._multi = t;
169
157
  }
170
158
  get mode() {
171
- return this._values.length > 0 || this.hasAttribute("values") ? "multi" : this._value || this.hasAttribute("value") ? "single" : this._multi ? "multi" : "none";
159
+ return this._valuesSet ? "multi" : this._valueSet ? "single" : this.hasAttribute("values") ? "multi" : this.hasAttribute("value") ? "single" : this._multi === !0 ? "multi" : "none";
172
160
  }
173
161
  get values() {
174
162
  return this._values;
175
163
  }
176
164
  set values(t) {
177
- this._values = t || [], this.values$.next(this._values);
165
+ this._values = t || [], this._valuesSet = !0, this.values$.next(this._values);
178
166
  }
179
167
  get value() {
180
168
  return this._value;
181
169
  }
182
170
  set value(t) {
183
- this._value = t || "", this.value$.next(this._value);
171
+ this._value = t || "", this._valueSet = !0, this.value$.next(this._value);
184
172
  }
185
173
  connectedCallback() {
186
- super.connectedCallback(), this.value$.next(this._value), this.values$.next(this._values);
187
- const t = this.mode;
188
- t === "multi" ? this.values$.pipe(C((e, s) => e.length === s.length && e.every((o, n) => o === s[n])), E(0), y(this.disconnecting)).subscribe((e) => this.updateChipStates(e)) : t === "single" && this.value$.pipe(C(), E(0), y(this.disconnecting)).subscribe((e) => this.updateChipStates(e));
174
+ super.connectedCallback(), this.value$.next(this._value), this.values$.next(this._values), g([this.value$.pipe(C()), this.values$.pipe(C((t, e) => t.length === e.length && t.every((s, o) => s === e[o])))]).pipe(O(0), x(this.disconnecting)).subscribe(([t, e]) => {
175
+ this.updateChipStates(this.mode, t, e);
176
+ });
189
177
  }
190
- updateChipStates(t) {
191
- if (!this.chips) return;
192
- const e = this.mode;
193
- e !== "none" && this.chips.forEach((s) => {
194
- if (!("value" in s) || !("selected" in s)) return;
195
- const o = s;
196
- if (e === "multi") {
197
- const n = t;
198
- o.selected = n.length > 0 && n.includes(o.value);
199
- } else o.selected = t !== "" && t === o.value;
178
+ updateChipStates(t, e, s) {
179
+ this.chips && t !== "none" && this.chips.forEach((o) => {
180
+ if ("value" in o && "selected" in o) {
181
+ const l = o;
182
+ t === "multi" ? l.selected = s.length > 0 && s.includes(l.value) : t === "single" && (l.selected = e !== "" && e === l.value);
183
+ }
200
184
  });
201
185
  }
202
- change(t) {
203
- t.preventDefault(), t.stopPropagation();
204
- const e = this.mode;
205
- if (e === "none") return;
206
- const { value: s, selected: o } = t.detail;
207
- e === "multi" ? (this._values = o ? [.../* @__PURE__ */ new Set([...this._values, s])] : this._values.filter((n) => n !== s), this.values$.next(this._values)) : (this._value = o ? s : "", this.value$.next(this._value)), this.dispatchEvent(new CustomEvent("change", { detail: e === "multi" ? this._values : this._value, bubbles: !0 }));
186
+ async change(t) {
187
+ if (t.preventDefault(), t.stopPropagation(), this.mode === "none") return;
188
+ const { value: e, selected: s } = t.detail;
189
+ this.mode === "multi" ? s ? this._values.includes(e) || (this._values = [...this._values, e], this.values$.next(this._values)) : (this._values = this._values.filter((o) => o !== e), this.values$.next(this._values)) : this.mode === "single" && (this._value = s ? e : "", this.value$.next(this._value)), this.requestUpdate(), this.dispatchEvent(new CustomEvent("change", { detail: this.mode === "multi" ? this._values : this._value, bubbles: !0 }));
208
190
  }
209
191
  firstUpdated(t) {
210
- super.firstUpdated(t);
211
- const e = this.mode;
212
- e === "multi" ? this.updateChipStates(this._values) : e === "single" && this.updateChipStates(this._value);
192
+ super.firstUpdated(t), this.updateChipStates(this.mode, this._value, this._values);
213
193
  }
214
194
  render() {
195
+ const t = this.classMap({ "flex auto-cols-max": !0, "items-center": !0, "flex-wrap": this.wrap, "overflow-x-auto": !this.wrap, "scrollbar-hide": !this.wrap, "gap-2": !0 });
215
196
  return r`
216
- <section @change=${this.change}>
217
- <slot @slotchange=${() => {
218
- const t = this.mode;
219
- t === "multi" ? this.updateChipStates(this._values) : t === "single" && this.updateChipStates(this._value);
220
- }}></slot>
197
+ <section class=${t} @change=${this.change}>
198
+ <slot
199
+ @slotchange=${() => {
200
+ this.updateChipStates(this.mode, this._value, this._values);
201
+ }}
202
+ ></slot>
221
203
  </section>
222
204
  `;
223
205
  }
224
206
  };
225
- v([l({ type: Boolean, reflect: !0 })], f.prototype, "multi", 1), v([l({ type: Array, reflect: !0 })], f.prototype, "values", 1), v([l({ type: String, reflect: !0 })], f.prototype, "value", 1), v([S({ selector: "schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip", flatten: !0 })], f.prototype, "chips", 2), v([l({ type: Boolean, reflect: !0 })], f.prototype, "wrap", 2), f = v([k("schmancy-chips")], f);
226
- var I = Object.defineProperty, L = Object.getOwnPropertyDescriptor, m = (t, e, s, o) => {
227
- for (var n, i = o > 1 ? void 0 : o ? L(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
228
- return o && i && I(e, s, i), i;
207
+ f([a({ type: Boolean, reflect: !0 })], v.prototype, "multi", 1), f([a({ type: Array, reflect: !0 })], v.prototype, "values", 1), f([a({ type: String, reflect: !0 })], v.prototype, "value", 1), f([S({ selector: "schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip", flatten: !0 })], v.prototype, "chips", 2), f([a({ type: Boolean, reflect: !0 })], v.prototype, "wrap", 2), v = f([_("schmancy-chips")], v);
208
+ var U = Object.defineProperty, I = Object.getOwnPropertyDescriptor, m = (t, e, s, o) => {
209
+ for (var l, i = o > 1 ? void 0 : o ? I(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
210
+ return o && i && U(e, s, i), i;
229
211
  };
230
- const $ = class $ extends w(g`
212
+ const y = class y extends w($`
231
213
  :host {
232
214
  display: inline-block;
233
215
  outline: none;
@@ -301,7 +283,7 @@ const $ = class $ extends w(g`
301
283
  return this.internals?.form;
302
284
  }
303
285
  connectedCallback() {
304
- super.connectedCallback(), _([this.hover$, this.pressed$, this.focused$]).pipe(y(this.disconnecting)).subscribe();
286
+ super.connectedCallback(), g([this.hover$, this.pressed$, this.focused$]).pipe(x(this.disconnecting)).subscribe();
305
287
  }
306
288
  render() {
307
289
  const e = { "inline-flex": !0, "items-center": !0, "gap-2": !0, "rounded-lg": !0, "h-8 px-4": !0, "cursor-pointer": !this.disabled, "transition-all": !0, "duration-200": !0, "select-none": !0, "text-sm": !0, "font-medium": !0, border: !0, relative: !0, "min-h-[32px]": !0, "bg-secondary-container": this._selected, "text-secondary-onContainer": this._selected, "border-secondary-container": this._selected, "bg-surface-container": !this._selected, "text-surface-on": !this._selected, "border-outline-variant": !this._selected, "hover:brightness-95": this._selected && !this.disabled, "hover:bg-surface-container-high": !this._selected && !this.disabled, "active:brightness-90": !this.disabled, "focus-visible:outline": !this.disabled, "focus-visible:outline-2": !this.disabled, "focus-visible:outline-offset-2": !this.disabled, "focus-visible:outline-primary-default": !this.disabled, "shadow-md": this.elevated && !this.disabled, "hover:shadow-lg": this.elevated && !this.disabled, "opacity-[var(--schmancy-sys-state-disabled-opacity)]": this.disabled, "cursor-not-allowed": this.disabled };
@@ -358,18 +340,18 @@ const $ = class $ extends w(g`
358
340
  `;
359
341
  }
360
342
  };
361
- $.shadowRootOptions = { ...x.shadowRootOptions, delegatesFocus: !0 }, $.formAssociated = !0;
362
- let h = $;
363
- if (m([l({ type: String, reflect: !0 })], h.prototype, "value", 2), m([l({ type: Boolean, reflect: !0 })], h.prototype, "selected", 1), m([l({ type: String, reflect: !0 })], h.prototype, "icon", 2), m([l({ type: Boolean, reflect: !0 })], h.prototype, "removable", 2), m([l({ type: Boolean, reflect: !0 })], h.prototype, "disabled", 2), m([l({ type: Boolean, reflect: !0 })], h.prototype, "elevated", 2), m([S({ slot: "icon" })], h.prototype, "iconSlotElements", 2), customElements.get("schmancy-filter-chip") || customElements.define("schmancy-filter-chip", h), !customElements.get("schmancy-chip")) {
343
+ y.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, y.formAssociated = !0;
344
+ let h = y;
345
+ if (m([a({ type: String, reflect: !0 })], h.prototype, "value", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "selected", 1), m([a({ type: String, reflect: !0 })], h.prototype, "icon", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "removable", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "disabled", 2), m([a({ type: Boolean, reflect: !0 })], h.prototype, "elevated", 2), m([S({ slot: "icon" })], h.prototype, "iconSlotElements", 2), customElements.get("schmancy-filter-chip") || customElements.define("schmancy-filter-chip", h), !customElements.get("schmancy-chip")) {
364
346
  class t extends h {
365
347
  }
366
348
  customElements.define("schmancy-chip", t);
367
349
  }
368
- var T = Object.defineProperty, U = Object.getOwnPropertyDescriptor, b = (t, e, s, o) => {
369
- for (var n, i = o > 1 ? void 0 : o ? U(e, s) : e, a = t.length - 1; a >= 0; a--) (n = t[a]) && (i = (o ? n(e, s, i) : n(i)) || i);
370
- return o && i && T(e, s, i), i;
350
+ var L = Object.defineProperty, T = Object.getOwnPropertyDescriptor, b = (t, e, s, o) => {
351
+ for (var l, i = o > 1 ? void 0 : o ? T(e, s) : e, n = t.length - 1; n >= 0; n--) (l = t[n]) && (i = (o ? l(e, s, i) : l(i)) || i);
352
+ return o && i && L(e, s, i), i;
371
353
  };
372
- let p = class extends w(g`
354
+ let p = class extends w($`
373
355
  :host {
374
356
  display: inline-block;
375
357
  outline: none;
@@ -424,9 +406,9 @@ let p = class extends w(g`
424
406
  if (this.disabled) return;
425
407
  const e = this.shadowRoot?.querySelector("button");
426
408
  if (e) {
427
- const s = e.getBoundingClientRect(), o = t.clientX - s.left, n = t.clientY - s.top, i = this.nextRippleId++;
428
- this.ripples = [...this.ripples, { x: o, y: n, id: i }], setTimeout(() => {
429
- this.ripples = this.ripples.filter((a) => a.id !== i);
409
+ const s = e.getBoundingClientRect(), o = t.clientX - s.left, l = t.clientY - s.top, i = this.nextRippleId++;
410
+ this.ripples = [...this.ripples, { x: o, y: l, id: i }], setTimeout(() => {
411
+ this.ripples = this.ripples.filter((n) => n.id !== i);
430
412
  }, 600);
431
413
  }
432
414
  this.href && (this.target === "_blank" ? window.open(this.href, "_blank") : window.location.href = this.href), this.dispatchEvent(new CustomEvent("action", { detail: { value: this.value }, bubbles: !0, composed: !0 }));
@@ -443,14 +425,14 @@ let p = class extends w(g`
443
425
  };
444
426
  }
445
427
  connectedCallback() {
446
- super.connectedCallback(), _([this.hover$, this.pressed$, this.focused$]).pipe(y(this.disconnecting)).subscribe();
428
+ super.connectedCallback(), g([this.hover$, this.pressed$, this.focused$]).pipe(x(this.disconnecting)).subscribe();
447
429
  }
448
430
  render() {
449
431
  const t = !!this.icon, e = { relative: !0, "inline-flex": !0, "items-center": !0, "gap-2": !0, "h-8": !0, "min-h-[32px]": !0, "rounded-full": !0, "cursor-pointer": !this.disabled, "transition-all": !0, "duration-200": !0, "select-none": !0, "overflow-hidden": !0, border: !0, "pl-2": t, "pl-4": !t, "pr-4": !0, "bg-surface-containerLow": !0, "text-surface-onVariant": !0, "border-outline": !0, "focus-visible:outline": !this.disabled, "focus-visible:outline-2": !this.disabled, "focus-visible:outline-primary": !this.disabled, "focus-visible:outline-offset-2": !this.disabled, "opacity-38": this.disabled, "cursor-not-allowed": this.disabled };
450
432
  return r`
451
433
  <button
452
434
  type="button"
453
- class=${B(e)}
435
+ class=${M(e)}
454
436
  ?disabled=${this.disabled}
455
437
  @click=${this.handleClick}
456
438
  @keydown=${this.handleKeyDown}
@@ -486,10 +468,10 @@ let p = class extends w(g`
486
468
  `;
487
469
  }
488
470
  };
489
- p.shadowRootOptions = { ...x.shadowRootOptions, delegatesFocus: !0 }, b([l({ reflect: !0 })], p.prototype, "value", 2), b([l({ reflect: !0 })], p.prototype, "icon", 2), b([l({ reflect: !0 })], p.prototype, "href", 2), b([l({ reflect: !0 })], p.prototype, "target", 2), b([l({ type: Boolean, reflect: !0 })], p.prototype, "disabled", 2), b([l({ type: Boolean, reflect: !0 })], p.prototype, "elevated", 2), b([O()], p.prototype, "ripples", 2), p = b([k("schmancy-suggestion-chip")], p);
471
+ p.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, b([a({ reflect: !0 })], p.prototype, "value", 2), b([a({ reflect: !0 })], p.prototype, "icon", 2), b([a({ reflect: !0 })], p.prototype, "href", 2), b([a({ reflect: !0 })], p.prototype, "target", 2), b([a({ type: Boolean, reflect: !0 })], p.prototype, "disabled", 2), b([a({ type: Boolean, reflect: !0 })], p.prototype, "elevated", 2), b([E()], p.prototype, "ripples", 2), p = b([_("schmancy-suggestion-chip")], p);
490
472
  export {
491
473
  d as S,
492
474
  h as a,
493
475
  p as b
494
476
  };
495
- //# sourceMappingURL=suggestion-chip-Cl0cPTKV.js.map
477
+ //# sourceMappingURL=suggestion-chip-CASXKYnD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suggestion-chip-CASXKYnD.js","sources":["../src/chips/assist-chip.ts","../src/chips/chips.ts","../src/chips/filter-chip.ts","../src/chips/suggestion-chip.ts"],"sourcesContent":["import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Assist chip component - prompts user actions like opening calendar events or sharing content\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-assist-chip')\nexport class SchmancyAssistChip extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\tmin-width:fit-content\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`) {\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - true by default per M3 spec for assist chips */\n\t@property({ type: Boolean, reflect: true }) elevated = true\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\trender() {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors - assist chips are elevated by default\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\n\t\t\t// M3: Assist chips elevated by default (shadow-1)\n\t\t\t'shadow-sm': this.elevated && !this.disabled, // shadow-1 for elevation\n\t\t\t'hover:shadow-md': this.elevated && !this.disabled, // elevated on hover\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-assist-chip': SchmancyAssistChip\n\t}\n}\n\nexport type AssistChipActionEvent = { value: string }","import { $LitElement } from '@mixins/index'\nimport { css, html, PropertyValues } from 'lit'\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { debounceTime, distinctUntilChanged, takeUntil } from 'rxjs/operators'\nimport type { FilterChipChangeEvent as SchmancyChipChangeEvent } from './filter-chip'\nimport { SchmancyFilterChip as SchmancyChip } from './filter-chip'\n\n@customElement('schmancy-chips')\nexport default class SchmancyChips extends $LitElement(\n\ncss`\n\t:host{\n\t\tdisplay:block;\n\t}\n\n\t.scrollbar-hide {\n\t\t-ms-overflow-style: none; /* IE and Edge */\n\t\tscrollbar-width: none; /* Firefox */\n\t}\n\t.scrollbar-hide::-webkit-scrollbar {\n\t\tdisplay: none; /* Chrome, Safari, and Opera */\n\t}\n`\n) {\n\t// RxJS state streams - initialized with undefined to detect if properties were set\n\tprivate value$ = new BehaviorSubject<string>('')\n\tprivate values$ = new BehaviorSubject<string[]>([])\n\n\t// Track if properties were initialized from attributes/properties\n\tprivate _value: string = ''\n\tprivate _values: string[] = []\n\tprivate _multi: boolean = false\n\n\t// Track if properties have been explicitly set\n\tprivate _valueSet: boolean = false\n\tprivate _valuesSet: boolean = false\n\n\t/**\n\t * @deprecated Use .values for multi-selection or .value for single-selection instead.\n\t * The mode is now automatically determined based on which property is used.\n\t */\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\tget multi(): boolean {\n\t\treturn this._multi\n\t}\n\tset multi(value: boolean) {\n\t\tthis._multi = value\n\t\t// Note: We don't update any BehaviorSubject here as mode is now computed\n\t}\n\n\t/**\n\t * Automatically determines the selection mode based on which properties are in use\n\t */\n\tprivate get mode(): 'multi' | 'single' | 'none' {\n\t\t// Check if values array is being used (explicitly set)\n\t\tif (this._valuesSet) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Check if value string is being used (explicitly set)\n\t\tif (this._valueSet) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Check if either property has been set via attributes\n\t\tif (this.hasAttribute('values')) {\n\t\t\treturn 'multi'\n\t\t}\n\t\tif (this.hasAttribute('value')) {\n\t\t\treturn 'single'\n\t\t}\n\t\t// Fallback to deprecated multi prop for backward compatibility\n\t\tif (this._multi === true) {\n\t\t\treturn 'multi'\n\t\t}\n\t\t// Default to none (no selection management)\n\t\treturn 'none'\n\t}\n\n\t@property({\n\t\ttype: Array,\n\t\treflect: true,\n\t})\n\tget values(): string[] {\n\t\treturn this._values\n\t}\n\tset values(value: string[]) {\n\t\tthis._values = value || []\n\t\tthis._valuesSet = true // Mark that values has been explicitly set\n\t\tthis.values$.next(this._values)\n\t}\n\n\t@property({\n\t\ttype: String,\n\t\treflect: true,\n\t})\n\tget value(): string {\n\t\treturn this._value\n\t}\n\tset value(value: string) {\n\t\tthis._value = value || ''\n\t\tthis._valueSet = true // Mark that value has been explicitly set\n\t\tthis.value$.next(this._value)\n\t}\n\n\t@queryAssignedElements({\n\t\tselector:\n\t\t\t'schmancy-chip, schmancy-filter-chip, schmancy-assist-chip, schmancy-input-chip, schmancy-suggestion-chip',\n\t\tflatten: true,\n\t})\n\tchips!: (SchmancyChip | HTMLElement)[]\n\n\t@property({\n\t\ttype: Boolean,\n\t\treflect: true,\n\t})\n\twrap: boolean = false\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Initialize BehaviorSubjects with current property values\n\t\t// This ensures properties set before connectedCallback are respected\n\t\tthis.value$.next(this._value)\n\t\tthis.values$.next(this._values)\n\n\t\t// Set up reactive pipeline for state synchronization\n\t\tcombineLatest([\n\t\t\tthis.value$.pipe(distinctUntilChanged()),\n\t\t\tthis.values$.pipe(\n\t\t\t\tdistinctUntilChanged((prev, curr) => prev.length === curr.length && prev.every((v, i) => v === curr[i])),\n\t\t\t),\n\t\t])\n\t\t\t.pipe(\n\t\t\t\tdebounceTime(0), // Ensure DOM is ready\n\t\t\t\ttakeUntil(this.disconnecting),\n\t\t\t)\n\t\t\t.subscribe(([value, values]) => {\n\t\t\t\t// Reactively update chip states based on container state and auto-detected mode\n\t\t\t\tthis.updateChipStates(this.mode, value, values)\n\t\t\t})\n\t}\n\n\tprivate updateChipStates(mode: 'multi' | 'single' | 'none', value: string, values: string[]) {\n\t\tif (!this.chips) return\n\n\t\t// If mode is 'none', don't manage selection state\n\t\tif (mode === 'none') return\n\n\t\tthis.chips.forEach(chip => {\n\t\t\tif ('value' in chip && 'selected' in chip) {\n\t\t\t\tconst filterChip = chip as SchmancyChip\n\t\t\t\tif (mode === 'multi') {\n\t\t\t\t\t// In multi mode: only select if values array explicitly includes this chip's value\n\t\t\t\t\tfilterChip.selected = values.length > 0 && values.includes(filterChip.value)\n\t\t\t\t} else if (mode === 'single') {\n\t\t\t\t\t// In single mode: only select if value is non-empty AND matches this chip's value\n\t\t\t\t\t// This prevents chips from being selected when value is empty string\n\t\t\t\t\tfilterChip.selected = value !== '' && value === filterChip.value\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\n\tasync change(e: CustomEvent<SchmancyChipChangeEvent>) {\n\t\te.preventDefault()\n\t\te.stopPropagation()\n\n\t\t// If mode is 'none', don't handle selection changes\n\t\tif (this.mode === 'none') return\n\n\t\tconst { value, selected } = e.detail\n\n\t\t// Update the reactive streams and internal tracking, which will trigger state synchronization\n\t\tif (this.mode === 'multi') {\n\t\t\tif (selected) {\n\t\t\t\t// Add value if not already present\n\t\t\t\tif (!this._values.includes(value)) {\n\t\t\t\t\tthis._values = [...this._values, value]\n\t\t\t\t\tthis.values$.next(this._values)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Remove value\n\t\t\t\tthis._values = this._values.filter(v => v !== value)\n\t\t\t\tthis.values$.next(this._values)\n\t\t\t}\n\t\t} else if (this.mode === 'single') {\n\t\t\t// Single selection mode\n\t\t\tthis._value = selected ? value : ''\n\t\t\tthis.value$.next(this._value)\n\t\t}\n\n\t\t// Request update to trigger re-render and property reflection\n\t\tthis.requestUpdate()\n\n\t\t// Dispatch change event with appropriate detail based on mode\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent<SchmancyChipsChangeEvent>('change', {\n\t\t\t\tdetail: this.mode === 'multi' ? this._values : this._value,\n\t\t\t\tbubbles: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprotected firstUpdated(_changedProperties: PropertyValues): void {\n\t\tsuper.firstUpdated(_changedProperties)\n\t\t// Initial state synchronization will happen through the reactive pipeline\n\t\t// Force an initial update to ensure chips are synchronized\n\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst containerClasses = this.classMap({\n\t\t\t\"flex auto-cols-max\": true,\n\t\t\t'items-center': true,\n\t\t\t'flex-wrap': this.wrap,\n\t\t\t'overflow-x-auto': !this.wrap,\n\t\t\t'scrollbar-hide': !this.wrap,\n\t\t\t'gap-2':true,\n\t\t})\n\n\t\treturn html`\n\t\t\t<section class=${containerClasses} @change=${this.change}>\n\t\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${() => {\n\t\t\t\t\t\t// When slot changes, trigger state update through reactive pipeline\n\t\t\t\t\t\tthis.updateChipStates(this.mode, this._value, this._values)\n\t\t\t\t\t}}\n\t\t\t\t></slot>\n\t\t\t</section>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chips': SchmancyChips\n\t}\n}\nexport type SchmancyChipsChangeEvent = string | Array<string>\n","import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, LitElement } from 'lit'\nimport { property, queryAssignedElements } from 'lit/decorators.js'\nimport { when } from 'lit/directives/when.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Filter chip component for content filtering.\n *\n * Filter chips are the ONLY chip type that maintains persistent selected state.\n * They are used for filtering content by toggling on/off different filter criteria.\n *\n * @fires change - Dispatched when selection state changes with {value, selected}\n * @fires remove - Dispatched when remove button is clicked (if removable)\n *\n * @example\n * ```html\n * <schmancy-filter-chip value=\"category-1\" selected>\n * Category 1\n * </schmancy-filter-chip>\n * ```\n */\nexport class SchmancyFilterChip extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\tmin-width:fit-content\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t\t/* M3 disabled state opacity */\n\t\topacity: var(--schmancy-sys-state-disabled-opacity);\n\t}\n\n\tbutton {\n\t\tfont-family: inherit;\n\t}\n\n\t/* Material Symbols font for icons */\n\t.material-symbols-outlined {\n\t\tfont-family: 'Material Symbols Outlined';\n\t\tfont-weight: normal;\n\t\tfont-style: normal;\n\t\tfont-size: 18px;\n\t\tline-height: 1;\n\t\tletter-spacing: normal;\n\t\ttext-transform: none;\n\t\tdisplay: inline-block;\n\t\twhite-space: nowrap;\n\t\tword-wrap: normal;\n\t\tdirection: ltr;\n\t\t-webkit-font-smoothing: antialiased;\n\t\ttext-rendering: optimizeLegibility;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tfont-feature-settings: 'liga';\n\t\tvertical-align: middle;\n\t}\n`) {\n\t/** Unique identifier for this filter chip */\n\t@property({ type: String, reflect: true })\n\tvalue: string = ''\n\n\t/** Whether the filter chip is selected (active filter) */\n\tprivate _selected: boolean = false\n\n\t@property({ type: Boolean, reflect: true })\n\tget selected(): boolean {\n\t\treturn this._selected\n\t}\n\tset selected(value: boolean) {\n\t\tconst oldValue = this._selected\n\t\tthis._selected = value\n\t\tthis.requestUpdate('selected', oldValue)\n\t}\n\n\t/** Optional icon to display (Material Symbols name) */\n\t@property({ type: String, reflect: true })\n\ticon: string = ''\n\n\t/** Whether to show a remove button */\n\t@property({ type: Boolean, reflect: true })\n\tremovable: boolean = false\n\n\t/** Whether the chip is disabled */\n\t@property({ type: Boolean, reflect: true })\n\tdisabled: boolean = false\n\n\t/** Whether to use elevated style with shadow */\n\t@property({ type: Boolean, reflect: true })\n\televated: boolean = false\n\n\t// Reactive state management with RxJS\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// Query assigned elements in the icon slot\n\t@queryAssignedElements({ slot: 'icon' }) iconSlotElements!: Element[]\n\n\tconstructor() {\n\t\tsuper()\n\t\ttry {\n\t\t\tthis.internals = this.attachInternals()\n\t\t} catch {\n\t\t\tthis.internals = undefined\n\t\t}\n\t}\n\n\tprotected static shadowRootOptions = {\n\t\t...LitElement.shadowRootOptions,\n\t\tdelegatesFocus: true,\n\t}\n\n\tstatic formAssociated = true\n\tinternals: ElementInternals | undefined\n\tget form() {\n\t\treturn this.internals?.form\n\t}\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// RxJS streams are maintained for potential future use\n\t\t// Currently state is handled directly through event handlers\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$,\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting),\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = () => {\n\t\tif (this.disabled) return\n\n\t\t// Don't modify this.selected - let the parent container control it\n\t\t// Dispatch change event with the INTENDED state\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('change', {\n\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleRemove = (e: Event) => {\n\t\tif (this.disabled) return\n\n\t\te.stopPropagation()\n\n\t\t// Dispatch remove event\n\t\tthis.dispatchEvent(\n\t\t\tnew CustomEvent('remove', {\n\t\t\t\tdetail: { value: this.value },\n\t\t\t\tbubbles: true,\n\t\t\t\tcomposed: true,\n\t\t\t}),\n\t\t)\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\t// Dispatch event directly rather than calling handleClick to be explicit\n\t\t\tthis.dispatchEvent(\n\t\t\t\tnew CustomEvent('change', {\n\t\t\t\t\tdetail: { value: this.value, selected: !this._selected },\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tcomposed: true,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t}\n\n\tprivate handleMouseEnter = () => {\n\t\tthis.hover$.next(true)\n\t}\n\n\tprivate handleMouseLeave = () => {\n\t\tthis.hover$.next(false)\n\t\tthis.pressed$.next(false)\n\t}\n\n\tprivate handleMouseDown = () => {\n\t\tthis.pressed$.next(true)\n\t}\n\n\tprivate handleMouseUp = () => {\n\t\tthis.pressed$.next(false)\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst chipClasses = {\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t/* M3 shape: small for chips */\n\t\t\t'rounded-lg': true,\n\t\t\t'h-8 px-4': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t/* M3 motion: short duration */\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'text-sm': true,\n\t\t\t'font-medium': true,\n\t\t\t'border': true,\n\t\t\t'relative': true,\n\t\t\t'min-h-[32px]': true,\n\n\t\t\t// Background and text colors based on selection state\n\t\t\t'bg-secondary-container': this._selected,\n\t\t\t'text-secondary-onContainer': this._selected,\n\t\t\t'border-secondary-container': this._selected,\n\t\t\t'bg-surface-container': !this._selected,\n\t\t\t'text-surface-on': !this._selected,\n\t\t\t'border-outline-variant': !this._selected,\n\n\t\t\t// Hover states\n\t\t\t'hover:brightness-95': this._selected && !this.disabled,\n\t\t\t'hover:bg-surface-container-high': !this._selected && !this.disabled,\n\n\t\t\t// M3 pressed state (no scale transformation in M3)\n\t\t\t'active:brightness-90': !this.disabled,\n\n\t\t\t// Focus-visible state for better UX\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary-default': !this.disabled,\n\n\t\t\t// Elevated style\n\t\t\t'shadow-md': this.elevated && !this.disabled,\n\t\t\t'hover:shadow-lg': this.elevated && !this.disabled,\n\n\t\t\t// M3 disabled state\n\t\t\t'opacity-[var(--schmancy-sys-state-disabled-opacity)]': this.disabled,\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\tclass=${this.classMap(chipClasses)}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${this.handleMouseEnter}\n\t\t\t\t@mouseleave=${this.handleMouseLeave}\n\t\t\t\t@mousedown=${this.handleMouseDown}\n\t\t\t\t@mouseup=${this.handleMouseUp}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\taria-pressed=${this._selected ? 'true' : 'false'}\n\t\t\t\trole=\"checkbox\"\n\t\t\t\ttabindex=\"0\"\n\t\t\t>\n\t\t\t\t<!-- Icon container - conditionally shown using when directive -->\n\t\t\t\t${when(\n\t\t\t\t\tthis._selected || this.icon || this.iconSlotElements?.length > 0,\n\t\t\t\t\t() => html`\n\t\t\t\t\t\t<span class=\"inline-flex w-[18px] h-[18px] items-center justify-center shrink-0\">\n\t\t\t\t\t\t\t${this._selected ? html`\n\t\t\t\t\t\t\t\t<span class=\"material-symbols-outlined text-[18px]\">\n\t\t\t\t\t\t\t\t\tcheck\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t` : this.icon ? html`\n\t\t\t\t\t\t\t\t<span class=\"material-symbols-outlined text-[18px]\">\n\t\t\t\t\t\t\t\t\t${this.icon}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t` : html`\n\t\t\t\t\t\t\t\t<slot name=\"icon\"></slot>\n\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t`\n\t\t\t\t)}\n\n\t\t\t\t<!-- Chip content -->\n\t\t\t\t<slot></slot>\n\n\t\t\t\t<!-- Remove button (if removable) -->\n\t\t\t\t${this.removable ? html`\n\t\t\t\t\t<button\n\t\t\t\t\t\tclass=\"ml-1 -mr-1 p-0.5 rounded-full hover:bg-surface-container-highest transition-colors duration-200\"\n\t\t\t\t\t\t@click=${this.handleRemove}\n\t\t\t\t\t\taria-label=\"Remove filter\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"material-symbols-outlined text-sm sm:text-[16px]\">\n\t\t\t\t\t\t\tclose\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t` : ''}\n\t\t\t</button>\n\t\t`\n\t}\n}\n\n// Register the element with both names for backward compatibility\n// Check if not already registered to prevent duplicate registration errors\nif (!customElements.get('schmancy-filter-chip')) {\n\tcustomElements.define('schmancy-filter-chip', SchmancyFilterChip)\n}\n\n// For backward compatibility, register 'schmancy-chip' with a subclass\n// to avoid duplicate constructor registration error\nif (!customElements.get('schmancy-chip')) {\n\tclass SchmancyChipCompat extends SchmancyFilterChip {}\n\tcustomElements.define('schmancy-chip', SchmancyChipCompat)\n}\n\n// Export alias for backward compatibility\nexport { SchmancyFilterChip as SchmancyChip }\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-chip': SchmancyFilterChip\n\t\t'schmancy-filter-chip': SchmancyFilterChip\n\t}\n}\n\nexport type FilterChipChangeEvent = { value: string; selected: boolean }\nexport type FilterChipRemoveEvent = { value: string }\n// Alias for backward compatibility\nexport type SchmancyChipChangeEvent = FilterChipChangeEvent","import { TailwindElement } from '@mixins/tailwind.mixin'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { BehaviorSubject, combineLatest } from 'rxjs'\nimport { takeUntil } from 'rxjs/operators'\n\n/**\n * Suggestion chip component - provides contextual recommendations to users\n *\n * IMPORTANT: Suggestion chips do NOT have a selected state. They are designed to\n * provide suggestions and recommendations that trigger actions when clicked.\n * Unlike filter chips, they cannot be toggled on/off.\n *\n * Pure Schmancy implementation with Tailwind CSS and RxJS state management\n */\n@customElement('schmancy-suggestion-chip')\nexport class SchmancySuggestionChip extends TailwindElement(css`\n\t:host {\n\t\tdisplay: inline-block;\n\t\toutline: none;\n\t\tmin-width:fit-content\n\t}\n\n\t:host([disabled]) {\n\t\tpointer-events: none;\n\t}\n\n\t.ripple {\n\t\tposition: absolute;\n\t\tborder-radius: 50%;\n\t\ttransform: scale(0);\n\t\tanimation: ripple 600ms linear;\n\t\tbackground-color: rgba(0, 0, 0, 0.08);\n\t\tpointer-events: none;\n\t}\n\n\t@keyframes ripple {\n\t\tto {\n\t\t\ttransform: scale(4);\n\t\t\topacity: 0;\n\t\t}\n\t}\n\n\t/* State layer for M3 hover/focus/pressed states */\n\t.state-layer {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tborder-radius: inherit;\n\t\tpointer-events: none;\n\t\tbackground-color: currentColor;\n\t\topacity: 0;\n\t\ttransition: opacity 200ms ease;\n\t}\n\n\t:host(:not([disabled])) button:hover .state-layer {\n\t\topacity: 0.08;\n\t}\n\n\t:host(:not([disabled])) button:focus-visible .state-layer {\n\t\topacity: 0.1;\n\t}\n\n\t:host(:not([disabled])) button:active .state-layer {\n\t\topacity: 0.1;\n\t}\n`) {\n\t/** Value identifier for the chip */\n\t@property({ reflect: true }) value = ''\n\n\t/** Optional icon name (Material Symbols) */\n\t@property({ reflect: true }) icon = ''\n\n\t/** Optional href for navigation */\n\t@property({ reflect: true }) href = ''\n\n\t/** Target for navigation (e.g., '_blank') */\n\t@property({ reflect: true }) target = ''\n\n\t/** Disable the chip */\n\t@property({ type: Boolean, reflect: true }) disabled = false\n\n\t/** Elevated style variant - flat by default per M3 spec */\n\t@property({ type: Boolean, reflect: true }) elevated = false\n\n\t// RxJS state streams\n\tprivate hover$ = new BehaviorSubject<boolean>(false)\n\tprivate pressed$ = new BehaviorSubject<boolean>(false)\n\tprivate focused$ = new BehaviorSubject<boolean>(false)\n\n\t// UI state - only ripples needed for rendering\n\t@state() private ripples: Array<{ x: number; y: number; id: number }> = []\n\n\tprotected static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }\n\n\tprivate nextRippleId = 0\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback()\n\n\t\t// Stream management for future extensions\n\t\t// Currently, states are handled directly in event handlers\n\t\t// This pipeline can be extended for more complex state interactions\n\t\tcombineLatest([\n\t\t\tthis.hover$,\n\t\t\tthis.pressed$,\n\t\t\tthis.focused$\n\t\t]).pipe(\n\t\t\t// States are managed through event handlers directly\n\t\t\t// This pipeline is kept for potential future state combinations\n\t\t\ttakeUntil(this.disconnecting)\n\t\t).subscribe()\n\t}\n\n\tprivate handleClick = (e: MouseEvent) => {\n\t\tif (this.disabled) return\n\n\t\t// Add ripple effect\n\t\tconst button = this.shadowRoot?.querySelector('button')\n\t\tif (button) {\n\t\t\tconst rect = button.getBoundingClientRect()\n\t\t\tconst x = e.clientX - rect.left\n\t\t\tconst y = e.clientY - rect.top\n\t\t\tconst id = this.nextRippleId++\n\n\t\t\tthis.ripples = [...this.ripples, { x, y, id }]\n\n\t\t\t// Remove ripple after animation\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.ripples = this.ripples.filter(r => r.id !== id)\n\t\t\t}, 600)\n\t\t}\n\n\t\t// Navigate if href is provided\n\t\tif (this.href) {\n\t\t\tif (this.target === '_blank') {\n\t\t\t\twindow.open(this.href, '_blank')\n\t\t\t} else {\n\t\t\t\twindow.location.href = this.href\n\t\t\t}\n\t\t}\n\n\t\t// Dispatch action event\n\t\tthis.dispatchEvent(new CustomEvent('action', {\n\t\t\tdetail: { value: this.value },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true\n\t\t}))\n\t}\n\n\tprivate handleKeyDown = (e: KeyboardEvent) => {\n\t\tif (this.disabled) return\n\n\t\tif (e.key === 'Enter' || e.key === ' ') {\n\t\t\te.preventDefault()\n\t\t\tthis.pressed$.next(true)\n\n\t\t\t// Simulate click\n\t\t\tconst clickEvent = new MouseEvent('click', {\n\t\t\t\tbubbles: true,\n\t\t\t\tcancelable: true,\n\t\t\t\tclientX: 0,\n\t\t\t\tclientY: 0\n\t\t\t})\n\t\t\tthis.handleClick(clickEvent)\n\n\t\t\tsetTimeout(() => this.pressed$.next(false), 100)\n\t\t}\n\t}\n\n\tprivate handleFocus = () => {\n\t\tthis.focused$.next(true)\n\t}\n\n\tprivate handleBlur = () => {\n\t\tthis.focused$.next(false)\n\t}\n\n\tprotected render(): unknown {\n\t\tconst hasIcon = !!this.icon;\n\n\t\tconst classes = {\n\t\t\t'relative': true,\n\t\t\t'inline-flex': true,\n\t\t\t'items-center': true,\n\t\t\t'gap-2': true,\n\t\t\t'h-8': true, // M3: 32px height\n\t\t\t'min-h-[32px]': true,\n\t\t\t'rounded-full': true,\n\t\t\t'cursor-pointer': !this.disabled,\n\t\t\t'transition-all': true,\n\t\t\t'duration-200': true,\n\t\t\t'select-none': true,\n\t\t\t'overflow-hidden': true,\n\t\t\t'border': true,\n\n\t\t\t// M3 Padding: 8px with icon, 16px without (leading), 16px trailing\n\t\t\t'pl-2': hasIcon, // 8px with icon\n\t\t\t'pl-4': !hasIcon, // 16px without icon\n\t\t\t'pr-4': true, // 16px trailing\n\n\t\t\t// M3 Colors for suggestion chips\n\t\t\t'bg-surface-containerLow': true,\n\t\t\t'text-surface-onVariant': true,\n\t\t\t'border-outline': true,\n\n\t\t\t// Suggestion chips are flat by default (no elevation per M3)\n\n\t\t\t// Focus state\n\t\t\t'focus-visible:outline': !this.disabled,\n\t\t\t'focus-visible:outline-2': !this.disabled,\n\t\t\t'focus-visible:outline-primary': !this.disabled,\n\t\t\t'focus-visible:outline-offset-2': !this.disabled,\n\n\t\t\t// Disabled\n\t\t\t'opacity-38': this.disabled, // M3 disabled opacity\n\t\t\t'cursor-not-allowed': this.disabled\n\t\t}\n\n\t\treturn html`\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=${classMap(classes)}\n\t\t\t\t?disabled=${this.disabled}\n\t\t\t\t@click=${this.handleClick}\n\t\t\t\t@keydown=${this.handleKeyDown}\n\t\t\t\t@mouseenter=${() => this.hover$.next(true)}\n\t\t\t\t@mouseleave=${() => this.hover$.next(false)}\n\t\t\t\t@mousedown=${() => this.pressed$.next(true)}\n\t\t\t\t@mouseup=${() => this.pressed$.next(false)}\n\t\t\t\t@focus=${this.handleFocus}\n\t\t\t\t@blur=${this.handleBlur}\n\t\t\t\ttabindex=${this.disabled ? '-1' : '0'}\n\t\t\t\trole=\"button\"\n\t\t\t\taria-disabled=${this.disabled}\n\t\t\t\taria-label=${this.value}\n\t\t\t>\n\t\t\t\t${this.icon ? html`\n\t\t\t\t\t<schmancy-icon class=\"text-[18px] shrink-0\">${this.icon}</schmancy-icon>\n\t\t\t\t` : ''}\n\t\t\t\t<span class=\"text-sm font-medium leading-5\">\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\n\t\t\t\t<!-- Ripple effects -->\n\t\t\t\t${this.ripples.map(ripple => html`\n\t\t\t\t\t<span\n\t\t\t\t\t\tclass=\"ripple\"\n\t\t\t\t\t\tstyle=\"left: ${ripple.x}px; top: ${ripple.y}px;\"\n\t\t\t\t\t></span>\n\t\t\t\t`)}\n\n\t\t\t\t<!-- State layer for M3 hover/focus/pressed states -->\n\t\t\t\t<div class=\"state-layer\"></div>\n\t\t\t</button>\n\t\t`\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'schmancy-suggestion-chip': SchmancySuggestionChip\n\t}\n}\n\nexport type SuggestionChipActionEvent = { value: string }"],"names":["SchmancyAssistChip","TailwindElement","css","constructor","super","arguments","this","value","icon","href","target","disabled","elevated","hover$","BehaviorSubject","pressed$","focused$","ripples","nextRippleId","handleClick","e","button","shadowRoot","querySelector","rect","getBoundingClientRect","x","clientX","left","y","clientY","top","id","setTimeout","filter","r","window","open","location","dispatchEvent","CustomEvent","detail","bubbles","composed","handleKeyDown","key","preventDefault","next","clickEvent","MouseEvent","cancelable","handleFocus","handleBlur","connectedCallback","combineLatest","pipe","takeUntil","disconnecting","subscribe","hasIcon","classes","relative","html","classMap","map","ripple","shadowRootOptions","LitElement","delegatesFocus","__decorateClass","property","reflect","prototype","type","Boolean","state","customElement","SchmancyChips","$LitElement","value$","values$","_value","_values","_multi","_valueSet","_valuesSet","wrap","multi","mode","hasAttribute","values","distinctUntilChanged","prev","curr","length","every","v","i","debounceTime","updateChipStates","chips","forEach","chip","filterChip","selected","includes","stopPropagation","requestUpdate","_changedProperties","firstUpdated","render","containerClasses","change","Array","String","queryAssignedElements","selector","flatten","SchmancyFilterChip","_selected","removable","handleRemove","handleMouseEnter","handleMouseLeave","handleMouseDown","handleMouseUp","internals","attachInternals","oldValue","form","chipClasses","border","when","iconSlotElements","formAssociated","_S","slot","customElements","get","define","SchmancyChipCompat","SchmancySuggestionChip"],"mappings":";;;;;;;;;;;;;AAYO,IAAMA,IAAN,cAAiCC,EAAgBC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,CAAjD,EAAA;AAAA,EAAA,cAAAC;AAAAC,UAAAA,GAAAC,SAAAA,GAmDuBC,KAAAC,QAAQ,IAGRD,KAAAE,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ACFiE,CAAAA;"}
package/dist/teleport.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-q32dkyky.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./avatar-B44Yq_7I.cjs");exports.HereMorty=e.HereMorty,Object.defineProperty(exports,"SchmancyTeleportation",{enumerable:!0,get:()=>e.SchmancyTeleportation}),exports.WhereAreYouRicky=e.WhereAreYouRicky,exports.teleport=e.teleport;
2
2
  //# sourceMappingURL=teleport.cjs.map
package/dist/teleport.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as o, t, W as a, u as s } from "./avatar-4sGidVGe.js";
1
+ import { H as o, t, W as a, u as s } from "./avatar-ByCv3NzJ.js";
2
2
  export {
3
3
  o as HereMorty,
4
4
  t as SchmancyTeleportation,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhmo91/schmancy",
3
- "version": "0.5.27",
3
+ "version": "0.5.29",
4
4
  "description": "UI library build with web components",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
@@ -6,6 +6,8 @@ export type SchmancyAutocompleteChangeEvent = CustomEvent<{
6
6
  }>;
7
7
  declare const SchmancyAutocomplete_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
8
8
  export default class SchmancyAutocomplete extends SchmancyAutocomplete_base {
9
+ _valueSet: boolean;
10
+ _valuesSet: boolean;
9
11
  required: boolean;
10
12
  placeholder: string;
11
13
  label: string;
@@ -8,12 +8,17 @@ export default class SchmancyChips extends SchmancyChips_base {
8
8
  private _value;
9
9
  private _values;
10
10
  private _multi;
11
+ private _valueSet;
12
+ private _valuesSet;
11
13
  /**
12
14
  * @deprecated Use .values for multi-selection or .value for single-selection instead.
13
15
  * The mode is now automatically determined based on which property is used.
14
16
  */
15
17
  get multi(): boolean;
16
18
  set multi(value: boolean);
19
+ /**
20
+ * Automatically determines the selection mode based on which properties are in use
21
+ */
17
22
  private get mode();
18
23
  get values(): string[];
19
24
  set values(value: string[]);
@@ -23,7 +28,7 @@ export default class SchmancyChips extends SchmancyChips_base {
23
28
  wrap: boolean;
24
29
  connectedCallback(): void;
25
30
  private updateChipStates;
26
- change(e: CustomEvent<SchmancyChipChangeEvent>): void;
31
+ change(e: CustomEvent<SchmancyChipChangeEvent>): Promise<void>;
27
32
  protected firstUpdated(_changedProperties: PropertyValues): void;
28
33
  protected render(): unknown;
29
34
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"autocomplete-BlhAOtex.js","sources":["../src/autocomplete/autocomplete.ts"],"sourcesContent":["import { $LitElement } from '@mixins/index'\nimport { InputSize, SchmancyInput } from '@schmancy/input'\nimport SchmancyOption from '@schmancy/option/option'\nimport { html } from 'lit'\nimport { customElement, property, query, queryAssignedElements, state } from 'lit/decorators.js'\nimport { classMap } from 'lit/directives/class-map.js'\nimport { createRef, ref } from 'lit/directives/ref.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { when } from 'lit/directives/when.js'\nimport {\n BehaviorSubject,\n combineLatest\n} from 'rxjs'\nimport {\n debounceTime,\n distinctUntilChanged,\n take,\n takeUntil,\n tap\n} from 'rxjs/operators'\nimport style from './autocomplete.scss?inline'\n\n// Import the similarity function (or include it inline)\nimport { similarity } from '../utils/search'\n// Import chip component for multi-select display\nimport '../chips/input-chip'\n\nexport type SchmancyAutocompleteChangeEvent = CustomEvent<{\n value: string | string[]\n values?: string[]\n}>\n\ninterface FilteredOption {\n option: SchmancyOption\n score: number\n}\n\n@customElement('schmancy-autocomplete')\nexport default class SchmancyAutocomplete extends $LitElement(style) {\n // Public API properties\n @property({ type: Boolean }) required = false\n @property({ type: String }) placeholder = ''\n @property({ type: String, reflect: true }) label = ''\n @property({ type: String }) name = ''\n @property({ type: String }) maxHeight = '300px'\n @property({ type: Boolean }) multi = false\n @property({ type: String }) description = ''\n @property({ type: String, reflect: true }) size: InputSize = 'md'\n @property({ type: String }) autocomplete = 'off'\n @property({ type: Number }) debounceMs = 200\n @property({ type: Number }) similarityThreshold = 0.3 // Minimum similarity score to show option\n @property({ type: Boolean }) error = false\n @property({ type: String }) validationMessage = ''\n\n // Values property for multi-select mode\n @property({ type: Array })\n get values() {\n return [...this._selectedValues$.value]\n }\n set values(vals: string[]) {\n this._selectedValues$.next(Array.isArray(vals) ? [...vals] : [])\n }\n\n // Value property\n @property({ type: String, reflect: true })\n get value() {\n return this.multi \n ? this._selectedValues$.value.join(',')\n : this._selectedValue$.value\n }\n set value(val: string) {\n if (this.multi) {\n const newValues = val ? val.split(',').map(v => v.trim()).filter(Boolean) : []\n const currentValues = this._selectedValues$.value\n // Only update if values actually changed\n if (JSON.stringify(newValues) !== JSON.stringify(currentValues)) {\n this._selectedValues$.next(newValues)\n }\n } else {\n // Only update if value actually changed\n if (val !== this._selectedValue$.value) {\n this._selectedValue$.next(val)\n }\n }\n }\n\n // State\n @state() private _open = false\n @state() private _inputValue = ''\n @state() private _visibleOptionsCount = 0\n @state() private _hasResults = true\n\n // Track if we're clicking on an option to prevent blur interference\n private _isSelectingOption = false\n\n // DOM references\n @query('#options') _listbox!: HTMLUListElement\n @query('sch-input') _input!: SchmancyInput\n @queryAssignedElements({ flatten: true }) private _options!: SchmancyOption[]\n private _inputElementRef = createRef<HTMLInputElement>()\n\n // RxJS Subjects - only what we actually need\n private _selectedValue$ = new BehaviorSubject<string>('')\n private _selectedValues$ = new BehaviorSubject<string[]>([])\n private _inputValue$ = new BehaviorSubject<string>('')\n\n connectedCallback() {\n super.connectedCallback()\n\n if (!this.id) {\n this.id = `sch-autocomplete-${Math.random().toString(36).slice(2, 9)}`\n }\n\n this._setupAutocompleteLogic()\n this._setupDocumentClickHandler()\n }\n\n private _setupAutocompleteLogic() {\n // Sync selection state\n combineLatest([\n this._selectedValue$,\n this._selectedValues$\n ]).pipe(\n tap(([selectedValue, selectedValues]) => {\n this._updateOptionSelection(selectedValue, selectedValues)\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n\n // Filter options based on input\n this._inputValue$.pipe(\n distinctUntilChanged(),\n debounceTime(this.debounceMs),\n tap(searchTerm => {\n if (this._open) {\n this._filterOptions(searchTerm)\n }\n }),\n takeUntil(this.disconnecting)\n ).subscribe()\n }\n\n private _setupOptionHandlers() {\n this._options.forEach((option, index) => {\n option.setAttribute('role', 'option')\n option.tabIndex = -1\n if (!option.id) {\n option.id = `${this.id}-option-${index}`\n }\n // Prevent blur handler from interfering with option selection\n option.onmousedown = (e: MouseEvent) => {\n e.preventDefault() // Prevent focus loss\n this._isSelectingOption = true\n }\n\n // Handle the actual selection\n option.onclick = (e: MouseEvent) => {\n e.stopPropagation()\n this._selectOption(option)\n // Reset flag after a short delay\n setTimeout(() => {\n this._isSelectingOption = false\n }, 50)\n }\n })\n }\n\n private _updateOptionSelection(selectedValue: string, selectedValues: string[]) {\n this._options.forEach(option => {\n option.selected = this.multi\n ? selectedValues.includes(option.value)\n : option.value === selectedValue\n option.setAttribute('aria-selected', String(option.selected))\n })\n }\n\n private _filterOptions(searchTerm: string) {\n const term = searchTerm.trim()\n\n if (!term) {\n // Show all options if no search term\n this._options.forEach(option => {\n option.hidden = false\n option.style.order = '0'\n })\n this._visibleOptionsCount = this._options.length\n this._hasResults = true\n } else {\n // Calculate similarity scores for all options\n const scoredOptions: FilteredOption[] = this._options.map(option => {\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n\n const labelScore = similarity(term, optionLabel)\n const valueScore = similarity(term, optionValue)\n const score = Math.max(labelScore * 1.1, valueScore)\n\n return { option, score }\n })\n\n // Sort by score (highest first)\n scoredOptions.sort((a, b) => b.score - a.score)\n\n // Apply visibility and ordering\n let visibleCount = 0\n scoredOptions.forEach((item, index) => {\n const { option, score } = item\n\n if (score < this.similarityThreshold) {\n option.hidden = true\n } else {\n option.hidden = false\n visibleCount++\n option.style.order = String(index)\n }\n })\n\n this._visibleOptionsCount = visibleCount\n this._hasResults = visibleCount > 0\n }\n\n this._announceToScreenReader(\n this._visibleOptionsCount > 0\n ? `${this._visibleOptionsCount} option${this._visibleOptionsCount === 1 ? '' : 's'} available.`\n : 'No results found.'\n )\n }\n\n private _selectOption(option: SchmancyOption) {\n if (this.multi) {\n const currentValues = this._selectedValues$.value\n const index = currentValues.indexOf(option.value)\n const newValues = index > -1\n ? currentValues.filter(v => v !== option.value)\n : [...currentValues, option.value]\n\n this._selectedValues$.next(newValues)\n this._announceToScreenReader(\n newValues.length > 0\n ? `Selected: ${this._getSelectedLabels().join(', ')}`\n : 'No options selected'\n )\n this._fireChangeEvent()\n } else {\n // Fix the bug: Update value BEFORE firing event\n this._selectedValue$.next(option.value)\n\n // Now fire event with the NEW value\n this._fireChangeEvent()\n\n // Update UI\n this._open = false\n this._inputValue = option.label || option.textContent || ''\n this._inputValue$.next(this._inputValue)\n\n // Blur the input\n setTimeout(() => this._inputElementRef.value?.blur(), 100)\n\n this._announceToScreenReader(`Selected: ${option.label || option.textContent}`)\n }\n }\n\n private _setupDocumentClickHandler() {\n // Simple document click handler\n const handleDocumentClick = (e: MouseEvent) => {\n if (!this._open) return\n\n const path = e.composedPath()\n if (!path.includes(this) && !this._options.some(opt => path.includes(opt))) {\n this._open = false\n this._updateInputDisplay()\n }\n }\n\n document.addEventListener('click', handleDocumentClick)\n\n // Cleanup on disconnect\n this.disconnecting.pipe(take(1)).subscribe(() => {\n document.removeEventListener('click', handleDocumentClick)\n })\n }\n\n\n private _updateInputDisplay() {\n // For multi-select, we don't update input display since chips show the selections\n if (this.multi || this._open) return\n\n const selectedValue = this._selectedValue$.value\n const option = this._options.find(opt => opt.value === selectedValue)\n this._inputValue = option ? option.label || option.textContent || '' : ''\n this._inputValue$.next(this._inputValue)\n\n if (this._inputElementRef.value) {\n this._inputElementRef.value.value = this._inputValue\n }\n }\n\n private _getSelectedLabels(): string[] {\n return this._options\n .filter(option => \n this.multi \n ? this._selectedValues$.value.includes(option.value)\n : option.value === this._selectedValue$.value\n )\n .map(option => option.label || option.textContent || '')\n }\n\n private _announceToScreenReader(message: string) {\n const liveRegion = this.shadowRoot?.querySelector('#live-status')\n if (liveRegion) {\n liveRegion.textContent = message\n }\n }\n\n private _fireChangeEvent() {\n const detail: SchmancyAutocompleteChangeEvent['detail'] = {\n value: this.value,\n }\n\n if (this.multi) {\n detail.values = [...this._selectedValues$.value]\n }\n\n this.dispatchEvent(\n new CustomEvent<SchmancyAutocompleteChangeEvent['detail']>('change', {\n detail,\n bubbles: true,\n composed: true,\n })\n )\n }\n\n public checkValidity(): boolean {\n if (!this.required) return true\n return this.multi \n ? this._selectedValues$.value.length > 0 \n : Boolean(this._selectedValue$.value)\n }\n\n public reportValidity(): boolean {\n if (this._inputElementRef.value) {\n return this._inputElementRef.value.reportValidity()\n }\n return this.checkValidity()\n }\n\n firstUpdated() {\n this._setupOptionHandlers()\n\n // Update options when slot changes\n const slot = this.shadowRoot?.querySelector('slot')\n slot?.addEventListener('slotchange', () => {\n this._setupOptionHandlers()\n this._updateOptionSelection(this._selectedValue$.value, this._selectedValues$.value)\n })\n }\n\n private handleChipRemove(value: string) {\n const currentValues = this._selectedValues$.value\n const newValues = currentValues.filter(v => v !== value)\n this._selectedValues$.next(newValues)\n this._fireChangeEvent()\n this._announceToScreenReader(`Removed: ${this._getChipLabel(value)}`)\n }\n\n private _getChipLabel(value: string): string {\n const option = this._options.find(opt => opt.value === value)\n return option ? option.label || option.textContent || value : value\n }\n\n private _focusTextInput() {\n if (this._inputElementRef.value) {\n this._inputElementRef.value.focus()\n }\n }\n\n render() {\n const descriptionId = `${this.id}-desc`\n\n // Get size-based styling to match Schmancy input\n const getSizeStyles = () => {\n switch (this.size) {\n case 'sm':\n return {\n height: 'min-h-[40px]',\n padding: 'px-2',\n fontSize: 'text-sm', // 14px\n labelSize: 'text-sm'\n }\n case 'lg':\n return {\n height: 'min-h-[60px]',\n padding: 'px-5',\n fontSize: 'text-lg', // 18px\n labelSize: 'text-lg'\n }\n case 'md':\n default:\n return {\n height: 'min-h-[50px]',\n padding: 'px-4',\n fontSize: 'text-base', // 16px\n labelSize: 'text-base'\n }\n }\n }\n\n const { height, padding, fontSize, labelSize } = getSizeStyles()\n\n return html`\n <div class=\"relative\">\n <!-- Screen reader live region -->\n <div id=\"live-status\" role=\"status\" aria-live=\"polite\" class=\"sr-only\"></div>\n\n <!-- Description -->\n ${this.description ? html`<div id=\"${descriptionId}\" class=\"sr-only\">${this.description}</div>` : ''}\n\n <!-- Custom input wrapper for Gmail-style chip input -->\n <slot name=\"trigger\">\n ${when(this.multi,\n () => html`\n <!-- Custom multi-select input with inline chips -->\n <div class=\"relative\">\n ${when(this.label, () => html`\n <label class=\"${classMap({\n 'block mb-1 font-medium': true,\n 'text-primary-default': !this.error,\n 'text-error-default': this.error,\n [labelSize]: true\n })}\">\n ${this.label}${this.required ? html`<span class=\"text-error-default ml-1\">*</span>` : ''}\n </label>\n `)}\n <div\n class=\"${classMap({\n 'flex flex-wrap items-center gap-1': true,\n [height]: true,\n [padding]: true,\n 'block w-full min-w-0 rounded-[8px] border-0': true,\n 'bg-surface-highest text-surface-on': true,\n 'ring-0 ring-inset focus-within:ring-1 focus-within:ring-inset': true,\n 'ring-secondary-default focus-within:ring-secondary-default': !this.error,\n 'ring-error-default focus-within:ring-error-default': this.error,\n 'cursor-text transition-colors duration-200': true\n })}\"\n @click=${() => this._focusTextInput()}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n >\n <!-- Render chips inline -->\n ${repeat(\n this._selectedValues$.value,\n value => value,\n value => html`\n <schmancy-input-chip\n .value=${value}\n @remove=${(e: CustomEvent) => this.handleChipRemove(e.detail.value)}\n class=\"flex-shrink-0 my-0.5\"\n >\n ${this._getChipLabel(value)}\n </schmancy-input-chip>\n `\n )}\n\n <!-- Text input for typing -->\n <input\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n type=\"text\"\n class=\"flex-1 min-w-[120px] py-1 bg-transparent border-none outline-none ${fontSize} font-medium text-surface-on placeholder:text-muted\"\n name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .placeholder=${this._selectedValues$.value.length > 0 ? 'Add more...' : this.placeholder}\n .value=${this._inputValue}\n .autocomplete=${this.autocomplete}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n // Clear input on focus for new searches\n this._inputValue = ''\n this._inputValue$.next('')\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n />\n </div>\n\n <!-- Validation message -->\n ${when(this.error && this.validationMessage, () => html`\n <div class=\"mt-1 text-sm text-error-default\">\n ${this.validationMessage}\n </div>\n `)}\n </div>\n `,\n () => html`\n <!-- Regular single-select input -->\n <schmancy-input\n .size=${this.size}\n ${ref(this._inputElementRef)}\n id=\"autocomplete-input\"\n class=\"w-full\"\n .name=${this.name || this.label?.toLowerCase().replace(/\\s+/g, '-') || ''}\n .label=${this.label}\n .placeholder=${this.placeholder}\n .required=${this.required}\n .value=${this._inputValue}\n type=\"text\"\n autocomplete=${this.autocomplete}\n clickable\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-haspopup=\"listbox\"\n aria-controls=\"options\"\n aria-expanded=${this._open}\n aria-describedby=${this.description ? descriptionId : undefined}\n @input=${(e: Event) => {\n const value = (e.target as HTMLInputElement).value\n this._inputValue = value\n this._inputValue$.next(value)\n }}\n @focus=${(e: FocusEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @click=${(e: MouseEvent) => {\n e.stopPropagation()\n this._open = true\n }}\n @keydown=${(e: KeyboardEvent) => {\n this._handleKeyDown(e)\n }}\n @blur=${() => {\n this._handleAutoSelectOnBlur()\n }}\n >\n </schmancy-input>\n `\n )}\n </slot>\n\n <!-- Options dropdown -->\n <ul\n id=\"options\"\n class=${classMap({\n 'absolute': true,\n 'z-[1000]': true,\n 'mt-1': true,\n 'w-full': true,\n 'rounded-md': true,\n 'shadow-md': true,\n 'overflow-auto': true,\n 'min-w-full': true,\n 'bg-surface-low': true,\n 'flex': true,\n 'flex-col': true, // Enable flexbox for ordering\n })}\n role=\"listbox\"\n aria-multiselectable=${this.multi ? 'true' : 'false'}\n aria-label=${`${this.label || 'Options'} dropdown`}\n ?hidden=${!this._open}\n style=\"max-height: ${this.maxHeight}; display: ${this._open ? 'flex' : 'none'};\"\n @slotchange=${() => {\n this._setupOptionHandlers()\n }}\n >\n <slot></slot>\n ${!this._hasResults ? html`\n <li class=\"px-3 py-2 text-sm text-muted\">No results found</li>\n ` : ''}\n </ul>\n </div>\n `\n }\n\n private _handleAutoSelectOnBlur() {\n // Don't run if we're clicking on an option (prevents interference with click handler)\n if (this._isSelectingOption) {\n return\n }\n\n // Only auto-select in single-select mode and when dropdown is open with a search term\n if (this.multi || !this._open || !this._inputValue.trim()) {\n return\n }\n \n const searchTerm = this._inputValue.trim()\n \n // Find the best matching option using the same similarity logic as filtering\n let bestMatch: SchmancyOption | null = null\n let bestScore = 0\n \n this._options.forEach(option => {\n // Skip hidden options\n if (option.hidden) return\n \n // Get text to search in (prioritize label, then textContent, then value)\n const optionLabel = option.label || option.textContent || ''\n const optionValue = option.value\n \n // Calculate similarity scores for both label and value\n const labelScore = similarity(searchTerm, optionLabel)\n const valueScore = similarity(searchTerm, optionValue)\n \n // Use the higher score (prioritizing label matches)\n const score = Math.max(labelScore * 1.1, valueScore) // Slight boost for label matches\n \n // Keep track of best match that meets threshold\n if (score > bestScore && score >= this.similarityThreshold) {\n bestScore = score\n bestMatch = option\n }\n })\n \n // Auto-select the best match if found\n if (bestMatch) {\n // Select the option directly\n this._selectOption(bestMatch)\n\n // Close the dropdown\n this._open = false\n }\n }\n\n private _handleKeyDown(event: KeyboardEvent) {\n const isOpen = this._open\n const selectedValues = this._selectedValues$.value\n\n // Handle backspace to remove last chip in multi-select when input is empty\n if (this.multi && event.key === 'Backspace' && !this._inputValue && selectedValues.length > 0 && !isOpen) {\n event.preventDefault()\n const lastValue = selectedValues[selectedValues.length - 1]\n this.handleChipRemove(lastValue)\n return\n }\n\n if (!isOpen && (event.key === 'ArrowDown' || event.key === 'Enter')) {\n event.preventDefault()\n this._open = true\n\n setTimeout(() => {\n const firstVisible = this._options.find(opt => !opt.hidden)\n firstVisible?.focus()\n }, 10)\n return\n }\n\n if (!isOpen) return\n\n const visibleOptions = this._options.filter(opt => !opt.hidden)\n .sort((a, b) => parseInt(a.style.order || '0') - parseInt(b.style.order || '0'))\n\n const focusedOption = visibleOptions.find(opt => opt === document.activeElement)\n const currentIndex = focusedOption ? visibleOptions.indexOf(focusedOption) : -1\n\n switch (event.key) {\n case 'Escape':\n event.preventDefault()\n this._open = false\n this._updateInputDisplay()\n this._inputElementRef.value?.focus()\n break\n\n case 'Tab':\n this._open = false\n this._updateInputDisplay()\n break\n\n case 'ArrowDown':\n event.preventDefault()\n const nextIndex = currentIndex < visibleOptions.length - 1 ? currentIndex + 1 : 0\n visibleOptions[nextIndex]?.focus()\n break\n\n case 'ArrowUp':\n event.preventDefault()\n const prevIndex = currentIndex > 0 ? currentIndex - 1 : visibleOptions.length - 1\n visibleOptions[prevIndex]?.focus()\n break\n\n case 'Home':\n event.preventDefault()\n visibleOptions[0]?.focus()\n break\n\n case 'End':\n event.preventDefault()\n visibleOptions[visibleOptions.length - 1]?.focus()\n break\n\n case 'Enter':\n case ' ':\n if (focusedOption) {\n event.preventDefault()\n this._selectOption(focusedOption)\n }\n break\n }\n }\n}\n\n\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'schmancy-autocomplete': SchmancyAutocomplete\n }\n}"],"names":["SchmancyAutocomplete","$LitElement","super","arguments","this","required","placeholder","label","name","maxHeight","multi","description","size","autocomplete","debounceMs","similarityThreshold","error","validationMessage","_open","_inputValue","_visibleOptionsCount","_hasResults","_isSelectingOption","_inputElementRef","createRef","_selectedValue$","BehaviorSubject","_selectedValues$","_inputValue$","values","value","vals","next","Array","isArray","join","val","newValues","split","map","v","trim","filter","Boolean","currentValues","JSON","stringify","connectedCallback","id","Math","random","toString","slice","_setupAutocompleteLogic","_setupDocumentClickHandler","combineLatest","pipe","tap","selectedValue","selectedValues","_updateOptionSelection","takeUntil","disconnecting","subscribe","distinctUntilChanged","debounceTime","searchTerm","_filterOptions","_setupOptionHandlers","_options","forEach","option","index","setAttribute","tabIndex","onmousedown","e","preventDefault","onclick","stopPropagation","_selectOption","setTimeout","selected","includes","String","term","scoredOptions","optionLabel","textContent","optionValue","labelScore","similarity","valueScore","score","max","sort","a","b","visibleCount","item","hidden","style","order","length","_announceToScreenReader","indexOf","_getSelectedLabels","_fireChangeEvent","blur","handleDocumentClick","path","composedPath","some","opt","_updateInputDisplay","document","addEventListener","take","removeEventListener","find","message","liveRegion","shadowRoot","querySelector","detail","dispatchEvent","CustomEvent","bubbles","composed","checkValidity","reportValidity","firstUpdated","_getChipLabel","_focusTextInput","focus","descriptionId","height","padding","fontSize","labelSize","getSizeStyles","html","when","classMap","repeat","handleChipRemove","ref","toLowerCase","replace","target","_handleKeyDown","_handleAutoSelectOnBlur","absolute","flex","bestMatch","bestScore","event","isOpen","key","lastValue","firstVisible","visibleOptions","parseInt","focusedOption","activeElement","currentIndex","nextIndex","prevIndex","__decorateClass","property","type","prototype","reflect","Number","state","query","queryAssignedElements","flatten","customElement"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,IAAqBA,IAArB,cAAkDC;EAAlD;AAAAC,UAAAA,GAAAC,SAAAA,GAEiCC,KAAAC,WAAAA,IACDD,KAAAE,cAAc,IACCF,KAAAG,QAAQ,IACvBH,KAAA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