@topjoao/top-design-system 0.1.7 → 0.1.8-beta.0

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/README.md CHANGED
@@ -884,9 +884,11 @@ completo quando `showTooltip` está ativo.
884
884
  | `option-group` | Props nativas, incluindo `option` | Cabeçalho de um grupo. |
885
885
  | `footer` | Props nativas do AutoComplete | Rodapé do painel. |
886
886
 
887
- `search` recebe `{ originalEvent, query }` a cada consulta; atualize `options`
888
- com os resultados. `loadMore` repassa o evento do virtual scroller para busca
889
- paginar. Pela ref, `hideDropdown()` fecha o painel.
887
+ `search` recebe `{ originalEvent, query }` nas consultas digitadas e quando o
888
+ botão abre o dropdown sem opções carregadas; se já houver opções, a abertura
889
+ pelo botão reutiliza essa lista. Atualize `options` com os resultados.
890
+ `loadMore` repassa o evento do virtual scroller para busca paginar. Pela ref,
891
+ `hideDropdown()` fecha o painel.
890
892
 
891
893
  ## TopTabs
892
894
 
@@ -2513,29 +2513,35 @@ var Te = /* @__PURE__ */ Se(xe, [["render", we], ["__file", "/Users/mahmudulhasa
2513
2513
  typeof window > "u" || window.dispatchEvent(new CustomEvent("top-select:close-others", { detail: { instanceId: L } }));
2514
2514
  }
2515
2515
  function J(e) {
2516
+ k.value = e.query ?? "", ie(), !(e.originalEvent.type === "click" && e.originalEvent.currentTarget?.classList.contains("p-autocomplete-dropdown") && f.options.length > 0) && _("search", {
2517
+ ...e,
2518
+ query: k.value
2519
+ });
2520
+ }
2521
+ function Y(e) {
2516
2522
  e.detail?.instanceId !== L && q();
2517
2523
  }
2518
- function Y() {
2524
+ function ae() {
2519
2525
  if (f.disabled || R) {
2520
2526
  q();
2521
2527
  return;
2522
2528
  }
2523
2529
  N.value = !0, ie();
2524
2530
  }
2525
- function ae() {
2531
+ function oe() {
2526
2532
  f.closeOnSelect && (N.value = !1, q(), m(q), R && clearTimeout(R), R = setTimeout(() => {
2527
2533
  q(), R = null;
2528
2534
  }, 200));
2529
2535
  }
2530
- return r({ hideDropdown: q }), y(() => window.addEventListener("top-select:close-others", J)), v(() => {
2531
- window.removeEventListener("top-select:close-others", J), R && clearTimeout(R);
2536
+ return r({ hideDropdown: q }), y(() => window.addEventListener("top-select:close-others", Y)), v(() => {
2537
+ window.removeEventListener("top-select:close-others", Y), R && clearTimeout(R);
2532
2538
  }), A(() => f.disabled, (e) => {
2533
2539
  e && (N.value = !1, q());
2534
2540
  }), A(() => f.options, () => {
2535
2541
  N.value || q();
2536
2542
  }), (n, r) => (b(), a("div", {
2537
2543
  class: h(["top-select top-solutions-component relative w-full", { "pointer-events-none": t.disabled }]),
2538
- onFocusin: Y
2544
+ onFocusin: ae
2539
2545
  }, [o("span", Yn, [w(n.$slots, "icon", { loading: t.loading }, () => [t.loading ? (b(), a("i", Xn)) : (b(), a("i", Zn))])]), l(O(E), p({
2540
2546
  ref_key: "autocompleteRef",
2541
2547
  ref: P
@@ -2593,17 +2599,14 @@ var Te = /* @__PURE__ */ Se(xe, [["render", we], ["__file", "/Users/mahmudulhasa
2593
2599
  k.value = "", _("clear");
2594
2600
  },
2595
2601
  onItemSelect: r[2] ||= (e) => {
2596
- k.value = "", _("select", e), ae();
2602
+ k.value = "", _("select", e), oe();
2597
2603
  },
2598
2604
  onComplete: r[3] ||= (e) => {
2599
2605
  if (t.disabled) {
2600
2606
  q();
2601
2607
  return;
2602
2608
  }
2603
- k.value = e.query ?? "", ie(), _("search", {
2604
- ...e,
2605
- query: k.value
2606
- });
2609
+ J(e);
2607
2610
  },
2608
2611
  onChange: r[4] ||= (e) => _("change", e)
2609
2612
  }), s({
@@ -3079,4 +3082,4 @@ var hr = Symbol("top-accordion-context"), gr = /* @__PURE__ */ u({
3079
3082
  //#endregion
3080
3083
  export { gr as a, Jn as c, Ve as d, ve as f, se as h, yr as i, Ye as l, ce as m, Pr as n, pr as o, pe as p, Dr as r, fr as s, zr as t, Q as u };
3081
3084
 
3082
- //# sourceMappingURL=TopToast-Cqe-vLPE.js.map
3085
+ //# sourceMappingURL=TopToast-CEYrqaEE.js.map