@avakhula/ui 0.0.25 → 0.0.27

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { openBlock as W, createElementBlock as re, normalizeStyle as Un, normalizeClass as $e, createBlock as _e, resolveDynamicComponent as br, mergeProps as Et, withCtx as be, renderSlot as Ne, withDirectives as Ve, createElementVNode as le, Fragment as at, renderList as jt, vShow as Ye, createCommentVNode as he, Transition as vi, resolveComponent as fe, toDisplayString as Ce, createVNode as me, withModifiers as $t, resolveDirective as $r, createSlots as vo, Teleport as Xo, createTextVNode as Ge, vModelDynamic as yo, withKeys as vn, pushScopeId as bo, popScopeId as $o, vModelText as _o, defineComponent as ea, onMounted as ta, onBeforeUnmount as na, ref as Ii, watch as Jr, nextTick as Di, h as ra, createStaticVNode as ia, createApp as oa } from "vue";
1
+ import { openBlock as W, createElementBlock as re, normalizeStyle as Un, normalizeClass as $e, resolveComponent as fe, createElementVNode as le, renderSlot as Ne, createVNode as me, Transition as vi, withCtx as be, withDirectives as Ve, vShow as Ye, createBlock as _e, resolveDynamicComponent as br, mergeProps as Et, Fragment as at, renderList as jt, createCommentVNode as he, toDisplayString as Ce, withModifiers as $t, resolveDirective as $r, createSlots as vo, Teleport as Xo, createTextVNode as Ge, vModelDynamic as yo, withKeys as vn, pushScopeId as bo, popScopeId as $o, vModelText as _o, defineComponent as ea, onMounted as ta, onBeforeUnmount as na, ref as Ii, watch as Jr, nextTick as Di, h as ra, createStaticVNode as ia, createApp as oa } from "vue";
2
2
  const Ae = (t, n) => {
3
3
  const e = t.__vccOpts || t;
4
4
  for (const [i, o] of n)
@@ -35,7 +35,84 @@ function sa(t, n, e, i, o, r) {
35
35
  ref: "icon"
36
36
  }, null, 14, la);
37
37
  }
38
- const et = /* @__PURE__ */ Ae(aa, [["render", sa]]), ln = {
38
+ const et = /* @__PURE__ */ Ae(aa, [["render", sa]]);
39
+ const ua = {
40
+ name: "IbAccordion",
41
+ props: {
42
+ isOpen: {
43
+ type: Boolean,
44
+ default: !1
45
+ }
46
+ },
47
+ watch: {
48
+ isOpen(t) {
49
+ this.isActive = t;
50
+ }
51
+ },
52
+ data() {
53
+ return {
54
+ isActive: this.isOpen
55
+ };
56
+ },
57
+ methods: {
58
+ onClick() {
59
+ this.isActive = !this.isActive, this.isActive ? this.$emit("open", this.isActive) : this.$emit("close", this.isActive);
60
+ },
61
+ enter(t) {
62
+ const n = getComputedStyle(t).width;
63
+ t.style.width = n, t.style.position = "absolute", t.style.visibility = "hidden", t.style.height = "auto";
64
+ const e = getComputedStyle(t).height;
65
+ t.style.width = null, t.style.position = null, t.style.visibility = null, t.style.height = 0, getComputedStyle(t).height, requestAnimationFrame(() => {
66
+ t.style.height = e;
67
+ });
68
+ },
69
+ afterEnter(t) {
70
+ t.style.height = "auto";
71
+ },
72
+ leave(t) {
73
+ const n = getComputedStyle(t).height;
74
+ t.style.height = n, getComputedStyle(t).height, requestAnimationFrame(() => {
75
+ t.style.height = 0;
76
+ });
77
+ }
78
+ },
79
+ components: {
80
+ IbIcon: et
81
+ }
82
+ }, da = { class: "accordion-content" };
83
+ function ca(t, n, e, i, o, r) {
84
+ const s = fe("ib-icon");
85
+ return W(), re("div", {
86
+ class: $e(["ib-accordion", { active: o.isActive }])
87
+ }, [
88
+ le("button", {
89
+ class: "accordion-title",
90
+ onClick: n[0] || (n[0] = (...l) => r.onClick && r.onClick(...l))
91
+ }, [
92
+ Ne(t.$slots, "title", {}, void 0, !0),
93
+ me(s, {
94
+ class: "chevron-icon",
95
+ name: "chevron-down-outline"
96
+ })
97
+ ]),
98
+ me(vi, {
99
+ name: "expand",
100
+ onEnter: r.enter,
101
+ onAfterEnter: r.afterEnter,
102
+ onLeave: r.leave
103
+ }, {
104
+ default: be(() => [
105
+ Ve(le("div", da, [
106
+ Ne(t.$slots, "content", {}, void 0, !0)
107
+ ], 512), [
108
+ [Ye, o.isActive]
109
+ ])
110
+ ]),
111
+ _: 3
112
+ }, 8, ["onEnter", "onAfterEnter", "onLeave"])
113
+ ], 2);
114
+ }
115
+ const Oh = /* @__PURE__ */ Ae(ua, [["render", ca], ["__scopeId", "data-v-4513fa96"]]), ln = {
39
116
  primary: "primary",
40
117
  secondary: "secondary",
41
118
  tertiary: "tertiary",
@@ -48,7 +125,7 @@ function _r(t) {
48
125
  n.startsWith("on") && delete t[n];
49
126
  return t;
50
127
  }
51
- const ua = {
128
+ const fa = {
52
129
  name: "IbButton",
53
130
  props: {
54
131
  kind: {
@@ -129,8 +206,8 @@ const ua = {
129
206
  }
130
207
  },
131
208
  inheritAttrs: !1
132
- }, da = ["method", "action"], ca = ["value"], fa = ["value"], ha = ["name", "value"];
133
- function pa(t, n, e, i, o, r) {
209
+ }, ha = ["method", "action"], pa = ["value"], ga = ["value"], ma = ["name", "value"];
210
+ function va(t, n, e, i, o, r) {
134
211
  return W(), _e(br(e.href.length ? "a" : "button"), Et({
135
212
  onClick: n[0] || (n[0] = (s) => r.onClick(s))
136
213
  }, r.attrs), {
@@ -147,26 +224,26 @@ function pa(t, n, e, i, o, r) {
147
224
  type: "hidden",
148
225
  name: "_method",
149
226
  value: e.linkMethod
150
- }, null, 8, ca),
227
+ }, null, 8, pa),
151
228
  le("input", {
152
229
  type: "hidden",
153
230
  name: "_token",
154
231
  value: r.token
155
- }, null, 8, fa),
232
+ }, null, 8, ga),
156
233
  (W(!0), re(at, null, jt(Object.keys(e.postOptions), (s, l) => (W(), re("input", {
157
234
  key: l,
158
235
  type: "hidden",
159
236
  name: s,
160
237
  value: e.postOptions[s]
161
- }, null, 8, ha))), 128))
162
- ], 8, da)), [
238
+ }, null, 8, ma))), 128))
239
+ ], 8, ha)), [
163
240
  [Ye, !1]
164
241
  ]) : he("", !0)
165
242
  ]),
166
243
  _: 3
167
244
  }, 16);
168
245
  }
169
- const ga = /* @__PURE__ */ Ae(ua, [["render", pa]]), ma = {
246
+ const ya = /* @__PURE__ */ Ae(fa, [["render", va]]), ba = {
170
247
  topLeft: "top-Left",
171
248
  topCenter: "top-center",
172
249
  topRight: "top-right",
@@ -180,12 +257,12 @@ const ga = /* @__PURE__ */ Ae(ua, [["render", pa]]), ma = {
180
257
  leftCenter: "left-center",
181
258
  leftBottom: "left-bottom"
182
259
  };
183
- const va = {
260
+ const $a = {
184
261
  name: "IbPopover",
185
262
  props: {
186
263
  position: {
187
264
  type: String,
188
- default: ma.topCenter
265
+ default: ba.topCenter
189
266
  }
190
267
  },
191
268
  data() {
@@ -217,7 +294,7 @@ const va = {
217
294
  this.parentNode.removeEventListener("focus", this.showPopover, !0), this.parentNode.removeEventListener("blur", this.hidePopover, !0), this.parentNode.removeEventListener("mouseover", this.showPopover, !0), this.parentNode.removeEventListener("mouseleave", this.hidePopover, !0);
218
295
  }
219
296
  };
220
- function ya(t, n, e, i, o, r) {
297
+ function _a(t, n, e, i, o, r) {
221
298
  return W(), _e(vi, null, {
222
299
  default: be(() => [
223
300
  Ve(le("div", {
@@ -231,8 +308,8 @@ function ya(t, n, e, i, o, r) {
231
308
  _: 3
232
309
  });
233
310
  }
234
- const ba = /* @__PURE__ */ Ae(va, [["render", ya], ["__scopeId", "data-v-be16c20c"]]);
235
- const $a = {
311
+ const wa = /* @__PURE__ */ Ae($a, [["render", _a], ["__scopeId", "data-v-be16c20c"]]);
312
+ const Oa = {
236
313
  name: "IbTooltip",
237
314
  props: {
238
315
  position: {
@@ -245,22 +322,22 @@ const $a = {
245
322
  type: String
246
323
  }
247
324
  },
248
- components: { IbPopover: ba }
249
- }, _a = { key: 0 };
250
- function wa(t, n, e, i, o, r) {
325
+ components: { IbPopover: wa }
326
+ }, ka = { key: 0 };
327
+ function Ca(t, n, e, i, o, r) {
251
328
  const s = fe("ib-popover");
252
329
  return W(), _e(s, {
253
330
  position: e.position,
254
331
  class: "ib-tooltip"
255
332
  }, {
256
333
  default: be(() => [
257
- e.title ? (W(), re("b", _a, Ce(e.title), 1)) : he("", !0),
334
+ e.title ? (W(), re("b", ka, Ce(e.title), 1)) : he("", !0),
258
335
  le("p", null, Ce(e.text), 1)
259
336
  ]),
260
337
  _: 1
261
338
  }, 8, ["position"]);
262
339
  }
263
- const Qt = /* @__PURE__ */ Ae($a, [["render", wa], ["__scopeId", "data-v-5289283c"]]), Pi = {
340
+ const Qt = /* @__PURE__ */ Ae(Oa, [["render", Ca], ["__scopeId", "data-v-5289283c"]]), Pi = {
264
341
  [ln.primary]: ln.primary,
265
342
  [ln.tertiary]: ln.tertiary,
266
343
  [ln.ghost]: ln.ghost,
@@ -270,7 +347,7 @@ const Qt = /* @__PURE__ */ Ae($a, [["render", wa], ["__scopeId", "data-v-5289283
270
347
  s: "s",
271
348
  m: "m"
272
349
  };
273
- const Oa = {
350
+ const Ea = {
274
351
  name: "IbIconButton",
275
352
  props: {
276
353
  kind: {
@@ -327,12 +404,12 @@ const Oa = {
327
404
  }
328
405
  },
329
406
  components: {
330
- IbButton: ga,
407
+ IbButton: ya,
331
408
  IbTooltip: Qt
332
409
  },
333
410
  inheritAttrs: !1
334
411
  };
335
- function ka(t, n, e, i, o, r) {
412
+ function Sa(t, n, e, i, o, r) {
336
413
  const s = fe("ib-tooltip"), l = fe("ib-button");
337
414
  return W(), _e(l, Et({ onClick: r.onClick }, r.attrs, {
338
415
  href: e.href,
@@ -350,13 +427,13 @@ function ka(t, n, e, i, o, r) {
350
427
  _: 3
351
428
  }, 16, ["onClick", "href", "kind", "disabled", "tabindex"]);
352
429
  }
353
- const At = /* @__PURE__ */ Ae(Oa, [["render", ka]]), rr = {
430
+ const At = /* @__PURE__ */ Ae(Ea, [["render", Sa]]), rr = {
354
431
  alert: "alert",
355
432
  warning: "warning",
356
433
  info: "info",
357
434
  success: "success"
358
435
  };
359
- const Ca = {
436
+ const xa = {
360
437
  name: "IbAlert",
361
438
  props: {
362
439
  type: {
@@ -408,33 +485,33 @@ const Ca = {
408
485
  IbIcon: et,
409
486
  IbIconButton: At
410
487
  }
411
- }, Ea = {
488
+ }, Aa = {
412
489
  ref: "content",
413
490
  class: "content"
414
- }, Sa = { class: "content-head" }, xa = {
491
+ }, Ta = { class: "content-head" }, Na = {
415
492
  key: 1,
416
493
  class: "ib-alert-title"
417
- }, Aa = { class: "text-content" }, Ta = { class: "link" };
418
- function Na(t, n, e, i, o, r) {
494
+ }, Ia = { class: "text-content" }, Da = { class: "link" };
495
+ function Pa(t, n, e, i, o, r) {
419
496
  var d;
420
497
  const s = fe("ib-icon"), l = fe("ib-icon-button");
421
498
  return W(), re("div", {
422
499
  role: "alert",
423
500
  class: $e(r.classes)
424
501
  }, [
425
- le("div", Ea, [
426
- le("span", Sa, [
502
+ le("div", Aa, [
503
+ le("span", Ta, [
427
504
  e.showIcon ? (W(), _e(s, {
428
505
  key: 0,
429
506
  class: "ib-alert-icon",
430
507
  name: r.iconName
431
508
  }, null, 8, ["name"])) : he("", !0),
432
- (d = e.title) != null && d.length ? (W(), re("b", xa, Ce(e.title), 1)) : he("", !0)
509
+ (d = e.title) != null && d.length ? (W(), re("b", Na, Ce(e.title), 1)) : he("", !0)
433
510
  ]),
434
- le("span", Aa, [
511
+ le("span", Ia, [
435
512
  Ne(t.$slots, "default", {}, void 0, !0)
436
513
  ]),
437
- le("div", Ta, [
514
+ le("div", Da, [
438
515
  Ne(t.$slots, "link", {}, void 0, !0)
439
516
  ])
440
517
  ], 512),
@@ -454,84 +531,7 @@ function Na(t, n, e, i, o, r) {
454
531
  }, 8, ["onClick"])) : he("", !0)
455
532
  ], 2);
456
533
  }
457
- const $n = /* @__PURE__ */ Ae(Ca, [["render", Na], ["__scopeId", "data-v-b6c38dbb"]]);
458
- const Ia = {
459
- name: "IbAccordion",
460
- props: {
461
- isOpen: {
462
- type: Boolean,
463
- default: !1
464
- }
465
- },
466
- watch: {
467
- isOpen(t) {
468
- this.isActive = t;
469
- }
470
- },
471
- data() {
472
- return {
473
- isActive: this.isOpen
474
- };
475
- },
476
- methods: {
477
- onClick() {
478
- this.isActive = !this.isActive, this.isActive ? this.$emit("open", this.isActive) : this.$emit("close", this.isActive);
479
- },
480
- enter(t) {
481
- const n = getComputedStyle(t).width;
482
- t.style.width = n, t.style.position = "absolute", t.style.visibility = "hidden", t.style.height = "auto";
483
- const e = getComputedStyle(t).height;
484
- t.style.width = null, t.style.position = null, t.style.visibility = null, t.style.height = 0, getComputedStyle(t).height, requestAnimationFrame(() => {
485
- t.style.height = e;
486
- });
487
- },
488
- afterEnter(t) {
489
- t.style.height = "auto";
490
- },
491
- leave(t) {
492
- const n = getComputedStyle(t).height;
493
- t.style.height = n, getComputedStyle(t).height, requestAnimationFrame(() => {
494
- t.style.height = 0;
495
- });
496
- }
497
- },
498
- components: {
499
- IbIcon: et
500
- }
501
- }, Da = { class: "accordion-content" };
502
- function Pa(t, n, e, i, o, r) {
503
- const s = fe("ib-icon");
504
- return W(), re("div", {
505
- class: $e(["ib-accordion", { active: o.isActive }])
506
- }, [
507
- le("button", {
508
- class: "accordion-title",
509
- onClick: n[0] || (n[0] = (...l) => r.onClick && r.onClick(...l))
510
- }, [
511
- Ne(t.$slots, "title", {}, void 0, !0),
512
- me(s, {
513
- class: "chevron-icon",
514
- name: "chevron-down-outline"
515
- })
516
- ]),
517
- me(vi, {
518
- name: "expand",
519
- onEnter: r.enter,
520
- onAfterEnter: r.afterEnter,
521
- onLeave: r.leave
522
- }, {
523
- default: be(() => [
524
- Ve(le("div", Da, [
525
- Ne(t.$slots, "content", {}, void 0, !0)
526
- ], 512), [
527
- [Ye, o.isActive]
528
- ])
529
- ]),
530
- _: 3
531
- }, 8, ["onEnter", "onAfterEnter", "onLeave"])
532
- ], 2);
533
- }
534
- const Oh = /* @__PURE__ */ Ae(Ia, [["render", Pa], ["__scopeId", "data-v-4513fa96"]]);
534
+ const $n = /* @__PURE__ */ Ae(xa, [["render", Pa], ["__scopeId", "data-v-b6c38dbb"]]);
535
535
  const Ma = {
536
536
  name: "IbBadge",
537
537
  props: {
@@ -3368,6 +3368,9 @@ const Fs = {
3368
3368
  t.forEach((n) => {
3369
3369
  n.children && n.children.length ? this.setBookmarkedOptions(n.children) : this.initBookmarks.includes(n.id) && (this.actualBookmarkedOptions[n.id] = n);
3370
3370
  }), this.filter(this.filterString, t);
3371
+ },
3372
+ onClose() {
3373
+ this.isMultiple ? this.$emit("close", Object.keys(this.selected)) : this.$emit("close", Object.keys(this.selected)[0]);
3371
3374
  }
3372
3375
  },
3373
3376
  computed: {
@@ -3439,6 +3442,7 @@ function zs(t, n, e, i, o, r) {
3439
3442
  disabled: o.isLoading,
3440
3443
  "is-resizable": e.isResizable,
3441
3444
  vertical: e.vertical,
3445
+ onClose: r.onClose,
3442
3446
  ref: "dropdown"
3443
3447
  }, vo({
3444
3448
  body: be(() => [
@@ -3628,7 +3632,7 @@ function zs(t, n, e, i, o, r) {
3628
3632
  ]),
3629
3633
  key: "1"
3630
3634
  }
3631
- ]), 1032, ["disabled", "is-resizable", "vertical"])
3635
+ ]), 1032, ["disabled", "is-resizable", "vertical", "onClose"])
3632
3636
  ]);
3633
3637
  }
3634
3638
  const Ks = /* @__PURE__ */ Ae(Fs, [["render", zs]]);
@@ -19343,14 +19347,14 @@ const Gh = /* @__PURE__ */ Ae($h, [["render", _h]]), Yh = {
19343
19347
  text: n.value
19344
19348
  }), e.mount(i), i.firstChild.setAttribute("style", "display: block"), setTimeout(() => {
19345
19349
  if (i.firstChild) {
19346
- const { top: r, left: s, width: l } = t.getBoundingClientRect(), { width: d, height: h } = i.firstChild.getBoundingClientRect(), f = `
19347
- left: ${s + l / 2 - d / 2}px!important;
19348
- top: ${r - h - 5}px!important;
19349
- bottom: auto!important;
19350
- right: auto!important;
19351
- transform: none!important;
19352
- `;
19353
- i.firstChild.setAttribute("style", f);
19350
+ const { top: r, left: s, width: l } = t.getBoundingClientRect(), { width: d, height: h } = i.firstChild.getBoundingClientRect(), f = document.documentElement.scrollTop, c = `
19351
+ left: ${s + l / 2 - d / 2}px!important;
19352
+ top: ${r - h + f - 5}px!important;
19353
+ bottom: auto!important;
19354
+ right: auto!important;
19355
+ transform: none!important;
19356
+ `;
19357
+ i.firstChild.setAttribute("style", c);
19354
19358
  }
19355
19359
  }, 100);
19356
19360
  }), t.addEventListener("mouseleave", () => {
@@ -19363,7 +19367,7 @@ export {
19363
19367
  $n as IbAlert,
19364
19368
  kh as IbBadge,
19365
19369
  Ph as IbBreadcrumbs,
19366
- ga as IbButton,
19370
+ ya as IbButton,
19367
19371
  Ch as IbButtonGroup,
19368
19372
  bh as IbCell,
19369
19373
  xo as IbCheckbox,
@@ -19382,7 +19386,7 @@ export {
19382
19386
  Th as IbModal,
19383
19387
  Mh as IbPagination,
19384
19388
  Vh as IbPhoneInput,
19385
- ba as IbPopover,
19389
+ wa as IbPopover,
19386
19390
  Lh as IbProgressBar,
19387
19391
  qh as IbRadio,
19388
19392
  Kh as IbRow,