@pequity/squirrel 1.0.19 → 1.0.20-beta.1
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 +1 -0
- package/dist/cjs/chunks/p-action-bar.js +1 -0
- package/dist/cjs/chunks/p-card.js +1 -0
- package/dist/cjs/chunks/p-checkbox.js +1 -0
- package/dist/cjs/chunks/p-dropdown-select.js +1 -0
- package/dist/cjs/chunks/p-input-percent.js +1 -0
- package/dist/cjs/chunks/p-pagination-info.js +1 -0
- package/dist/cjs/chunks/p-pagination.js +1 -0
- package/dist/cjs/chunks/p-ring-loader.js +1 -0
- package/dist/cjs/chunks/p-select-btn.js +1 -0
- package/dist/cjs/chunks/p-select.js +1 -0
- package/dist/cjs/chunks/p-table-loader.js +1 -0
- package/dist/cjs/chunks/p-tabs.js +1 -0
- package/dist/cjs/config.js +1 -0
- package/dist/cjs/currency.js +1 -0
- package/dist/cjs/dom.js +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/inputClassesMixin.js +1 -0
- package/dist/cjs/inputClassesShared.js +1 -0
- package/dist/cjs/listKeyboardNavigation.js +1 -0
- package/dist/cjs/number.js +1 -0
- package/dist/cjs/object.js +1 -0
- package/dist/cjs/p-action-bar.js +1 -0
- package/dist/cjs/p-alert.js +1 -0
- package/dist/cjs/p-avatar.js +1 -0
- package/dist/cjs/p-btn.js +5 -0
- package/dist/cjs/p-card.js +1 -0
- package/dist/cjs/p-checkbox.js +1 -0
- package/dist/cjs/p-chips.js +1 -0
- package/dist/cjs/p-close-btn.js +1 -0
- package/dist/cjs/p-date-picker.js +1 -0
- package/dist/cjs/p-drawer.js +1 -0
- package/dist/cjs/p-dropdown-select.js +1 -0
- package/dist/cjs/p-dropdown.js +1 -0
- package/dist/cjs/p-file-upload.js +1 -0
- package/dist/cjs/p-info-icon.js +1 -0
- package/dist/cjs/p-inline-date-picker.js +1 -0
- package/dist/cjs/p-input-number.js +1 -0
- package/dist/cjs/p-input-percent.js +1 -0
- package/dist/cjs/p-input-search.js +1 -0
- package/dist/cjs/p-input.js +1 -0
- package/dist/cjs/p-loading.js +1 -0
- package/dist/cjs/p-modal.js +1 -0
- package/dist/cjs/p-pagination-info.js +1 -0
- package/dist/cjs/p-pagination.js +1 -0
- package/dist/cjs/p-progress-bar.js +1 -0
- package/dist/cjs/p-ring-loader.js +1 -0
- package/dist/cjs/p-select-btn.js +1 -0
- package/dist/cjs/p-select-list.js +1 -0
- package/dist/cjs/p-select-pill.js +1 -0
- package/dist/cjs/p-select.js +1 -0
- package/dist/cjs/p-skeleton-loader.js +1 -0
- package/dist/cjs/p-table-filter-icon.js +1 -0
- package/dist/cjs/p-table-header-cell.js +1 -0
- package/dist/cjs/p-table-loader.js +1 -0
- package/dist/cjs/p-table-sort.js +1 -0
- package/dist/cjs/p-table-td.js +1 -0
- package/dist/cjs/p-table.js +1 -0
- package/dist/cjs/p-tabs.js +1 -0
- package/dist/cjs/p-textarea.js +1 -0
- package/dist/cjs/p-toggle.js +1 -0
- package/dist/cjs/pagination.js +1 -0
- package/dist/cjs/string.js +1 -0
- package/dist/cjs/tailwind.js +1 -0
- package/dist/cjs/text.js +1 -0
- package/dist/cjs/useInputClasses.js +1 -0
- package/dist/cjs/usePLoading.js +1 -0
- package/dist/cjs/usePModal.js +1 -0
- package/dist/cjs/usePTableColResize.js +1 -0
- package/dist/cjs/usePTableRowVirtualizer.js +1 -0
- package/dist/cjs/useSelectList.js +1 -0
- package/dist/es/chunks/_plugin-vue_export-helper.js +9 -0
- package/dist/es/chunks/p-action-bar.js +52 -0
- package/dist/es/chunks/p-card.js +25 -0
- package/dist/es/chunks/p-checkbox.js +22 -0
- package/dist/es/chunks/p-dropdown-select.js +366 -0
- package/dist/es/chunks/p-input-percent.js +45 -0
- package/dist/es/chunks/p-pagination-info.js +61 -0
- package/dist/es/chunks/p-pagination.js +93 -0
- package/dist/es/chunks/p-ring-loader.js +59 -0
- package/dist/es/chunks/p-select-btn.js +77 -0
- package/dist/es/chunks/p-select.js +97 -0
- package/dist/es/chunks/p-table-loader.js +57 -0
- package/dist/es/chunks/p-tabs.js +47 -0
- package/dist/es/config.js +105 -0
- package/dist/es/currency.js +9 -0
- package/dist/es/dom.js +15 -0
- package/dist/es/index.js +794 -0
- package/dist/es/inputClassesMixin.js +45 -0
- package/dist/es/inputClassesShared.js +61 -0
- package/dist/es/listKeyboardNavigation.js +60 -0
- package/dist/es/number.js +4 -0
- package/dist/es/object.js +4 -0
- package/dist/es/p-action-bar.js +4 -0
- package/dist/es/p-alert.js +61 -0
- package/dist/es/p-avatar.js +69 -0
- package/dist/es/p-btn.js +317 -0
- package/dist/es/p-card.js +4 -0
- package/dist/es/p-checkbox.js +4 -0
- package/dist/es/p-chips.js +91 -0
- package/dist/es/p-close-btn.js +33 -0
- package/dist/es/p-date-picker.js +132 -0
- package/dist/es/p-drawer.js +235 -0
- package/dist/es/p-dropdown-select.js +4 -0
- package/dist/es/p-dropdown.js +120 -0
- package/dist/es/p-file-upload.js +13 -0
- package/dist/es/p-info-icon.js +31 -0
- package/dist/es/p-inline-date-picker.js +132 -0
- package/dist/es/p-input-number.js +129 -0
- package/dist/es/p-input-percent.js +4 -0
- package/dist/es/p-input-search.js +109 -0
- package/dist/es/p-input.js +84 -0
- package/dist/es/p-loading.js +30 -0
- package/dist/es/p-modal.js +283 -0
- package/dist/es/p-pagination-info.js +4 -0
- package/dist/es/p-pagination.js +4 -0
- package/dist/es/p-progress-bar.js +39 -0
- package/dist/es/p-ring-loader.js +4 -0
- package/dist/es/p-select-btn.js +4 -0
- package/dist/es/p-select-list.js +4 -0
- package/dist/es/p-select-pill.js +95 -0
- package/dist/es/p-select.js +4 -0
- package/dist/es/p-skeleton-loader.js +69 -0
- package/dist/es/p-table-filter-icon.js +21 -0
- package/dist/es/p-table-header-cell.js +71 -0
- package/dist/es/p-table-loader.js +4 -0
- package/dist/es/p-table-sort.js +8 -0
- package/dist/es/p-table-td.js +42 -0
- package/dist/es/p-table.js +8 -0
- package/dist/es/p-tabs.js +4 -0
- package/dist/es/p-textarea.js +72 -0
- package/dist/es/p-toggle.js +110 -0
- package/dist/es/pagination.js +12 -0
- package/dist/es/string.js +4 -0
- package/dist/es/tailwind.js +3794 -0
- package/dist/es/text.js +11 -0
- package/dist/es/useInputClasses.js +28 -0
- package/dist/es/usePLoading.js +19 -0
- package/dist/es/usePModal.js +18 -0
- package/dist/es/usePTableColResize.js +49 -0
- package/dist/es/usePTableRowVirtualizer.js +22 -0
- package/dist/es/useSelectList.js +143 -0
- package/dist/style.css +1 -1
- package/package.json +22 -20
- package/dist/squirrel.cjs.js +0 -5
- package/dist/squirrel.es.js +0 -8220
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import d from "./inputClassesMixin.js";
|
|
2
|
+
import { defineComponent as u, openBlock as r, createElementBlock as l, normalizeClass as a, normalizeStyle as p, renderSlot as m, toDisplayString as o, createCommentVNode as f, createElementVNode as n, mergeProps as g, withDirectives as h, vShow as y } from "vue";
|
|
3
|
+
import { _ as b } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
+
const $ = u({
|
|
5
|
+
name: "PTextarea",
|
|
6
|
+
mixins: [d],
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {
|
|
10
|
+
type: [String, Number],
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
label: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ""
|
|
16
|
+
},
|
|
17
|
+
errorMsg: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: ""
|
|
20
|
+
},
|
|
21
|
+
required: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
emits: ["update:modelValue"],
|
|
27
|
+
computed: {
|
|
28
|
+
attrs() {
|
|
29
|
+
const { class: e, style: s, ...t } = this.$attrs;
|
|
30
|
+
return t;
|
|
31
|
+
},
|
|
32
|
+
style() {
|
|
33
|
+
return this.$attrs.style;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
updateValue(e) {
|
|
38
|
+
const s = e.target;
|
|
39
|
+
this.$emit("update:modelValue", s.value);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}), C = ["data-has-error"], V = ["value"];
|
|
43
|
+
function v(e, s, t, S, M, c) {
|
|
44
|
+
return r(), l("div", {
|
|
45
|
+
class: a([{ hidden: e.$attrs.hidden }, e.$attrs.class]),
|
|
46
|
+
"data-has-error": !!e.errorMsg,
|
|
47
|
+
style: p(e.style)
|
|
48
|
+
}, [
|
|
49
|
+
m(e.$slots, "label", {
|
|
50
|
+
label: e.label,
|
|
51
|
+
labelClasses: e.labelClasses
|
|
52
|
+
}, () => [
|
|
53
|
+
e.label ? (r(), l("label", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: a(e.labelClasses)
|
|
56
|
+
}, o(e.label), 3)) : f("", !0)
|
|
57
|
+
]),
|
|
58
|
+
n("textarea", g({ value: e.modelValue }, e.attrs, {
|
|
59
|
+
class: e.textareaClasses,
|
|
60
|
+
onInput: s[0] || (s[0] = (...i) => e.updateValue && e.updateValue(...i))
|
|
61
|
+
}), " ", 16, V),
|
|
62
|
+
h(n("div", {
|
|
63
|
+
class: a(e.errorMsgClasses)
|
|
64
|
+
}, o(e.errorMsg), 3), [
|
|
65
|
+
[y, e.errorMsg]
|
|
66
|
+
])
|
|
67
|
+
], 14, C);
|
|
68
|
+
}
|
|
69
|
+
const w = /* @__PURE__ */ b($, [["render", v]]);
|
|
70
|
+
export {
|
|
71
|
+
w as default
|
|
72
|
+
};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import d from "./inputClassesMixin.js";
|
|
2
|
+
import { defineComponent as p, openBlock as l, createElementBlock as o, normalizeClass as t, normalizeStyle as f, createElementVNode as s, mergeProps as c, renderSlot as u, toDisplayString as n, createCommentVNode as h, withDirectives as g, vShow as m } from "vue";
|
|
3
|
+
import { _ as b } from "./chunks/_plugin-vue_export-helper.js";
|
|
4
|
+
const y = {
|
|
5
|
+
sm: "w-9 h-5 after:top-[2px] after:left-[2px] after:h-4 after:w-4",
|
|
6
|
+
md: "w-11 h-6 after:top-[2px] after:left-[2px] after:h-5 after:w-5",
|
|
7
|
+
lg: "w-[52px] h-7 after:top-0.5 after:left-[2px] after:h-6 after:w-6"
|
|
8
|
+
}, $ = [
|
|
9
|
+
"shadow-inner-toggle",
|
|
10
|
+
"bg-p-gray-30",
|
|
11
|
+
"transition-all",
|
|
12
|
+
"duration-300",
|
|
13
|
+
"rounded-full",
|
|
14
|
+
"peer-checked:after:translate-x-full",
|
|
15
|
+
"peer-checked:after:border-white",
|
|
16
|
+
"after:content-['']",
|
|
17
|
+
"after:absolute",
|
|
18
|
+
"after:bg-white",
|
|
19
|
+
"after:rounded-full",
|
|
20
|
+
"after:transition-all",
|
|
21
|
+
"after:duration-300",
|
|
22
|
+
"peer-checked:bg-primary",
|
|
23
|
+
"peer-disabled:bg-p-blue-10",
|
|
24
|
+
"peer-disabled:after:border-p-blue-10"
|
|
25
|
+
].join(" "), C = p({
|
|
26
|
+
mixins: [d],
|
|
27
|
+
inheritAttrs: !1,
|
|
28
|
+
props: {
|
|
29
|
+
modelValue: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
label: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: ""
|
|
36
|
+
},
|
|
37
|
+
errorMsg: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
40
|
+
},
|
|
41
|
+
required: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: !1
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
emits: ["update:modelValue"],
|
|
47
|
+
computed: {
|
|
48
|
+
toggleClasses() {
|
|
49
|
+
const e = `${$} ${y[this.size]}`;
|
|
50
|
+
return this.errorMsg ? `${e} border border-on-error` : e;
|
|
51
|
+
},
|
|
52
|
+
toggleLabelClasses() {
|
|
53
|
+
return `${this.labelClasses.replace("mb-1", "")} ml-2`;
|
|
54
|
+
},
|
|
55
|
+
attrs() {
|
|
56
|
+
const { style: e, class: r, "data-testid": i, ...a } = this.$attrs;
|
|
57
|
+
return a;
|
|
58
|
+
},
|
|
59
|
+
style() {
|
|
60
|
+
return this.$attrs.style;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
methods: {
|
|
64
|
+
change(e) {
|
|
65
|
+
const r = e.target;
|
|
66
|
+
this.$emit("update:modelValue", r.checked);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}), k = ["aria-checked", "data-testid"], w = ["checked"];
|
|
70
|
+
function S(e, r, i, a, v, V) {
|
|
71
|
+
return l(), o("div", {
|
|
72
|
+
class: t(["inline-flex flex-col", e.$attrs.class]),
|
|
73
|
+
style: f(e.style),
|
|
74
|
+
role: "switch",
|
|
75
|
+
"aria-checked": e.modelValue ? "true" : "false",
|
|
76
|
+
"data-testid": e.$attrs["data-testid"]
|
|
77
|
+
}, [
|
|
78
|
+
s("label", {
|
|
79
|
+
class: t(["relative inline-flex items-center", { "cursor-pointer": !e.$attrs.disabled }])
|
|
80
|
+
}, [
|
|
81
|
+
s("input", c({
|
|
82
|
+
type: "checkbox",
|
|
83
|
+
checked: e.modelValue,
|
|
84
|
+
class: "peer sr-only"
|
|
85
|
+
}, { ...e.attrs, input: () => {
|
|
86
|
+
}, onChange: e.change }), null, 16, w),
|
|
87
|
+
s("div", {
|
|
88
|
+
class: t(e.toggleClasses)
|
|
89
|
+
}, null, 2),
|
|
90
|
+
u(e.$slots, "label", {
|
|
91
|
+
label: e.label,
|
|
92
|
+
labelClasses: e.toggleLabelClasses
|
|
93
|
+
}, () => [
|
|
94
|
+
e.label ? (l(), o("span", {
|
|
95
|
+
key: 0,
|
|
96
|
+
class: t(e.toggleLabelClasses)
|
|
97
|
+
}, n(e.label), 3)) : h("", !0)
|
|
98
|
+
], !0)
|
|
99
|
+
], 2),
|
|
100
|
+
g(s("div", {
|
|
101
|
+
class: t(e.errorMsgClasses)
|
|
102
|
+
}, n(e.errorMsg), 3), [
|
|
103
|
+
[m, e.errorMsg]
|
|
104
|
+
])
|
|
105
|
+
], 14, k);
|
|
106
|
+
}
|
|
107
|
+
const B = /* @__PURE__ */ b(C, [["render", S], ["__scopeId", "data-v-e222188e"]]);
|
|
108
|
+
export {
|
|
109
|
+
B as default
|
|
110
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const c = (t, n, i = 2, o = "...") => {
|
|
2
|
+
const u = t || 1, e = u <= i || u > n - i ? i : i - 1, r = [], h = [];
|
|
3
|
+
if (n <= 1 || n === void 0)
|
|
4
|
+
return [1];
|
|
5
|
+
r.push(1);
|
|
6
|
+
for (let s = u - e; s <= u + e; s++)
|
|
7
|
+
s < n && s > 1 && r.push(s);
|
|
8
|
+
return r.push(n), r.reduce((s, p) => (s === 1 && h.push(s), p - s !== 1 && h.push(o), h.push(p), p)), h;
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
c as createPagingRange
|
|
12
|
+
};
|