@sysvale/cuida 3.67.3 → 3.67.5

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.
@@ -31112,15 +31112,14 @@ const Zp = {
31112
31112
  slotString() {
31113
31113
  return this.hasSlots ? this.$slots.default()[0].children : "";
31114
31114
  },
31115
- sanitizedSlotString() {
31116
- return this.slotString.toLowerCase();
31115
+ normalizedSlotString() {
31116
+ return this.normalize(this.slotString);
31117
31117
  },
31118
- sanitizedHighlightedText() {
31119
- var t;
31120
- return (t = this.highlightedText) == null ? void 0 : t.toLowerCase();
31118
+ normalizedHighlightText() {
31119
+ return this.normalize(this.highlightedText);
31121
31120
  },
31122
31121
  isAValidSubstring() {
31123
- return this.caseSensitive ? this.slotString.includes(this.highlightedText) : this.sanitizedSlotString.includes(this.sanitizedHighlightedText);
31122
+ return this.normalizedSlotString.includes(this.normalizedHighlightText);
31124
31123
  },
31125
31124
  paddingResolver() {
31126
31125
  return this.highlightedText ? "4px 1px" : "4px";
@@ -31154,18 +31153,75 @@ const Zp = {
31154
31153
  this.splitContent();
31155
31154
  },
31156
31155
  methods: {
31156
+ normalize(t) {
31157
+ const e = {
31158
+ a: "[a\xE1\xE0\xE2\xE3]",
31159
+ \u00E1: "[a\xE1\xE0\xE2\xE3]",
31160
+ \u00E0: "[a\xE1\xE0\xE2\xE3]",
31161
+ \u00E2: "[a\xE1\xE0\xE2\xE3]",
31162
+ \u00E3: "[a\xE1\xE0\xE2\xE3]",
31163
+ e: "[e\xE9\xEA]",
31164
+ \u00E9: "[e\xE9\xEA]",
31165
+ \u00EA: "[e\xE9\xEA]",
31166
+ i: "[i\xED]",
31167
+ \u00ED: "[i\xED]",
31168
+ o: "[o\xF3\xF4\xF5]",
31169
+ \u00F3: "[o\xF3\xF4\xF5]",
31170
+ \u00F4: "[o\xF3\xF4\xF5]",
31171
+ \u00F5: "[o\xF3\xF4\xF5]",
31172
+ u: "[u\xFA\xFC]",
31173
+ \u00FA: "[u\xFA\xFC]",
31174
+ \u00FC: "[u\xFA\xFC]"
31175
+ }, n = {
31176
+ a: "[a\xE1\xE0\xE2\xE3]",
31177
+ \u00E1: "[a\xE1\xE0\xE2\xE3]",
31178
+ \u00E0: "[a\xE1\xE0\xE2\xE3]",
31179
+ \u00E2: "[a\xE1\xE0\xE2\xE3]",
31180
+ \u00E3: "[a\xE1\xE0\xE2\xE3]",
31181
+ e: "[e\xE9\xEA]",
31182
+ \u00E9: "[e\xE9\xEA]",
31183
+ \u00EA: "[e\xE9\xEA]",
31184
+ i: "[i\xED]",
31185
+ \u00ED: "[i\xED]",
31186
+ o: "[o\xF3\xF4\xF5]",
31187
+ \u00F3: "[o\xF3\xF4\xF5]",
31188
+ \u00F4: "[o\xF3\xF4\xF5]",
31189
+ \u00F5: "[o\xF3\xF4\xF5]",
31190
+ u: "[u\xFA\xFC]",
31191
+ \u00FA: "[u\xFA\xFC]",
31192
+ \u00FC: "[u\xFA\xFC]",
31193
+ A: "[A\xC1\xC0\xC2\xC3]",
31194
+ \u00C1: "[A\xC1\xC0\xC2\xC3]",
31195
+ \u00C0: "[A\xC1\xC0\xC2\xC3]",
31196
+ \u00C2: "[A\xC1\xC0\xC2\xC3]",
31197
+ \u00C3: "[A\xC1\xC0\xC2\xC3]",
31198
+ E: "[E\xC9\xCA]",
31199
+ \u00C9: "[E\xC9\xCA]",
31200
+ \u00CA: "[E\xC9\xCA]",
31201
+ I: "[I\xCD]",
31202
+ \u00CD: "[I\xCD]",
31203
+ O: "[O\xD3\xD4\xD5]",
31204
+ \u00D3: "[O\xD3\xD4\xD5]",
31205
+ \u00D4: "[O\xD3\xD4\xD5]",
31206
+ \u00D5: "[O\xD3\xD4\xD5]",
31207
+ U: "[U\xDA\xDC]",
31208
+ \u00DA: "[U\xDA\xDC]",
31209
+ \u00DC: "[U\xDA\xDC]"
31210
+ };
31211
+ return this.caseSensitive ? t == null ? void 0 : t.replace(/[aáàâãeéêiíoóôõuúüAÁÀÂÃEÉÊIÍOÓÔÕUÚÜ]/g, (i) => n[i] || i) : t == null ? void 0 : t.toLowerCase().replace(/[aáàâãeéêiíoóôõuúü]/g, (i) => e[i] || i);
31212
+ },
31157
31213
  splitContent() {
31158
- let t = this.caseSensitive ? "g" : "gi", e = new RegExp(`(${this.highlightedText})`, t), n = this.slotString.split(e);
31214
+ let t = this.caseSensitive ? "g" : "gi", e = new RegExp(`(${this.normalizedHighlightText})`, t), n = this.slotString.split(e);
31159
31215
  this.substrings = n.map((i, s) => ({
31160
31216
  string: i,
31161
- highlighted: this.sanitizedHighlightedText === i.toLowerCase(),
31217
+ highlighted: new RegExp(`^${this.normalizedHighlightText}$`, t).test(this.caseSensitive ? i : i == null ? void 0 : i.toLowerCase()),
31162
31218
  id: s
31163
31219
  }));
31164
31220
  }
31165
31221
  }
31166
31222
  }, d4 = () => {
31167
31223
  Mt((t) => ({
31168
- "6787239b": t.paddingResolver
31224
+ f27ef064: t.paddingResolver
31169
31225
  }));
31170
31226
  }, h4 = Zp.setup;
31171
31227
  Zp.setup = h4 ? (t, e) => (d4(), h4(t, e)) : d4;
@@ -31183,13 +31239,13 @@ function Cae(t, e, n, i, s, r) {
31183
31239
  ], 64))
31184
31240
  ], 64))), 128)) : (y(), C("mark", {
31185
31241
  key: 1,
31186
- class: F(["highlight__container", r.dynamicHighlightClass]),
31242
+ class: F(["highlight__container", { dynamicHighlightClass: r.isAValidSubstring }]),
31187
31243
  style: gn(r.dynamicStyle)
31188
31244
  }, [
31189
31245
  oe(t.$slots, "default", {}, void 0, !0)
31190
31246
  ], 6));
31191
31247
  }
31192
- const q6 = /* @__PURE__ */ he(Sae, [["render", Cae], ["__scopeId", "data-v-45d62b58"]]);
31248
+ const q6 = /* @__PURE__ */ he(Sae, [["render", Cae], ["__scopeId", "data-v-9ca911e6"]]);
31193
31249
  const f4 = [
31194
31250
  "sm",
31195
31251
  "md",
@@ -35944,7 +36000,7 @@ const due = {
35944
36000
  d.value = "", (P = c.value) == null || P.focus(), w();
35945
36001
  }
35946
36002
  function w() {
35947
- if (clearTimeout(a.value), o.value = !0, r.value = [], d.value.length === 0) {
36003
+ if (clearTimeout(a.value), o.value = !0, r.value = [], d.value.trim().length === 0) {
35948
36004
  o.value = !1;
35949
36005
  return;
35950
36006
  }
@@ -35966,7 +36022,7 @@ const due = {
35966
36022
  i("onRemoveRecent", P), (L = c.value) == null || L.focus();
35967
36023
  }
35968
36024
  function z() {
35969
- d.value.length > 0 && i("onEnterPress", d.value);
36025
+ d.value.trim().length > 0 && i("onEnterPress", d.value);
35970
36026
  }
35971
36027
  function M(P) {
35972
36028
  return P.slice(0, 5);
@@ -36136,7 +36192,7 @@ const due = {
36136
36192
  ], 32)
36137
36193
  ])) : U("", !0);
36138
36194
  }
36139
- }, vue = /* @__PURE__ */ he(mue, [["__scopeId", "data-v-5cc39d13"]]);
36195
+ }, vue = /* @__PURE__ */ he(mue, [["__scopeId", "data-v-fee7edc6"]]);
36140
36196
  const ig = {
36141
36197
  props: {
36142
36198
  modelValue: {