@wikicasa-dev/components 2.2.9-alpha.34 → 2.2.9-alpha.35

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.
Files changed (107) hide show
  1. package/dist/Swiper/autoplay.js +3 -4
  2. package/dist/Swiper/controller.js +1 -2
  3. package/dist/Swiper/free-mode.js +3 -4
  4. package/dist/Swiper/keyboard.js +3 -4
  5. package/dist/Swiper/navigation.js +3 -4
  6. package/dist/Swiper/pagination.js +3 -4
  7. package/dist/Swiper/thumbs.js +3 -4
  8. package/dist/UIKit/AccessibleSelect.js +2 -3
  9. package/dist/UIKit/Accordion/BaseAccordion.js +1 -1
  10. package/dist/UIKit/Accordion/BaseAccordionBtn.js +1 -1
  11. package/dist/UIKit/Accordion/BaseAccordionContent.js +1 -1
  12. package/dist/UIKit/Accordion/BaseAccordionItem.js +2 -3
  13. package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +2 -3
  14. package/dist/UIKit/BaseAlert.js +2 -3
  15. package/dist/UIKit/BaseAutocomplete.js +2 -3
  16. package/dist/UIKit/BaseBadge.js +2 -3
  17. package/dist/UIKit/BaseBreadcrumb.js +1 -1
  18. package/dist/UIKit/BaseButton.js +1 -1
  19. package/dist/UIKit/BaseCard.js +36 -5
  20. package/dist/UIKit/BaseComplexToggle.js +105 -5
  21. package/dist/UIKit/BaseDropDown.d.ts +2 -2
  22. package/dist/UIKit/BaseDropDown.js +2 -3
  23. package/dist/UIKit/BaseFloatingLabel.js +39 -5
  24. package/dist/UIKit/BaseInput.js +210 -5
  25. package/dist/UIKit/BaseModal.js +2 -3
  26. package/dist/UIKit/BasePagination.js +1 -1
  27. package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
  28. package/dist/UIKit/BaseSlider.js +206 -5
  29. package/dist/UIKit/BaseSnackbar.js +2 -3
  30. package/dist/UIKit/BaseTextarea.js +126 -5
  31. package/dist/UIKit/BaseToggle.js +41 -5
  32. package/dist/UIKit/BaseTooltip.js +40 -5
  33. package/dist/UIKit/BaseUploadFile.js +1 -1
  34. package/dist/UIKit/Checkbox/CheckboxBtn.js +2 -3
  35. package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
  36. package/dist/UIKit/Radio/RadioButton.js +1 -1
  37. package/dist/UIKit/Radio/RadioGroup.js +1 -1
  38. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +20 -5
  39. package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
  40. package/dist/UIKit/Slider/SimpleSlider.js +81 -5
  41. package/dist/UIKit/StaticSpinner.js +26 -5
  42. package/dist/UIKit/Tab/BaseTab.js +1 -1
  43. package/dist/UIKit/Tab/BaseTabList.js +1 -1
  44. package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
  45. package/dist/UIKit/Tab/BaseTabView.js +1 -1
  46. package/dist/assets/BaseInput.css +1 -1
  47. package/dist/assets/SwiperCarousel.css +1 -1
  48. package/dist/chart/DoughnutChart.js +1 -1
  49. package/dist/chart/LineChart.js +1 -1
  50. package/dist/{packages/components/lib/UIKit/AccessibleSelect.vue.js → chunks/AccessibleSelect.vue_vue_type_style_index_0_lang.DWwkWpAC.js} +3 -4
  51. package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js → chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.Qp6BrYox.js} +5 -5
  52. package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js → chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CL5zNPzY.js} +4 -4
  53. package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js → chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.BqjzG2As.js} +5 -5
  54. package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js → chunks/BaseAccordionItem.vue_vue_type_style_index_0_lang.DwEHSyBO.js} +4 -4
  55. package/dist/chunks/BaseAlert.vue_vue_type_style_index_0_lang.BVR-COlL.js +19 -0
  56. package/dist/{packages/components/lib/UIKit/BaseAutocomplete.vue.js → chunks/BaseAutocomplete.vue_vue_type_style_index_0_lang.BW_JCkOV.js} +24 -25
  57. package/dist/{packages/components/lib/UIKit/BaseBadge.vue.js → chunks/BaseBadge.vue_vue_type_style_index_0_lang.BnYtlFXq.js} +6 -6
  58. package/dist/{packages/components/lib/UIKit/BaseBreadcrumb.vue.js → chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.CcfuB26u.js} +7 -7
  59. package/dist/{packages/components/lib/UIKit/BaseButton.vue.js → chunks/BaseButton.vue_vue_type_script_setup_true_lang.CswNVEW_.js} +2 -2
  60. package/dist/{packages/components/lib/UIKit/BaseDropDown.vue.js → chunks/BaseDropDown.vue_vue_type_style_index_0_lang.z4eFD2_f.js} +12 -12
  61. package/dist/{packages/components/lib/UIKit/BaseModal.vue.js → chunks/BaseModal.vue_vue_type_style_index_0_lang.B8U_buif.js} +2 -2
  62. package/dist/{packages/components/lib/UIKit/BasePagination.vue.js → chunks/BasePagination.vue_vue_type_script_setup_true_lang.CkGMhOm-.js} +1 -1
  63. package/dist/{packages/components/lib/UIKit/BaseSnackbar.vue.js → chunks/BaseSnackbar.vue_vue_type_style_index_0_lang.DJqVfg6P.js} +2 -2
  64. package/dist/{packages/components/lib/UIKit/Tab/BaseTab.vue.js → chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js} +3 -3
  65. package/dist/{packages/components/lib/UIKit/Tab/BaseTabList.vue.js → chunks/BaseTabList.vue_vue_type_script_setup_true_lang.BXvkXKbT.js} +3 -3
  66. package/dist/{packages/components/lib/UIKit/Tab/BaseTabPanel.vue.js → chunks/BaseTabPanel.vue_vue_type_script_setup_true_lang.CM1ObHXU.js} +1 -1
  67. package/dist/{packages/components/lib/UIKit/Tab/BaseTabView.vue.js → chunks/BaseTabView.vue_vue_type_script_setup_true_lang.BocXkfTw.js} +17 -17
  68. package/dist/{packages/components/lib/UIKit/BaseUploadFile.vue.js → chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.DMPiMivr.js} +7 -7
  69. package/dist/{packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js → chunks/CheckboxBtn.vue_vue_type_style_index_0_lang.MYOfjOwM.js} +8 -8
  70. package/dist/{packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js → chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.aDZDPjgR.js} +3 -4
  71. package/dist/{packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js → chunks/ClearableAutocomplete.vue_vue_type_style_index_0_lang.DUOBcBPN.js} +4 -5
  72. package/dist/{packages/components/lib/chart/DoughnutChart.vue.js → chunks/DoughnutChart.vue_vue_type_script_setup_true_lang.yALl_gpB.js} +6 -6
  73. package/dist/{packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js → chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BidNzYDc.js} +5 -5
  74. package/dist/{packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js → chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.BnLNx3be.js} +3 -3
  75. package/dist/{packages/components/lib/chart/LineChart.vue.js → chunks/LineChart.vue_vue_type_script_setup_true_lang.Df20jEOd.js} +7 -7
  76. package/dist/{packages/components/lib/UIKit/Radio/RadioButton.vue.js → chunks/RadioButton.vue_vue_type_script_setup_true_lang.g-a7DM3l.js} +3 -3
  77. package/dist/{packages/components/lib/UIKit/Radio/RadioGroup.vue.js → chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DtBZuHm2.js} +3 -3
  78. package/dist/{packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js → chunks/SelectItem.vue_vue_type_script_setup_true_lang.DvQ4ZKvE.js} +9 -9
  79. package/dist/{packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js → chunks/ShimmerMultiLine.vue_vue_type_script_setup_true_lang.DEb8nfZp.js} +4 -4
  80. package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
  81. package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
  82. package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
  83. package/dist/components/carousel/SwiperCarousel.js +243 -6
  84. package/dist/components/carousel/SwiperSlide.js +1 -1
  85. package/dist/index.js +82 -92
  86. package/package.json +2 -1
  87. package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
  88. package/dist/assets/SwiperCarousel2.css +0 -1
  89. package/dist/assets/swiper-swiper.css +0 -1
  90. package/dist/assets/swiper-zoom.css +0 -1
  91. package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +0 -19
  92. package/dist/packages/components/lib/UIKit/BaseCard.vue.js +0 -37
  93. package/dist/packages/components/lib/UIKit/BaseComplexToggle.vue.js +0 -106
  94. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +0 -40
  95. package/dist/packages/components/lib/UIKit/BaseInput.vue.js +0 -211
  96. package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +0 -207
  97. package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +0 -127
  98. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +0 -42
  99. package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +0 -41
  100. package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +0 -21
  101. package/dist/packages/components/lib/UIKit/Slider/SimpleSlider.vue.js +0 -82
  102. package/dist/packages/components/lib/UIKit/StaticSpinner.vue.js +0 -27
  103. package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +0 -246
  104. /package/dist/assets/{swiper-free-mode.css → free-mode.css} +0 -0
  105. /package/dist/assets/{swiper-navigation.css → navigation.css} +0 -0
  106. /package/dist/assets/{swiper-pagination.css → pagination.css} +0 -0
  107. /package/dist/assets/{swiper-thumbs.css → thumbs.css} +0 -0
@@ -1,106 +0,0 @@
1
- import { defineComponent as T, mergeModels as C, useModel as x, computed as d, createElementBlock as g, openBlock as c, normalizeClass as o, createElementVNode as i, withModifiers as f, renderSlot as m, createCommentVNode as k } from "vue";
2
- const y = ["id", "data-cy"], $ = ["data-btn-bg-color", "data-cy"], L = ["src", "alt"], M = ["innerHTML"], z = ["data-btn-bg-color", "data-cy"], B = ["src", "alt"], V = ["innerHTML"], j = /* @__PURE__ */ T({
3
- __name: "BaseComplexToggle",
4
- props: /* @__PURE__ */ C({
5
- labels: {},
6
- type: { default: "full" },
7
- mode: { default: "" },
8
- btnBgColor: { default: "uikit-bg-w-lavender" },
9
- btnClasses: {},
10
- borderContainerColor: { default: "uikit-border-w-secondary" },
11
- size: { default: "" }
12
- }, {
13
- modelValue: {
14
- default: null
15
- },
16
- modelModifiers: {}
17
- }),
18
- emits: ["update:modelValue"],
19
- setup(e) {
20
- const t = e, s = x(e, "modelValue"), n = () => {
21
- s.value = t.labels.leftToggle;
22
- }, u = () => {
23
- s.value = t.labels.rightToggle;
24
- };
25
- (() => {
26
- if (t.labels.leftToggle.checked) {
27
- n();
28
- return;
29
- }
30
- if (t.labels.rightToggle.checked) {
31
- u();
32
- return;
33
- }
34
- n();
35
- })();
36
- const r = (l) => s.value?.label === l.label, b = d(() => r(t.labels.leftToggle)), h = d(() => r(t.labels.rightToggle));
37
- return (l, a) => (c(), g("div", {
38
- id: l.$attrs.id || "",
39
- "data-cy": l.$attrs["data-cy"] || "",
40
- class: o(["base-complex-toggle uikit-relative uikit-flex uikit-justify-center uikit-p-0", [e.mode, e.borderContainerColor, e.size]])
41
- }, [
42
- i("div", {
43
- "data-btn-bg-color": e.btnBgColor,
44
- "data-cy": `bct-left-btn${e.labels.leftToggle.label ? `-${e.labels.leftToggle.label}` : ""}`,
45
- class: o(["left-button uikit-flex uikit-flex-1 uikit-items-center uikit-justify-center hover:uikit-cursor-pointer", [
46
- {
47
- "base-complex-toggle-active": b.value
48
- }
49
- ]]),
50
- onClick: a[0] || (a[0] = f((v) => n(), ["stop"]))
51
- }, [
52
- m(l.$slots, "left_icon", {}, () => [
53
- e.labels.leftToggle.icon ? (c(), g("img", {
54
- key: 0,
55
- class: "base-complex-toggle-icon uikit-relative uikit-z-10 uikit-mr-10px",
56
- src: e.labels.leftToggle.icon.src,
57
- alt: e.labels.leftToggle.icon.alt,
58
- width: "15",
59
- height: "15"
60
- }, null, 8, L)) : k("", !0)
61
- ], !0),
62
- i("span", {
63
- class: "base-complex-toggle-label uikit-relative uikit-z-10",
64
- innerHTML: e.labels.leftToggle.label
65
- }, null, 8, M)
66
- ], 10, $),
67
- i("div", {
68
- "data-btn-bg-color": e.btnBgColor,
69
- "data-cy": `bct-right-btn${e.labels.rightToggle.label ? `-${e.labels.rightToggle.label}` : ""}`,
70
- class: o(["right-button uikit-flex uikit-flex-1 uikit-items-center uikit-justify-center hover:uikit-cursor-pointer", [
71
- {
72
- "base-complex-toggle-active": h.value
73
- }
74
- ]]),
75
- onClick: a[1] || (a[1] = f((v) => u(), ["stop"]))
76
- }, [
77
- m(l.$slots, "right_icon", {}, () => [
78
- e.labels.rightToggle.icon ? (c(), g("img", {
79
- key: 0,
80
- class: "base-complex-toggle-icon uikit-relative uikit-z-10 uikit-mr-10px",
81
- src: e.labels.rightToggle.icon.src,
82
- alt: e.labels.rightToggle.icon.alt,
83
- width: "15",
84
- height: "15"
85
- }, null, 8, B)) : k("", !0)
86
- ], !0),
87
- i("span", {
88
- class: "base-complex-toggle-label uikit-relative uikit-z-10",
89
- innerHTML: e.labels.rightToggle.label
90
- }, null, 8, V)
91
- ], 10, z),
92
- i("div", {
93
- class: o(["uikit-absolute uikit-transition-all uikit-duration-200 uikit-ease-out", [
94
- e.type === "full" ? "base-complex-toggle-active-bg" : "base-complex-toggle-active-padded-bg",
95
- e.btnBgColor,
96
- e.mode,
97
- b.value ? "translateX-left" : "translateX-right",
98
- e.btnClasses
99
- ]])
100
- }, null, 2)
101
- ], 10, y));
102
- }
103
- });
104
- export {
105
- j as default
106
- };
@@ -1,40 +0,0 @@
1
- import { defineComponent as d, createElementBlock as a, openBlock as s, withModifiers as u, normalizeClass as t, createElementVNode as r, createCommentVNode as k } from "vue";
2
- const b = ["for"], c = ["innerHTML"], x = /* @__PURE__ */ d({
3
- __name: "BaseFloatingLabel",
4
- props: {
5
- labelState: { default: "inline-label" },
6
- isValid: { type: [Boolean, null], default: null },
7
- labelText: {},
8
- disabled: { type: [String, Boolean], default: !1 },
9
- labelClasses: {},
10
- labelTextClasses: {}
11
- },
12
- emits: ["click"],
13
- setup(e, { emit: n }) {
14
- const o = n;
15
- return (i, l) => (s(), a("label", {
16
- for: i.$attrs.for,
17
- class: t(["uikit-pointer-events-none uikit-absolute uikit-left-15px uikit-h-5", [e.labelState, { "uikit-text-w-secondary": e.disabled }, e.labelClasses]]),
18
- onClick: l[0] || (l[0] = u((f) => o("click"), ["stop"]))
19
- }, [
20
- r("span", {
21
- class: t(["uikit-font-medium [font-size:inherit]", [
22
- e.disabled ? "uikit-text-w-secondary" : "uikit-text-w-black",
23
- e.labelTextClasses
24
- ]]),
25
- innerHTML: e.labelText
26
- }, null, 10, c),
27
- i.$attrs.required ? (s(), a("sup", {
28
- key: 0,
29
- class: t(["uikit-absolute -uikit-top-[0.3rem] [font-size:inherit]", [
30
- { "uikit-text-w-secondary": e.disabled },
31
- { "uikit-text-w-danger": e.isValid === !1 },
32
- { "uikit-text-w-primary": (e.isValid || e.isValid === null) && !e.disabled }
33
- ]])
34
- }, " *", 2)) : k("", !0)
35
- ], 10, b));
36
- }
37
- });
38
- export {
39
- x as default
40
- };
@@ -1,211 +0,0 @@
1
- import { defineComponent as z, mergeModels as C, useModel as A, ref as m, watch as w, useAttrs as N, createElementBlock as r, openBlock as u, normalizeClass as v, unref as s, renderSlot as c, createElementVNode as h, createBlock as O, createCommentVNode as y, withKeys as j, withModifiers as $, Fragment as T, renderList as B } from "vue";
2
- import D from "../../../../UIKit/BaseFloatingLabel.js";
3
- import { useFloatingLabel as G } from "../../../../composables/useFloatingLabel.js";
4
- const J = ["id", "data-cy", "name", "autocomplete", "disabled", "aria-labelledby", "readonly", "type", "pattern", "min", "max", "maxlength", "inputmode", "placeholder", "value"], Q = { 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" }, W = ["innerHTML"], X = ["innerHTML"], Y = ["innerHTML"], Z = {
5
- key: 1,
6
- class: "under-label uikit-absolute uikit-text-12"
7
- }, te = /* @__PURE__ */ z({
8
- inheritAttrs: !1,
9
- __name: "BaseInput",
10
- props: /* @__PURE__ */ C({
11
- inputClass: {},
12
- labelText: { default: "" },
13
- feedback: {},
14
- isValid: { type: [Boolean, null], default: null },
15
- keepFloatingLabel: { type: Boolean, default: !1 },
16
- formatter: { default: null },
17
- labelClasses: {},
18
- fieldsetClasses: {},
19
- labelTextClasses: {},
20
- withLeftIcon: { type: Boolean, default: () => {
21
- } },
22
- withRightIcon: { type: Boolean, default: () => {
23
- } },
24
- dataCy: {}
25
- }, {
26
- modelValue: { default: "" },
27
- modelModifiers: {}
28
- }),
29
- emits: /* @__PURE__ */ C(["click", "keydownEnterPressed", "focusin", "focusout", "keydown", "keyup"], ["update:modelValue"]),
30
- setup(e, { expose: M, emit: E }) {
31
- const d = A(e, "modelValue"), a = m(""), k = E, {
32
- labelState: o,
33
- handleFocusIn: H,
34
- handleFocusOut: x,
35
- setInlineLabel: V,
36
- setFloatingLabel: I
37
- } = G(k), n = m("text"), f = m({}), b = m(null), R = () => {
38
- e.feedback && (f.value = e.feedback, e.feedback.valid && typeof e.feedback.valid == "string" && (f.value.valid = [e.feedback.valid]), e.feedback.invalid && typeof e.feedback.invalid == "string" && (f.value.invalid = [e.feedback.invalid]));
39
- }, L = (t, i) => {
40
- if (!e.formatter || !e.formatter.formatFn)
41
- return a.value = t, "";
42
- const l = t.length ? e.formatter.formatFn(t) : t;
43
- return i && (i.value = l), a.value = l, l;
44
- }, F = (t, i = !0) => {
45
- if (i && (!e.formatter || !e.formatter.unFormatFn))
46
- return d.value = t, t;
47
- if (!i || !e.formatter || !e.formatter.unFormatFn) return;
48
- const l = e.formatter.unFormatFn(t);
49
- return d.value = l ?? "", l;
50
- }, P = ({ target: t }) => {
51
- const i = t, l = F(i.value);
52
- L(
53
- `${l}`,
54
- l === d.value ? i : void 0
55
- );
56
- }, q = () => {
57
- d.value = "", V();
58
- }, K = () => {
59
- n.value === "password" ? n.value = "text" : n.value === "text" && (n.value = "password");
60
- };
61
- w(
62
- () => e.feedback,
63
- () => {
64
- R();
65
- },
66
- {
67
- immediate: !0
68
- }
69
- ), w(
70
- d,
71
- (t) => {
72
- L(
73
- `${t}`,
74
- F(`${t}`, !1) === t ? b.value : void 0
75
- ), a.value != null && a.value.length > 0 && o.value !== "floating-label" ? I() : !a.value && document && document.activeElement !== b.value && V();
76
- },
77
- {
78
- immediate: !0
79
- }
80
- ), w(
81
- () => e.keepFloatingLabel,
82
- (t) => {
83
- t ? I() : x(d.value);
84
- }
85
- );
86
- const S = N();
87
- return n.value = S.type || "text", M({
88
- select: () => {
89
- b.value?.select();
90
- }
91
- }), (t, i) => (u(), r("div", {
92
- class: v(["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", [
93
- t.$attrs.class,
94
- { "floating-label": e.labelText },
95
- s(o) === "floating-label" ? "floating-state" : "inline-state",
96
- {
97
- "has-right-icon": e.withRightIcon !== void 0 ? e.withRightIcon : !!t.$slots.righticon
98
- },
99
- {
100
- "has-left-icon": e.withLeftIcon !== void 0 ? e.withLeftIcon : !!t.$slots.leftIcon
101
- },
102
- { "is-invalid": e.isValid === !1, "is-valid": e.isValid }
103
- ]])
104
- }, [
105
- c(t.$slots, "leftIcon", {}, void 0, !0),
106
- c(t.$slots, "righticon", {
107
- handleClean: q,
108
- handleShowPasswd: K,
109
- curType: n.value
110
- }, void 0, !0),
111
- h("input", {
112
- id: t.$attrs.id,
113
- ref_key: "baseInputEl",
114
- ref: b,
115
- "data-cy": e.dataCy,
116
- name: t.$attrs.name,
117
- class: v(["input-element uikit-peer uikit-relative uikit-ml-[1px] uikit-mt-[6px] uikit-box-border uikit-block uikit-h-[42px] uikit-w-[calc(100%-2px)] uikit-appearance-none uikit-truncate uikit-rounded-[11px] !uikit-border-none uikit-bg-white uikit-bg-no-repeat uikit-px-4 uikit-outline-0 focus:uikit-shadow-none focus:uikit-outline-none disabled:uikit-bg-w-cultured disabled:uikit-text-w-secondary", [
118
- {
119
- "is-invalid invalid-bg !uikit-pr-9": e.isValid === !1,
120
- "is-valid valid-bg !uikit-pr-9": e.isValid
121
- },
122
- {
123
- "uikit-pr-[42px]": e.withRightIcon !== void 0 ? e.withRightIcon : !!t.$slots.righticon
124
- },
125
- {
126
- "uikit-pl-[42px]": e.withLeftIcon !== void 0 ? e.withLeftIcon : !!t.$slots.leftIcon
127
- },
128
- e.inputClass
129
- ]]),
130
- autocomplete: t.$attrs.autocomplete === "on" ? "on" : "off",
131
- disabled: t.$attrs.disabled,
132
- "aria-labelledby": t.$attrs.id,
133
- readonly: t.$attrs.readonly,
134
- type: n.value,
135
- pattern: t.$attrs.pattern,
136
- min: t.$attrs.min,
137
- max: t.$attrs.max,
138
- maxlength: t.$attrs.maxlength,
139
- inputmode: t.$attrs.inputmode,
140
- placeholder: t.$attrs.placeholder,
141
- value: a.value,
142
- onClick: i[0] || (i[0] = (l) => k("click", l)),
143
- onFocusin: i[1] || (i[1] = $(() => e.labelText && s(H)(), ["stop"])),
144
- onFocusout: i[2] || (i[2] = $((l) => e.labelText && !e.keepFloatingLabel && s(x)(a.value), ["stop"])),
145
- onInput: $(P, ["stop"]),
146
- onKeydown: [
147
- i[3] || (i[3] = j(() => k("keydownEnterPressed"), ["enter"])),
148
- i[4] || (i[4] = (l) => k("keydown", l))
149
- ],
150
- onKeyup: i[5] || (i[5] = (l) => k("keyup", l))
151
- }, null, 42, J),
152
- h("fieldset", {
153
- class: v(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-top-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-solid uikit-px-2 uikit-py-0 uikit-text-left 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", [
154
- {
155
- "is-invalid uikit-border-w-danger": e.isValid === !1,
156
- "is-valid uikit-border-w-primary": e.isValid,
157
- "uikit-border-w-secondary": e.isValid === null
158
- },
159
- { "uikit-top-0": !e.labelText },
160
- e.fieldsetClasses
161
- ]])
162
- }, [
163
- h("legend", Q, [
164
- h("span", {
165
- class: v(["visible-label uikit-opacity-0", [
166
- { "uikit-mx-5px": e.labelText },
167
- {
168
- "uikit-visible uikit-inline-block": s(o) === "floating-label"
169
- },
170
- {
171
- "uikit-invisible uikit-hidden": s(o) === "inline-label"
172
- }
173
- ]]),
174
- innerHTML: e.labelText
175
- }, null, 10, W)
176
- ])
177
- ], 2),
178
- e.labelText ? (u(), O(D, {
179
- key: 0,
180
- for: t.$attrs.id,
181
- "label-text": e.labelText,
182
- "label-state": s(o),
183
- "is-valid": e.isValid,
184
- required: t.$attrs.required,
185
- disabled: t.$attrs.disabled,
186
- "label-classes": [
187
- s(o) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
188
- e.labelClasses
189
- ],
190
- "label-text-classes": e.labelTextClasses
191
- }, null, 8, ["for", "label-text", "label-state", "is-valid", "required", "disabled", "label-classes", "label-text-classes"])) : y("", !0),
192
- c(t.$slots, "feedback", {}, () => [
193
- e.isValid === !1 ? (u(!0), r(T, { key: 0 }, B(f.value.invalid, (l, g) => (u(), r("div", {
194
- key: `${t.$attrs.id}_invalid_${g}`,
195
- class: "uikit-mt-1 uikit-text-12 uikit-text-w-danger",
196
- innerHTML: l
197
- }, null, 8, X))), 128)) : e.isValid === !0 ? (u(!0), r(T, { key: 1 }, B(f.value.valid, (l, g) => (u(), r("div", {
198
- key: `${t.$attrs.id}_valid_${g}`,
199
- class: "uikit-mt-1 uikit-text-12 uikit-text-w-primary",
200
- innerHTML: l
201
- }, null, 8, Y))), 128)) : y("", !0)
202
- ], !0),
203
- t.$slots["under-label"] ? (u(), r("div", Z, [
204
- c(t.$slots, "under-label", {}, void 0, !0)
205
- ])) : y("", !0)
206
- ], 2));
207
- }
208
- });
209
- export {
210
- te as default
211
- };
@@ -1,207 +0,0 @@
1
- import { defineComponent as R, mergeModels as _, useModel as w, ref as p, useTemplateRef as D, useAttrs as j, onMounted as q, createElementBlock as G, openBlock as H, createElementVNode as x, withModifiers as T, createVNode as k } from "vue";
2
- import C from "../../../../UIKit/BaseInput.js";
3
- const J = { class: "range_container" }, K = { class: "sliders_control" }, O = ["value", "min", "max", "step"], Q = ["value", "min", "max", "step"], W = { class: "form_control row" }, X = { class: "pb-15 pb-sm-0 col-sm-6 col-xl-4" }, Y = { class: "col-sm-6 col-xl-4" }, ae = /* @__PURE__ */ R({
4
- __name: "BaseSlider",
5
- props: /* @__PURE__ */ _({
6
- type: { default: "linear" },
7
- min: { default: 0 },
8
- max: { default: 100 }
9
- }, {
10
- minValue: { default: 0 },
11
- minValueModifiers: {},
12
- maxValue: { default: 0 },
13
- maxValueModifiers: {}
14
- }),
15
- emits: ["update:minValue", "update:maxValue"],
16
- setup(m) {
17
- function B(e, l) {
18
- const a = parseInt(e.value, 10), t = parseInt(l.value, 10);
19
- return [a, t];
20
- }
21
- const E = (e) => e.minPos + (Math.log(e.value) - e.minlval) / e.scale, L = (e) => Math.exp(
22
- (e.position - e.minPos) * e.scale + e.minlval
23
- );
24
- function V(e, l, a, t, v) {
25
- const s = l.max - l.min, f = e - l.min, $ = l.value - l.min;
26
- v.style.background = `linear-gradient(
27
- to right,
28
- ${a} 0%,
29
- ${a} ${f / s * 100}%,
30
- ${t} ${f / s * 100}%,
31
- ${t} ${$ / s * 100}%,
32
- ${a} ${$ / s * 100}%,
33
- ${a} 100%)`;
34
- }
35
- function h(e, l) {
36
- e <= 0 ? l.style.zIndex = "2" : l.style.zIndex = "0";
37
- }
38
- const r = w(m, "minValue"), o = w(m, "maxValue"), n = p(0), u = p(100), c = p(10), d = p(40), F = p(0), M = p(0), y = p(0), g = D("fromSlider"), i = D("toSlider"), P = (e, l) => {
39
- if (!g.value || !i.value) return;
40
- l || (l = "0");
41
- const a = parseInt(l, 10);
42
- if (e == "min-input") {
43
- if (a >= o.value) return;
44
- r.value = a, z(i.value, a, o.value);
45
- return;
46
- }
47
- a < r.value || (o.value = a, A(i.value, i.value, r.value, a));
48
- }, I = (e) => {
49
- if (m.type === "logarithmic")
50
- return e = e || 1, parseInt(
51
- E({
52
- value: e,
53
- minPos: n.value,
54
- minlval: F.value,
55
- scale: y.value
56
- }).toFixed(0),
57
- 10
58
- );
59
- if (m.type === "linear")
60
- return e;
61
- throw new Error("The slider type has not been implemented");
62
- }, S = (e) => {
63
- if (m.type === "logarithmic")
64
- return e = e || 1, parseInt(
65
- L({
66
- position: e,
67
- scale: y.value,
68
- minlval: F.value,
69
- minPos: n.value
70
- }).toFixed(0),
71
- 10
72
- );
73
- if (m.type === "linear")
74
- return e;
75
- throw new Error("The slider type has not been implemented");
76
- }, z = (e, l, a) => {
77
- const t = I(l), v = I(a);
78
- V(
79
- t,
80
- {
81
- min: n.value,
82
- max: u.value,
83
- value: v
84
- },
85
- "#B4C2F0",
86
- "#2B5DFF",
87
- e
88
- );
89
- const s = t, f = o.value;
90
- s > f ? c.value = f : c.value = s;
91
- }, A = (e, l, a, t) => {
92
- const v = I(a), s = I(t);
93
- V(
94
- v,
95
- {
96
- min: n.value,
97
- max: u.value,
98
- value: s
99
- },
100
- "#B4C2F0",
101
- "#2B5DFF",
102
- l
103
- );
104
- const f = r.value, $ = s;
105
- h(o.value, e), f <= $ ? d.value = $ : d.value = f;
106
- }, N = (e, l) => {
107
- if (!l.value) return;
108
- const [a, t] = B(e, l), v = S(a);
109
- V(
110
- a,
111
- {
112
- min: n.value,
113
- max: u.value,
114
- value: t
115
- },
116
- "#B4C2F0",
117
- "#2B5DFF",
118
- l
119
- ), a > t ? (e.value = `${t}`, c.value = t, r.value = t) : (c.value = a, r.value = v);
120
- }, U = (e, l) => {
121
- if (!l.value) return;
122
- const [a, t] = B(e, l), v = S(t);
123
- V(
124
- c.value,
125
- {
126
- min: n.value,
127
- max: u.value,
128
- value: t
129
- },
130
- "#B4C2F0",
131
- "#2B5DFF",
132
- l
133
- ), h(parseInt(l.value, 10), l), a <= t ? (d.value = t, o.value = v) : (l.value = `${a}`, d.value = a, o.value = a);
134
- }, b = j();
135
- return (() => {
136
- n.value = parseInt(`${m.min || 0}`, 10), u.value = parseInt(`${m.max || 100}`, 10), c.value = n.value, d.value = u.value, r.value = parseInt(`${b.minValue || n.value}`, 10), o.value = parseInt(`${b.maxValue || u.value}`, 10), F.value = Math.log(r.value || 1), M.value = Math.log(o.value), y.value = (M.value - F.value) / (u.value - n.value);
137
- })(), q(() => {
138
- !g.value || !i.value || (V(
139
- c.value,
140
- {
141
- min: n.value,
142
- max: u.value,
143
- value: d.value
144
- },
145
- "#B4C2F0",
146
- "#2B5DFF",
147
- i.value
148
- ), h(d.value, i.value));
149
- }), (e, l) => (H(), G("div", J, [
150
- x("div", K, [
151
- x("input", {
152
- ref_key: "fromSlider",
153
- ref: g,
154
- class: "fromSlider",
155
- type: "range",
156
- value: c.value,
157
- min: n.value,
158
- max: u.value,
159
- step: e.$attrs.step,
160
- onInput: l[0] || (l[0] = T((a) => N(
161
- g.value,
162
- i.value
163
- ), ["stop"]))
164
- }, null, 40, O),
165
- x("input", {
166
- ref_key: "toSlider",
167
- ref: i,
168
- class: "toSlider",
169
- type: "range",
170
- value: d.value,
171
- min: n.value,
172
- max: u.value,
173
- step: e.$attrs.step,
174
- onInput: l[1] || (l[1] = T((a) => U(
175
- g.value,
176
- i.value
177
- ), ["stop"]))
178
- }, null, 40, Q)
179
- ]),
180
- x("div", W, [
181
- x("div", X, [
182
- k(C, {
183
- "label-text": "Min",
184
- type: "text",
185
- pattern: "[0-9]*",
186
- inputmode: "numeric",
187
- "model-value": r.value,
188
- "onUpdate:modelValue": l[2] || (l[2] = (a) => P("min-input", `${a || ""}`))
189
- }, null, 8, ["model-value"])
190
- ]),
191
- x("div", Y, [
192
- k(C, {
193
- "label-text": "Max",
194
- type: "text",
195
- pattern: "[0-9]*",
196
- inputmode: "numeric",
197
- "model-value": o.value,
198
- "onUpdate:modelValue": l[3] || (l[3] = (a) => P("max-input", `${a || ""}`))
199
- }, null, 8, ["model-value"])
200
- ])
201
- ])
202
- ]));
203
- }
204
- });
205
- export {
206
- ae as default
207
- };