@wikicasa-dev/components 1.2.28 → 1.2.30
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 +1 -4
- package/dist/BaseAccordion.js +1 -4
- package/dist/BaseAccordionBtn.js +1 -4
- package/dist/BaseAccordionContent.js +1 -4
- package/dist/BaseAccordionItem.js +1 -4
- package/dist/BaseAlert.js +1 -4
- package/dist/BaseAutocomplete.js +1 -4
- package/dist/BaseBadge.js +1 -4
- package/dist/BaseBtModal.js +1 -188
- package/dist/BaseButton.js +1 -4
- package/dist/BaseCard.js +1 -34
- package/dist/BaseComplexToggle.js +1 -140
- package/dist/BaseDropDown.js +1 -4
- package/dist/BaseFloatingLabel.js +1 -49
- package/dist/BaseIcon.js +1 -41
- package/dist/BaseInput.js +1 -278
- package/dist/BaseNavItem.js +1 -59
- package/dist/BasePagination.js +1 -164
- package/dist/BasePaper.js +1 -15
- package/dist/BaseSlider.js +7 -261
- package/dist/BaseSnackbar.js +1 -80
- package/dist/BaseTab.js +1 -78
- package/dist/BaseTextarea.js +1 -143
- package/dist/BaseToggle.js +1 -45
- package/dist/BaseTooltip.js +1 -54
- package/dist/BaseUploadFile.js +1 -70
- package/dist/CheckboxBtn.js +1 -75
- package/dist/CheckboxGroup.js +1 -4
- package/dist/IntersectionObservable.js +1 -4
- package/dist/IntersectionObserver.js +1 -4
- package/dist/RadioButton.js +1 -59
- package/dist/RadioGroup.js +1 -66
- package/dist/SelectItem.js +1 -4
- package/dist/StaticSpinner.js +1 -32
- package/dist/SwiperCarousel.js +1 -4
- package/dist/{AccessibleSelect.vue_vue_type_script_setup_true_lang-V0XqgKXS.js → chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.BYoss5rN.js} +3 -3
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.BsiqDUGT.js +1 -0
- package/dist/chunks/ArrowIcon.BkjChBnb.js +1 -0
- package/dist/{ArrowIcon-BAw-0KtW.js → chunks/ArrowIcon.Dok-D5yM.js} +1 -1
- package/dist/chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.C_HkVDZJ.js +1 -0
- package/dist/{BaseAccordionBtn.vue_vue_type_script_setup_true_lang-CzbKLH4-.js → chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.DBI-gxoJ.js} +1 -1
- package/dist/chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.BiU7T1M1.js +1 -0
- package/dist/{BaseAccordionItem.vue_vue_type_script_setup_true_lang-CHXsLP6t.js → chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.Dlyi71Ul.js} +3 -3
- package/dist/chunks/BaseAlert.vue_vue_type_script_setup_true_lang.CjFsLhwr.js +1 -0
- package/dist/{BaseAlert.vue_vue_type_script_setup_true_lang-CwrICy7C.js → chunks/BaseAlert.vue_vue_type_script_setup_true_lang.HqYdk4yE.js} +1 -1
- package/dist/{BaseAutocomplete.vue_vue_type_script_setup_true_lang-DO8H2Lnc.js → chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.BoWyUvIn.js} +5 -5
- package/dist/chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.D8WvGQMa.js +1 -0
- package/dist/{BaseBadge.vue_vue_type_style_index_0_lang-CTjNbikr.js → chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js} +1 -1
- package/dist/chunks/BaseBadge.vue_vue_type_style_index_0_lang.DjrBMyt7.js +1 -0
- package/dist/{BaseButton.vue_vue_type_script_setup_true_lang-CBdWTtB_.js → chunks/BaseButton.vue_vue_type_script_setup_true_lang.DZLJGoNO.js} +3 -3
- package/dist/chunks/BaseButton.vue_vue_type_script_setup_true_lang.Ns4H_IBk.js +1 -0
- package/dist/{BaseDropDown.vue_vue_type_script_setup_true_lang-6hJBGFOb.js → chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.dYLwFJCe.js} +2 -2
- package/dist/chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.fEH9G16N.js +1 -0
- package/dist/{CheckboxGroup.vue_vue_type_script_setup_true_lang-DiWa7fxD.js → chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.C5jcwwv6.js} +3 -3
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.JeL27AzP.js +1 -0
- package/dist/{CloseIcon-o6CokGLA.js → chunks/CloseIcon.BiYjxFIs.js} +1 -1
- package/dist/chunks/CloseIcon.ClSHNHpF.js +1 -0
- package/dist/chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.CPn3IY_R.js +5 -0
- package/dist/{SwiperCarousel.vue_vue_type_style_index_0_lang-Ck2g-QeX.js → chunks/SwiperCarousel.vue_vue_type_style_index_0_lang.CbGACfP1.js} +12 -12
- package/dist/{index-BYvf5Yfg.js → chunks/index.-NHoDoWD.js} +2 -2
- package/dist/chunks/index.-WuGFU0l.js +1 -0
- package/dist/index.js +1 -67
- package/dist/useBreakpoints.js +1 -21
- package/dist/useFloatingLabel.js +1 -33
- package/dist/useKeyboardController.js +1 -41
- package/package.json +1 -1
- package/dist/AccessibleSelect.cjs +0 -1
- package/dist/AccessibleSelect.vue_vue_type_script_setup_true_lang-CWGYPn_s.cjs +0 -1
- package/dist/ArrowIcon-p3-glcm0.cjs +0 -1
- package/dist/BaseAccordion.cjs +0 -1
- package/dist/BaseAccordionBtn.cjs +0 -1
- package/dist/BaseAccordionBtn.vue_vue_type_script_setup_true_lang-BQr2_BlM.cjs +0 -1
- package/dist/BaseAccordionContent.cjs +0 -1
- package/dist/BaseAccordionItem.cjs +0 -1
- package/dist/BaseAccordionItem.vue_vue_type_script_setup_true_lang-0R0-KeUL.cjs +0 -1
- package/dist/BaseAlert.cjs +0 -1
- package/dist/BaseAlert.vue_vue_type_script_setup_true_lang-EApeOMaK.cjs +0 -1
- package/dist/BaseAutocomplete.cjs +0 -1
- package/dist/BaseAutocomplete.vue_vue_type_script_setup_true_lang-Vw4TREJv.cjs +0 -1
- package/dist/BaseBadge.cjs +0 -1
- package/dist/BaseBadge.vue_vue_type_style_index_0_lang-CoTdlbL5.cjs +0 -1
- package/dist/BaseBtModal.cjs +0 -1
- package/dist/BaseButton.cjs +0 -1
- package/dist/BaseButton.vue_vue_type_script_setup_true_lang-C4Jpz6nD.cjs +0 -1
- package/dist/BaseCard.cjs +0 -1
- package/dist/BaseComplexToggle.cjs +0 -1
- package/dist/BaseDropDown.cjs +0 -1
- package/dist/BaseDropDown.vue_vue_type_script_setup_true_lang-BHoTtg5-.cjs +0 -1
- package/dist/BaseFloatingLabel.cjs +0 -1
- package/dist/BaseIcon.cjs +0 -1
- package/dist/BaseInput.cjs +0 -1
- package/dist/BaseNavItem.cjs +0 -1
- package/dist/BasePagination.cjs +0 -1
- package/dist/BasePaper.cjs +0 -1
- package/dist/BaseSlider.cjs +0 -8
- package/dist/BaseSnackbar.cjs +0 -1
- package/dist/BaseTab.cjs +0 -1
- package/dist/BaseTextarea.cjs +0 -1
- package/dist/BaseToggle.cjs +0 -1
- package/dist/BaseTooltip.cjs +0 -1
- package/dist/BaseUploadFile.cjs +0 -1
- package/dist/CheckboxBtn.cjs +0 -1
- package/dist/CheckboxGroup.cjs +0 -1
- package/dist/CheckboxGroup.vue_vue_type_script_setup_true_lang-Dq_WMwsx.cjs +0 -1
- package/dist/CloseIcon-B0iqXdWk.cjs +0 -1
- package/dist/IntersectionObservable.cjs +0 -1
- package/dist/IntersectionObserver.cjs +0 -1
- package/dist/RadioButton.cjs +0 -1
- package/dist/RadioGroup.cjs +0 -1
- package/dist/SelectItem.cjs +0 -1
- package/dist/StaticSpinner.cjs +0 -1
- package/dist/SwiperCarousel.cjs +0 -1
- package/dist/SwiperCarousel.vue_vue_type_style_index_0_lang-Dcp0WsTT.cjs +0 -5
- package/dist/index-EIUFf5Sn.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/useBreakpoints.cjs +0 -1
- package/dist/useFloatingLabel.cjs +0 -1
- package/dist/useKeyboardController.cjs +0 -1
- /package/dist/{BaseAlert.css → assets/BaseAlert.css} +0 -0
- /package/dist/{BaseBadge.css → assets/BaseBadge.css} +0 -0
- /package/dist/{BaseBtModal.css → assets/BaseBtModal.css} +0 -0
- /package/dist/{BaseButton.css → assets/BaseButton.css} +0 -0
- /package/dist/{BaseCard.css → assets/BaseCard.css} +0 -0
- /package/dist/{BaseComplexToggle.css → assets/BaseComplexToggle.css} +0 -0
- /package/dist/{BaseFloatingLabel.css → assets/BaseFloatingLabel.css} +0 -0
- /package/dist/{BaseIcon.css → assets/BaseIcon.css} +0 -0
- /package/dist/{BaseInput.css → assets/BaseInput.css} +0 -0
- /package/dist/{BaseNavItem.css → assets/BaseNavItem.css} +0 -0
- /package/dist/{BasePaper.css → assets/BasePaper.css} +0 -0
- /package/dist/{BaseSlider.css → assets/BaseSlider.css} +0 -0
- /package/dist/{BaseSnackbar.css → assets/BaseSnackbar.css} +0 -0
- /package/dist/{BaseTextarea.css → assets/BaseTextarea.css} +0 -0
- /package/dist/{BaseToggle.css → assets/BaseToggle.css} +0 -0
- /package/dist/{BaseTooltip.css → assets/BaseTooltip.css} +0 -0
- /package/dist/{CheckboxBtn.css → assets/CheckboxBtn.css} +0 -0
- /package/dist/{StaticSpinner.css → assets/StaticSpinner.css} +0 -0
- /package/dist/{SwiperCarousel.css → assets/SwiperCarousel.css} +0 -0
- /package/dist/{free-mode.css → assets/free-mode.css} +0 -0
- /package/dist/{index.css → assets/index.css} +0 -0
- /package/dist/{navigation.css → assets/navigation.css} +0 -0
- /package/dist/{pagination.css → assets/pagination.css} +0 -0
- /package/dist/{BaseAccordion.vue_vue_type_script_setup_true_lang-CoE2D2rV.js → chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.CoE2D2rV.js} +0 -0
- /package/dist/{BaseAccordion.vue_vue_type_script_setup_true_lang-f0Al20X4.cjs → chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.f0Al20X4.js} +0 -0
- /package/dist/{BaseAccordionContent.vue_vue_type_script_setup_true_lang-N7oILwdv.js → chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js} +0 -0
- /package/dist/{BaseAccordionContent.vue_vue_type_script_setup_true_lang-U3YQw0dV.cjs → chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.U3YQw0dV.js} +0 -0
- /package/dist/{DefaultValues-S0CTWW-b.cjs → chunks/DefaultValues.S0CTWW-b.js} +0 -0
- /package/dist/{DefaultValues-k7iQWtC2.js → chunks/DefaultValues.k7iQWtC2.js} +0 -0
- /package/dist/{IntersectionObservable.vue_vue_type_script_setup_true_lang-BBMxY-re.js → chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BBMxY-re.js} +0 -0
- /package/dist/{IntersectionObservable.vue_vue_type_script_setup_true_lang-BPatqpa3.cjs → chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BPatqpa3.js} +0 -0
- /package/dist/{IntersectionObserver.vue_vue_type_script_setup_true_lang-Bo-O96cp.js → chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.Bo-O96cp.js} +0 -0
- /package/dist/{IntersectionObserver.vue_vue_type_script_setup_true_lang-DYKR3Sel.cjs → chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.DYKR3Sel.js} +0 -0
- /package/dist/{ObjectUtils-B1Dk4qsM.js → chunks/ObjectUtils.B1Dk4qsM.js} +0 -0
- /package/dist/{ObjectUtils-C5gq8MtL.cjs → chunks/ObjectUtils.C5gq8MtL.js} +0 -0
- /package/dist/{SelectItem.vue_vue_type_script_setup_true_lang-3ie26G8n.cjs → chunks/SelectItem.vue_vue_type_script_setup_true_lang.3ie26G8n.js} +0 -0
- /package/dist/{SelectItem.vue_vue_type_script_setup_true_lang-BOLdDTLM.js → chunks/SelectItem.vue_vue_type_script_setup_true_lang.BOLdDTLM.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-BHFhmbuH.cjs → chunks/_plugin-vue_export-helper.BHFhmbuH.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-CHgC5LLL.js → chunks/_plugin-vue_export-helper.CHgC5LLL.js} +0 -0
- /package/dist/{autoplay-Dyvby5gX.cjs → chunks/autoplay.Dyvby5gX.js} +0 -0
- /package/dist/{autoplay-l0sNRNKZ.js → chunks/autoplay.l0sNRNKZ.js} +0 -0
- /package/dist/{controller-Dyvby5gX.cjs → chunks/controller.Dyvby5gX.js} +0 -0
- /package/dist/{controller-l0sNRNKZ.js → chunks/controller.l0sNRNKZ.js} +0 -0
- /package/dist/{js.cookie-BMVAK0Pe.cjs → chunks/js.cookie.BMVAK0Pe.js} +0 -0
- /package/dist/{js.cookie-BaTT4o7s.js → chunks/js.cookie.BaTT4o7s.js} +0 -0
- /package/dist/{thumbs-Dyvby5gX.cjs → chunks/thumbs.Dyvby5gX.js} +0 -0
- /package/dist/{thumbs-l0sNRNKZ.js → chunks/thumbs.l0sNRNKZ.js} +0 -0
package/dist/BaseInput.js
CHANGED
|
@@ -1,278 +1 @@
|
|
|
1
|
-
|
|
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 "./_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
|
-
};
|
|
1
|
+
require('./assets/BaseInput.css');"use strict";const d=require("./BaseFloatingLabel.js"),p=require("./useFloatingLabel.js"),t=require("vue"),k=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),b=t.defineComponent({name:"BaseInput",components:{BaseFloatingLabel:d},inheritAttrs:!1,props:{inputClass:{type:[String,Array],required:!1,default:""},inputType:{type:String,default:"text-input"},labelText:{type:String,default:""},border:{type:Boolean,default:!0},radius:{type:Boolean,default:!0},modelValue:{type:[String,Number]},feedback:{type:Object},isValid:{type:Boolean,default:null},auto:{type:Boolean,default:!0},keepFloatingLabel:{type:Boolean,default:!1},formatter:{type:Object,default:null}},emits:["update:modelValue","click","keydown-enter-pressed","focusin","focusout","keydown"],setup(e,i){const{labelState:l,setInitialLabelState:o,handleFocusIn:r,handleFocusOut:u,setInlineLabel:n,setFloatingLabel:a}=p.useFloatingLabel(i.emit);return{labelState:l,setInitialLabelState:o,handleFocusIn:r,handleFocusOut:u,setInlineLabel:n,setFloatingLabel:a}},data(){return{type:"",feedbackObj:{},pointerDownListener:e=>{e.preventDefault()}}},computed:{passwordIcon(){return document?document.querySelector("[data-type='password-icon']"):null}},watch:{feedback(){this.normalizeFeedbackProp()},modelValue(e){if(e){const i=this.$refs.baseInput;if(!i)return;!i.value&&this.formatter&&(e=i.value);const l=this.updateInputValue(i,e);this.$emit("update:modelValue",l)}else this.$refs.baseInput.value="";e!=null&&`${e}`.length>0&&this.auto&&this.labelState!=="floating-label"?this.labelState="floating-label":(e==null||e==null)&&(this.labelState="inline-label")},keepFloatingLabel(e){e?this.setFloatingLabel():this.handleFocusOut(this.modelValue,!0,this.auto)}},created(){this.type=this.$attrs.type,this.normalizeFeedbackProp(),this.setInitialLabelState(this.modelValue)},mounted(){if((this.modelValue!=null||this.modelValue!=null)&&(this.$refs.baseInput.value=`${this.modelValue}`),this.formatter){const e=this.updateInputValue(this.$refs.baseInput,`${this.modelValue}`);this.$emit("update:modelValue",e)}this.setPointerOutListener()},unmounted(){this.passwordIcon?.removeEventListener("pointerdown",this.pointerDownListener)},methods:{select(){this.$refs.baseInput.select()},setPointerOutListener(){if(this.$attrs.type!=="password")return;const e=this.passwordIcon;e&&e.addEventListener("pointerdown",this.pointerDownListener)},handleFloatingLabelClick(){this.$refs.baseInput.focus()},normalizeFeedbackProp(){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]))},updateInputValue(e,i){if(!i)return e.value="","";let l="";return this.formatter&&this.formatter.unFormatFn?l=`${this.formatter.unFormatFn(i)}`:l=i,this.formatter?e.value=this.formatter.formatFn(l):e.value=l,l},handleInputChange({target:e}){if(this.inputType==="select")return;const i=e,l=this.updateInputValue(i,i.value);this.$emit("update:modelValue",l)},handleClick(e){this.$emit("click",e)},handleClean(){this.$emit("update:modelValue",""),this.setInlineLabel()},handleShowPasswd(){this.type==="password"?this.type="text":this.type==="text"&&(this.type="password")}}}),h=["id","data-cy","name","autocomplete","disabled","aria-labelledby","readonly","type","pattern","min","max","maxlength","inputmode","placeholder"],f={key:0,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"},m=["innerHTML"],$=["innerHTML"],v=["innerHTML"],c={class:"under-label uikit-absolute uikit-text-12"};function y(e,i,l,o,r,u){const n=t.resolveComponent("base-floating-label");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["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",[e.$attrs.class,{"uikit-mt-10px":e.labelText},{"floating-label":e.labelText},e.labelState==="floating-label"?"floating-state":"inline-state",{"has-right-icon":e.$attrs["with-right-icon"]!==void 0?e.$attrs["with-right-icon"]:!!e.$slots.righticon},{"has-left-icon":e.$attrs["with-left-icon"]!==void 0?e.$attrs["with-left-icon"]:!!e.$slots.leftIcon},{"is-invalid":e.isValid===!1,"is-valid":e.isValid}]])},[t.renderSlot(e.$slots,"leftIcon",{},void 0,!0),t.renderSlot(e.$slots,"righticon",{handleClean:e.handleClean,handleShowPasswd:e.handleShowPasswd,curType:e.type},void 0,!0),t.createElementVNode("input",{id:e.$attrs.id,ref:"baseInput","data-cy":e.$attrs["data-cy"],name:e.$attrs.name,class:t.normalizeClass(["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",[{"uikit-rounded-xs":e.radius},{"input-element uikit-block uikit-w-full uikit-appearance-none uikit-px-4 uikit-outline-0":e.inputType==="text-input"},{"uikit-text-w-secondary":e.$attrs.disabled},{"is-invalid invalid-bg !uikit-pr-9":e.isValid===!1,"is-valid valid-bg !uikit-pr-9":e.isValid},{"uikit-pr-[42px]":e.$attrs["with-right-icon"]!==void 0?e.$attrs["with-right-icon"]:!!e.$slots.righticon},{"uikit-pl-[42px]":e.$attrs["with-left-icon"]!==void 0?e.$attrs["with-left-icon"]:!!e.$slots.leftIcon},e.inputClass]]),autocomplete:e.$attrs.autocomplete==="on"?"on":"off",disabled:e.$attrs.disabled,"aria-labelledby":e.$attrs.id,readonly:e.$attrs.readonly,type:e.type,pattern:e.$attrs.pattern,min:e.$attrs.min,max:e.$attrs.max,maxlength:e.$attrs.maxlength,inputmode:e.$attrs.inputmode,placeholder:e.$attrs.placeholder,onClick:i[0]||(i[0]=(...a)=>e.handleClick&&e.handleClick(...a)),onFocusin:i[1]||(i[1]=t.withModifiers(()=>e.handleFocusIn(),["stop"])),onFocusout:i[2]||(i[2]=t.withModifiers(a=>!e.keepFloatingLabel&&e.handleFocusOut(e.modelValue,!1,e.auto),["stop"])),onInput:i[3]||(i[3]=t.withModifiers((...a)=>e.handleInputChange&&e.handleInputChange(...a),["stop"])),onKeydown:[i[4]||(i[4]=t.withKeys(a=>e.$emit("keydown-enter-pressed"),["enter"])),i[5]||(i[5]=a=>e.$emit("keydown",a))]},null,42,h),t.createElementVNode("fieldset",{class:t.normalizeClass(["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",[{"uikit-border-0":!e.border},{"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,"uikit-rounded-xs":e.radius,"is-invalid uikit-border-w-danger":e.isValid===!1,"is-valid uikit-border-w-primary":e.isValid,"uikit-border-w-secondary":e.isValid===null&&e.border},{"no-floating-label uikit-top-0":!e.labelText},e.$attrs["fieldset-classes"]]])},[e.labelText?(t.openBlock(),t.createElementBlock("legend",f,[t.createElementVNode("span",{class:t.normalizeClass(["visible-label uikit-opacity-0",[{"uikit-mx-5px":e.labelText},{"uikit-visible uikit-inline-block":e.labelState==="floating-label"},{"uikit-invisible uikit-hidden":e.labelState==="inline-label"}]]),innerHTML:e.labelText},null,10,m)])):t.createCommentVNode("",!0)],2),e.labelText?(t.openBlock(),t.createBlock(n,{key:0,for:e.$attrs.id,"label-text":e.labelText,"label-state":e.labelState,"is-valid":e.isValid,required:e.$attrs.required,disabled:e.$attrs.disabled,"label-classes":e.$attrs["label-classes"],onClick:e.handleFloatingLabelClick},null,8,["for","label-text","label-state","is-valid","required","disabled","label-classes","onClick"])):t.createCommentVNode("",!0),e.isValid===!1?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.feedbackObj.invalid,(a,s)=>(t.openBlock(),t.createElementBlock("div",{key:`${e.$attrs.id}_invalid_${s}`,class:"uikit-mt-1 uikit-text-12 uikit-text-w-danger",innerHTML:a},null,8,$))),128)):e.isValid===!0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.feedbackObj.valid,(a,s)=>(t.openBlock(),t.createElementBlock("div",{key:`${e.$attrs.id}_valid_${s}`,class:"uikit-mt-1 uikit-text-12 uikit-text-w-primary",innerHTML:a},null,8,v))),128)):t.createCommentVNode("",!0),t.createElementVNode("div",c,[t.renderSlot(e.$slots,"under-label",{},void 0,!0)])],2)}const w=k._export_sfc(b,[["render",y],["__scopeId","data-v-bbdd7899"]]);module.exports=w;
|
package/dist/BaseNavItem.js
CHANGED
|
@@ -1,59 +1 @@
|
|
|
1
|
-
|
|
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 "./_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
|
-
};
|
|
1
|
+
require('./assets/BaseNavItem.css');"use strict";const a=require("./BaseIcon.js"),e=require("vue"),r=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),n=e.defineComponent({name:"BaseNavItem",components:{BaseIcon:a},props:{text:{type:String},iconName:{type:String},iconClass:{type:String,default:"uikit-mr-5px"},navItemCustomClass:{type:String},isActive:{type:Boolean,default:!1}},emits:["click"],watch:{isActive(t){const i=this.$refs["base-nav-item"];t?i.classList.add("active"):i.classList.remove("active")}}}),c=["id"];function l(t,i,p,m,d,f){const s=e.resolveComponent("base-icon");return e.openBlock(),e.createElementBlock("li",{id:`${t.$attrs.id}`,class:e.normalizeClass(["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",[t.navItemCustomClass]]),onClick:i[0]||(i[0]=o=>t.$emit("click",o))},[t.iconName?(e.openBlock(),e.createBlock(s,{key:0,"alt-attribute":"icon","icon-name":t.iconName,"icon-class":t.iconClass},null,8,["icon-name","icon-class"])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default",{},()=>[e.createElementVNode("a",{ref:"base-nav-item",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]"},e.toDisplayString(t.text),513)],!0)],10,c)}const u=r._export_sfc(n,[["render",l],["__scopeId","data-v-7f3f4fee"]]);module.exports=u;
|
package/dist/BasePagination.js
CHANGED
|
@@ -1,164 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import "./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 "./_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-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
|
-
};
|
|
1
|
+
"use strict";const a=require("./BaseIcon.js");require("./chunks/js.cookie.BMVAK0Pe.js");const t=require("vue"),l=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js");function u(e,i=!1){return e==null?"":k(i?Math.round(e):Math.floor(e),0)}function k(e,i){return!e&&e!==0?"":e.toLocaleString("it-IT",{minimumFractionDigits:i,maximumFractionDigits:i})}const c=t.defineComponent({name:"BasePagination",components:{BaseIcon:a},props:{offset:{type:Number,default:0},count:{type:Number,default:0},limit:{type:Number,default:25},siblings:{type:Number,default:3},additionalCount:{type:Number,default:0}},emits:["new-pagination-offset"],data(){return{activeHoverOnLeftIcon:!1,activeHoverOnRightIcon:!1}},methods:{handleHoverIcon(e,i){e?i==="LeftArrow"?this.activeHoverOnLeftIcon=!0:this.activeHoverOnRightIcon=!0:(this.activeHoverOnLeftIcon=!1,this.activeHoverOnRightIcon=!1)},getPages(){return Math.ceil((this.count+this.additionalCount)/this.limit)},getFormattedPages(){return u(Math.ceil((this.count+this.additionalCount)/this.limit))},getCurrentPage(){return Math.round(this.offset/this.limit)+1},getPreviousPages(){const e=Math.max(2,this.getCurrentPage()-this.siblings);let i=[];for(let n=e;n<this.getCurrentPage();n++)i.push(n);return i},getNextPages(){const e=Math.min(this.getPages()-1,this.getCurrentPage()+this.siblings);let i=[];for(let n=this.getCurrentPage()+1;n<=e;n++)i.push(n);return i},formatInteger(e){return u(e)},selectPage(e){this.$emit("new-pagination-offset",Math.round((e-1)*this.limit-this.additionalCount))},getCount(){return this.count}}}),g={"aria-label":"Page navigation"},m={key:0,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"},p={key:2,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"},h=["onClick"],d={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"},v=["onClick"],f={key:3,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"};function P(e,i,n,y,C,b){const o=t.resolveComponent("baseIcon");return t.openBlock(),t.createElementBlock("nav",g,[e.getCount()>0?(t.openBlock(),t.createElementBlock("ul",m,[e.getCurrentPage()>1?(t.openBlock(),t.createElementBlock("li",{key:0,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",onClick:i[0]||(i[0]=r=>e.selectPage(e.getCurrentPage()-1)),onMouseover:i[1]||(i[1]=r=>e.handleHoverIcon(!0,"LeftArrow")),onMouseout:i[2]||(i[2]=r=>e.handleHoverIcon(!1,"LeftArrow"))},[t.createVNode(o,{"icon-name":"arrow-sx-blue.svg","alt-attribute":"icona pagina successiva","icon-class":"uikit-mr-0"})],32)):t.createCommentVNode("",!0),e.getCurrentPage()>1?(t.openBlock(),t.createElementBlock("li",{key:1,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",onClick:i[3]||(i[3]=r=>e.selectPage(1))}," 1 ")):t.createCommentVNode("",!0),e.getCurrentPage()>e.siblings+2?(t.openBlock(),t.createElementBlock("li",p," ... ")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getPreviousPages(),r=>(t.openBlock(),t.createElementBlock("li",{key:r,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",onClick:s=>e.selectPage(r)},t.toDisplayString(e.formatInteger(r)),9,h))),128)),t.createElementVNode("li",d,t.toDisplayString(e.getCurrentPage()),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getNextPages(),r=>(t.openBlock(),t.createElementBlock("li",{key:r,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",onClick:s=>e.selectPage(r)},t.toDisplayString(e.formatInteger(r)),9,v))),128)),e.getCurrentPage()<e.getPages()-e.siblings-1?(t.openBlock(),t.createElementBlock("li",f," ... ")):t.createCommentVNode("",!0),e.getCurrentPage()<e.getPages()?(t.openBlock(),t.createElementBlock("li",{key:4,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",onClick:i[4]||(i[4]=r=>e.selectPage(e.getPages()))},t.toDisplayString(e.getFormattedPages()),1)):t.createCommentVNode("",!0),e.getCurrentPage()<e.getPages()?(t.openBlock(),t.createElementBlock("li",{key:5,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",onClick:i[5]||(i[5]=r=>e.selectPage(e.getCurrentPage()+1)),onMouseover:i[6]||(i[6]=r=>e.handleHoverIcon(!0,"RightArrow")),onMouseout:i[7]||(i[7]=r=>e.handleHoverIcon(!1,"RightArrow"))},[t.createVNode(o,{"icon-name":"arrow-dx-blue.svg","alt-attribute":"icona pagina successiva","icon-class":"uikit-mr-0"})],32)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])}const w=l._export_sfc(c,[["render",P]]);module.exports=w;
|
package/dist/BasePaper.js
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineComponent as o, openBlock as t, createElementBlock as r, renderSlot as s } from "vue";
|
|
3
|
-
import { _ as n } from "./_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
|
-
};
|
|
1
|
+
require('./assets/BasePaper.css');"use strict";const e=require("vue"),o=require("./chunks/_plugin-vue_export-helper.BHFhmbuH.js"),r=e.defineComponent({name:"BasePaper"}),s={class:"base-paper"};function n(t,p,a,_,i,d){return e.openBlock(),e.createElementBlock("div",s,[e.renderSlot(t.$slots,"content",{},void 0,!0)])}const c=o._export_sfc(r,[["render",n],["__scopeId","data-v-f52750e0"]]);module.exports=c;
|