@wikicasa-dev/components 1.2.30 → 1.2.32
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/AccessibleSelect.js +4 -1
- package/dist/BaseAccordion.js +4 -1
- package/dist/BaseAccordionBtn.js +4 -1
- package/dist/BaseAccordionContent.js +4 -1
- package/dist/BaseAccordionItem.js +4 -1
- package/dist/BaseAlert.js +4 -1
- package/dist/BaseAutocomplete.js +4 -1
- package/dist/BaseBadge.js +4 -1
- package/dist/BaseBtModal.js +188 -1
- package/dist/BaseButton.js +4 -1
- package/dist/BaseCard.js +34 -1
- package/dist/BaseComplexToggle.js +140 -1
- package/dist/BaseDropDown.js +4 -1
- package/dist/BaseFloatingLabel.js +49 -1
- package/dist/BaseIcon.js +41 -1
- package/dist/BaseInput.js +278 -1
- package/dist/BaseNavItem.js +59 -1
- package/dist/BasePagination.js +164 -1
- package/dist/BasePaper.js +15 -1
- package/dist/BaseSlider.js +261 -7
- package/dist/BaseSnackbar.js +80 -1
- package/dist/BaseTab.js +78 -1
- package/dist/BaseTextarea.js +143 -1
- package/dist/BaseToggle.js +45 -1
- package/dist/BaseTooltip.js +54 -1
- package/dist/BaseUploadFile.js +70 -1
- package/dist/CheckboxBtn.js +75 -1
- package/dist/CheckboxGroup.js +4 -1
- package/dist/IntersectionObservable.js +4 -1
- package/dist/IntersectionObserver.js +4 -1
- package/dist/RadioButton.js +59 -1
- package/dist/RadioGroup.js +66 -1
- package/dist/SelectItem.js +4 -1
- package/dist/StaticSpinner.js +32 -1
- package/dist/SwiperCarousel.js +4 -1
- package/dist/index.js +67 -1
- package/dist/useBreakpoints.js +21 -1
- package/dist/useFloatingLabel.js +33 -1
- package/dist/useKeyboardController.js +41 -1
- package/package.json +3 -10
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.BsiqDUGT.js +0 -1
- package/dist/chunks/ArrowIcon.BkjChBnb.js +0 -1
- package/dist/chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.f0Al20X4.js +0 -1
- package/dist/chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.C_HkVDZJ.js +0 -1
- package/dist/chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.U3YQw0dV.js +0 -1
- package/dist/chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.BiU7T1M1.js +0 -1
- package/dist/chunks/BaseAlert.vue_vue_type_script_setup_true_lang.CjFsLhwr.js +0 -1
- package/dist/chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.D8WvGQMa.js +0 -1
- package/dist/chunks/BaseBadge.vue_vue_type_style_index_0_lang.DjrBMyt7.js +0 -1
- package/dist/chunks/BaseButton.vue_vue_type_script_setup_true_lang.Ns4H_IBk.js +0 -1
- package/dist/chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.fEH9G16N.js +0 -1
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.JeL27AzP.js +0 -1
- package/dist/chunks/CloseIcon.ClSHNHpF.js +0 -1
- package/dist/chunks/DefaultValues.S0CTWW-b.js +0 -1
- package/dist/chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BPatqpa3.js +0 -1
- package/dist/chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.DYKR3Sel.js +0 -1
- package/dist/chunks/ObjectUtils.C5gq8MtL.js +0 -1
- package/dist/chunks/SelectItem.vue_vue_type_script_setup_true_lang.3ie26G8n.js +0 -1
- package/dist/chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.CPn3IY_R.js +0 -5
- package/dist/chunks/_plugin-vue_export-helper.BHFhmbuH.js +0 -1
- package/dist/chunks/autoplay.Dyvby5gX.js +0 -1
- package/dist/chunks/controller.Dyvby5gX.js +0 -1
- package/dist/chunks/index.-WuGFU0l.js +0 -1
- package/dist/chunks/js.cookie.BMVAK0Pe.js +0 -1
- package/dist/chunks/thumbs.Dyvby5gX.js +0 -1
package/dist/BaseInput.js
CHANGED
|
@@ -1 +1,278 @@
|
|
|
1
|
-
|
|
1
|
+
import './assets/BaseInput.css';
|
|
2
|
+
import v from "./BaseFloatingLabel.js";
|
|
3
|
+
import { useFloatingLabel as y } from "./useFloatingLabel.js";
|
|
4
|
+
import { defineComponent as w, resolveComponent as g, openBlock as l, createElementBlock as s, normalizeClass as n, renderSlot as d, createElementVNode as o, withModifiers as p, withKeys as V, createCommentVNode as b, createBlock as c, Fragment as m, renderList as $ } from "vue";
|
|
5
|
+
import { _ as I } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
6
|
+
const F = w({
|
|
7
|
+
name: "BaseInput",
|
|
8
|
+
components: { BaseFloatingLabel: v },
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
props: {
|
|
11
|
+
inputClass: { type: [String, Array], required: !1, default: "" },
|
|
12
|
+
inputType: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "text-input"
|
|
15
|
+
},
|
|
16
|
+
labelText: { type: String, default: "" },
|
|
17
|
+
border: { type: Boolean, default: !0 },
|
|
18
|
+
radius: { type: Boolean, default: !0 },
|
|
19
|
+
modelValue: { type: [String, Number] },
|
|
20
|
+
feedback: { type: Object },
|
|
21
|
+
isValid: { type: Boolean, default: null },
|
|
22
|
+
auto: { type: Boolean, default: !0 },
|
|
23
|
+
keepFloatingLabel: { type: Boolean, default: !1 },
|
|
24
|
+
formatter: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: null
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
emits: [
|
|
30
|
+
"update:modelValue",
|
|
31
|
+
"click",
|
|
32
|
+
"keydown-enter-pressed",
|
|
33
|
+
"focusin",
|
|
34
|
+
"focusout",
|
|
35
|
+
"keydown"
|
|
36
|
+
],
|
|
37
|
+
setup(e, t) {
|
|
38
|
+
const {
|
|
39
|
+
labelState: a,
|
|
40
|
+
setInitialLabelState: k,
|
|
41
|
+
handleFocusIn: h,
|
|
42
|
+
handleFocusOut: f,
|
|
43
|
+
setInlineLabel: r,
|
|
44
|
+
setFloatingLabel: i
|
|
45
|
+
} = y(t.emit);
|
|
46
|
+
return {
|
|
47
|
+
labelState: a,
|
|
48
|
+
setInitialLabelState: k,
|
|
49
|
+
handleFocusIn: h,
|
|
50
|
+
handleFocusOut: f,
|
|
51
|
+
setInlineLabel: r,
|
|
52
|
+
setFloatingLabel: i
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
data() {
|
|
56
|
+
return {
|
|
57
|
+
type: "",
|
|
58
|
+
//a valid input type
|
|
59
|
+
feedbackObj: {},
|
|
60
|
+
pointerDownListener: (e) => {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
computed: {
|
|
66
|
+
passwordIcon() {
|
|
67
|
+
return document ? document.querySelector("[data-type='password-icon']") : null;
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
watch: {
|
|
71
|
+
feedback() {
|
|
72
|
+
this.normalizeFeedbackProp();
|
|
73
|
+
},
|
|
74
|
+
modelValue(e) {
|
|
75
|
+
if (e) {
|
|
76
|
+
const t = this.$refs.baseInput;
|
|
77
|
+
if (!t)
|
|
78
|
+
return;
|
|
79
|
+
!t.value && this.formatter && (e = t.value);
|
|
80
|
+
const a = this.updateInputValue(t, e);
|
|
81
|
+
this.$emit("update:modelValue", a);
|
|
82
|
+
} else
|
|
83
|
+
this.$refs.baseInput.value = "";
|
|
84
|
+
e != null && `${e}`.length > 0 && this.auto && this.labelState !== "floating-label" ? this.labelState = "floating-label" : (e == null || e == null) && (this.labelState = "inline-label");
|
|
85
|
+
},
|
|
86
|
+
//Manually moving the floating label
|
|
87
|
+
keepFloatingLabel(e) {
|
|
88
|
+
e ? this.setFloatingLabel() : this.handleFocusOut(this.modelValue, !0, this.auto);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
created() {
|
|
92
|
+
this.type = this.$attrs.type, this.normalizeFeedbackProp(), this.setInitialLabelState(this.modelValue);
|
|
93
|
+
},
|
|
94
|
+
mounted() {
|
|
95
|
+
if ((this.modelValue != null || this.modelValue != null) && (this.$refs.baseInput.value = `${this.modelValue}`), this.formatter) {
|
|
96
|
+
const e = this.updateInputValue(
|
|
97
|
+
this.$refs.baseInput,
|
|
98
|
+
`${this.modelValue}`
|
|
99
|
+
);
|
|
100
|
+
this.$emit("update:modelValue", e);
|
|
101
|
+
}
|
|
102
|
+
this.setPointerOutListener();
|
|
103
|
+
},
|
|
104
|
+
unmounted() {
|
|
105
|
+
this.passwordIcon?.removeEventListener(
|
|
106
|
+
"pointerdown",
|
|
107
|
+
this.pointerDownListener
|
|
108
|
+
);
|
|
109
|
+
},
|
|
110
|
+
methods: {
|
|
111
|
+
select() {
|
|
112
|
+
this.$refs.baseInput.select();
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Prevents the default behaviour of pointerout so the clicked element won't make lose the focus to the input element
|
|
116
|
+
* */
|
|
117
|
+
setPointerOutListener() {
|
|
118
|
+
if (this.$attrs.type !== "password")
|
|
119
|
+
return;
|
|
120
|
+
const e = this.passwordIcon;
|
|
121
|
+
e && e.addEventListener("pointerdown", this.pointerDownListener);
|
|
122
|
+
},
|
|
123
|
+
handleFloatingLabelClick() {
|
|
124
|
+
this.$refs.baseInput.focus();
|
|
125
|
+
},
|
|
126
|
+
normalizeFeedbackProp() {
|
|
127
|
+
this.feedback && (this.feedbackObj = this.feedback, this.feedback.valid && typeof this.feedback.valid == "string" && (this.feedbackObj.valid = [this.feedback.valid]), this.feedback.invalid && typeof this.feedback.invalid == "string" && (this.feedbackObj.invalid = [this.feedback.invalid]));
|
|
128
|
+
},
|
|
129
|
+
updateInputValue(e, t) {
|
|
130
|
+
if (!t)
|
|
131
|
+
return e.value = "", "";
|
|
132
|
+
let a = "";
|
|
133
|
+
return this.formatter && this.formatter.unFormatFn ? a = `${this.formatter.unFormatFn(t)}` : a = t, this.formatter ? e.value = this.formatter.formatFn(a) : e.value = a, a;
|
|
134
|
+
},
|
|
135
|
+
handleInputChange({ target: e }) {
|
|
136
|
+
if (this.inputType === "select")
|
|
137
|
+
return;
|
|
138
|
+
const t = e, a = this.updateInputValue(t, t.value);
|
|
139
|
+
this.$emit("update:modelValue", a);
|
|
140
|
+
},
|
|
141
|
+
handleClick(e) {
|
|
142
|
+
this.$emit("click", e);
|
|
143
|
+
},
|
|
144
|
+
handleClean() {
|
|
145
|
+
this.$emit("update:modelValue", ""), this.setInlineLabel();
|
|
146
|
+
},
|
|
147
|
+
handleShowPasswd() {
|
|
148
|
+
this.type === "password" ? this.type = "text" : this.type === "text" && (this.type = "password");
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}), L = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby", "readonly", "type", "pattern", "min", "max", "maxlength", "inputmode", "placeholder"], C = {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: "uikit-invisible uikit-float-none uikit-mb-2 uikit-ml-2 uikit-block uikit-h-3 uikit-w-auto uikit-max-w-full uikit-overflow-hidden uikit-whitespace-nowrap uikit-p-0 uikit-text uikit-transition-[max-width] uikit-duration-[50ms] uikit-ease-out"
|
|
154
|
+
}, S = ["innerHTML"], T = ["innerHTML"], O = ["innerHTML"], B = { class: "under-label uikit-absolute uikit-text-12" };
|
|
155
|
+
function j(e, t, a, k, h, f) {
|
|
156
|
+
const r = g("base-floating-label");
|
|
157
|
+
return l(), s("div", {
|
|
158
|
+
class: n(["input-wrapper uikit-relative uikit-inline-block uikit-w-full [&.has-right-icon.is-invalid_.text-input-icon]:uikit-mr-25px [&.has-right-icon.is-valid_.text-input-icon]:uikit-mr-25px", [
|
|
159
|
+
e.$attrs.class,
|
|
160
|
+
{ "uikit-mt-10px": e.labelText },
|
|
161
|
+
{ "floating-label": e.labelText },
|
|
162
|
+
e.labelState === "floating-label" ? "floating-state" : "inline-state",
|
|
163
|
+
{
|
|
164
|
+
"has-right-icon": e.$attrs["with-right-icon"] !== void 0 ? e.$attrs["with-right-icon"] : !!e.$slots.righticon
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"has-left-icon": e.$attrs["with-left-icon"] !== void 0 ? e.$attrs["with-left-icon"] : !!e.$slots.leftIcon
|
|
168
|
+
},
|
|
169
|
+
{ "is-invalid": e.isValid === !1, "is-valid": e.isValid }
|
|
170
|
+
]])
|
|
171
|
+
}, [
|
|
172
|
+
d(e.$slots, "leftIcon", {}, void 0, !0),
|
|
173
|
+
d(e.$slots, "righticon", {
|
|
174
|
+
handleClean: e.handleClean,
|
|
175
|
+
handleShowPasswd: e.handleShowPasswd,
|
|
176
|
+
curType: e.type
|
|
177
|
+
}, void 0, !0),
|
|
178
|
+
o("input", {
|
|
179
|
+
id: e.$attrs.id,
|
|
180
|
+
ref: "baseInput",
|
|
181
|
+
"data-cy": e.$attrs["data-cy"],
|
|
182
|
+
name: e.$attrs.name,
|
|
183
|
+
class: n(["uikit-peer uikit-box-border uikit-h-11 uikit-truncate !uikit-border-none uikit-bg-no-repeat focus:uikit-shadow-none focus:uikit-outline-none", [
|
|
184
|
+
{ "uikit-rounded-xs": e.radius },
|
|
185
|
+
{
|
|
186
|
+
"input-element uikit-block uikit-w-full uikit-appearance-none uikit-px-4 uikit-outline-0": e.inputType === "text-input"
|
|
187
|
+
},
|
|
188
|
+
{ "uikit-text-w-secondary": e.$attrs.disabled },
|
|
189
|
+
{
|
|
190
|
+
"is-invalid invalid-bg !uikit-pr-9": e.isValid === !1,
|
|
191
|
+
"is-valid valid-bg !uikit-pr-9": e.isValid
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"uikit-pr-[42px]": e.$attrs["with-right-icon"] !== void 0 ? e.$attrs["with-right-icon"] : !!e.$slots.righticon
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"uikit-pl-[42px]": e.$attrs["with-left-icon"] !== void 0 ? e.$attrs["with-left-icon"] : !!e.$slots.leftIcon
|
|
198
|
+
},
|
|
199
|
+
e.inputClass
|
|
200
|
+
]]),
|
|
201
|
+
autocomplete: e.$attrs.autocomplete === "on" ? "on" : "off",
|
|
202
|
+
disabled: e.$attrs.disabled,
|
|
203
|
+
"aria-labelledby": e.$attrs.id,
|
|
204
|
+
readonly: e.$attrs.readonly,
|
|
205
|
+
type: e.type,
|
|
206
|
+
pattern: e.$attrs.pattern,
|
|
207
|
+
min: e.$attrs.min,
|
|
208
|
+
max: e.$attrs.max,
|
|
209
|
+
maxlength: e.$attrs.maxlength,
|
|
210
|
+
inputmode: e.$attrs.inputmode,
|
|
211
|
+
placeholder: e.$attrs.placeholder,
|
|
212
|
+
onClick: t[0] || (t[0] = (...i) => e.handleClick && e.handleClick(...i)),
|
|
213
|
+
onFocusin: t[1] || (t[1] = p(() => e.handleFocusIn(), ["stop"])),
|
|
214
|
+
onFocusout: t[2] || (t[2] = p((i) => !e.keepFloatingLabel && e.handleFocusOut(e.modelValue, !1, e.auto), ["stop"])),
|
|
215
|
+
onInput: t[3] || (t[3] = p((...i) => e.handleInputChange && e.handleInputChange(...i), ["stop"])),
|
|
216
|
+
onKeydown: [
|
|
217
|
+
t[4] || (t[4] = V((i) => e.$emit("keydown-enter-pressed"), ["enter"])),
|
|
218
|
+
t[5] || (t[5] = (i) => e.$emit("keydown", i))
|
|
219
|
+
]
|
|
220
|
+
}, null, 42, L),
|
|
221
|
+
o("fieldset", {
|
|
222
|
+
class: n(["uikit-pointer-events-none uikit-absolute -uikit-top-[5px] uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-h-12 uikit-overflow-hidden uikit-px-2 uikit-py-0 uikit-text-left", [
|
|
223
|
+
{ "uikit-border-0": !e.border },
|
|
224
|
+
{
|
|
225
|
+
"uikit-border uikit-border-solid uikit-transition-[border] uikit-duration-100 uikit-ease-out peer-focus:uikit-border-2 peer-focus:uikit-border-w-primary peer-focus:[&.is-invalid]:uikit-border-w-danger": e.border,
|
|
226
|
+
"uikit-rounded-xs": e.radius,
|
|
227
|
+
"is-invalid uikit-border-w-danger": e.isValid === !1,
|
|
228
|
+
"is-valid uikit-border-w-primary": e.isValid,
|
|
229
|
+
"uikit-border-w-secondary": e.isValid === null && e.border
|
|
230
|
+
},
|
|
231
|
+
{ "no-floating-label uikit-top-0": !e.labelText },
|
|
232
|
+
e.$attrs["fieldset-classes"]
|
|
233
|
+
]])
|
|
234
|
+
}, [
|
|
235
|
+
e.labelText ? (l(), s("legend", C, [
|
|
236
|
+
o("span", {
|
|
237
|
+
class: n(["visible-label uikit-opacity-0", [
|
|
238
|
+
{ "uikit-mx-5px": e.labelText },
|
|
239
|
+
{
|
|
240
|
+
"uikit-visible uikit-inline-block": e.labelState === "floating-label"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"uikit-invisible uikit-hidden": e.labelState === "inline-label"
|
|
244
|
+
}
|
|
245
|
+
]]),
|
|
246
|
+
innerHTML: e.labelText
|
|
247
|
+
}, null, 10, S)
|
|
248
|
+
])) : b("", !0)
|
|
249
|
+
], 2),
|
|
250
|
+
e.labelText ? (l(), c(r, {
|
|
251
|
+
key: 0,
|
|
252
|
+
for: e.$attrs.id,
|
|
253
|
+
"label-text": e.labelText,
|
|
254
|
+
"label-state": e.labelState,
|
|
255
|
+
"is-valid": e.isValid,
|
|
256
|
+
required: e.$attrs.required,
|
|
257
|
+
disabled: e.$attrs.disabled,
|
|
258
|
+
"label-classes": e.$attrs["label-classes"],
|
|
259
|
+
onClick: e.handleFloatingLabelClick
|
|
260
|
+
}, null, 8, ["for", "label-text", "label-state", "is-valid", "required", "disabled", "label-classes", "onClick"])) : b("", !0),
|
|
261
|
+
e.isValid === !1 ? (l(!0), s(m, { key: 1 }, $(e.feedbackObj.invalid, (i, u) => (l(), s("div", {
|
|
262
|
+
key: `${e.$attrs.id}_invalid_${u}`,
|
|
263
|
+
class: "uikit-mt-1 uikit-text-12 uikit-text-w-danger",
|
|
264
|
+
innerHTML: i
|
|
265
|
+
}, null, 8, T))), 128)) : e.isValid === !0 ? (l(!0), s(m, { key: 2 }, $(e.feedbackObj.valid, (i, u) => (l(), s("div", {
|
|
266
|
+
key: `${e.$attrs.id}_valid_${u}`,
|
|
267
|
+
class: "uikit-mt-1 uikit-text-12 uikit-text-w-primary",
|
|
268
|
+
innerHTML: i
|
|
269
|
+
}, null, 8, O))), 128)) : b("", !0),
|
|
270
|
+
o("div", B, [
|
|
271
|
+
d(e.$slots, "under-label", {}, void 0, !0)
|
|
272
|
+
])
|
|
273
|
+
], 2);
|
|
274
|
+
}
|
|
275
|
+
const z = /* @__PURE__ */ I(F, [["render", j], ["__scopeId", "data-v-bbdd7899"]]);
|
|
276
|
+
export {
|
|
277
|
+
z as default
|
|
278
|
+
};
|
package/dist/BaseNavItem.js
CHANGED
|
@@ -1 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
import './assets/BaseNavItem.css';
|
|
2
|
+
import s from "./BaseIcon.js";
|
|
3
|
+
import { defineComponent as r, resolveComponent as n, openBlock as i, createElementBlock as l, normalizeClass as c, createBlock as m, createCommentVNode as u, renderSlot as p, createElementVNode as d, toDisplayString as f } from "vue";
|
|
4
|
+
import { _ as b } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
+
const k = r({
|
|
6
|
+
name: "BaseNavItem",
|
|
7
|
+
components: { BaseIcon: s },
|
|
8
|
+
props: {
|
|
9
|
+
text: {
|
|
10
|
+
type: String
|
|
11
|
+
},
|
|
12
|
+
iconName: {
|
|
13
|
+
type: String
|
|
14
|
+
},
|
|
15
|
+
iconClass: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "uikit-mr-5px"
|
|
18
|
+
},
|
|
19
|
+
navItemCustomClass: {
|
|
20
|
+
type: String
|
|
21
|
+
},
|
|
22
|
+
isActive: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
emits: ["click"],
|
|
28
|
+
watch: {
|
|
29
|
+
isActive(e) {
|
|
30
|
+
const t = this.$refs["base-nav-item"];
|
|
31
|
+
e ? t.classList.add("active") : t.classList.remove("active");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}), v = ["id"];
|
|
35
|
+
function g(e, t, C, y, $, N) {
|
|
36
|
+
const a = n("base-icon");
|
|
37
|
+
return i(), l("li", {
|
|
38
|
+
id: `${e.$attrs.id}`,
|
|
39
|
+
class: c(["uikit-group/tabs uikit-relative uikit-flex uikit-cursor-pointer uikit-items-center uikit-pb-5px disabled:uikit-border-transparent disabled:uikit-bg-transparent disabled:uikit-text-gray-600", [e.navItemCustomClass]]),
|
|
40
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("click", o))
|
|
41
|
+
}, [
|
|
42
|
+
e.iconName ? (i(), m(a, {
|
|
43
|
+
key: 0,
|
|
44
|
+
"alt-attribute": "icon",
|
|
45
|
+
"icon-name": e.iconName,
|
|
46
|
+
"icon-class": e.iconClass
|
|
47
|
+
}, null, 8, ["icon-name", "icon-class"])) : u("", !0),
|
|
48
|
+
p(e.$slots, "default", {}, () => [
|
|
49
|
+
d("a", {
|
|
50
|
+
ref: "base-nav-item",
|
|
51
|
+
class: "after:uikit-absolute after:uikit-bottom-0 after:uikit-left-0 after:uikit-w-full after:uikit-content-[''] group-hover/tabs:after:uikit-border-b-2 group-hover/tabs:after:uikit-border-b-w-primary group-hover/tabs:after:[border-bottom-style:solid]"
|
|
52
|
+
}, f(e.text), 513)
|
|
53
|
+
], !0)
|
|
54
|
+
], 10, v);
|
|
55
|
+
}
|
|
56
|
+
const _ = /* @__PURE__ */ b(k, [["render", g], ["__scopeId", "data-v-7f3f4fee"]]);
|
|
57
|
+
export {
|
|
58
|
+
_ as default
|
|
59
|
+
};
|
package/dist/BasePagination.js
CHANGED
|
@@ -1 +1,164 @@
|
|
|
1
|
-
|
|
1
|
+
import c from "./BaseIcon.js";
|
|
2
|
+
import "./chunks/js.cookie.BaTT4o7s.js";
|
|
3
|
+
import { defineComponent as h, resolveComponent as d, openBlock as r, createElementBlock as n, createVNode as k, createCommentVNode as o, Fragment as l, renderList as g, toDisplayString as s, createElementVNode as f } from "vue";
|
|
4
|
+
import { _ as v } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
+
function p(i, t = !1) {
|
|
6
|
+
return i == null ? "" : P(t ? Math.round(i) : Math.floor(i), 0);
|
|
7
|
+
}
|
|
8
|
+
function P(i, t) {
|
|
9
|
+
return !i && i !== 0 ? "" : i.toLocaleString(
|
|
10
|
+
"it-IT",
|
|
11
|
+
// usare una stringa tipo 'en-US' per sovrascrivere la lingua del browser
|
|
12
|
+
{
|
|
13
|
+
minimumFractionDigits: t,
|
|
14
|
+
maximumFractionDigits: t
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const w = h({
|
|
19
|
+
name: "BasePagination",
|
|
20
|
+
components: { BaseIcon: c },
|
|
21
|
+
props: {
|
|
22
|
+
offset: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0
|
|
25
|
+
},
|
|
26
|
+
count: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 0
|
|
29
|
+
},
|
|
30
|
+
limit: {
|
|
31
|
+
type: Number,
|
|
32
|
+
default: 25
|
|
33
|
+
},
|
|
34
|
+
siblings: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 3
|
|
37
|
+
},
|
|
38
|
+
additionalCount: {
|
|
39
|
+
type: Number,
|
|
40
|
+
default: 0
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
emits: ["new-pagination-offset"],
|
|
44
|
+
data() {
|
|
45
|
+
return {
|
|
46
|
+
activeHoverOnLeftIcon: !1,
|
|
47
|
+
activeHoverOnRightIcon: !1
|
|
48
|
+
};
|
|
49
|
+
},
|
|
50
|
+
methods: {
|
|
51
|
+
handleHoverIcon(i, t) {
|
|
52
|
+
i ? t === "LeftArrow" ? this.activeHoverOnLeftIcon = !0 : this.activeHoverOnRightIcon = !0 : (this.activeHoverOnLeftIcon = !1, this.activeHoverOnRightIcon = !1);
|
|
53
|
+
},
|
|
54
|
+
getPages() {
|
|
55
|
+
return Math.ceil((this.count + this.additionalCount) / this.limit);
|
|
56
|
+
},
|
|
57
|
+
getFormattedPages() {
|
|
58
|
+
return p(
|
|
59
|
+
Math.ceil((this.count + this.additionalCount) / this.limit)
|
|
60
|
+
);
|
|
61
|
+
},
|
|
62
|
+
getCurrentPage() {
|
|
63
|
+
return Math.round(this.offset / this.limit) + 1;
|
|
64
|
+
},
|
|
65
|
+
getPreviousPages() {
|
|
66
|
+
const i = Math.max(2, this.getCurrentPage() - this.siblings);
|
|
67
|
+
let t = [];
|
|
68
|
+
for (let u = i; u < this.getCurrentPage(); u++)
|
|
69
|
+
t.push(u);
|
|
70
|
+
return t;
|
|
71
|
+
},
|
|
72
|
+
getNextPages() {
|
|
73
|
+
const i = Math.min(
|
|
74
|
+
this.getPages() - 1,
|
|
75
|
+
this.getCurrentPage() + this.siblings
|
|
76
|
+
);
|
|
77
|
+
let t = [];
|
|
78
|
+
for (let u = this.getCurrentPage() + 1; u <= i; u++)
|
|
79
|
+
t.push(u);
|
|
80
|
+
return t;
|
|
81
|
+
},
|
|
82
|
+
formatInteger(i) {
|
|
83
|
+
return p(i);
|
|
84
|
+
},
|
|
85
|
+
selectPage(i) {
|
|
86
|
+
this.$emit(
|
|
87
|
+
"new-pagination-offset",
|
|
88
|
+
Math.round((i - 1) * this.limit - this.additionalCount)
|
|
89
|
+
);
|
|
90
|
+
},
|
|
91
|
+
getCount() {
|
|
92
|
+
return this.count;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}), y = { "aria-label": "Page navigation" }, b = {
|
|
96
|
+
key: 0,
|
|
97
|
+
class: "uikit-text-14 uikit-m-0 uikit-flex uikit-list-none uikit-content-center uikit-gap-4 uikit-p-0 uikit-pl-0 uikit-font-semibold sm:uikit-gap-5"
|
|
98
|
+
}, C = {
|
|
99
|
+
key: 2,
|
|
100
|
+
class: "font-weight-bold uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
101
|
+
}, x = ["onClick"], I = { class: "selected uikit-pointer-events-none uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-items-center uikit-justify-center uikit-rounded-circle uikit-bg-w-primary uikit-p-5px uikit-text-white hover:uikit-bg-w-primary hover:uikit-text-white" }, $ = ["onClick"], M = {
|
|
102
|
+
key: 3,
|
|
103
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
104
|
+
};
|
|
105
|
+
function H(i, t, u, N, j, L) {
|
|
106
|
+
const a = d("baseIcon");
|
|
107
|
+
return r(), n("nav", y, [
|
|
108
|
+
i.getCount() > 0 ? (r(), n("ul", b, [
|
|
109
|
+
i.getCurrentPage() > 1 ? (r(), n("li", {
|
|
110
|
+
key: 0,
|
|
111
|
+
class: "arrow-button prev-page uikit-h-30x uikit-flex uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary md:uikit-mr-5 [&_>_img]:hover:uikit-brightness-0 [&_>_img]:hover:uikit-invert",
|
|
112
|
+
onClick: t[0] || (t[0] = (e) => i.selectPage(i.getCurrentPage() - 1)),
|
|
113
|
+
onMouseover: t[1] || (t[1] = (e) => i.handleHoverIcon(!0, "LeftArrow")),
|
|
114
|
+
onMouseout: t[2] || (t[2] = (e) => i.handleHoverIcon(!1, "LeftArrow"))
|
|
115
|
+
}, [
|
|
116
|
+
k(a, {
|
|
117
|
+
"icon-name": "arrow-sx-blue.svg",
|
|
118
|
+
"alt-attribute": "icona pagina successiva",
|
|
119
|
+
"icon-class": "uikit-mr-0"
|
|
120
|
+
})
|
|
121
|
+
], 32)) : o("", !0),
|
|
122
|
+
i.getCurrentPage() > 1 ? (r(), n("li", {
|
|
123
|
+
key: 1,
|
|
124
|
+
class: "page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
125
|
+
onClick: t[3] || (t[3] = (e) => i.selectPage(1))
|
|
126
|
+
}, " 1 ")) : o("", !0),
|
|
127
|
+
i.getCurrentPage() > i.siblings + 2 ? (r(), n("li", C, " ... ")) : o("", !0),
|
|
128
|
+
(r(!0), n(l, null, g(i.getPreviousPages(), (e) => (r(), n("li", {
|
|
129
|
+
key: e,
|
|
130
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
131
|
+
onClick: (m) => i.selectPage(e)
|
|
132
|
+
}, s(i.formatInteger(e)), 9, x))), 128)),
|
|
133
|
+
f("li", I, s(i.getCurrentPage()), 1),
|
|
134
|
+
(r(!0), n(l, null, g(i.getNextPages(), (e) => (r(), n("li", {
|
|
135
|
+
key: e,
|
|
136
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
137
|
+
onClick: (m) => i.selectPage(e)
|
|
138
|
+
}, s(i.formatInteger(e)), 9, $))), 128)),
|
|
139
|
+
i.getCurrentPage() < i.getPages() - i.siblings - 1 ? (r(), n("li", M, " ... ")) : o("", !0),
|
|
140
|
+
i.getCurrentPage() < i.getPages() ? (r(), n("li", {
|
|
141
|
+
key: 4,
|
|
142
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
143
|
+
onClick: t[4] || (t[4] = (e) => i.selectPage(i.getPages()))
|
|
144
|
+
}, s(i.getFormattedPages()), 1)) : o("", !0),
|
|
145
|
+
i.getCurrentPage() < i.getPages() ? (r(), n("li", {
|
|
146
|
+
key: 5,
|
|
147
|
+
class: "arrow-button next-page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary md:uikit-ml-5 [&_>_img]:hover:uikit-brightness-0 [&_>_img]:hover:uikit-invert",
|
|
148
|
+
onClick: t[5] || (t[5] = (e) => i.selectPage(i.getCurrentPage() + 1)),
|
|
149
|
+
onMouseover: t[6] || (t[6] = (e) => i.handleHoverIcon(!0, "RightArrow")),
|
|
150
|
+
onMouseout: t[7] || (t[7] = (e) => i.handleHoverIcon(!1, "RightArrow"))
|
|
151
|
+
}, [
|
|
152
|
+
k(a, {
|
|
153
|
+
"icon-name": "arrow-dx-blue.svg",
|
|
154
|
+
"alt-attribute": "icona pagina successiva",
|
|
155
|
+
"icon-class": "uikit-mr-0"
|
|
156
|
+
})
|
|
157
|
+
], 32)) : o("", !0)
|
|
158
|
+
])) : o("", !0)
|
|
159
|
+
]);
|
|
160
|
+
}
|
|
161
|
+
const R = /* @__PURE__ */ v(w, [["render", H]]);
|
|
162
|
+
export {
|
|
163
|
+
R as default
|
|
164
|
+
};
|
package/dist/BasePaper.js
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import './assets/BasePaper.css';
|
|
2
|
+
import { defineComponent as o, openBlock as t, createElementBlock as r, renderSlot as s } from "vue";
|
|
3
|
+
import { _ as n } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
|
+
const a = o({
|
|
5
|
+
name: "BasePaper"
|
|
6
|
+
}), c = { class: "base-paper" };
|
|
7
|
+
function p(e, _, d, f, i, m) {
|
|
8
|
+
return t(), r("div", c, [
|
|
9
|
+
s(e.$slots, "content", {}, void 0, !0)
|
|
10
|
+
]);
|
|
11
|
+
}
|
|
12
|
+
const $ = /* @__PURE__ */ n(a, [["render", p], ["__scopeId", "data-v-f52750e0"]]);
|
|
13
|
+
export {
|
|
14
|
+
$ as default
|
|
15
|
+
};
|