golden-logic-ui 1.3.10 → 1.3.12

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.
@@ -1,27 +1,30 @@
1
- import { ref as c, shallowRef as Y, onMounted as ve, onBeforeUnmount as me, watch as M, createElementBlock as f, openBlock as v, Fragment as Z, createCommentVNode as h, normalizeClass as B, createElementVNode as s, toDisplayString as b, withDirectives as F, withModifiers as ee, vShow as te, vModelText as ge, renderList as pe, nextTick as he } from "vue";
1
+ import { ref as v, shallowRef as Y, onMounted as ve, onBeforeUnmount as me, watch as I, createElementBlock as c, openBlock as f, Fragment as Z, createCommentVNode as h, normalizeClass as O, createElementVNode as s, toDisplayString as w, withDirectives as F, withModifiers as ee, vShow as te, vModelText as ge, renderList as he, nextTick as pe } from "vue";
2
2
  const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3 mb-4" }, we = {
3
3
  key: 0,
4
4
  class: "bg-blue-100 text-blue-800 text-sm font-medium mb-2 mt-2 me-2 px-2.5 py-0.5 rounded-sm dark:bg-blue-900 dark:text-blue-300"
5
5
  }, be = ["name", "id", "value"], ke = {
6
6
  key: 0,
7
7
  class: "dropdown"
8
- }, Se = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, _e = { class: "relative showOptions" }, Ce = ["value", "placeholder"], De = { class: "text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1" }, Oe = {
8
+ }, Se = { class: "relative focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:focus:ring-blue-500 dark:focus:border-blue-500" }, _e = { class: "relative showOptions" }, Ce = ["value", "placeholder", "disabled"], De = {
9
9
  key: 0,
10
10
  class: "border-b border-gray-200 dark:border-gray-700"
11
- }, Ee = { class: "relative" }, Be = ["id", "placeholder"], $e = { class: "flex items-center py-2 pr-4" }, Le = ["onClick", "onMousedown", "id"], Me = { class: "flex justify-between items-center py-2" }, Ie = ["innerHTML"], je = {
11
+ }, Oe = { class: "relative" }, Ee = ["id", "placeholder"], Be = { class: "flex items-center py-2 pr-4" }, $e = ["onClick", "onMousedown", "id"], Le = { class: "flex justify-between items-center py-2" }, Me = { class: "min-w-0" }, Ie = ["innerHTML"], je = {
12
+ key: 0,
13
+ class: "ms-2 text-gray-500 dark:text-gray-400"
14
+ }, Te = {
12
15
  key: 0,
13
16
  class: "flex items-center shrink-0 w-4 h-4 text-green-500 ltr:right-2 rtl:left-2 dark:text-green-400",
14
17
  "aria-hidden": "true",
15
18
  xmlns: "http://www.w3.org/2000/svg",
16
19
  fill: "none",
17
20
  viewBox: "0 0 16 12"
18
- }, Te = {
21
+ }, Ue = {
19
22
  key: 2,
20
23
  class: "p-2 text-center text-gray-500"
21
- }, Ue = {
24
+ }, Ae = {
22
25
  key: 3,
23
26
  class: "p-2 text-gray-500"
24
- }, Ae = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, qe = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Ne = {
27
+ }, qe = { class: "block mt-1 text-sm font-normal leading-5 text-red-500" }, Ve = { class: "block mt-1 text-sm font-normal leading-5 text-gray-500" }, Pe = {
25
28
  __name: "GlDropdown",
26
29
  props: {
27
30
  modelValue: {
@@ -106,46 +109,60 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
106
109
  custom_option_label: {
107
110
  type: String,
108
111
  default: "Use:"
112
+ },
113
+ /** Extra classes on the field itself, e.g. to square a corner when it sits against another field. */
114
+ input_class: {
115
+ type: String,
116
+ default: ""
117
+ },
118
+ /** Extra classes on the open list, e.g. a minimum width wider than a narrow field. */
119
+ options_class: {
120
+ type: String,
121
+ default: ""
122
+ },
123
+ disabled: {
124
+ type: Boolean,
125
+ default: !1
109
126
  }
110
127
  },
111
128
  emits: ["update:modelValue", "selected", "selectionChanged"],
112
- setup(r, { emit: le }) {
113
- const o = r, k = le, a = c({}), T = c(!1), y = c(0), x = c(!1), m = c(""), g = c(""), $ = c(!1), S = c(1), _ = c(null), L = c(1), i = Y([]), O = c(!1), I = Y([]), U = c([]), ne = c(null), H = c(null);
114
- let E = !1, p = null, A = 0, C = null;
129
+ setup(o, { emit: le }) {
130
+ const r = o, k = le, a = v({}), T = v(!1), y = v(0), x = v(!1), m = v(""), g = v(""), $ = v(!1), S = v(1), _ = v(null), L = v(1), i = Y([]), E = v(!1), j = Y([]), U = v([]), ne = v(null), H = v(null);
131
+ let B = !1, p = null, A = 0, C = null;
115
132
  const z = (e) => e?.name === "CanceledError" || e?.name === "AbortError" || typeof axios < "u" && axios.isCancel?.(e), q = async (e = "down") => {
116
- if ($.value || !o.api_url) return;
133
+ if ($.value || !r.api_url) return;
117
134
  p && p.abort(), p = new AbortController();
118
135
  const t = ++A;
119
136
  $.value = !0;
120
137
  try {
121
- const l = e === "up" ? Math.max(S.value - 1, L.value) : S.value, { data: n } = await axios.get(o.api_url, {
138
+ const l = e === "up" ? Math.max(S.value - 1, L.value) : S.value, { data: n } = await axios.get(r.api_url, {
122
139
  params: { search: m.value, page: l, per_page: 20 },
123
140
  signal: p.signal
124
141
  });
125
- if (E || t !== A) return;
142
+ if (B || t !== A) return;
126
143
  if (!n || !n.data) {
127
- i.value = [], O.value = !1;
144
+ i.value = [], E.value = !1;
128
145
  return;
129
146
  }
130
147
  const u = W(n.data);
131
148
  if (e === "down") {
132
149
  const d = i.value.length ? i.value.concat(u) : u, D = a.value;
133
- w(D) && D.id !== void 0 && D.name && !d.some((j) => String(j.id) === String(D.id)) && d.unshift(D), i.value = d, S.value++, _.value = n.last_page, O.value = !0;
150
+ b(D) && D.id !== void 0 && D.name && !d.some((M) => String(M.id) === String(D.id)) && d.unshift(D), i.value = d, S.value++, _.value = n.last_page, E.value = !0;
134
151
  }
135
152
  _.value || (_.value = n.last_page), L.value || (L.value = 1);
136
153
  } catch (l) {
137
154
  if (z(l)) return;
138
155
  console.error("Error fetching data:", l);
139
156
  } finally {
140
- !E && t === A && ($.value = !1, p = null);
157
+ !B && t === A && ($.value = !1, p = null);
141
158
  }
142
159
  }, ae = async (e) => {
143
- if (!o.api_url || e === null || e === void 0 || e === "") return null;
160
+ if (!r.api_url || e === null || e === void 0 || e === "") return null;
144
161
  try {
145
- const { data: t } = await axios.get(o.api_url, {
162
+ const { data: t } = await axios.get(r.api_url, {
146
163
  params: { search: e, per_page: 20 }
147
164
  });
148
- if (E) return null;
165
+ if (B) return null;
149
166
  const l = t?.data;
150
167
  if (!l || !l.length) return null;
151
168
  const n = String(e);
@@ -167,56 +184,56 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
167
184
  return;
168
185
  }
169
186
  const u = await ae(t);
170
- E || (u ? (a.value = u, i.value.some((d) => String(d.id) === String(u.id)) || (i.value = [u, ...i.value])) : o.allow_custom ? a.value = { id: t, name: t } : a.value = { id: t, name: "" });
187
+ B || (u ? (a.value = u, i.value.some((d) => String(d.id) === String(u.id)) || (i.value = [u, ...i.value])) : r.allow_custom ? a.value = { id: t, name: t } : a.value = { id: t, name: "" });
171
188
  }, re = (e) => {
172
189
  const t = e.target;
173
190
  t && t.scrollHeight - t.clientHeight <= t.scrollTop + 10 && S.value <= _.value && q("down");
174
191
  }, K = (e) => {
175
- e.target && (document.activeElement.classList.contains("showOptions" + g.value) ? x.value || V() : e.target.id != o.field_name + "search" + g.value && e.target.id != o.field_name && !e.target.classList.contains("showOptions" + g.value) && (R(), y.value = 0, x.value = !1));
192
+ e.target && (document.activeElement.classList.contains("showOptions" + g.value) ? x.value || V() : e.target.id != r.field_name + "search" + g.value && e.target.id != r.field_name && !e.target.classList.contains("showOptions" + g.value) && (R(), y.value = 0, x.value = !1));
176
193
  }, V = () => {
177
- if (!o.show) {
194
+ if (!(r.show || r.disabled)) {
178
195
  if (x.value) {
179
196
  x.value = !1;
180
197
  return;
181
198
  }
182
- m.value = "", x.value = !0, o.api_url && (!O.value || i.value.length === 0) && (S.value = 1, _.value = null, i.value = [], O.value = !1, q("down")), he(() => {
199
+ m.value = "", x.value = !0, r.api_url && (!E.value || i.value.length === 0) && (S.value = 1, _.value = null, i.value = [], E.value = !1, q("down")), pe(() => {
183
200
  const e = document.getElementById(
184
- `${o.field_name}search${g.value}`
201
+ `${r.field_name}search${g.value}`
185
202
  );
186
203
  e && e.focus();
187
204
  });
188
205
  }
189
206
  }, N = () => {
190
207
  const e = (t) => {
191
- if (o.allow_custom && t) {
208
+ if (r.allow_custom && t) {
192
209
  const l = typeof t == "object" ? t.id : t;
193
210
  return { id: l, name: l };
194
211
  }
195
212
  return {};
196
213
  };
197
- return w(a.value) ? typeof a.value == "object" ? i.value.find(
214
+ return b(a.value) ? typeof a.value == "object" ? i.value.find(
198
215
  (t) => String(t.id) === String(a.value.id)
199
216
  ) || e(a.value) : i.value.find(
200
217
  (t) => String(t.id) === String(a.value)
201
- ) || e(a.value) : o.modelValue ? typeof o.modelValue == "object" ? i.value.find(
202
- (t) => String(t.id) === String(o.modelValue.id)
203
- ) || e(o.modelValue) : i.value.find(
204
- (t) => String(t.id) === String(o.modelValue)
205
- ) || e(o.modelValue) : {};
218
+ ) || e(a.value) : r.modelValue ? typeof r.modelValue == "object" ? i.value.find(
219
+ (t) => String(t.id) === String(r.modelValue.id)
220
+ ) || e(r.modelValue) : i.value.find(
221
+ (t) => String(t.id) === String(r.modelValue)
222
+ ) || e(r.modelValue) : {};
206
223
  };
207
224
  ve(() => {
208
- g.value = ue(), o.show || (document.body.addEventListener("click", G), document.addEventListener("focusin", K));
225
+ g.value = ue(), r.show || (document.body.addEventListener("click", G), document.addEventListener("focusin", K));
209
226
  }), me(() => {
210
- E = !0, p && (p.abort(), p = null), C && (clearTimeout(C), C = null), document.body.removeEventListener("click", G), document.removeEventListener("focusin", K);
227
+ B = !0, p && (p.abort(), p = null), C && (clearTimeout(C), C = null), document.body.removeEventListener("click", G), document.removeEventListener("focusin", K);
211
228
  });
212
229
  function ie() {
213
- const e = I.value, t = o.maxItem, l = m.value;
230
+ const e = j.value, t = r.maxItem, l = m.value;
214
231
  if (!l)
215
232
  return e.length > t ? e.slice(0, t) : e;
216
233
  const n = l.toLowerCase(), u = [];
217
234
  for (let d = 0, D = e.length; d < D && u.length < t; d++) {
218
- const j = e[d];
219
- String(j.name).toLowerCase().includes(n) && u.push(j);
235
+ const M = e[d];
236
+ (String(M.name).toLowerCase().includes(n) || String(M.keywords ?? "").toLowerCase().includes(n)) && u.push(M);
220
237
  }
221
238
  return u;
222
239
  }
@@ -240,11 +257,11 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
240
257
  return e = Math.floor(e / 16), (t === "x" ? l : l & 3 | 8).toString(16);
241
258
  });
242
259
  }
243
- function w(e) {
260
+ function b(e) {
244
261
  return e && typeof e == "object" && Object.keys(e).length > 0;
245
262
  }
246
263
  function G(e) {
247
- e.target.id != o.field_name + "search" + g.value && e.target.id != o.field_name && !e.target.classList.contains("showOptions" + g.value) && (R(), y.value = 0, x.value = !1);
264
+ e.target.id != r.field_name + "search" + g.value && e.target.id != r.field_name && !e.target.classList.contains("showOptions" + g.value) && (R(), y.value = 0, x.value = !1);
248
265
  }
249
266
  function J(e) {
250
267
  const t = `${e}${g.value}`, l = document.getElementById(t), n = H.value;
@@ -269,7 +286,7 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
269
286
  return t;
270
287
  }
271
288
  function ce() {
272
- const e = o.options, t = new Array(e.length);
289
+ const e = r.options, t = new Array(e.length);
273
290
  for (let l = 0; l < e.length; l++) {
274
291
  const n = e[l];
275
292
  t[l] = typeof n == "object" ? n : { id: n, name: n };
@@ -278,104 +295,107 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
278
295
  }
279
296
  function X() {
280
297
  const e = m.value, t = { id: e, name: e }, l = String(e);
281
- U.value.some((n) => String(n.id) === l) || U.value.push(t), i.value.some((n) => String(n.id) === l) || (i.value = [...i.value, t], I.value = [...I.value, t]), P(t);
298
+ U.value.some((n) => String(n.id) === l) || U.value.push(t), i.value.some((n) => String(n.id) === l) || (i.value = [...i.value, t], j.value = [...j.value, t]), P(t);
282
299
  }
283
300
  function P(e) {
284
301
  T.value = !0, a.value = e, x.value = !1, k("update:modelValue", a.value.id), k("selected", a.value), k("selectionChanged", a.value);
285
302
  }
286
303
  function fe() {
287
- o.show || (a.value = {}, m.value = "", k("update:modelValue", ""), k("selected", a.value), k("selectionChanged", a.value), V());
304
+ r.show || (a.value = {}, m.value = "", k("update:modelValue", ""), k("selected", a.value), k("selectionChanged", a.value), V());
288
305
  }
289
306
  function R() {
290
307
  (!a.value || !a.value.id) && (a.value = {}, m.value = "");
291
308
  }
292
- return M(m, () => {
293
- if (!o.api_url) {
309
+ return I(m, () => {
310
+ if (!r.api_url) {
294
311
  i.value = ie(), i.value.length === 0 && (a.value = {});
295
312
  return;
296
313
  }
297
314
  C && clearTimeout(C), C = setTimeout(() => {
298
- C = null, !E && (S.value = 1, _.value = null, L.value = 1, i.value = [], O.value = !1, q("down"));
315
+ C = null, !B && (S.value = 1, _.value = null, L.value = 1, i.value = [], E.value = !1, q("down"));
299
316
  }, 250);
300
- }), M(a, (e) => {
301
- w(e) && e.id !== o.modelValue && k("update:modelValue", e.id);
302
- }), M(
303
- () => o.api_url,
317
+ }), I(a, (e) => {
318
+ b(e) && e.id !== r.modelValue && k("update:modelValue", e.id);
319
+ }), I(
320
+ () => r.api_url,
304
321
  () => {
305
- p && (p.abort(), p = null), S.value = 1, _.value = null, L.value = 1, i.value = [], O.value = !1;
322
+ p && (p.abort(), p = null), S.value = 1, _.value = null, L.value = 1, i.value = [], E.value = !1;
306
323
  },
307
324
  { immediate: !0 }
308
- ), M(
309
- () => o.modelValue,
325
+ ), I(
326
+ () => r.modelValue,
310
327
  async (e) => {
311
328
  if (!e) {
312
329
  a.value = {};
313
330
  return;
314
331
  }
315
332
  const t = typeof e == "object" ? e.id : e;
316
- w(a.value) && String(a.value.id) !== String(t) && (a.value = {}, T.value = !1), o.api_url ? T.value ? a.value = N() : await oe(e) : a.value = N();
333
+ b(a.value) && String(a.value.id) !== String(t) && (a.value = {}, T.value = !1), r.api_url ? T.value ? a.value = N() : await oe(e) : a.value = N();
317
334
  },
318
335
  { immediate: !0 }
319
- ), M(
320
- () => o.options,
336
+ ), I(
337
+ () => r.options,
321
338
  () => {
322
- if (!o.api_url) {
339
+ if (!r.api_url) {
323
340
  const e = ce(), t = new Set(e.map((n) => String(n.id))), l = e;
324
341
  for (const n of U.value) {
325
342
  const u = String(n.id);
326
343
  t.has(u) || (l.push(n), t.add(u));
327
344
  }
328
- I.value = l, i.value = l, a.value = N();
345
+ j.value = l, i.value = l, a.value = N();
329
346
  }
330
347
  },
331
348
  // deep so the list still updates when options load late by mutating the SAME
332
349
  // array in place (e.g. column.options.push(...)) — a reference-only watch
333
350
  // would miss that and leave the dropdown list empty.
334
351
  { immediate: !0, deep: !0 }
335
- ), (e, t) => (v(), f(Z, null, [
336
- r.show ? (v(), f("div", {
352
+ ), (e, t) => (f(), c(Z, null, [
353
+ o.show ? (f(), c("div", {
337
354
  key: 0,
338
- class: B(r.field_name)
355
+ class: O(o.field_name)
339
356
  }, [
340
- s("h3", ye, b(r.label_name), 1),
357
+ s("h3", ye, w(o.label_name), 1),
341
358
  s("p", xe, [
342
- w(a.value) ? (v(), f("span", we, b(a.value?.name), 1)) : h("", !0)
359
+ b(a.value) ? (f(), c("span", we, w(a.value?.name), 1)) : h("", !0)
343
360
  ]),
344
361
  t[6] || (t[6] = s("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
345
362
  ], 2)) : h("", !0),
346
- r.show ? h("", !0) : (v(), f("div", {
363
+ o.show ? h("", !0) : (f(), c("div", {
347
364
  key: 1,
348
- class: B(r.field_name)
365
+ class: O(o.field_name)
349
366
  }, [
350
367
  s("input", {
351
368
  type: "hidden",
352
- name: r.field_name,
353
- id: r.field_name,
369
+ name: o.field_name,
370
+ id: o.field_name,
354
371
  value: a.value?.id
355
372
  }, null, 8, be),
356
- r.options ? (v(), f("div", ke, [
357
- r.label_name ? (v(), f("label", {
373
+ o.options ? (f(), c("div", ke, [
374
+ o.label_name ? (f(), c("label", {
358
375
  key: 0,
359
- class: B({
360
- "gl-label-form": r.error_message == "",
361
- "gl-label-form-invalid": r.error_message !== "",
362
- required: r.is_required
376
+ class: O({
377
+ "gl-label-form": o.error_message == "",
378
+ "gl-label-form-invalid": o.error_message !== "",
379
+ required: o.is_required
363
380
  })
364
- }, b(r.label_name), 3)) : h("", !0),
381
+ }, w(o.label_name), 3)) : h("", !0),
365
382
  s("div", Se, [
366
383
  s("div", _e, [
367
384
  s("input", {
368
385
  ref_key: "myDivDropDown",
369
386
  ref: ne,
370
- class: B([{
371
- "gl-input-form": r.error_message == "",
372
- "gl-input-form-invalid": r.error_message !== "",
387
+ class: O([{
388
+ "gl-input-form": o.error_message == "",
389
+ "gl-input-form-invalid": o.error_message !== "",
373
390
  [`showOptions${g.value}`]: !0,
374
- "pr-14!": w(a.value) && r.has_cancel,
375
- "pr-8!": !(w(a.value) && r.has_cancel)
391
+ "pr-14!": b(a.value) && o.has_cancel,
392
+ "pr-8!": !(b(a.value) && o.has_cancel),
393
+ "opacity-70 cursor-not-allowed": o.disabled,
394
+ [o.input_class]: o.input_class !== ""
376
395
  }, "truncate showOptions1"]),
377
396
  value: a.value?.name,
378
- placeholder: r.placeholder,
397
+ placeholder: o.placeholder,
398
+ disabled: o.disabled,
379
399
  autocomplete: "off",
380
400
  readonly: ""
381
401
  }, null, 10, Ce),
@@ -400,15 +420,15 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
400
420
  })
401
421
  ], -1)
402
422
  ]), 512), [
403
- [te, w(a.value) && r.has_cancel]
423
+ [te, b(a.value) && o.has_cancel]
404
424
  ]),
405
425
  s("i", {
406
426
  onClick: t[1] || (t[1] = ee((l) => V(), ["stop"])),
407
427
  class: "absolute text-xl text-gray-500 cursor-pointer ltr:right-2 rtl:left-2 hover:text-gray-700 dark:hover:text-gray-700 showOptions",
408
428
  style: { top: "14px" }
409
429
  }, [
410
- (v(), f("svg", {
411
- class: B([x.value ? "" : "rotate-180", "w-3 h-3 shrink-0"]),
430
+ (f(), c("svg", {
431
+ class: O([x.value ? "" : "rotate-180", "w-3 h-3 shrink-0"]),
412
432
  "aria-hidden": "true",
413
433
  xmlns: "http://www.w3.org/2000/svg",
414
434
  fill: "none",
@@ -423,24 +443,26 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
423
443
  }, null, -1)
424
444
  ]), 2))
425
445
  ]),
426
- F(s("div", De, [
427
- r.hide_search ? h("", !0) : (v(), f("div", Oe, [
446
+ F(s("div", {
447
+ class: O(["text-gray-700 bg-white border dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 absolute w-full z-999999999 rounded-md mt-1 pt-1", o.options_class])
448
+ }, [
449
+ o.hide_search ? h("", !0) : (f(), c("div", De, [
428
450
  t[10] || (t[10] = s("label", {
429
451
  for: "default-search",
430
452
  class: "mb-2 text-sm font-medium text-gray-900 sr-only dark:text-white"
431
453
  }, "Search", -1)),
432
- s("div", Ee, [
454
+ s("div", Oe, [
433
455
  t[9] || (t[9] = s("div", { class: "absolute inset-y-0 flex items-center pointer-events-none start-0 ps-3" }, null, -1)),
434
456
  F(s("input", {
435
457
  type: "search",
436
458
  "onUpdate:modelValue": t[2] || (t[2] = (l) => m.value = l),
437
- id: `${r.field_name}search${g.value}`,
459
+ id: `${o.field_name}search${g.value}`,
438
460
  onKeydown: se,
439
461
  onBlur: t[3] || (t[3] = (l) => R()),
440
462
  autocomplete: "off",
441
463
  class: "block w-full p-2 text-sm text-gray-900 outline-hidden dark:bg-gray-800 dark:text-white",
442
- placeholder: r.search_input_placeholder
443
- }, null, 40, Be), [
464
+ placeholder: o.search_input_placeholder
465
+ }, null, 40, Ee), [
444
466
  [ge, m.value]
445
467
  ])
446
468
  ])
@@ -451,18 +473,18 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
451
473
  ref_key: "dropdownRef",
452
474
  ref: H
453
475
  }, [
454
- r.allow_custom && m.value && !i.value.find((l) => String(l.name) === String(m.value)) ? (v(), f("div", {
476
+ o.allow_custom && m.value && !i.value.find((l) => String(l.name) === String(m.value)) ? (f(), c("div", {
455
477
  key: 0,
456
478
  class: "relative px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",
457
479
  onClick: t[4] || (t[4] = (l) => X()),
458
480
  onMousedown: t[5] || (t[5] = (l) => X())
459
481
  }, [
460
- s("div", $e, [
461
- s("span", null, b(r.custom_option_label) + ' "' + b(m.value) + '"', 1)
482
+ s("div", Be, [
483
+ s("span", null, w(o.custom_option_label) + ' "' + w(m.value) + '"', 1)
462
484
  ])
463
485
  ], 32)) : h("", !0),
464
- i.value.length ? (v(!0), f(Z, { key: 1 }, pe(i.value, (l, n) => (v(), f("div", {
465
- class: B([
486
+ i.value.length ? (f(!0), c(Z, { key: 1 }, he(i.value, (l, n) => (f(), c("div", {
487
+ class: O([
466
488
  "relative px-2 py-0.5 text-xs leading-4 text-gray-700 no-underline cursor-pointer dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-white hover:rounded-sm",
467
489
  n + 1 == y.value ? "bg-gray-100 dark:bg-gray-700 rounded-sm" : ""
468
490
  ]),
@@ -471,11 +493,14 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
471
493
  key: n,
472
494
  id: `${n + 1}${g.value}`
473
495
  }, [
474
- s("div", Me, [
475
- s("span", {
476
- innerHTML: l.name || l.id || "-"
477
- }, null, 8, Ie),
478
- a.value?.id === l.id ? (v(), f("svg", je, t[11] || (t[11] = [
496
+ s("div", Le, [
497
+ s("span", Me, [
498
+ s("span", {
499
+ innerHTML: l.name || l.id || "-"
500
+ }, null, 8, Ie),
501
+ l.hint ? (f(), c("span", je, w(l.hint), 1)) : h("", !0)
502
+ ]),
503
+ a.value?.id === l.id ? (f(), c("svg", Te, t[11] || (t[11] = [
479
504
  s("path", {
480
505
  stroke: "currentColor",
481
506
  "stroke-linecap": "round",
@@ -485,22 +510,22 @@ const ye = { class: "font-bold ptext-lg dark:text-white" }, xe = { class: "mt-3
485
510
  }, null, -1)
486
511
  ]))) : h("", !0)
487
512
  ])
488
- ], 42, Le))), 128)) : h("", !0),
489
- $.value ? (v(), f("div", Te, " Loading... ")) : h("", !0),
490
- !$.value && i.value.length === 0 && !(r.allow_custom && m.value) ? (v(), f("div", Ue, b(r.no_results_found_placeholder), 1)) : h("", !0)
513
+ ], 42, $e))), 128)) : h("", !0),
514
+ $.value ? (f(), c("div", Ue, " Loading... ")) : h("", !0),
515
+ !$.value && i.value.length === 0 && !(o.allow_custom && m.value) ? (f(), c("div", Ae, w(o.no_results_found_placeholder), 1)) : h("", !0)
491
516
  ], 544)
492
- ], 512), [
517
+ ], 2), [
493
518
  [te, x.value]
494
519
  ])
495
520
  ])
496
521
  ])
497
522
  ])) : h("", !0),
498
- s("span", Ae, b(r.error_message), 1),
499
- s("small", qe, b(r.description), 1)
523
+ s("span", qe, w(o.error_message), 1),
524
+ s("small", Ve, w(o.description), 1)
500
525
  ], 2))
501
526
  ], 64));
502
527
  }
503
528
  };
504
529
  export {
505
- Ne as default
530
+ Pe as default
506
531
  };
@@ -1,21 +1,22 @@
1
- import { ref as C, computed as y, watch as T, createElementBlock as o, openBlock as u, normalizeClass as S, createCommentVNode as p, createElementVNode as g, toDisplayString as c, Fragment as B, createTextVNode as L, renderList as V } from "vue";
2
- import { PHONE_PREFERRED as U, PHONE_COUNTRIES as z, PHONE_CODE_DEFAULTS as G } from "./phoneCountries.js";
3
- const j = {
1
+ import { ref as E, computed as d, watch as I, createElementBlock as s, openBlock as u, normalizeClass as S, createCommentVNode as x, createElementVNode as b, toDisplayString as f, Fragment as T, createTextVNode as U, createBlock as z } from "vue";
2
+ import G from "./GlDropdown.vue.js";
3
+ import { PHONE_PREFERRED as L, PHONE_COUNTRIES as j, PHONE_CODE_DEFAULTS as J } from "./phoneCountries.js";
4
+ const K = {
4
5
  key: 0,
5
6
  class: "gl-label-form"
6
- }, J = {
7
+ }, M = {
7
8
  class: "mt-1 text-gray-900 dark:text-white tabular-nums",
8
9
  dir: "ltr"
9
- }, K = ["for"], M = {
10
+ }, Q = ["for"], X = {
10
11
  class: "flex",
11
12
  dir: "ltr"
12
- }, Q = {
13
+ }, Y = {
13
14
  key: 0,
14
15
  class: "h-10 inline-flex shrink-0 items-center rounded-s-lg border border-e-0 border-gray-200 bg-gray-100 px-3 text-sm font-medium text-gray-700 tabular-nums dark:border-gray-700 dark:bg-gray-700 dark:text-gray-200"
15
- }, X = ["value", "disabled", "aria-label", "title"], Y = ["label"], Z = ["value"], ee = ["label"], te = ["value"], le = ["id", "name", "value", "placeholder", "required", "disabled", "aria-invalid"], ae = { class: "gl-span-form-error" }, ne = {
16
+ }, Z = ["id", "name", "value", "placeholder", "required", "disabled", "aria-invalid"], ee = { class: "gl-span-form-error" }, te = {
16
17
  key: 1,
17
18
  class: "block mt-1 text-sm font-normal leading-5 text-gray-500"
18
- }, ue = {
19
+ }, re = {
19
20
  __name: "GlPhoneInput",
20
21
  props: {
21
22
  /** The number without its country code, digits only. */
@@ -29,9 +30,9 @@ const j = {
29
30
  * length is the digits after the code, used to warn on a short or long
30
31
  * number; leave it out where numbers vary. Defaults to every country.
31
32
  */
32
- countries: { type: Array, default: () => z },
33
- /** ISO codes listed first, above the rest. */
34
- preferred: { type: Array, default: () => U },
33
+ countries: { type: Array, default: () => j },
34
+ /** ISO codes listed first; the rest follow alphabetically. */
35
+ preferred: { type: Array, default: () => L },
35
36
  /** Show the code as fixed text instead of a picker. */
36
37
  lock_country: { type: Boolean, default: !1 },
37
38
  field_name: { type: String, default: "" },
@@ -44,144 +45,138 @@ const j = {
44
45
  placeholder: { type: String, default: "" },
45
46
  /** Shown when the length is off. :country and :length are filled in. */
46
47
  length_message: { type: String, default: ":country numbers have :length digits." },
47
- country_label: { type: String, default: "Country" },
48
- preferred_label: { type: String, default: "Common" },
49
- all_label: { type: String, default: "All countries" }
48
+ search_placeholder: { type: String, default: "Search country or code" }
50
49
  },
51
50
  emits: ["update:modelValue", "update:country_code", "update:country", "change", "blur"],
52
- setup(a, { expose: q, emit: $ }) {
53
- const n = a, b = $, v = C(null), O = C(!1), i = (e) => e.code || e.dial, s = y(() => {
51
+ setup(a, { expose: $, emit: C }) {
52
+ const n = a, g = C, h = E(null), B = E(!1), i = (e) => e.code || e.dial, c = d(() => {
54
53
  const e = n.countries;
55
- return !n.country_code || e.some((l) => l.dial === n.country_code) ? e : [...e, { code: "", dial: n.country_code, name: n.country_code }];
56
- }), w = y(
57
- () => n.preferred.map((e) => s.value.find((l) => l.code === e)).filter(Boolean)
58
- ), P = y(
59
- () => s.value.filter((e) => !n.preferred.includes(e.code)).sort((e, l) => e.name.localeCompare(l.name))
54
+ return !n.country_code || e.some((t) => t.dial === n.country_code) ? e : [...e, { code: "", dial: n.country_code, name: n.country_code }];
55
+ }), O = d(
56
+ () => n.preferred.map((e) => c.value.find((t) => t.code === e)).filter(Boolean)
57
+ ), q = d(() => [
58
+ ...O.value,
59
+ ...c.value.filter((e) => !n.preferred.includes(e.code)).sort((e, t) => e.name.localeCompare(t.name))
60
+ ]), D = d(
61
+ () => q.value.map((e) => ({
62
+ id: i(e),
63
+ name: e.code ? `${e.dial} ${e.code}` : e.dial,
64
+ hint: e.code ? e.name : "",
65
+ keywords: `${e.name} ${e.dial} ${e.code}`
66
+ }))
60
67
  );
61
- function E(e, l = "") {
62
- const t = s.value.filter((r) => r.dial === e);
63
- return t.find((r) => l && r.code === l) || w.value.find((r) => r.dial === e) || t.find((r) => r.code === G[e]) || t[0] || null;
68
+ function w(e, t = "") {
69
+ const l = c.value.filter((r) => r.dial === e);
70
+ return l.find((r) => t && r.code === t) || O.value.find((r) => r.dial === e) || l.find((r) => r.code === J[e]) || l[0] || null;
64
71
  }
65
- const h = C(i(E(n.country_code, n.country) || { dial: n.country_code }));
66
- T(
72
+ const v = E(i(w(n.country_code, n.country) || { dial: n.country_code }));
73
+ I(
67
74
  () => [n.country_code, n.country],
68
- ([e, l]) => {
69
- const t = s.value.find((_) => i(_) === h.value);
70
- if (t && t.dial === e && (!l || t.code === l))
75
+ ([e, t]) => {
76
+ const l = c.value.find((k) => i(k) === v.value);
77
+ if (l && l.dial === e && (!t || l.code === t))
71
78
  return;
72
- const r = E(e, l);
73
- h.value = r ? i(r) : e;
79
+ const r = w(e, t);
80
+ v.value = r ? i(r) : e;
74
81
  }
75
82
  );
76
- const d = y(() => s.value.find((e) => i(e) === h.value) || null), f = y(() => String(n.modelValue ?? "")), W = y(() => {
77
- const e = d.value?.length;
78
- return !O.value || !e || f.value === "" || f.value.length === e ? "" : n.length_message.replace(":country", d.value.name).replace(":length", String(e));
79
- }), m = y(() => n.error_message || W.value), A = (e) => String(e ?? "").replace(/\D/g, ""), k = (e) => e.replace(/\D/g, "");
83
+ const o = d(() => c.value.find((e) => i(e) === v.value) || null), m = d(() => String(n.modelValue ?? "")), P = d(() => {
84
+ const e = o.value?.length;
85
+ return !B.value || !e || m.value === "" || m.value.length === e ? "" : n.length_message.replace(":country", o.value.name).replace(":length", String(e));
86
+ }), y = d(() => n.error_message || P.value), W = (e) => String(e ?? "").replace(/\D/g, ""), p = (e) => e.replace(/\D/g, "");
80
87
  function F(e) {
81
- return [...new Set(s.value.map((t) => t.dial).filter(Boolean))].sort((t, r) => k(r).length - k(t).length).find((t) => e.startsWith(k(t)));
88
+ return [...new Set(c.value.map((l) => l.dial).filter(Boolean))].sort((l, r) => p(r).length - p(l).length).find((l) => e.startsWith(p(l)));
82
89
  }
83
90
  function N(e) {
84
- h.value = i(e), e.dial !== n.country_code && b("update:country_code", e.dial), e.code && e.code !== n.country && b("update:country", e.code);
91
+ v.value = i(e), e.dial !== n.country_code && g("update:country_code", e.dial), e.code && e.code !== n.country && g("update:country", e.code);
85
92
  }
86
- function D(e) {
87
- const l = d.value?.dial || n.country_code;
88
- b("change", { country_code: l, country: d.value?.code || "", number: e, full: e ? `${l}${e}` : "" });
93
+ function V(e) {
94
+ const t = o.value?.dial || n.country_code;
95
+ g("change", { country_code: t, country: o.value?.code || "", number: e, full: e ? `${t}${e}` : "" });
89
96
  }
90
97
  function H(e) {
91
- const l = String(e ?? "").trim();
92
- let t = A(l);
93
- if (!n.lock_country && (l.startsWith("+") || l.startsWith("00"))) {
94
- const _ = l.startsWith("00") ? t.slice(2) : t, x = F(_);
95
- x && (N(d.value?.dial === x ? d.value : E(x)), t = _.slice(k(x).length));
98
+ const t = String(e ?? "").trim();
99
+ let l = W(t);
100
+ if (!n.lock_country && (t.startsWith("+") || t.startsWith("00"))) {
101
+ const k = t.startsWith("00") ? l.slice(2) : l, _ = F(k);
102
+ _ && (N(o.value?.dial === _ ? o.value : w(_)), l = k.slice(p(_).length));
96
103
  }
97
- const r = d.value?.length;
98
- r && t.length === r + 1 && t.startsWith("0") && (t = t.slice(1)), b("update:modelValue", t), D(t), v.value && v.value.value !== t && (v.value.value = t);
104
+ const r = o.value?.length;
105
+ r && l.length === r + 1 && l.startsWith("0") && (l = l.slice(1)), g("update:modelValue", l), V(l), h.value && h.value.value !== l && (h.value.value = l);
99
106
  }
100
107
  function R(e) {
101
- const l = s.value.find((t) => i(t) === e.target.value);
102
- l && (N(l), D(f.value));
108
+ const t = e?.id ? c.value.find((l) => i(l) === e.id) : null;
109
+ t && (N(t), V(m.value));
103
110
  }
104
- function I(e) {
105
- O.value = !0, b("blur", e);
111
+ function A(e) {
112
+ B.value = !0, g("blur", e);
106
113
  }
107
- return q({ focus: () => v.value?.focus() }), (e, l) => a.show ? (u(), o("div", {
114
+ return $({ focus: () => h.value?.focus() }), (e, t) => a.show ? (u(), s("div", {
108
115
  key: 0,
109
116
  class: S(a.field_name)
110
117
  }, [
111
- a.label_name ? (u(), o("label", j, c(a.label_name), 1)) : p("", !0),
112
- g("p", J, [
113
- f.value ? (u(), o(B, { key: 0 }, [
114
- L(c(d.value?.dial || a.country_code) + " " + c(f.value), 1)
115
- ], 64)) : p("", !0)
118
+ a.label_name ? (u(), s("label", K, f(a.label_name), 1)) : x("", !0),
119
+ b("p", M, [
120
+ m.value ? (u(), s(T, { key: 0 }, [
121
+ U(f(o.value?.dial || a.country_code) + " " + f(m.value), 1)
122
+ ], 64)) : x("", !0)
116
123
  ]),
117
- l[1] || (l[1] = g("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
118
- ], 2)) : (u(), o("div", {
124
+ t[1] || (t[1] = b("hr", { class: "opacity-100! bg-gray-200 border-0 dark:bg-gray-700" }, null, -1))
125
+ ], 2)) : (u(), s("div", {
119
126
  key: 1,
120
127
  class: S(a.field_name)
121
128
  }, [
122
- a.label_name ? (u(), o("label", {
129
+ a.label_name ? (u(), s("label", {
123
130
  key: 0,
124
131
  for: a.field_name,
125
132
  class: S({
126
- "gl-label-form": !m.value,
127
- "gl-label-form-invalid": m.value,
133
+ "gl-label-form": !y.value,
134
+ "gl-label-form-invalid": y.value,
128
135
  required: a.is_required
129
136
  })
130
- }, c(a.label_name), 11, K)) : p("", !0),
131
- g("div", M, [
132
- a.lock_country ? (u(), o("span", Q, c(a.country_code), 1)) : (u(), o("select", {
137
+ }, f(a.label_name), 11, Q)) : x("", !0),
138
+ b("div", X, [
139
+ a.lock_country ? (u(), s("span", Y, f(o.value?.dial || a.country_code), 1)) : (u(), z(G, {
133
140
  key: 1,
134
- value: h.value,
141
+ class: "w-32 shrink-0",
142
+ field_name: `${a.field_name}_country`,
143
+ options: D.value,
144
+ modelValue: v.value,
145
+ has_cancel: !1,
135
146
  disabled: a.disabled,
136
- "aria-label": a.country_label,
137
- title: d.value?.name || a.country_label,
138
- class: "h-10 w-auto max-w-32 shrink-0 cursor-pointer rounded-s-lg border border-e-0 border-gray-200 bg-gray-100 ps-3 pe-8 text-sm font-medium text-gray-700 tabular-nums outline-hidden focus:border-primary dark:border-gray-700 dark:bg-gray-700 dark:text-gray-200 dark:focus:border-primaryDark disabled:cursor-not-allowed disabled:opacity-70",
139
- onChange: R
140
- }, [
141
- w.value.length ? (u(), o("optgroup", {
142
- key: 0,
143
- label: a.preferred_label
144
- }, [
145
- (u(!0), o(B, null, V(w.value, (t) => (u(), o("option", {
146
- key: "p-" + i(t),
147
- value: i(t)
148
- }, c(t.code ? `${t.code} ${t.dial}` : t.dial), 9, Z))), 128))
149
- ], 8, Y)) : p("", !0),
150
- g("optgroup", { label: a.all_label }, [
151
- (u(!0), o(B, null, V(P.value, (t) => (u(), o("option", {
152
- key: i(t),
153
- value: i(t)
154
- }, c(t.code ? `${t.code} ${t.dial}` : t.dial), 9, te))), 128))
155
- ], 8, ee)
156
- ], 40, X)),
157
- g("input", {
147
+ search_input_placeholder: a.search_placeholder,
148
+ input_class: "rounded-e-none! border-e-0! bg-gray-100! dark:bg-gray-700! font-medium tabular-nums",
149
+ options_class: "min-w-72",
150
+ onSelectionChanged: R
151
+ }, null, 8, ["field_name", "options", "modelValue", "disabled", "search_input_placeholder"])),
152
+ b("input", {
158
153
  ref_key: "input",
159
- ref: v,
154
+ ref: h,
160
155
  type: "tel",
161
156
  inputmode: "numeric",
162
157
  autocomplete: "tel-national",
163
158
  id: a.field_name,
164
159
  name: a.field_name,
165
- value: f.value,
166
- placeholder: a.placeholder || (d.value?.length ? "0".repeat(d.value.length) : ""),
160
+ value: m.value,
161
+ placeholder: a.placeholder || (o.value?.length ? "0".repeat(o.value.length) : ""),
167
162
  maxlength: "24",
168
163
  required: a.is_required,
169
164
  disabled: a.disabled,
170
- "aria-invalid": m.value ? "true" : "false",
165
+ "aria-invalid": y.value ? "true" : "false",
171
166
  class: S(["min-w-0 rounded-s-none! tabular-nums", {
172
- "gl-input-form": !m.value,
173
- "gl-input-form-invalid": m.value,
167
+ "gl-input-form": !y.value,
168
+ "gl-input-form-invalid": y.value,
174
169
  "opacity-70 cursor-not-allowed bg-gray-100 dark:bg-gray-700": a.disabled
175
170
  }]),
176
- onInput: l[0] || (l[0] = (t) => H(t.target.value)),
177
- onBlur: I
178
- }, null, 42, le)
171
+ onInput: t[0] || (t[0] = (l) => H(l.target.value)),
172
+ onBlur: A
173
+ }, null, 42, Z)
179
174
  ]),
180
- g("span", ae, c(m.value), 1),
181
- a.description ? (u(), o("small", ne, c(a.description), 1)) : p("", !0)
175
+ b("span", ee, f(y.value), 1),
176
+ a.description ? (u(), s("small", te, f(a.description), 1)) : x("", !0)
182
177
  ], 2));
183
178
  }
184
179
  };
185
180
  export {
186
- ue as default
181
+ re as default
187
182
  };
@@ -1,8 +1,8 @@
1
- import { ref as b, computed as g, createElementBlock as a, openBlock as s, createElementVNode as e, toDisplayString as l, createCommentVNode as i } from "vue";
2
- const m = { class: "w-full" }, f = { class: "flex justify-between items-center" }, h = { class: "gl-label-form" }, p = { class: "flex items-center" }, x = { class: "shrink-0 z-10 inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg dark:bg-gray-600 dark:text-white dark:border-gray-600" }, y = { class: "relative w-full" }, v = ["value"], k = { key: 0 }, w = {
1
+ import { ref as m, computed as p, createElementBlock as o, openBlock as s, createElementVNode as e, toDisplayString as n, createCommentVNode as d } from "vue";
2
+ const g = { class: "w-full" }, y = { class: "flex justify-between items-center" }, b = { class: "gl-label-form" }, f = { class: "flex items-center" }, h = { class: "shrink-0 z-10 inline-flex items-center p-2 text-sm font-medium text-center text-gray-900 bg-gray-100 border border-gray-300 rounded-s-lg dark:bg-gray-600 dark:text-white dark:border-gray-600" }, k = { class: "relative w-full" }, x = ["value"], v = { key: 0 }, w = {
3
3
  key: 1,
4
4
  class: "inline-flex items-center"
5
- }, _ = { class: "mt-2 text-sm text-gray-500 dark:text-gray-400" }, S = {
5
+ }, _ = { class: "mt-2 text-sm text-gray-500 dark:text-gray-400" }, H = {
6
6
  __name: "GlTextCopy",
7
7
  props: {
8
8
  label_name: {
@@ -22,39 +22,39 @@ const m = { class: "w-full" }, f = { class: "flex justify-between items-center"
22
22
  default: ""
23
23
  }
24
24
  },
25
- setup(r) {
26
- const u = r, o = b(!1), c = (d) => {
27
- navigator.clipboard.writeText(d).then(function() {
28
- o.value = !0, setTimeout(() => {
29
- o.value = !1;
25
+ setup(t) {
26
+ const c = t, a = m(!1), u = (l) => {
27
+ navigator.clipboard.writeText(l).then(function() {
28
+ a.value = !0, setTimeout(() => {
29
+ a.value = !1;
30
30
  }, 2e3);
31
- }).catch(function(t) {
32
- console.error("Error copying to clipboard: ", t);
31
+ }).catch(function(r) {
32
+ console.error("Error copying to clipboard: ", r);
33
33
  });
34
- }, n = g(() => u.code);
35
- return (d, t) => (s(), a("div", m, [
36
- e("div", f, [
37
- e("label", h, l(r.label_name), 1)
34
+ }, i = p(() => c.code);
35
+ return (l, r) => (s(), o("div", g, [
36
+ e("div", y, [
37
+ e("label", b, n(t.label_name), 1)
38
38
  ]),
39
- e("div", p, [
40
- e("span", x, l(r.text_name), 1),
41
- e("div", y, [
39
+ e("div", f, [
40
+ e("span", h, n(t.text_name), 1),
41
+ e("div", k, [
42
42
  e("input", {
43
43
  type: "text",
44
44
  "aria-describedby": "helper-text-explanation",
45
- class: "bg-gray-50 border border-e-0 border-gray-300 text-gray-500 dark:text-gray-400 text-sm border-s-0 focus:ring-blue-500 focus:border-blue-500 block w-full p-2 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500",
46
- value: n.value,
45
+ class: "bg-gray-50 border border-e-0 border-gray-300 text-gray-500 dark:text-gray-400 text-sm border-s-0 focus:ring-primary focus:border-primary block w-full p-2 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-primaryDark dark:focus:border-primaryDark",
46
+ value: i.value,
47
47
  readonly: "",
48
48
  disabled: ""
49
- }, null, 8, v)
49
+ }, null, 8, x)
50
50
  ]),
51
51
  e("button", {
52
52
  style: { padding: ".61rem" },
53
- onClick: t[0] || (t[0] = (C) => c(n.value)),
54
- class: "shrink-0 z-10 inline-flex items-center px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-e-lg hover:bg-blue-800 focus:ring-4 focus:outline-hidden focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 border border-blue-700 dark:border-blue-600 hover:border-blue-800 dark:hover:border-blue-700",
53
+ onClick: r[0] || (r[0] = (D) => u(i.value)),
54
+ class: "shrink-0 z-10 inline-flex items-center px-4 text-sm font-medium text-center text-white bg-primary rounded-e-lg hover:bg-primary/90 focus:ring-4 focus:outline-hidden focus:ring-primary/30 dark:bg-primaryDark dark:hover:bg-primaryDark/90 dark:focus:ring-primaryDark/30 border border-primary dark:border-primaryDark hover:border-primary/90 dark:hover:border-primaryDark/90",
55
55
  type: "button"
56
56
  }, [
57
- o.value ? i("", !0) : (s(), a("span", k, t[1] || (t[1] = [
57
+ a.value ? d("", !0) : (s(), o("span", v, r[1] || (r[1] = [
58
58
  e("svg", {
59
59
  class: "w-4 h-4",
60
60
  "aria-hidden": "true",
@@ -65,7 +65,7 @@ const m = { class: "w-full" }, f = { class: "flex justify-between items-center"
65
65
  e("path", { d: "M16 1h-3.278A1.992 1.992 0 0 0 11 0H7a1.993 1.993 0 0 0-1.722 1H2a2 2 0 0 0-2 2v15a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2Zm-3 14H5a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2Zm0-4H5a1 1 0 0 1 0-2h8a1 1 0 1 1 0 2Zm0-5H5a1 1 0 0 1 0-2h2V2h4v2h2a1 1 0 1 1 0 2Z" })
66
66
  ], -1)
67
67
  ]))),
68
- o.value ? (s(), a("span", w, t[2] || (t[2] = [
68
+ a.value ? (s(), o("span", w, r[2] || (r[2] = [
69
69
  e("svg", {
70
70
  class: "w-4 h-4",
71
71
  "aria-hidden": "true",
@@ -81,13 +81,13 @@ const m = { class: "w-full" }, f = { class: "flex justify-between items-center"
81
81
  d: "M1 5.917 5.724 10.5 15 1.5"
82
82
  })
83
83
  ], -1)
84
- ]))) : i("", !0)
84
+ ]))) : d("", !0)
85
85
  ])
86
86
  ]),
87
- e("p", _, l(r.description), 1)
87
+ e("p", _, n(t.description), 1)
88
88
  ]));
89
89
  }
90
90
  };
91
91
  export {
92
- S as default
92
+ H as default
93
93
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "The most popular library of interactive components built with Vuejs && Tailwind CSS",
4
4
  "type": "module",
5
5
  "private": false,
6
- "version": "1.3.10",
6
+ "version": "1.3.12",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/mrgiant/GoldenLogicUi.git"