@pequity/squirrel 1.0.20-beta.1 → 1.0.20-beta.3
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/cjs/chunks/_plugin-vue_export-helper.js +9 -1
- package/dist/cjs/chunks/p-action-bar.js +60 -1
- package/dist/cjs/chunks/p-card.js +28 -1
- package/dist/cjs/chunks/p-checkbox.js +24 -1
- package/dist/cjs/chunks/p-dropdown-select.js +414 -1
- package/dist/cjs/chunks/p-input-percent.js +53 -1
- package/dist/cjs/chunks/p-pagination-info.js +66 -1
- package/dist/cjs/chunks/p-pagination.js +122 -1
- package/dist/cjs/chunks/p-ring-loader.js +81 -1
- package/dist/cjs/chunks/p-select-btn.js +97 -1
- package/dist/cjs/chunks/p-select.js +123 -1
- package/dist/cjs/chunks/p-table-loader.js +70 -1
- package/dist/cjs/chunks/p-tabs.js +52 -1
- package/dist/cjs/config.js +105 -1
- package/dist/cjs/currency.js +9 -1
- package/dist/cjs/dom.js +27 -1
- package/dist/cjs/index.js +976 -1
- package/dist/cjs/inputClassesMixin.js +50 -1
- package/dist/cjs/inputClassesShared.js +76 -1
- package/dist/cjs/listKeyboardNavigation.js +110 -1
- package/dist/cjs/number.js +9 -1
- package/dist/cjs/object.js +4 -1
- package/dist/cjs/p-action-bar.js +3 -1
- package/dist/cjs/p-alert.js +65 -1
- package/dist/cjs/p-avatar.js +71 -1
- package/dist/cjs/p-btn.js +358 -2
- package/dist/cjs/p-card.js +3 -1
- package/dist/cjs/p-checkbox.js +3 -1
- package/dist/cjs/p-chips.js +110 -1
- package/dist/cjs/p-close-btn.js +36 -1
- package/dist/cjs/p-date-picker.js +139 -1
- package/dist/cjs/p-drawer.js +253 -1
- package/dist/cjs/p-dropdown-select.js +3 -1
- package/dist/cjs/p-dropdown.js +138 -1
- package/dist/cjs/p-file-upload.js +21 -1
- package/dist/cjs/p-info-icon.js +35 -1
- package/dist/cjs/p-inline-date-picker.js +142 -1
- package/dist/cjs/p-input-number.js +146 -1
- package/dist/cjs/p-input-percent.js +3 -1
- package/dist/cjs/p-input-search.js +110 -1
- package/dist/cjs/p-input.js +89 -1
- package/dist/cjs/p-loading.js +38 -1
- package/dist/cjs/p-modal.js +369 -1
- package/dist/cjs/p-pagination-info.js +3 -1
- package/dist/cjs/p-pagination.js +3 -1
- package/dist/cjs/p-progress-bar.js +41 -1
- package/dist/cjs/p-ring-loader.js +3 -1
- package/dist/cjs/p-select-btn.js +3 -1
- package/dist/cjs/p-select-list.js +4 -1
- package/dist/cjs/p-select-pill.js +111 -1
- package/dist/cjs/p-select.js +3 -1
- package/dist/cjs/p-skeleton-loader.js +73 -1
- package/dist/cjs/p-table-filter-icon.js +20 -1
- package/dist/cjs/p-table-header-cell.js +75 -1
- package/dist/cjs/p-table-loader.js +3 -1
- package/dist/cjs/p-table-sort.js +8 -1
- package/dist/cjs/p-table-td.js +88 -1
- package/dist/cjs/p-table.js +12 -1
- package/dist/cjs/p-tabs.js +3 -1
- package/dist/cjs/p-textarea.js +73 -1
- package/dist/cjs/p-toggle.js +114 -1
- package/dist/cjs/pagination.js +29 -1
- package/dist/cjs/string.js +12 -1
- package/dist/cjs/tailwind.js +4353 -1
- package/dist/cjs/text.js +16 -1
- package/dist/cjs/useInputClasses.js +44 -1
- package/dist/cjs/usePLoading.js +35 -1
- package/dist/cjs/usePModal.js +21 -1
- package/dist/cjs/usePTableColResize.js +81 -1
- package/dist/cjs/usePTableRowVirtualizer.js +31 -1
- package/dist/cjs/useSelectList.js +256 -1
- package/dist/es/chunks/_plugin-vue_export-helper.js +7 -6
- package/dist/es/chunks/p-action-bar.js +45 -36
- package/dist/es/chunks/p-card.js +18 -14
- package/dist/es/chunks/p-checkbox.js +14 -11
- package/dist/es/chunks/p-dropdown-select.js +232 -183
- package/dist/es/chunks/p-input-percent.js +34 -25
- package/dist/es/chunks/p-pagination-info.js +30 -24
- package/dist/es/chunks/p-pagination.js +78 -48
- package/dist/es/chunks/p-ring-loader.js +63 -40
- package/dist/es/chunks/p-select-btn.js +80 -59
- package/dist/es/chunks/p-select.js +81 -54
- package/dist/es/chunks/p-table-loader.js +46 -32
- package/dist/es/chunks/p-tabs.js +35 -29
- package/dist/es/config.js +2 -2
- package/dist/es/currency.js +3 -3
- package/dist/es/dom.js +24 -12
- package/dist/es/index.js +703 -519
- package/dist/es/inputClassesMixin.js +20 -14
- package/dist/es/inputClassesShared.js +60 -45
- package/dist/es/listKeyboardNavigation.js +86 -36
- package/dist/es/number.js +7 -2
- package/dist/es/object.js +2 -2
- package/dist/es/p-action-bar.js +2 -2
- package/dist/es/p-alert.js +35 -30
- package/dist/es/p-avatar.js +30 -27
- package/dist/es/p-btn.js +209 -164
- package/dist/es/p-card.js +2 -2
- package/dist/es/p-checkbox.js +2 -2
- package/dist/es/p-chips.js +60 -40
- package/dist/es/p-close-btn.js +20 -16
- package/dist/es/p-date-picker.js +66 -58
- package/dist/es/p-drawer.js +108 -89
- package/dist/es/p-dropdown-select.js +2 -2
- package/dist/es/p-dropdown.js +52 -33
- package/dist/es/p-file-upload.js +17 -9
- package/dist/es/p-info-icon.js +21 -16
- package/dist/es/p-inline-date-picker.js +64 -53
- package/dist/es/p-input-number.js +84 -66
- package/dist/es/p-input-percent.js +2 -2
- package/dist/es/p-input-search.js +43 -41
- package/dist/es/p-input.js +51 -45
- package/dist/es/p-loading.js +31 -22
- package/dist/es/p-modal.js +261 -174
- package/dist/es/p-pagination-info.js +2 -2
- package/dist/es/p-pagination.js +2 -2
- package/dist/es/p-progress-bar.js +26 -23
- package/dist/es/p-ring-loader.js +2 -2
- package/dist/es/p-select-btn.js +2 -2
- package/dist/es/p-select-list.js +2 -2
- package/dist/es/p-select-pill.js +58 -41
- package/dist/es/p-select.js +2 -2
- package/dist/es/p-skeleton-loader.js +34 -29
- package/dist/es/p-table-filter-icon.js +11 -11
- package/dist/es/p-table-header-cell.js +38 -33
- package/dist/es/p-table-loader.js +2 -2
- package/dist/es/p-table-sort.js +2 -2
- package/dist/es/p-table-td.js +76 -29
- package/dist/es/p-table.js +10 -6
- package/dist/es/p-tabs.js +2 -2
- package/dist/es/p-textarea.js +36 -34
- package/dist/es/p-toggle.js +53 -48
- package/dist/es/pagination.js +25 -8
- package/dist/es/string.js +10 -2
- package/dist/es/tailwind.js +1660 -1101
- package/dist/es/text.js +13 -8
- package/dist/es/useInputClasses.js +38 -22
- package/dist/es/usePLoading.js +31 -15
- package/dist/es/usePModal.js +15 -12
- package/dist/es/usePTableColResize.js +71 -39
- package/dist/es/usePTableRowVirtualizer.js +24 -15
- package/dist/es/useSelectList.js +234 -121
- package/dist/style.css +2124 -1
- package/package.json +1 -1
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { INPUT_SIZES
|
|
3
|
-
import { useInputClasses
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { defineComponent, useAttrs, computed, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, renderSlot, toDisplayString, createCommentVNode, createElementVNode, mergeProps, Fragment, renderList, withDirectives, vShow } from "vue";
|
|
2
|
+
import { INPUT_SIZES } from "../inputClassesShared.js";
|
|
3
|
+
import { useInputClasses } from "../useInputClasses.js";
|
|
4
|
+
const _hoisted_1 = ["data-has-error"];
|
|
5
|
+
const _hoisted_2 = ["value"];
|
|
6
|
+
const _hoisted_3 = ["value"];
|
|
7
|
+
const nullValue = "___null_value___";
|
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
|
+
...{
|
|
10
|
+
name: "PSelect",
|
|
11
|
+
inheritAttrs: false
|
|
12
|
+
},
|
|
7
13
|
__name: "p-select",
|
|
8
14
|
props: {
|
|
9
15
|
modelValue: {
|
|
@@ -24,13 +30,13 @@ const D = ["data-has-error"], O = ["value"], $ = ["value"], v = "___null_value__
|
|
|
24
30
|
},
|
|
25
31
|
required: {
|
|
26
32
|
type: Boolean,
|
|
27
|
-
default:
|
|
33
|
+
default: false
|
|
28
34
|
},
|
|
29
35
|
size: {
|
|
30
36
|
type: String,
|
|
31
37
|
default: "md",
|
|
32
|
-
validator(
|
|
33
|
-
return Object.keys(
|
|
38
|
+
validator(value) {
|
|
39
|
+
return Object.keys(INPUT_SIZES).includes(value);
|
|
34
40
|
}
|
|
35
41
|
},
|
|
36
42
|
itemText: {
|
|
@@ -43,55 +49,76 @@ const D = ["data-has-error"], O = ["value"], $ = ["value"], v = "___null_value__
|
|
|
43
49
|
}
|
|
44
50
|
},
|
|
45
51
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
52
|
+
setup(__props, { emit: __emit }) {
|
|
53
|
+
const emit = __emit;
|
|
54
|
+
const props = __props;
|
|
55
|
+
const $attrs = useAttrs();
|
|
56
|
+
const { labelClasses, selectClasses, errorMsgClasses } = useInputClasses(props);
|
|
57
|
+
const innerValue = computed({
|
|
58
|
+
get: () => {
|
|
59
|
+
if (props.modelValue === null) {
|
|
60
|
+
return nullValue;
|
|
61
|
+
}
|
|
62
|
+
return props.modelValue;
|
|
63
|
+
},
|
|
64
|
+
set: (v) => emit("update:modelValue", v)
|
|
65
|
+
});
|
|
66
|
+
const attrs = computed(() => {
|
|
67
|
+
const { class: classes, style: style2, ...rest } = $attrs;
|
|
68
|
+
return rest;
|
|
69
|
+
});
|
|
70
|
+
const style = computed(() => $attrs.style);
|
|
71
|
+
const innerOptions = computed(() => {
|
|
72
|
+
return props.items.map((item) => {
|
|
73
|
+
return {
|
|
74
|
+
value: item[props.itemValue] === null ? nullValue : item[props.itemValue],
|
|
75
|
+
text: item[props.itemText]
|
|
76
|
+
};
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
const onChange = (e) => {
|
|
80
|
+
const value = e.target.value;
|
|
81
|
+
if (value === nullValue) {
|
|
82
|
+
emit("update:modelValue", null);
|
|
60
83
|
return;
|
|
61
84
|
}
|
|
62
|
-
|
|
85
|
+
emit("update:modelValue", ["true", "false"].includes(value) ? value === "true" : value);
|
|
86
|
+
};
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
return openBlock(), createElementBlock("div", {
|
|
89
|
+
class: normalizeClass([{ hidden: unref($attrs).hidden }, unref($attrs).class]),
|
|
90
|
+
"data-has-error": !!__props.errorMsg,
|
|
91
|
+
style: normalizeStyle(style.value)
|
|
92
|
+
}, [
|
|
93
|
+
renderSlot(_ctx.$slots, "label", {
|
|
94
|
+
label: __props.label,
|
|
95
|
+
labelClasses: unref(labelClasses)
|
|
96
|
+
}, () => [
|
|
97
|
+
__props.label ? (openBlock(), createElementBlock("label", {
|
|
98
|
+
key: 0,
|
|
99
|
+
class: normalizeClass(unref(labelClasses))
|
|
100
|
+
}, toDisplayString(__props.label), 3)) : createCommentVNode("", true)
|
|
101
|
+
]),
|
|
102
|
+
createElementVNode("select", mergeProps({ class: unref(selectClasses) }, attrs.value, {
|
|
103
|
+
value: innerValue.value,
|
|
104
|
+
onChange
|
|
105
|
+
}), [
|
|
106
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(innerOptions.value, (o) => {
|
|
107
|
+
return openBlock(), createElementBlock("option", {
|
|
108
|
+
key: String(o.value),
|
|
109
|
+
value: o.value
|
|
110
|
+
}, toDisplayString(o.text), 9, _hoisted_3);
|
|
111
|
+
}), 128))
|
|
112
|
+
], 16, _hoisted_2),
|
|
113
|
+
withDirectives(createElementVNode("div", {
|
|
114
|
+
class: normalizeClass(unref(errorMsgClasses))
|
|
115
|
+
}, toDisplayString(__props.errorMsg), 3), [
|
|
116
|
+
[vShow, __props.errorMsg]
|
|
117
|
+
])
|
|
118
|
+
], 14, _hoisted_1);
|
|
63
119
|
};
|
|
64
|
-
return (e, a) => (o(), i("div", {
|
|
65
|
-
class: c([{ hidden: s(n).hidden }, s(n).class]),
|
|
66
|
-
"data-has-error": !!t.errorMsg,
|
|
67
|
-
style: B(h.value)
|
|
68
|
-
}, [
|
|
69
|
-
M(e.$slots, "label", {
|
|
70
|
-
label: t.label,
|
|
71
|
-
labelClasses: s(f)
|
|
72
|
-
}, () => [
|
|
73
|
-
t.label ? (o(), i("label", {
|
|
74
|
-
key: 0,
|
|
75
|
-
class: c(s(f))
|
|
76
|
-
}, m(t.label), 3)) : N("", !0)
|
|
77
|
-
]),
|
|
78
|
-
p("select", z({ class: s(g) }, b.value, {
|
|
79
|
-
value: V.value,
|
|
80
|
-
onChange: _
|
|
81
|
-
}), [
|
|
82
|
-
(o(!0), i(A, null, E(C.value, (r) => (o(), i("option", {
|
|
83
|
-
key: String(r.value),
|
|
84
|
-
value: r.value
|
|
85
|
-
}, m(r.text), 9, $))), 128))
|
|
86
|
-
], 16, O),
|
|
87
|
-
I(p("div", {
|
|
88
|
-
class: c(s(S))
|
|
89
|
-
}, m(t.errorMsg), 3), [
|
|
90
|
-
[P, t.errorMsg]
|
|
91
|
-
])
|
|
92
|
-
], 14, D));
|
|
93
120
|
}
|
|
94
121
|
});
|
|
95
122
|
export {
|
|
96
|
-
|
|
123
|
+
_sfc_main as _
|
|
97
124
|
};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createVNode, normalizeClass } from "vue";
|
|
2
|
+
import PSkeletonLoader from "../p-skeleton-loader.js";
|
|
3
|
+
const _hoisted_1 = { class: "block overflow-hidden border border-p-gray-30" };
|
|
4
|
+
const _hoisted_2 = { class: "mb-0 w-full bg-surface" };
|
|
5
|
+
const _hoisted_3 = { class: "relative border-b border-p-gray-30 px-4 py-2" };
|
|
6
|
+
const _hoisted_4 = { class: "skeleton-fade" };
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
...{
|
|
9
|
+
name: "PTableLoader"
|
|
10
|
+
},
|
|
5
11
|
__name: "p-table-loader",
|
|
6
12
|
props: {
|
|
7
13
|
rows: {
|
|
@@ -21,37 +27,45 @@ const m = { class: "block overflow-hidden border border-p-gray-30" }, i = { clas
|
|
|
21
27
|
default: "h-5"
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
|
-
setup(
|
|
25
|
-
return (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
setup(__props) {
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
33
|
+
createElementVNode("table", _hoisted_2, [
|
|
34
|
+
createElementVNode("thead", null, [
|
|
35
|
+
createElementVNode("tr", null, [
|
|
36
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.columns), (col) => {
|
|
37
|
+
return openBlock(), createElementBlock("th", {
|
|
38
|
+
key: col,
|
|
39
|
+
class: "bg-surface p-0"
|
|
40
|
+
}, [
|
|
41
|
+
createElementVNode("div", _hoisted_3, [
|
|
42
|
+
createVNode(PSkeletonLoader, { class: "h-5" })
|
|
43
|
+
])
|
|
44
|
+
]);
|
|
45
|
+
}), 128))
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
createElementVNode("tbody", _hoisted_4, [
|
|
49
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.rows), (i) => {
|
|
50
|
+
return openBlock(), createElementBlock("tr", { key: i }, [
|
|
51
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(Number(__props.columns), (col) => {
|
|
52
|
+
return openBlock(), createElementBlock("td", {
|
|
53
|
+
key: col,
|
|
54
|
+
class: normalizeClass([__props.tdClasses, "border-b border-p-blue-15"])
|
|
55
|
+
}, [
|
|
56
|
+
createVNode(PSkeletonLoader, {
|
|
57
|
+
class: normalizeClass(__props.tdSkeletonClasses)
|
|
58
|
+
}, null, 8, ["class"])
|
|
59
|
+
], 2);
|
|
60
|
+
}), 128))
|
|
61
|
+
]);
|
|
62
|
+
}), 128))
|
|
37
63
|
])
|
|
38
|
-
]),
|
|
39
|
-
l("tbody", p, [
|
|
40
|
-
(e(!0), t(a, null, o(Number(r.rows), (s) => (e(), t("tr", { key: s }, [
|
|
41
|
-
(e(!0), t(a, null, o(Number(r.columns), (c) => (e(), t("td", {
|
|
42
|
-
key: c,
|
|
43
|
-
class: d([r.tdClasses, "border-b border-p-blue-15"])
|
|
44
|
-
}, [
|
|
45
|
-
n(u, {
|
|
46
|
-
class: d(r.tdSkeletonClasses)
|
|
47
|
-
}, null, 8, ["class"])
|
|
48
|
-
], 2))), 128))
|
|
49
|
-
]))), 128))
|
|
50
64
|
])
|
|
51
|
-
])
|
|
52
|
-
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
53
67
|
}
|
|
54
68
|
});
|
|
55
69
|
export {
|
|
56
|
-
|
|
70
|
+
_sfc_main as _
|
|
57
71
|
};
|
package/dist/es/chunks/p-tabs.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, withCtx, createElementVNode, normalizeClass, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = { class: "flex items-center gap-2" };
|
|
3
|
+
const _hoisted_2 = { key: 0 };
|
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3
5
|
__name: "p-tabs",
|
|
4
6
|
props: {
|
|
5
7
|
tabs: {
|
|
6
8
|
type: Array,
|
|
7
|
-
required:
|
|
9
|
+
required: true
|
|
8
10
|
},
|
|
9
11
|
activeTab: {
|
|
10
12
|
type: String,
|
|
11
|
-
required:
|
|
13
|
+
required: true
|
|
12
14
|
},
|
|
13
15
|
tabsLeftPadding: {
|
|
14
16
|
type: Number,
|
|
@@ -16,32 +18,36 @@ const g = { class: "flex items-center gap-2" }, v = { key: 0 }, C = /* @__PURE__
|
|
|
16
18
|
}
|
|
17
19
|
},
|
|
18
20
|
emits: ["click:tab"],
|
|
19
|
-
setup(
|
|
20
|
-
return (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
setup(__props) {
|
|
22
|
+
return (_ctx, _cache) => {
|
|
23
|
+
return openBlock(), createElementBlock("div", {
|
|
24
|
+
class: "flex gap-4 border-b border-p-gray-30 text-base font-semibold",
|
|
25
|
+
style: normalizeStyle({ paddingLeft: `${__props.tabsLeftPadding}px` })
|
|
26
|
+
}, [
|
|
27
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabs, (tabData) => {
|
|
28
|
+
return openBlock(), createBlock(resolveDynamicComponent(tabData.to ? "RouterLink" : "div"), mergeProps({
|
|
29
|
+
key: `tab-${tabData.name}`
|
|
30
|
+
}, tabData.to ? { to: tabData.to } : {}, {
|
|
31
|
+
class: [[__props.activeTab === tabData.name ? "border-primary text-primary" : "border-transparent text-p-gray-40"], "group cursor-pointer border-b-2 pb-3 hover:border-primary hover:text-primary"],
|
|
32
|
+
onClick: ($event) => _ctx.$emit("click:tab", tabData.name)
|
|
33
|
+
}), {
|
|
34
|
+
default: withCtx(() => [
|
|
35
|
+
createElementVNode("div", _hoisted_1, [
|
|
36
|
+
tabData.icon ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
37
|
+
(openBlock(), createBlock(resolveDynamicComponent(tabData.icon), {
|
|
38
|
+
class: normalizeClass(["group-hover:fill-primary", [__props.activeTab === tabData.name ? "fill-primary" : "fill-p-gray-40"]])
|
|
39
|
+
}, null, 8, ["class"]))
|
|
40
|
+
])) : createCommentVNode("", true),
|
|
41
|
+
createElementVNode("div", null, toDisplayString(tabData.title), 1)
|
|
42
|
+
])
|
|
43
|
+
]),
|
|
44
|
+
_: 2
|
|
45
|
+
}, 1040, ["class", "onClick"]);
|
|
46
|
+
}), 128))
|
|
47
|
+
], 4);
|
|
48
|
+
};
|
|
43
49
|
}
|
|
44
50
|
});
|
|
45
51
|
export {
|
|
46
|
-
|
|
52
|
+
_sfc_main as _
|
|
47
53
|
};
|
package/dist/es/config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const config = {
|
|
2
2
|
content: ["./index.html", "./squirrel/**/*.{vue,js,ts,jsx,tsx,mdx}", "./src/**/*.{vue,js,ts,jsx,tsx,mdx}"],
|
|
3
3
|
theme: {
|
|
4
4
|
colors: {
|
|
@@ -101,5 +101,5 @@ const r = {
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
export {
|
|
104
|
-
|
|
104
|
+
config
|
|
105
105
|
};
|
package/dist/es/currency.js
CHANGED
package/dist/es/dom.js
CHANGED
|
@@ -1,15 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
var
|
|
3
|
-
if (!(
|
|
1
|
+
const isVisible = (element) => {
|
|
2
|
+
var _a;
|
|
3
|
+
if (!(element instanceof Element)) {
|
|
4
4
|
throw Error("You must provide a DOM element.");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
}
|
|
6
|
+
return !!(element.offsetWidth || element.offsetHeight || element.getClientRects().length) && window.getComputedStyle(element).visibility !== "hidden" && window.getComputedStyle(element).display !== "none" && ((_a = element.style) == null ? void 0 : _a.transform.includes("translateY(-9999px)")) === false;
|
|
7
|
+
};
|
|
8
|
+
const getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {
|
|
9
|
+
const listLength = list.length;
|
|
10
|
+
let index = activeElement ? list.indexOf(activeElement) : -1;
|
|
11
|
+
if (index === -1) {
|
|
12
|
+
return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];
|
|
13
|
+
}
|
|
14
|
+
index += shouldGetNext ? 1 : -1;
|
|
15
|
+
if (isCycleAllowed) {
|
|
16
|
+
index = (index + listLength) % listLength;
|
|
17
|
+
}
|
|
18
|
+
return list[Math.max(0, Math.min(index, listLength - 1))];
|
|
19
|
+
};
|
|
20
|
+
const isElement = (el) => {
|
|
21
|
+
return typeof el === "object" && el !== null && "tagName" in el && el instanceof HTMLElement;
|
|
22
|
+
};
|
|
11
23
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
24
|
+
getNextActiveElement,
|
|
25
|
+
isElement,
|
|
26
|
+
isVisible
|
|
15
27
|
};
|