@wikicasa-dev/components 2.6.12-alpha.1 → 2.6.13

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,8 +1,8 @@
1
- import { defineComponent as T, useId as N, useModel as I, shallowRef as R, computed as V, useTemplateRef as A, onMounted as z, onUnmounted as P, watch as v, nextTick as q, openBlock as m, createElementBlock as F, normalizeClass as d, renderSlot as x, unref as l, createVNode as U, withCtx as B, createElementVNode as j, createBlock as L, createCommentVNode as G, resolveDynamicComponent as J, mergeProps as Q, mergeModels as D } from "vue";
1
+ import { defineComponent as N, useId as T, useModel as I, shallowRef as R, computed as V, useTemplateRef as x, onMounted as z, onUnmounted as P, watch as v, nextTick as q, openBlock as m, createElementBlock as F, normalizeClass as s, renderSlot as A, unref as l, createVNode as U, withCtx as B, createElementVNode as j, createBlock as L, createCommentVNode as G, resolveDynamicComponent as J, mergeProps as Q, mergeModels as D } from "vue";
2
2
  import X from "./BaseButton.vue.js";
3
3
  import { ArrowIcon as Y } from "@wikicasa-dev/svg-icons";
4
4
  import { useKeyboardController as Z } from "../composables/mock.js";
5
- const _ = ["innerHTML"], le = /* @__PURE__ */ T({
5
+ const _ = ["innerHTML"], le = /* @__PURE__ */ N({
6
6
  inheritAttrs: !1,
7
7
  __name: "BaseDropDown",
8
8
  props: /* @__PURE__ */ D({
@@ -30,12 +30,12 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
30
30
  }),
31
31
  emits: /* @__PURE__ */ D(["click"], ["update:resetKeyboardController", "update:open"]),
32
32
  setup(t, { expose: S, emit: M }) {
33
- const n = t, y = N(), O = M, w = I(
33
+ const n = t, y = T(), O = M, w = I(
34
34
  t,
35
35
  "resetKeyboardController"
36
36
  ), o = I(t, "open");
37
37
  let C = !1;
38
- const s = R([]), W = V(() => s.value.length), u = A("container"), c = A("dropdown"), { activeIdx: a, selectedIdx: i, onKeyDownHandler: $ } = Z({
38
+ const u = R([]), W = V(() => u.value.length), a = x("container"), c = x("dropdown"), { activeIdx: i, selectedIdx: r, onKeyDownHandler: $ } = Z({
39
39
  optionsLength: W,
40
40
  isDropdownOpen: o,
41
41
  global: !1,
@@ -43,74 +43,74 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
43
43
  }), b = () => {
44
44
  o.value = !1;
45
45
  }, h = ({ target: e }) => {
46
- u.value?.contains(e) || b();
47
- }, p = (e) => {
48
- o.value && (u.value?.contains(e.target) || b());
46
+ a.value?.contains(e) || b();
47
+ }, p = ({ target: e }) => {
48
+ o.value && e instanceof Node && (a.value?.contains(e) || a.value && e.contains(a.value) || b());
49
49
  }, H = (e) => {
50
50
  n.activateKeyboardController && $(e);
51
51
  }, f = () => {
52
52
  n.keepState === "closed" && !o.value || n.keepState === "opened" && o.value || (o.value = !o.value);
53
- }, g = (e) => {
54
- e != null && (a.value = e);
55
53
  }, K = (e) => {
56
54
  e != null && (i.value = e);
55
+ }, g = (e) => {
56
+ e != null && (r.value = e);
57
57
  }, E = () => {
58
- c.value && (s.value = Array.from(c.value.children));
58
+ c.value && (u.value = Array.from(c.value.children));
59
59
  };
60
60
  return z(() => {
61
61
  E();
62
62
  }), P(() => {
63
63
  n.closeWhenClickedOutside && (document.removeEventListener("click", h), document.removeEventListener("focusin", p));
64
64
  }), v(w, (e) => {
65
- e && (a.value = -1, i.value = -1, q(() => {
65
+ e && (i.value = -1, r.value = -1, q(() => {
66
66
  E(), w.value = !1;
67
67
  }));
68
68
  }), v(o, (e) => {
69
69
  !e || C || !n.closeWhenClickedOutside || (document.addEventListener("click", h), document.addEventListener("focusin", p), C = !0);
70
- }), v(i, (e) => {
71
- e !== -1 && s.value[e]?.querySelector("a")?.click();
70
+ }), v(r, (e) => {
71
+ e !== -1 && u.value[e]?.querySelector("a")?.click();
72
72
  }), S({
73
- activeIdx: a,
74
- selectedIdx: i,
75
- getRootElement: () => u.value,
73
+ activeIdx: i,
74
+ selectedIdx: r,
75
+ getRootElement: () => a.value,
76
76
  getContentElement: () => c.value
77
- }), (e, r) => (m(), F("div", {
77
+ }), (e, d) => (m(), F("div", {
78
78
  ref: "container",
79
- class: d(["uikit-relative uikit-block", e.$attrs.class]),
79
+ class: s(["uikit-relative uikit-block", e.$attrs.class]),
80
80
  onKeydown: H
81
81
  }, [
82
- x(e.$slots, "btn_slot", {
82
+ A(e.$slots, "btn_slot", {
83
83
  toggleDropdown: f,
84
84
  isOpen: o.value,
85
- activeIdx: l(a),
86
- setActiveIdx: g,
87
- setSelectedIdx: K
85
+ activeIdx: l(i),
86
+ setActiveIdx: K,
87
+ setSelectedIdx: g
88
88
  }, () => [
89
89
  U(X, {
90
90
  id: l(y),
91
91
  type: "button",
92
92
  "data-cy": t.dataCy,
93
- class: d([
93
+ class: s([
94
94
  "!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
95
95
  t.btnClasses
96
96
  ]),
97
97
  "aria-expanded": o.value,
98
98
  "btn-class": "uikit-btn-single-selection",
99
- onClick: r[0] || (r[0] = (k) => {
99
+ onClick: d[0] || (d[0] = (k) => {
100
100
  O("click"), f();
101
101
  }),
102
- onKeydown: r[1] || (r[1] = (k) => {
102
+ onKeydown: d[1] || (d[1] = (k) => {
103
103
  Array.isArray(t.closeKeys) && !t.closeKeys.includes(k.key) || k.stopPropagation();
104
104
  })
105
105
  }, {
106
106
  default: B(() => [
107
107
  j("span", {
108
- class: d(["uikit-mr-5px", t.labelClasses]),
108
+ class: s(["uikit-mr-5px", t.labelClasses]),
109
109
  innerHTML: t.btnLabel
110
110
  }, null, 10, _),
111
111
  t.withArrowIcon ? (m(), L(l(Y), {
112
112
  key: 0,
113
- class: d(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
113
+ class: s(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
114
114
  width: t.arrowWidth,
115
115
  height: t.arrowWidth,
116
116
  "stroke-color": t.arrowStrokeColor
@@ -130,16 +130,17 @@ const _ = ["innerHTML"], le = /* @__PURE__ */ T({
130
130
  { "uikit-absolute": t.isAbsolute }
131
131
  ]],
132
132
  "aria-hidden": !o.value,
133
- "data-side": t.direction
133
+ "data-side": t.direction,
134
+ tabindex: "-1"
134
135
  }, t.dropdownAttrs), {
135
136
  default: B(() => [
136
- x(e.$slots, "default", {
137
+ A(e.$slots, "default", {
137
138
  isOpen: o.value,
138
139
  toggleDropdown: f,
139
- activeIdx: l(a),
140
- selectedIdx: l(i),
141
- setActiveIdx: g,
142
- setSelectedIdx: K
140
+ activeIdx: l(i),
141
+ selectedIdx: l(r),
142
+ setActiveIdx: K,
143
+ setSelectedIdx: g
143
144
  })
144
145
  ]),
145
146
  _: 3
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-thumbs.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Autoplay as m } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-thumbs.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Controller as m } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-thumbs.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Keyboard as t } from "swiper/modules";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import '../../../assets/swiper-controller.css';/* empty css */
1
+ import '../../../assets/swiper-thumbs.css';/* empty css */
2
2
  import "swiper/modules";
3
3
  import { Thumbs as p } from "swiper/modules";
4
4
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.6.12-alpha.1",
3
+ "version": "2.6.13",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,10 +42,10 @@
42
42
  },
43
43
  "homepage": "https://bitbucket.org/wikicasa/wikicasa-fe#readme",
44
44
  "peerDependencies": {
45
- "@wikicasa-dev/svg-icons": "^1.3.7-alpha.0",
46
- "@wikicasa-dev/types": "^2.6.0-alpha.0",
47
- "@wikicasa-dev/utilities": "^1.2.11-alpha.1",
48
- "@wikicasa-dev/vue-composables": "^0.2.0-alpha.0",
45
+ "@wikicasa-dev/svg-icons": "^1.3.7",
46
+ "@wikicasa-dev/types": "^2.8.0",
47
+ "@wikicasa-dev/utilities": "^1.2.11",
48
+ "@wikicasa-dev/vue-composables": "^0.2.0",
49
49
  "date-fns": "^4.0.0",
50
50
  "vue": "^3.5.0"
51
51
  },
@@ -83,12 +83,12 @@
83
83
  "vue-router": "^5.1.0",
84
84
  "vue-tsc": "^3.3.3",
85
85
  "@wikicasa-dev/eslint-config": "0.0.0",
86
- "@wikicasa-dev/vue-composables": "0.2.0-alpha.0",
87
- "@wikicasa-dev/types": "2.6.0-alpha.0",
88
- "@wikicasa-dev/tsconfig": "0.0.0",
89
- "@wikicasa-dev/svg-icons": "1.3.7-alpha.0",
90
86
  "@wikicasa-dev/tailwind-plugins": "0.0.7",
91
- "@wikicasa-dev/utilities": "1.2.11-alpha.1"
87
+ "@wikicasa-dev/svg-icons": "1.3.7",
88
+ "@wikicasa-dev/tsconfig": "0.0.0",
89
+ "@wikicasa-dev/utilities": "1.2.11",
90
+ "@wikicasa-dev/vue-composables": "0.2.0",
91
+ "@wikicasa-dev/types": "2.8.0"
92
92
  },
93
93
  "readme": "ERROR: No README data found!",
94
94
  "scripts": {