@wikicasa-dev/components 2.3.1-alpha.8 → 2.4.1-alpha.0
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/UIKit/BaseModal.d.ts +5 -5
- package/dist/UIKit/BaseSnackbar.d.ts +3 -1
- package/dist/UIKit/BaseToggle.d.ts +2 -2
- package/dist/UIKit/Tab/v2/BaseTabs.d.ts +24 -0
- package/dist/UIKit/Tab/v2/BaseTabs.js +5 -0
- package/dist/UIKit/Tab/v2/BaseTabsContent.d.ts +13 -0
- package/dist/UIKit/Tab/v2/BaseTabsContent.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.d.ts +66 -0
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.js +5 -0
- package/dist/UIKit/Tab/v2/BaseTabsList.d.ts +13 -0
- package/dist/UIKit/Tab/v2/BaseTabsList.js +4 -0
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.d.ts +20 -0
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.js +4 -0
- package/dist/assets/BaseBadge.css +1 -1
- package/dist/assets/BaseCard.css +1 -1
- package/dist/assets/BaseComplexToggle.css +1 -1
- package/dist/assets/BaseModal.css +1 -1
- package/dist/assets/BaseSnackbar.css +1 -1
- package/dist/assets/BaseTabs.css +1 -0
- package/dist/assets/BaseTabsIndicator.css +1 -0
- package/dist/assets/tailwind.css +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +111 -99
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +17 -17
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +131 -110
- package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +1 -3
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +54 -52
- package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +3 -4
- package/dist/packages/components/lib/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +10 -9
- package/dist/packages/components/lib/UIKit/Tab/BaseTabView.vue.js +45 -46
- package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabs.vue.js +39 -0
- package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsContent.vue.js +24 -0
- package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsIndicator.vue.js +34 -0
- package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsList.vue.js +23 -0
- package/dist/packages/components/lib/UIKit/Tab/v2/BaseTabsTrigger.vue.js +31 -0
- package/dist/types/index.d.ts +5 -0
- package/package.json +15 -15
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, mergeModels as I, useModel as w, ref as $, watch as y, nextTick as x, createBlock as u, openBlock as r, unref as i, withCtx as a, renderSlot as d, createVNode as n, normalizeClass as k, createCommentVNode as p, normalizeStyle as B } from "vue";
|
|
2
2
|
import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
|
|
3
3
|
import { ToastProvider as D, ToastRoot as M, ToastTitle as P, ToastDescription as z, ToastClose as S, ToastAction as A, ProgressRoot as N, ProgressIndicator as R, ToastPortal as U, ToastViewport as h } from "reka-ui";
|
|
4
|
-
const q = /* @__PURE__ */
|
|
4
|
+
const q = /* @__PURE__ */ b({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "BaseSnackbar",
|
|
7
7
|
props: /* @__PURE__ */ I({
|
|
8
8
|
alertClass: { default: "primary" },
|
|
9
9
|
duration: { default: 3e3 },
|
|
10
|
-
swipeDirection: { default: "
|
|
10
|
+
swipeDirection: { default: "left" },
|
|
11
11
|
to: { type: [String, Boolean], default: "body" },
|
|
12
12
|
dataCy: { default: "" },
|
|
13
13
|
withCloseIcon: { type: Boolean, default: !0 },
|
|
14
|
+
closeClasses: {},
|
|
14
15
|
viewportClasses: { default: "" },
|
|
15
16
|
type: { default: "foreground" }
|
|
16
17
|
}, {
|
|
@@ -20,94 +21,95 @@ const q = /* @__PURE__ */ x({
|
|
|
20
21
|
refreshModifiers: {}
|
|
21
22
|
}),
|
|
22
23
|
emits: ["update:open", "update:refresh"],
|
|
23
|
-
setup(
|
|
24
|
-
const l = w(
|
|
25
|
-
let
|
|
26
|
-
const
|
|
24
|
+
setup(e) {
|
|
25
|
+
const l = w(e, "open"), v = w(e, "refresh"), o = $(0);
|
|
26
|
+
let c, m;
|
|
27
|
+
const C = (t = 3e3) => {
|
|
27
28
|
o.value = 0;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
o.value = Math.min(100,
|
|
29
|
+
const s = Date.now();
|
|
30
|
+
m = setInterval(() => {
|
|
31
|
+
const g = Date.now() - s;
|
|
32
|
+
o.value = Math.min(100, g / t * 100), o.value >= 100 && clearInterval(m);
|
|
32
33
|
}, 30);
|
|
33
34
|
}, T = () => {
|
|
34
|
-
clearTimeout(
|
|
35
|
+
clearTimeout(c), c = setTimeout(() => {
|
|
35
36
|
l.value = !1;
|
|
36
|
-
},
|
|
37
|
+
}, e.duration), C(e.duration);
|
|
37
38
|
};
|
|
38
39
|
return y(
|
|
39
40
|
l,
|
|
40
|
-
(
|
|
41
|
-
|
|
42
|
-
if (
|
|
41
|
+
(t) => {
|
|
42
|
+
x(() => {
|
|
43
|
+
if (t) {
|
|
43
44
|
T();
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
clearInterval(
|
|
47
|
+
clearInterval(m), clearTimeout(c), o.value = 0;
|
|
47
48
|
});
|
|
48
49
|
},
|
|
49
50
|
{ immediate: !0 }
|
|
50
|
-
), y(v, (
|
|
51
|
-
|
|
51
|
+
), y(v, (t) => {
|
|
52
|
+
t && (l.value = !1, setTimeout(() => {
|
|
52
53
|
l.value = !0, v.value = !1;
|
|
53
54
|
}));
|
|
54
|
-
}), (
|
|
55
|
+
}), (t, s) => (r(), u(i(D), { "swipe-direction": e.swipeDirection }, {
|
|
55
56
|
default: a(() => [
|
|
56
|
-
|
|
57
|
+
d(t.$slots, "trigger", {
|
|
57
58
|
open: () => l.value = !0
|
|
58
59
|
}),
|
|
59
60
|
n(i(M), {
|
|
60
61
|
open: l.value,
|
|
61
|
-
"onUpdate:open":
|
|
62
|
-
duration:
|
|
63
|
-
class:
|
|
64
|
-
"data-cy":
|
|
65
|
-
type:
|
|
62
|
+
"onUpdate:open": s[1] || (s[1] = (f) => l.value = f),
|
|
63
|
+
duration: e.duration,
|
|
64
|
+
class: k(["uikit-toast-root uikit-relative uikit-box-border uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium uikit-shadow-surface sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${e.alertClass}`, t.$attrs.class]]),
|
|
65
|
+
"data-cy": e.dataCy,
|
|
66
|
+
type: e.type
|
|
66
67
|
}, {
|
|
67
68
|
default: a(() => [
|
|
68
|
-
|
|
69
|
+
t.$slots.title ? (r(), u(i(P), {
|
|
69
70
|
key: 0,
|
|
70
71
|
"as-child": ""
|
|
71
72
|
}, {
|
|
72
73
|
default: a(() => [
|
|
73
|
-
|
|
74
|
+
d(t.$slots, "title")
|
|
74
75
|
]),
|
|
75
76
|
_: 3
|
|
76
77
|
})) : p("", !0),
|
|
77
78
|
n(i(z), { "as-child": "" }, {
|
|
78
79
|
default: a(() => [
|
|
79
|
-
|
|
80
|
-
t.withCloseIcon ? (r(), s(i(S), {
|
|
81
|
-
key: 0,
|
|
82
|
-
class: "uikit-ml-[16px] uikit-flex uikit-size-[24px] uikit-shrink-0 uikit-cursor-pointer uikit-appearance-none uikit-items-center uikit-justify-center uikit-rounded-full uikit-bg-[#C1C8D5]",
|
|
83
|
-
"data-cy": "base-snackbar-close-btn"
|
|
84
|
-
}, {
|
|
85
|
-
default: a(() => [
|
|
86
|
-
n(i(V), {
|
|
87
|
-
width: 12,
|
|
88
|
-
height: 12,
|
|
89
|
-
"stroke-color": "#fff"
|
|
90
|
-
})
|
|
91
|
-
]),
|
|
92
|
-
_: 1
|
|
93
|
-
})) : p("", !0)
|
|
80
|
+
d(t.$slots, "default")
|
|
94
81
|
]),
|
|
95
82
|
_: 3
|
|
96
83
|
}),
|
|
97
|
-
e
|
|
84
|
+
e.withCloseIcon ? (r(), u(i(S), {
|
|
98
85
|
key: 1,
|
|
99
|
-
class: "[
|
|
86
|
+
class: k(["uikit-ml-[16px] uikit-flex uikit-size-[24px] uikit-shrink-0 uikit-cursor-pointer uikit-appearance-none uikit-items-center uikit-justify-center uikit-rounded-full uikit-bg-[#C1C8D5]", e.closeClasses]),
|
|
87
|
+
"data-cy": "base-snackbar-close-btn"
|
|
88
|
+
}, {
|
|
89
|
+
default: a(() => [
|
|
90
|
+
d(t.$slots, "toast-close", {}, () => [
|
|
91
|
+
n(i(V), {
|
|
92
|
+
width: 12,
|
|
93
|
+
height: 12,
|
|
94
|
+
"stroke-color": "#fff"
|
|
95
|
+
})
|
|
96
|
+
])
|
|
97
|
+
]),
|
|
98
|
+
_: 3
|
|
99
|
+
}, 8, ["class"])) : p("", !0),
|
|
100
|
+
t.$slots["toast-action"] ? (r(), u(i(A), {
|
|
101
|
+
key: 2,
|
|
100
102
|
"as-child": "",
|
|
101
103
|
"alt-text": "Goto schedule to undo"
|
|
102
104
|
}, {
|
|
103
105
|
default: a(() => [
|
|
104
|
-
|
|
106
|
+
d(t.$slots, "toast-action")
|
|
105
107
|
]),
|
|
106
108
|
_: 3
|
|
107
109
|
})) : p("", !0),
|
|
108
110
|
n(i(N), {
|
|
109
111
|
modelValue: o.value,
|
|
110
|
-
"onUpdate:modelValue":
|
|
112
|
+
"onUpdate:modelValue": s[0] || (s[0] = (f) => o.value = f),
|
|
111
113
|
class: "uikit-absolute uikit-bottom-0 uikit-left-0 uikit-h-[4px] uikit-w-full uikit-overflow-hidden"
|
|
112
114
|
}, {
|
|
113
115
|
default: a(() => [
|
|
@@ -121,19 +123,19 @@ const q = /* @__PURE__ */ x({
|
|
|
121
123
|
]),
|
|
122
124
|
_: 3
|
|
123
125
|
}, 8, ["open", "duration", "class", "data-cy", "type"]),
|
|
124
|
-
|
|
126
|
+
e.to ? (r(), u(i(U), {
|
|
125
127
|
key: 0,
|
|
126
|
-
to:
|
|
128
|
+
to: e.to
|
|
127
129
|
}, {
|
|
128
130
|
default: a(() => [
|
|
129
131
|
n(i(h), {
|
|
130
|
-
class:
|
|
132
|
+
class: k(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", e.viewportClasses])
|
|
131
133
|
}, null, 8, ["class"])
|
|
132
134
|
]),
|
|
133
135
|
_: 1
|
|
134
|
-
}, 8, ["to"])) : (r(),
|
|
136
|
+
}, 8, ["to"])) : (r(), u(i(h), {
|
|
135
137
|
key: 1,
|
|
136
|
-
class:
|
|
138
|
+
class: k(["uikit-alert-viewport uikit-m-0 uikit-w-full uikit-list-none uikit-gap-[8px]", e.viewportClasses])
|
|
137
139
|
}, null, 8, ["class"]))
|
|
138
140
|
]),
|
|
139
141
|
_: 3
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as d, mergeModels as s, useModel as n, createElementBlock as k, openBlock as c, renderSlot as a, createVNode as u, createCommentVNode as m, unref as o, withCtx as f, createElementVNode as p } from "vue";
|
|
2
2
|
import { SwitchRoot as b, SwitchThumb as h } from "reka-ui";
|
|
3
|
-
const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], V = /* @__PURE__ */
|
|
4
|
-
inheritAttrs: !1,
|
|
3
|
+
const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], V = /* @__PURE__ */ d({
|
|
5
4
|
__name: "BaseToggle",
|
|
6
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ s({
|
|
7
6
|
label: {},
|
|
8
7
|
dataCy: {}
|
|
9
8
|
}, {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as n, createBlock as
|
|
2
|
-
import { RadioGroupItem as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as n, createPropsRestProxy as d, createBlock as l, openBlock as p, unref as m, mergeProps as c, withCtx as u, renderSlot as y, normalizeProps as f, guardReactiveProps as C } from "vue";
|
|
2
|
+
import { RadioGroupItem as P } from "reka-ui";
|
|
3
|
+
const v = /* @__PURE__ */ n({
|
|
4
4
|
__name: "RadioGroupItemPrimitive",
|
|
5
5
|
props: {
|
|
6
6
|
dataCy: {},
|
|
@@ -13,18 +13,19 @@ const _ = /* @__PURE__ */ n({
|
|
|
13
13
|
required: { type: Boolean }
|
|
14
14
|
},
|
|
15
15
|
emits: ["select"],
|
|
16
|
-
setup(t, { emit:
|
|
17
|
-
const
|
|
18
|
-
return (i, o) => (
|
|
16
|
+
setup(t, { emit: a }) {
|
|
17
|
+
const r = d(t, ["dataCy"]), s = a;
|
|
18
|
+
return (i, o) => (p(), l(m(P), c(r, {
|
|
19
|
+
"data-cy": t.dataCy,
|
|
19
20
|
onSelect: o[0] || (o[0] = (e) => s("select", e))
|
|
20
21
|
}), {
|
|
21
22
|
default: u((e) => [
|
|
22
|
-
|
|
23
|
+
y(i.$slots, "default", f(C(e)))
|
|
23
24
|
]),
|
|
24
25
|
_: 3
|
|
25
|
-
}, 16));
|
|
26
|
+
}, 16, ["data-cy"]));
|
|
26
27
|
}
|
|
27
28
|
});
|
|
28
29
|
export {
|
|
29
|
-
|
|
30
|
+
v as default
|
|
30
31
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as S, mergeModels as T, useModel as z, ref as x, useId as j, useSlots as q, computed as G, provide as v, watch as k, createElementBlock as f, openBlock as l, normalizeClass as I, createElementVNode as H, createBlock as o, createCommentVNode as u, unref as m, toDisplayString as J, Fragment as g, renderList as K, withCtx as O, resolveDynamicComponent as Q } from "vue";
|
|
2
|
+
import R from "./BaseTabPanel.vue.js";
|
|
3
3
|
import P from "./BaseTabList.vue.js";
|
|
4
|
-
const
|
|
4
|
+
const U = ["data-cy"], W = ["id"], ae = /* @__PURE__ */ S({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "BaseTabView",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ T({
|
|
8
8
|
tabsPosition: { default: "top" },
|
|
9
9
|
tabViewDescription: {},
|
|
10
10
|
tabListClasses: {},
|
|
@@ -13,95 +13,94 @@ const W = ["data-cy"], X = ["id"], te = /* @__PURE__ */ z({
|
|
|
13
13
|
activeIdx: { default: 0 },
|
|
14
14
|
activeIdxModifiers: {}
|
|
15
15
|
}),
|
|
16
|
-
emits: /* @__PURE__ */
|
|
16
|
+
emits: /* @__PURE__ */ T(["tabClicked"], ["update:activeIdx"]),
|
|
17
17
|
setup(s, { emit: $ }) {
|
|
18
|
-
const B = $, c =
|
|
18
|
+
const B = $, c = z(s, "activeIdx"), A = x(""), b = x(null), d = j(), y = q(), r = (e) => e.props ?? null, h = (e) => e.type.__name === "BaseTab", p = (e, a) => ({
|
|
19
19
|
renderFn: e,
|
|
20
|
-
tabId:
|
|
20
|
+
tabId: C(a),
|
|
21
21
|
"active-tab-panel-idx": r(e)?.["active-tab-panel-idx"] ?? a,
|
|
22
22
|
"header-title": r(e)?.["header-title"] || "",
|
|
23
23
|
class: r(e)?.class || "",
|
|
24
24
|
"tab-panel-classes": r(e)?.["tab-panel-classes"] || "",
|
|
25
25
|
"data-cy": r(e)?.["data-cy"] || ""
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
}) :
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
const a =
|
|
32
|
-
(t, n,
|
|
26
|
+
}), i = G(() => y.default ? y.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
27
|
+
h(t) && e.push(p(t, e.length));
|
|
28
|
+
}) : h(a) && e.push(p(a, e.length)), e), []) : []);
|
|
29
|
+
v("tabs", i), v("isTabActive", (e) => c.value === e);
|
|
30
|
+
const F = (e = -1) => b.value === e, C = (e) => `base-tab-${e}-${d}`, V = (e = -1) => `base-tab-panel-${e}-${d}`, w = (e = -1) => {
|
|
31
|
+
const a = i.value.reduce(
|
|
32
|
+
(t, n, N) => (n["active-tab-panel-idx"] !== e || t.push({ tab: n, idx: N }), t),
|
|
33
33
|
[]
|
|
34
34
|
);
|
|
35
35
|
return a && a.length === 1 ? a[0].tab.tabId : a.find((t) => t.idx === c.value)?.tab.tabId;
|
|
36
|
+
}, D = (e) => {
|
|
37
|
+
A.value = C(e);
|
|
36
38
|
}, L = (e) => {
|
|
37
|
-
|
|
38
|
-
}, E = (e) => {
|
|
39
|
-
const a = l.value.at(e ?? -1);
|
|
39
|
+
const a = i.value.at(e ?? -1);
|
|
40
40
|
b.value = a?.["active-tab-panel-idx"] ?? null;
|
|
41
41
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}),
|
|
42
|
+
v("handleClick", (e, a) => {
|
|
43
|
+
D(e), c.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
44
|
+
}), k(
|
|
45
45
|
c,
|
|
46
46
|
(e) => {
|
|
47
|
-
|
|
47
|
+
L(e ?? -1);
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
immediate: !0
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
|
-
const
|
|
53
|
+
const E = (e, a) => {
|
|
54
54
|
for (let t = 0; t < e.length; t++)
|
|
55
55
|
if (e[t] !== a[t]) return t;
|
|
56
56
|
return null;
|
|
57
|
-
},
|
|
58
|
-
return
|
|
59
|
-
() =>
|
|
57
|
+
}, M = (e = -1) => i.value.find((a) => a["active-tab-panel-idx"] === e);
|
|
58
|
+
return k(
|
|
59
|
+
() => i.value.map((e) => e["active-tab-panel-idx"]),
|
|
60
60
|
(e, a) => {
|
|
61
|
-
const t =
|
|
61
|
+
const t = E(e, a);
|
|
62
62
|
if (t === null) return;
|
|
63
|
-
const n =
|
|
63
|
+
const n = i.value[t]["active-tab-panel-idx"];
|
|
64
64
|
c.value !== t || n === void 0 || (b.value = n);
|
|
65
65
|
}
|
|
66
|
-
), (e, a) => (
|
|
67
|
-
|
|
68
|
-
ref: F,
|
|
66
|
+
), (e, a) => (l(), f("div", {
|
|
67
|
+
ref: "root",
|
|
69
68
|
class: I(e.$attrs.class),
|
|
70
69
|
"data-cy": s.dataCy
|
|
71
70
|
}, [
|
|
72
|
-
|
|
73
|
-
id: `tablist-${
|
|
71
|
+
H("span", {
|
|
72
|
+
id: `tablist-${m(d)}`,
|
|
74
73
|
class: "uikit-sr-only"
|
|
75
|
-
},
|
|
76
|
-
s.tabsPosition === "top" ? (
|
|
74
|
+
}, J(s.tabViewDescription), 9, W),
|
|
75
|
+
s.tabsPosition === "top" ? (l(), o(P, {
|
|
77
76
|
key: 0,
|
|
78
|
-
uid:
|
|
77
|
+
uid: m(d),
|
|
79
78
|
"tab-list-classes": s.tabListClasses,
|
|
80
79
|
"data-cy": s.dataCy ? `${s.dataCy}-tab-list` : ""
|
|
81
80
|
}, null, 8, ["uid", "tab-list-classes", "data-cy"])) : u("", !0),
|
|
82
|
-
(
|
|
83
|
-
|
|
81
|
+
(l(!0), f(g, null, K(i.value, (t, n) => (l(), f(g, { key: n }, [
|
|
82
|
+
M(n) ? (l(), o(R, {
|
|
84
83
|
key: 0,
|
|
85
|
-
id:
|
|
86
|
-
"labelled-by":
|
|
87
|
-
active:
|
|
84
|
+
id: V(t["active-tab-panel-idx"]),
|
|
85
|
+
"labelled-by": w(n) ?? "",
|
|
86
|
+
active: F(n),
|
|
88
87
|
class: I(t["tab-panel-classes"])
|
|
89
88
|
}, {
|
|
90
|
-
default:
|
|
91
|
-
t.renderFn.children && t.renderFn.children.default ? (
|
|
89
|
+
default: O(() => [
|
|
90
|
+
t.renderFn.children && t.renderFn.children.default ? (l(), o(Q(t.renderFn.children.default), { key: 0 })) : u("", !0)
|
|
92
91
|
]),
|
|
93
92
|
_: 2
|
|
94
93
|
}, 1032, ["id", "labelled-by", "active", "class"])) : u("", !0)
|
|
95
94
|
], 64))), 128)),
|
|
96
|
-
s.tabsPosition === "bottom" ? (
|
|
95
|
+
s.tabsPosition === "bottom" ? (l(), o(P, {
|
|
97
96
|
key: 1,
|
|
98
|
-
uid:
|
|
97
|
+
uid: m(d),
|
|
99
98
|
"tab-list-classes": s.tabListClasses,
|
|
100
99
|
"data-cy": s.dataCy ? `${s.dataCy}-tab-list` : ""
|
|
101
100
|
}, null, 8, ["uid", "tab-list-classes", "data-cy"])) : u("", !0)
|
|
102
|
-
], 10,
|
|
101
|
+
], 10, U));
|
|
103
102
|
}
|
|
104
103
|
});
|
|
105
104
|
export {
|
|
106
|
-
|
|
105
|
+
ae as default
|
|
107
106
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as l, createPropsRestProxy as i, shallowRef as m, provide as d, onMounted as p, createBlock as c, openBlock as f, unref as y, mergeProps as C, withCtx as B, renderSlot as M } from "vue";
|
|
2
|
+
import { TabsRoot as V } from "reka-ui";
|
|
3
|
+
const v = /* @__PURE__ */ l({
|
|
4
|
+
__name: "BaseTabs",
|
|
5
|
+
props: {
|
|
6
|
+
dataCy: {},
|
|
7
|
+
defaultValue: {},
|
|
8
|
+
orientation: {},
|
|
9
|
+
dir: {},
|
|
10
|
+
activationMode: {},
|
|
11
|
+
modelValue: {},
|
|
12
|
+
unmountOnHide: { type: Boolean },
|
|
13
|
+
asChild: { type: Boolean },
|
|
14
|
+
as: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["update:modelValue", "mounted"],
|
|
17
|
+
setup(t, { emit: s }) {
|
|
18
|
+
const r = i(t, ["dataCy"]), o = s, a = m(!1);
|
|
19
|
+
return d("indicatorMounted", a), d("setIndicatorMounted", () => {
|
|
20
|
+
a.value = !0;
|
|
21
|
+
}), p(() => {
|
|
22
|
+
o("mounted");
|
|
23
|
+
}), (u, n) => (f(), c(y(V), C(r, {
|
|
24
|
+
"data-cy": t.dataCy,
|
|
25
|
+
class: "uikit-base-tabs",
|
|
26
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => o("update:modelValue", e))
|
|
27
|
+
}), {
|
|
28
|
+
default: B(({ modelValue: e }) => [
|
|
29
|
+
M(u.$slots, "default", {
|
|
30
|
+
modelValue: e
|
|
31
|
+
})
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 16, ["data-cy"]));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
v as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as o, createPropsRestProxy as r, createBlock as n, openBlock as s, unref as c, mergeProps as p, withCtx as d, renderSlot as l } from "vue";
|
|
2
|
+
import { TabsContent as f } from "reka-ui";
|
|
3
|
+
const C = /* @__PURE__ */ o({
|
|
4
|
+
__name: "BaseTabsContent",
|
|
5
|
+
props: {
|
|
6
|
+
dataCy: {},
|
|
7
|
+
value: {},
|
|
8
|
+
forceMount: { type: Boolean },
|
|
9
|
+
asChild: { type: Boolean },
|
|
10
|
+
as: {}
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = r(e, ["dataCy"]);
|
|
14
|
+
return (a, u) => (s(), n(c(f), p({ "data-cy": e.dataCy }, t), {
|
|
15
|
+
default: d(() => [
|
|
16
|
+
l(a.$slots, "default")
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}, 16, ["data-cy"]));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
C as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as s, createPropsRestProxy as d, inject as u, useTemplateRef as c, onMounted as l, createBlock as p, openBlock as k, unref as f, mergeProps as m, withCtx as b, renderSlot as y, createElementVNode as I } from "vue";
|
|
2
|
+
import { TabsIndicator as x } from "reka-ui";
|
|
3
|
+
const v = /* @__PURE__ */ s({
|
|
4
|
+
__name: "BaseTabsIndicator",
|
|
5
|
+
props: {
|
|
6
|
+
dataCy: {},
|
|
7
|
+
asChild: { type: Boolean },
|
|
8
|
+
as: {}
|
|
9
|
+
},
|
|
10
|
+
setup(t, { expose: i }) {
|
|
11
|
+
const e = d(t, ["dataCy"]), o = u(
|
|
12
|
+
"setIndicatorMounted",
|
|
13
|
+
void 0
|
|
14
|
+
), n = c("tabIndicatorRef");
|
|
15
|
+
return l(() => {
|
|
16
|
+
o?.();
|
|
17
|
+
}), i({
|
|
18
|
+
updateIndicatorStyle: () => n.value?.updateIndicatorStyle?.()
|
|
19
|
+
}), (r, a) => (k(), p(f(x), m({ ref: "tabIndicatorRef" }, e, {
|
|
20
|
+
"data-cy": t.dataCy,
|
|
21
|
+
class: "uikit-base-tabs-indicator uikit-absolute uikit-bottom-[var(--indicator-bottom,0)] uikit-left-0 uikit-z-[1] uikit-h-[2px] uikit-w-[--reka-tabs-indicator-size] uikit-translate-x-[--reka-tabs-indicator-position] uikit-translate-y-[1px] uikit-transition-[width,transform] uikit-duration-300"
|
|
22
|
+
}), {
|
|
23
|
+
default: b(() => [
|
|
24
|
+
y(r.$slots, "default", {}, () => [
|
|
25
|
+
a[0] || (a[0] = I("div", { class: "uikit-base-tabs-indicator-element uikit-h-full uikit-w-full" }, null, -1))
|
|
26
|
+
])
|
|
27
|
+
]),
|
|
28
|
+
_: 3
|
|
29
|
+
}, 16, ["data-cy"]));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
v as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as o, createPropsRestProxy as r, createBlock as s, openBlock as n, unref as l, mergeProps as p, withCtx as c, renderSlot as d } from "vue";
|
|
2
|
+
import { TabsList as i } from "reka-ui";
|
|
3
|
+
const y = /* @__PURE__ */ o({
|
|
4
|
+
__name: "BaseTabsList",
|
|
5
|
+
props: {
|
|
6
|
+
dataCy: {},
|
|
7
|
+
loop: { type: Boolean },
|
|
8
|
+
asChild: { type: Boolean },
|
|
9
|
+
as: {}
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const t = r(e, ["dataCy"]);
|
|
13
|
+
return (a, f) => (n(), s(l(i), p({ "data-cy": e.dataCy }, t, { class: "uikit-relative" }), {
|
|
14
|
+
default: c(() => [
|
|
15
|
+
d(a.$slots, "default")
|
|
16
|
+
]),
|
|
17
|
+
_: 3
|
|
18
|
+
}, 16, ["data-cy"]));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
y as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as o, createPropsRestProxy as d, inject as s, createBlock as c, openBlock as u, unref as a, mergeProps as n, withCtx as f, renderSlot as l } from "vue";
|
|
2
|
+
import { TabsTrigger as k } from "reka-ui";
|
|
3
|
+
const m = /* @__PURE__ */ o({
|
|
4
|
+
__name: "BaseTabsTrigger",
|
|
5
|
+
props: {
|
|
6
|
+
dataCy: {},
|
|
7
|
+
value: {},
|
|
8
|
+
disabled: { type: Boolean },
|
|
9
|
+
asChild: { type: Boolean },
|
|
10
|
+
as: {}
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
const e = d(t, ["dataCy"]), i = s(
|
|
14
|
+
"indicatorMounted",
|
|
15
|
+
void 0
|
|
16
|
+
);
|
|
17
|
+
return (r, v) => (u(), c(a(k), n({ "data-cy": t.dataCy }, e, {
|
|
18
|
+
class: ["uikit-relative uikit-bg-white uikit-p-[4px] uikit-text-16 data-[state=active]:uikit-font-semibold", {
|
|
19
|
+
"data-[state=active]:after:uikit-absolute data-[state=active]:after:uikit-bottom-[var(--indicator-bottom,0)] data-[state=active]:after:uikit-left-0 data-[state=active]:after:uikit-z-[1] data-[state=active]:after:uikit-block data-[state=active]:after:uikit-h-[2px] data-[state=active]:after:uikit-w-full data-[state=active]:after:uikit-translate-y-[1px] data-[state=active]:after:uikit-rounded-b-[var(--indicator-border-radius-bottom)] data-[state=active]:after:uikit-rounded-t-[var(--indicator-border-radius-top)] data-[state=active]:after:uikit-bg-w-primary data-[state=active]:after:uikit-content-['']": !a(i)
|
|
20
|
+
}]
|
|
21
|
+
}), {
|
|
22
|
+
default: f(() => [
|
|
23
|
+
l(r.$slots, "default")
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
}, 16, ["data-cy", "class"]));
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
m as default
|
|
31
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,3 +19,8 @@ export type { AccordionContentPrimitiveProps } from '../UIKit/Accordion/Accordio
|
|
|
19
19
|
export type { AccordionHeaderPrimitiveProps } from '../UIKit/Accordion/AccordionHeaderPrimitive';
|
|
20
20
|
export type { AccordionItemPrimitiveProps } from '../UIKit/Accordion/AccordionItemPrimitive';
|
|
21
21
|
export type { AccordionTriggerPrimitiveProps } from '../UIKit/Accordion/AccordionTriggerPrimitive';
|
|
22
|
+
export type { BaseTabsProps } from '../UIKit/Tab/v2/BaseTabs';
|
|
23
|
+
export type { BaseTabsContentProps } from '../UIKit/Tab/v2/BaseTabsContent';
|
|
24
|
+
export type { BaseTabsIndicatorProps } from '../UIKit/Tab/v2/BaseTabsIndicator';
|
|
25
|
+
export type { BaseTabsListProps } from '../UIKit/Tab/v2/BaseTabsList';
|
|
26
|
+
export type { BaseTabsTriggerProps } from '../UIKit/Tab/v2/BaseTabsTrigger';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1-alpha.0",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,41 +52,41 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"chart.js": "4.5.1",
|
|
54
54
|
"chartjs-adapter-date-fns": "3.0.0",
|
|
55
|
-
"reka-ui": "^2.
|
|
55
|
+
"reka-ui": "^2.7.0",
|
|
56
56
|
"swiper": "^12.0.3",
|
|
57
|
-
"vue": "^3.5.
|
|
57
|
+
"vue": "^3.5.27",
|
|
58
58
|
"vue-chartjs": "5.3.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@babel/eslint-parser": "^7.28.
|
|
62
|
-
"@histoire/plugin-vue": "^1.0.0-
|
|
63
|
-
"@types/node": "^
|
|
64
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
61
|
+
"@babel/eslint-parser": "^7.28.6",
|
|
62
|
+
"@histoire/plugin-vue": "^1.0.0-beta.1",
|
|
63
|
+
"@types/node": "^25.0.9",
|
|
64
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
65
65
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
66
66
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
67
67
|
"@wikicasa-dev/svg-icons": "1.3.0",
|
|
68
68
|
"@wikicasa-dev/vue-composables": "0.1.0",
|
|
69
69
|
"@wikicasa-dev/tailwind-plugins": "^0.0.3",
|
|
70
|
-
"@wikicasa-dev/types": "2.5.
|
|
70
|
+
"@wikicasa-dev/types": "2.5.1",
|
|
71
71
|
"@wikicasa-dev/utilities": "1.2.0",
|
|
72
|
-
"autoprefixer": "^10.4.
|
|
72
|
+
"autoprefixer": "^10.4.23",
|
|
73
73
|
"date-fns": "4.1.0",
|
|
74
74
|
"eslint": "^9.39",
|
|
75
|
-
"eslint-plugin-vue": "^10.
|
|
75
|
+
"eslint-plugin-vue": "^10.7.0",
|
|
76
76
|
"jiti": "^2.6.1",
|
|
77
77
|
"glob": "^13.0.0",
|
|
78
|
-
"histoire": "^1.0.0-
|
|
78
|
+
"histoire": "^1.0.0-beta.1",
|
|
79
79
|
"postcss": "^8.5.6",
|
|
80
|
-
"prettier": "^3.
|
|
80
|
+
"prettier": "^3.8.0",
|
|
81
81
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
82
82
|
"rollup-plugin-visualizer": "^6.0.5",
|
|
83
83
|
"tailwindcss": "3.4.15",
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
|
-
"vite": "7.
|
|
85
|
+
"vite": "7.3.1",
|
|
86
86
|
"vite-plugin-dts": "^4.5.4",
|
|
87
87
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
88
|
-
"vue-router": "^4.6.
|
|
89
|
-
"vue-tsc": "3.
|
|
88
|
+
"vue-router": "^4.6.4",
|
|
89
|
+
"vue-tsc": "3.2.2"
|
|
90
90
|
},
|
|
91
91
|
"readme": "ERROR: No README data found!",
|
|
92
92
|
"scripts": {
|