@comercti/react-components-hmg 0.8.9 → 0.8.11

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.
@@ -5314,20 +5314,14 @@ const gr = /* @__PURE__ */ H({
5314
5314
  text: {},
5315
5315
  disabledSubmit: { type: Boolean, default: !1 },
5316
5316
  disabledClear: { type: Boolean, default: !1 },
5317
- isOpen: { type: Boolean, default: !1 }
5317
+ showClearButton: { type: Boolean, default: !1 }
5318
5318
  },
5319
5319
  emits: ["submit", "clear"],
5320
5320
  setup(e, { emit: t }) {
5321
5321
  const o = M(!1), a = M(null), d = M(!1), u = t, l = e;
5322
- ae(), W(
5323
- () => l.isOpen,
5324
- (k) => {
5325
- o.value = k;
5326
- },
5327
- { immediate: !0 }
5328
- );
5322
+ ae();
5329
5323
  function p() {
5330
- d.value = !0, u("submit");
5324
+ o.value = !1, u("submit");
5331
5325
  }
5332
5326
  function v() {
5333
5327
  d.value = !1, u("clear");
@@ -5338,7 +5332,13 @@ const gr = /* @__PURE__ */ H({
5338
5332
  function c(k) {
5339
5333
  a.value && !a.value.contains(k.target) && (o.value = !1);
5340
5334
  }
5341
- return re(() => {
5335
+ return W(
5336
+ () => l.showClearButton,
5337
+ (k) => {
5338
+ d.value = k;
5339
+ },
5340
+ { immediate: !0 }
5341
+ ), re(() => {
5342
5342
  document.addEventListener("mousedown", c);
5343
5343
  }), je(() => {
5344
5344
  document.removeEventListener("mousedown", c);