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

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 (105) hide show
  1. package/dist/Swiper/autoplay.js +4 -3
  2. package/dist/Swiper/controller.js +2 -1
  3. package/dist/Swiper/free-mode.js +4 -3
  4. package/dist/Swiper/keyboard.js +4 -3
  5. package/dist/Swiper/navigation.js +4 -3
  6. package/dist/Swiper/pagination.js +4 -3
  7. package/dist/Swiper/thumbs.js +4 -3
  8. package/dist/UIKit/AccessibleSelect.js +3 -2
  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 +3 -2
  13. package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +3 -2
  14. package/dist/UIKit/BaseAlert.js +3 -2
  15. package/dist/UIKit/BaseAutocomplete.js +3 -2
  16. package/dist/UIKit/BaseBadge.js +3 -2
  17. package/dist/UIKit/BaseBreadcrumb.js +1 -1
  18. package/dist/UIKit/BaseButton.js +1 -1
  19. package/dist/UIKit/BaseCard.js +5 -36
  20. package/dist/UIKit/BaseComplexToggle.js +5 -105
  21. package/dist/UIKit/BaseDropDown.js +3 -2
  22. package/dist/UIKit/BaseFloatingLabel.js +5 -39
  23. package/dist/UIKit/BaseInput.js +5 -210
  24. package/dist/UIKit/BaseModal.js +3 -2
  25. package/dist/UIKit/BasePagination.js +1 -1
  26. package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
  27. package/dist/UIKit/BaseSlider.js +5 -206
  28. package/dist/UIKit/BaseSnackbar.js +3 -2
  29. package/dist/UIKit/BaseTextarea.js +5 -126
  30. package/dist/UIKit/BaseToggle.js +5 -41
  31. package/dist/UIKit/BaseTooltip.js +5 -40
  32. package/dist/UIKit/BaseUploadFile.js +1 -1
  33. package/dist/UIKit/Checkbox/CheckboxBtn.js +3 -2
  34. package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
  35. package/dist/UIKit/Radio/RadioButton.js +1 -1
  36. package/dist/UIKit/Radio/RadioGroup.js +1 -1
  37. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +5 -20
  38. package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
  39. package/dist/UIKit/Slider/SimpleSlider.js +5 -81
  40. package/dist/UIKit/StaticSpinner.js +5 -26
  41. package/dist/UIKit/Tab/BaseTab.js +1 -1
  42. package/dist/UIKit/Tab/BaseTabList.js +1 -1
  43. package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
  44. package/dist/UIKit/Tab/BaseTabView.js +1 -1
  45. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  46. package/dist/assets/SwiperCarousel.css +1 -1
  47. package/dist/assets/SwiperCarousel2.css +1 -0
  48. package/dist/assets/swiper-swiper.css +1 -0
  49. package/dist/assets/swiper-zoom.css +1 -0
  50. package/dist/chart/DoughnutChart.js +1 -1
  51. package/dist/chart/LineChart.js +1 -1
  52. package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
  53. package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
  54. package/dist/components/carousel/SwiperCarousel.js +6 -243
  55. package/dist/components/carousel/SwiperSlide.js +1 -1
  56. package/dist/index.js +92 -82
  57. package/dist/{chunks/AccessibleSelect.vue_vue_type_style_index_0_lang.DWwkWpAC.js → packages/components/lib/UIKit/AccessibleSelect.vue.js} +4 -3
  58. package/dist/{chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.Qp6BrYox.js → packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js} +5 -5
  59. package/dist/{chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CL5zNPzY.js → packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js} +4 -4
  60. package/dist/{chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.BqjzG2As.js → packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js} +5 -5
  61. package/dist/{chunks/BaseAccordionItem.vue_vue_type_style_index_0_lang.DwEHSyBO.js → packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js} +4 -4
  62. package/dist/{chunks/ClearableAutocomplete.vue_vue_type_style_index_0_lang.DUOBcBPN.js → packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js} +5 -4
  63. package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +19 -0
  64. package/dist/{chunks/BaseAutocomplete.vue_vue_type_style_index_0_lang.BW_JCkOV.js → packages/components/lib/UIKit/BaseAutocomplete.vue.js} +25 -24
  65. package/dist/{chunks/BaseBadge.vue_vue_type_style_index_0_lang.BnYtlFXq.js → packages/components/lib/UIKit/BaseBadge.vue.js} +6 -6
  66. package/dist/{chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.CcfuB26u.js → packages/components/lib/UIKit/BaseBreadcrumb.vue.js} +7 -7
  67. package/dist/{chunks/BaseButton.vue_vue_type_script_setup_true_lang.CswNVEW_.js → packages/components/lib/UIKit/BaseButton.vue.js} +2 -2
  68. package/dist/packages/components/lib/UIKit/BaseCard.vue.js +37 -0
  69. package/dist/packages/components/lib/UIKit/BaseComplexToggle.vue.js +106 -0
  70. package/dist/{chunks/BaseDropDown.vue_vue_type_style_index_0_lang.z4eFD2_f.js → packages/components/lib/UIKit/BaseDropDown.vue.js} +12 -12
  71. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +40 -0
  72. package/dist/packages/components/lib/UIKit/BaseInput.vue.js +211 -0
  73. package/dist/{chunks/BaseModal.vue_vue_type_style_index_0_lang.B8U_buif.js → packages/components/lib/UIKit/BaseModal.vue.js} +2 -2
  74. package/dist/{chunks/BasePagination.vue_vue_type_script_setup_true_lang.CkGMhOm-.js → packages/components/lib/UIKit/BasePagination.vue.js} +1 -1
  75. package/dist/{chunks/SelectItem.vue_vue_type_script_setup_true_lang.DvQ4ZKvE.js → packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js} +9 -9
  76. package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +207 -0
  77. package/dist/{chunks/BaseSnackbar.vue_vue_type_style_index_0_lang.DJqVfg6P.js → packages/components/lib/UIKit/BaseSnackbar.vue.js} +2 -2
  78. package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +127 -0
  79. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +42 -0
  80. package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +41 -0
  81. package/dist/{chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.DMPiMivr.js → packages/components/lib/UIKit/BaseUploadFile.vue.js} +7 -7
  82. package/dist/{chunks/CheckboxBtn.vue_vue_type_style_index_0_lang.MYOfjOwM.js → packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js} +8 -8
  83. package/dist/{chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.aDZDPjgR.js → packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js} +4 -3
  84. package/dist/{chunks/RadioButton.vue_vue_type_script_setup_true_lang.g-a7DM3l.js → packages/components/lib/UIKit/Radio/RadioButton.vue.js} +3 -3
  85. package/dist/{chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DtBZuHm2.js → packages/components/lib/UIKit/Radio/RadioGroup.vue.js} +3 -3
  86. package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +21 -0
  87. package/dist/{chunks/ShimmerMultiLine.vue_vue_type_script_setup_true_lang.DEb8nfZp.js → packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js} +4 -4
  88. package/dist/packages/components/lib/UIKit/Slider/SimpleSlider.vue.js +82 -0
  89. package/dist/packages/components/lib/UIKit/StaticSpinner.vue.js +27 -0
  90. package/dist/{chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js → packages/components/lib/UIKit/Tab/BaseTab.vue.js} +3 -3
  91. package/dist/{chunks/BaseTabList.vue_vue_type_script_setup_true_lang.BXvkXKbT.js → packages/components/lib/UIKit/Tab/BaseTabList.vue.js} +3 -3
  92. package/dist/{chunks/BaseTabPanel.vue_vue_type_script_setup_true_lang.CM1ObHXU.js → packages/components/lib/UIKit/Tab/BaseTabPanel.vue.js} +1 -1
  93. package/dist/{chunks/BaseTabView.vue_vue_type_script_setup_true_lang.BocXkfTw.js → packages/components/lib/UIKit/Tab/BaseTabView.vue.js} +17 -17
  94. package/dist/{chunks/DoughnutChart.vue_vue_type_script_setup_true_lang.yALl_gpB.js → packages/components/lib/chart/DoughnutChart.vue.js} +6 -6
  95. package/dist/{chunks/LineChart.vue_vue_type_script_setup_true_lang.Df20jEOd.js → packages/components/lib/chart/LineChart.vue.js} +7 -7
  96. package/dist/{chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.BidNzYDc.js → packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js} +5 -5
  97. package/dist/{chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.BnLNx3be.js → packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js} +3 -3
  98. package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +246 -0
  99. package/package.json +1 -1
  100. package/dist/chunks/BaseAlert.vue_vue_type_style_index_0_lang.BVR-COlL.js +0 -19
  101. package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js +0 -9
  102. /package/dist/assets/{free-mode.css → swiper-free-mode.css} +0 -0
  103. /package/dist/assets/{thumbs.css → swiper-keyboard.css} +0 -0
  104. /package/dist/assets/{navigation.css → swiper-navigation.css} +0 -0
  105. /package/dist/assets/{pagination.css → swiper-pagination.css} +0 -0
@@ -0,0 +1,211 @@
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,7 +1,7 @@
1
1
  import { defineComponent as I, ref as n, useTemplateRef as T, onUnmounted as z, watch as H, createBlock as O, openBlock as m, Teleport as $, createElementVNode as a, normalizeClass as s, createElementBlock as y, createCommentVNode as h, renderSlot as d, withModifiers as D, createVNode as F, unref as K, nextTick as N } from "vue";
2
2
  import { isWindows as g, awaitableSetTimeout as S } from "@wikicasa-dev/utilities";
3
3
  import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
4
- import '../assets/BaseModal.css';const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
4
+ const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
5
5
  __name: "BaseModal",
6
6
  props: {
7
7
  id: { default: "base-bt-modal" },
@@ -145,5 +145,5 @@ import '../assets/BaseModal.css';const P = ["id", "data-cy"], U = ["innerHTML"],
145
145
  }
146
146
  });
147
147
  export {
148
- j as _
148
+ j as default
149
149
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as c, useTemplateRef as u, watch as d, nextTick as m, createElementBlock as r, openBlock as v, normalizeClass as f, renderSlot as k, createElementVNode as x } from "vue";
2
- const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ c({
1
+ import { defineComponent as u, useTemplateRef as c, watch as d, nextTick as m, createElementBlock as r, openBlock as f, normalizeClass as v, renderSlot as k, createElementVNode as x } from "vue";
2
+ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ u({
3
3
  __name: "SelectItem",
4
4
  props: {
5
5
  label: { default: "" },
@@ -8,26 +8,26 @@ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ c(
8
8
  },
9
9
  emits: ["click", "mouseover"],
10
10
  setup(t, { emit: o }) {
11
- const n = o, i = t, a = u("liItem");
11
+ const a = o, i = t, n = c("liItem");
12
12
  return d(
13
13
  () => i.active,
14
14
  (e) => {
15
15
  e && m(() => {
16
- a.value && a.value.focus();
16
+ n.value && n.value.focus();
17
17
  });
18
18
  },
19
19
  { immediate: !0 }
20
- ), (e, l) => (v(), r("li", {
20
+ ), (e, l) => (f(), r("li", {
21
21
  ref: "liItem",
22
- class: f(["uikit-list-none uikit-text-w-black", [
22
+ class: v(["uikit-list-none uikit-text-w-black", [
23
23
  { "active uikit-bg-w-cultured": t.active },
24
24
  "uikit-outline-none",
25
25
  e.$attrs.class
26
26
  ]]),
27
27
  "data-active": t.active,
28
28
  tabindex: e.$attrs.tabindex ?? -1,
29
- onClick: l[0] || (l[0] = (s) => n("click", i.idx)),
30
- onMouseover: l[1] || (l[1] = (s) => n("mouseover", i.idx))
29
+ onClick: l[0] || (l[0] = (s) => a("click", i.idx)),
30
+ onMouseover: l[1] || (l[1] = (s) => a("mouseover", i.idx))
31
31
  }, [
32
32
  k(e.$slots, "default", { itemIdx: t.idx }, () => [
33
33
  x("span", {
@@ -38,5 +38,5 @@ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ c(
38
38
  }
39
39
  });
40
40
  export {
41
- $ as _
41
+ $ as default
42
42
  };
@@ -0,0 +1,207 @@
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
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as x, mergeModels as I, useModel as w, ref as b, watch as y, nextTick as $, createBlock as s, openBlock as r, unref as i, withCtx as a, renderSlot as f, createVNode as n, normalizeClass as m, createCommentVNode as p, normalizeStyle as B } from "vue";
2
2
  import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
3
3
  import { ToastProvider as D, ToastRoot as M, ToastTitle as P, ToastDescription as z, ToastClose as S, ToastAction as A, ProgressRoot as N, ProgressIndicator as R, ToastPortal as U, ToastViewport as h } from "reka-ui";
4
- import '../assets/BaseSnackbar.css';const q = /* @__PURE__ */ x({
4
+ const q = /* @__PURE__ */ x({
5
5
  inheritAttrs: !1,
6
6
  __name: "BaseSnackbar",
7
7
  props: /* @__PURE__ */ I({
@@ -141,5 +141,5 @@ import '../assets/BaseSnackbar.css';const q = /* @__PURE__ */ x({
141
141
  }
142
142
  });
143
143
  export {
144
- q as _
144
+ q as default
145
145
  };
@@ -0,0 +1,127 @@
1
+ import { defineComponent as T, mergeModels as c, useModel as h, ref as $, watch as L, createElementBlock as b, openBlock as f, normalizeClass as s, createElementVNode as r, createCommentVNode as v, unref as u, createVNode as M, withModifiers as o, nextTick as C } from "vue";
2
+ import F from "../../../../UIKit/BaseFloatingLabel.js";
3
+ import { useFloatingLabel as B } from "../../../../composables/useFloatingLabel.js";
4
+ const z = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "value"], E = {
5
+ key: 0,
6
+ class: "uikit-visible uikit-float-none 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-duration-[50s] uikit-ease-out"
7
+ }, H = ["innerHTML"], q = ["innerHTML"], S = /* @__PURE__ */ T({
8
+ inheritAttrs: !1,
9
+ __name: "BaseTextarea",
10
+ props: /* @__PURE__ */ c({
11
+ labelText: { default: "" },
12
+ feedback: {},
13
+ isValid: { type: [Boolean, null], default: null },
14
+ resize: { type: Boolean, default: !1 },
15
+ labelClasses: {}
16
+ }, {
17
+ modelValue: { default: "" },
18
+ modelModifiers: {}
19
+ }),
20
+ emits: /* @__PURE__ */ c(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
21
+ setup(e, { expose: m, emit: x }) {
22
+ const n = h(e, "modelValue"), k = x, {
23
+ labelState: a,
24
+ handleFocusIn: w,
25
+ handleFocusOut: y,
26
+ setFloatingLabel: g,
27
+ setInlineLabel: p
28
+ } = B(k), t = $(null);
29
+ L(
30
+ n,
31
+ (i) => {
32
+ `${i}`.length && a.value !== "floating-label" ? g() : !i?.length && a.value !== "inline-label" && document.activeElement !== t.value && p();
33
+ },
34
+ { immediate: !0 }
35
+ );
36
+ const V = ({ target: i }) => {
37
+ n.value = i.value;
38
+ };
39
+ return m({
40
+ disableTextarea: () => {
41
+ t.value && (t.value.setAttribute("readonly", "readonly"), t.value.classList.add("disabled"));
42
+ },
43
+ clearTextareaElem: () => {
44
+ t.value && (t.value.value = "");
45
+ },
46
+ focusDisabledTextarea: () => {
47
+ t.value && (t.value.removeAttribute("readonly"), t.value.classList.remove("disabled"), C(() => {
48
+ t.value && t.value.focus();
49
+ }));
50
+ }
51
+ }), (i, l) => (f(), b("div", {
52
+ class: s(i.$attrs["wrapper-classes"])
53
+ }, [
54
+ r("div", {
55
+ class: s(["input-wrapper uikit-relative uikit-rounded-xs uikit-px-0", [
56
+ u(a) === "floating-label" ? "floating-state" : "inline-state"
57
+ ]])
58
+ }, [
59
+ r("textarea", {
60
+ id: i.$attrs.id,
61
+ ref_key: "textarea",
62
+ ref: t,
63
+ "data-cy": i.$attrs["data-cy"],
64
+ class: s(["textarea-scrollbar uikit-peer/fieldset uikit-relative uikit-z-20 uikit-mb-10px uikit-mt-15px uikit-w-[calc(100%-1px)] uikit-overflow-y-auto uikit-whitespace-pre-wrap uikit-rounded-xs uikit-border-0 uikit-bg-transparent uikit-bg-no-repeat uikit-px-15px uikit-pb-[8px] uikit-outline-none", [
65
+ { "is-invalid invalid-bg !uikit-pr-10": e.isValid === !1 },
66
+ { "is-valid valid-bg !uikit-pr-10": e.isValid },
67
+ { "uikit-resize-none": !e.resize },
68
+ i.$attrs.class
69
+ ]]),
70
+ rows: i.$attrs.rows,
71
+ disabled: i.$attrs.disabled,
72
+ "aria-labelledby": i.$attrs.id,
73
+ readonly: i.$attrs.readonly,
74
+ onFocusin: l[0] || (l[0] = o((d) => u(w)(), ["stop"])),
75
+ onFocusout: l[1] || (l[1] = o((d) => u(y)(`${n.value}`.trim()), ["stop"])),
76
+ onInput: o(V, ["stop"]),
77
+ onKeydown: l[2] || (l[2] = o((d) => k("keydown", d), ["stop"])),
78
+ onClick: l[3] || (l[3] = (d) => k("click", d)),
79
+ value: n.value
80
+ }, null, 42, z),
81
+ r("fieldset", {
82
+ class: s(["uikit-pointer-events-none uikit-absolute -uikit-top-0 uikit-bottom-[3px] uikit-left-0 uikit-right-0 uikit-m-0 uikit-min-w-0 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-solid uikit-bg-white uikit-p-0 uikit-px-2 uikit-text-start uikit-transition-[border] uikit-duration-100 uikit-ease-out peer-focus/fieldset:uikit-border-2 peer-focus/fieldset:uikit-border-w-primary peer-disabled/fieldset:uikit-bg-w-cultured peer-[&.disabled]/fieldset:uikit-bg-w-cultured peer-focus/fieldset:[&.is-invalid]:uikit-border-w-danger", [
83
+ { "is-invalid": e.isValid === !1, "is-valid": e.isValid },
84
+ { "uikit-border-w-danger": e.isValid === !1 },
85
+ { "uikit-border-w-primary": e.isValid },
86
+ { "uikit-border-w-secondary": e.isValid === null }
87
+ ]])
88
+ }, [
89
+ e.labelText ? (f(), b("legend", E, [
90
+ r("span", {
91
+ class: s(["uikit-px-5px uikit-opacity-0", [
92
+ {
93
+ "uikit-visible uikit-inline-block": u(a) === "floating-label"
94
+ },
95
+ {
96
+ "uikit-invisible uikit-hidden": u(a) === "inline-label"
97
+ }
98
+ ]]),
99
+ innerHTML: e.labelText
100
+ }, null, 10, H)
101
+ ])) : v("", !0)
102
+ ], 2),
103
+ M(F, {
104
+ for: i.$attrs.id,
105
+ "label-text": e.labelText,
106
+ "label-state": u(a),
107
+ required: i.$attrs.required,
108
+ "is-valid": e.isValid,
109
+ "label-classes": [
110
+ u(a) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
111
+ e.labelClasses
112
+ ]
113
+ }, null, 8, ["for", "label-text", "label-state", "required", "is-valid", "label-classes"])
114
+ ], 2),
115
+ (e.isValid || e.isValid === !1) && e.feedback ? (f(), b("div", {
116
+ key: 0,
117
+ class: s(
118
+ e.isValid === !1 ? "uikit-mt-1 uikit-text-12 uikit-text-w-danger" : "uikit-mt-1 uikit-text-12 uikit-text-w-primary"
119
+ ),
120
+ innerHTML: e.isValid === !1 ? e.feedback.invalid : e.feedback.valid
121
+ }, null, 10, q)) : v("", !0)
122
+ ], 2));
123
+ }
124
+ });
125
+ export {
126
+ S as default
127
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as s, mergeModels as n, useModel as d, createElementBlock as k, openBlock as b, normalizeClass as c, renderSlot as r, createElementVNode as i, createCommentVNode as f, withModifiers as m } from "vue";
2
+ const p = { class: "switch uikit-relative uikit-inline-block uikit-min-w-[40px] uikit-text-sm" }, h = ["data-cy", "checked"], g = ["innerHTML"], y = /* @__PURE__ */ s({
3
+ inheritAttrs: !1,
4
+ __name: "BaseToggle",
5
+ props: /* @__PURE__ */ n({
6
+ withRightLabel: { type: Boolean, default: !0 },
7
+ label: { default: "" }
8
+ }, {
9
+ modelValue: { type: Boolean, default: !1 },
10
+ modelModifiers: {}
11
+ }),
12
+ emits: ["update:modelValue"],
13
+ setup(o) {
14
+ const l = d(o, "modelValue"), u = ({ target: e }) => {
15
+ l.value = e.checked;
16
+ };
17
+ return (e, t) => (b(), k("div", {
18
+ class: c(["switch-container uikit-inline-block uikit-items-center", e.$attrs.class])
19
+ }, [
20
+ r(e.$slots, "leftLabel", {}, void 0, !0),
21
+ i("label", p, [
22
+ i("input", {
23
+ "data-cy": e.$attrs["data-cy"] ?? "",
24
+ class: "uikit-peer/toggle uikit-h-0 uikit-w-0 uikit-opacity-0",
25
+ type: "checkbox",
26
+ checked: l.value,
27
+ onInput: t[0] || (t[0] = m((a) => u(a), ["stop"]))
28
+ }, null, 40, h),
29
+ t[1] || (t[1] = i("span", { class: "slider round uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-top-0 uikit-cursor-pointer uikit-bg-w-lavender uikit-duration-300 before:uikit-absolute before:uikit-bottom-0 before:uikit-left-0 before:uikit-top-0 before:uikit-box-border before:uikit-h-[22px] before:uikit-w-[22px] before:uikit-rounded-circle before:uikit-border before:uikit-border-solid before:uikit-border-w-secondary before:uikit-bg-white before:uikit-shadow-sm before:uikit-duration-300 before:uikit-content-[''] peer-checked/toggle:uikit-bg-w-primary" }, null, -1))
30
+ ]),
31
+ o.withRightLabel ? r(e.$slots, "rightLabel", { key: 0 }, () => [
32
+ i("span", {
33
+ class: "uikit-ml-10px",
34
+ innerHTML: o.label
35
+ }, null, 8, g)
36
+ ], !0) : f("", !0)
37
+ ], 2));
38
+ }
39
+ });
40
+ export {
41
+ y as default
42
+ };