@wikicasa-dev/components 2.1.2-alpha.3 → 2.1.2
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/UIKit/AccessibleSelect.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordion.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionBtn.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionContent.js +1 -1
- package/dist/UIKit/Accordion/BaseAccordionItem.js +1 -1
- package/dist/UIKit/BaseAlert.js +2 -3
- package/dist/UIKit/BaseAutocomplete.js +1 -1
- package/dist/UIKit/BaseBadge.js +2 -3
- package/dist/UIKit/BaseBreadcrumb.js +1 -1
- package/dist/UIKit/BaseButton.js +1 -1
- package/dist/UIKit/BaseCard.js +36 -5
- package/dist/UIKit/BaseComplexToggle.js +105 -5
- package/dist/UIKit/BaseDropDown.js +1 -1
- package/dist/UIKit/BaseFloatingLabel.js +39 -5
- package/dist/UIKit/BaseIcon.js +25 -4
- package/dist/UIKit/BaseInput.js +210 -5
- package/dist/UIKit/BaseModal.js +2 -3
- package/dist/UIKit/BasePagination.js +1 -1
- package/dist/UIKit/BasePaper.js +9 -9
- package/dist/UIKit/BaseSelect/SelectItem.js +1 -1
- package/dist/UIKit/BaseSlider.js +206 -5
- package/dist/UIKit/BaseSnackbar.js +80 -5
- package/dist/UIKit/BaseTextarea.js +126 -5
- package/dist/UIKit/BaseToggle.js +41 -5
- package/dist/UIKit/BaseTooltip.js +40 -5
- package/dist/UIKit/BaseUploadFile.js +1 -1
- package/dist/UIKit/Checkbox/CheckboxBtn.js +74 -5
- package/dist/UIKit/Checkbox/CheckboxGroup.js +1 -1
- package/dist/UIKit/Radio/RadioButton.js +1 -1
- package/dist/UIKit/Radio/RadioGroup.js +1 -1
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +20 -5
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +1 -1
- package/dist/UIKit/Slider/SimpleSlider.js +81 -5
- package/dist/UIKit/StaticSpinner.js +26 -5
- package/dist/UIKit/Tab/BaseTab.js +1 -1
- package/dist/UIKit/Tab/BaseTabList.js +1 -1
- package/dist/UIKit/Tab/BaseTabPanel.js +1 -1
- package/dist/UIKit/Tab/BaseTabView.js +1 -1
- package/dist/assets/SwiperCarousel.css +1 -0
- package/dist/chart/DoughnutChart.js +1 -1
- package/dist/chart/LineChart.js +1 -1
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.gRPd8LaO.js +246 -0
- package/dist/{node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js → chunks/ArrowIcon.Bq6Xr3uH.js} +3 -3
- package/dist/chunks/BaseAccordion.vue_vue_type_script_setup_true_lang.BJW28Y_i.js +32 -0
- package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js → chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.APN3hif2.js} +8 -8
- package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js → chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.Dn4qNu2R.js} +1 -1
- package/dist/{packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js → chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.Dpjir3yq.js} +21 -21
- package/dist/{packages/components/lib/UIKit/BaseAlert.vue.js → chunks/BaseAlert.vue_vue_type_style_index_0_lang.DUWb9d9_.js} +2 -2
- package/dist/{packages/components/lib/UIKit/BaseAutocomplete.vue.js → chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.Ol7Hmb-E.js} +74 -64
- package/dist/chunks/BaseBadge.vue_vue_type_style_index_0_lang.D2PAy8_x.js +19 -0
- package/dist/{packages/components/lib/UIKit/BaseBreadcrumb.vue.js → chunks/BaseBreadcrumb.vue_vue_type_script_setup_true_lang.DlSPjwQe.js} +5 -5
- package/dist/{packages/components/lib/UIKit/BaseButton.vue.js → chunks/BaseButton.vue_vue_type_script_setup_true_lang.BPSr-Zxr.js} +6 -6
- package/dist/{packages/components/lib/UIKit/BaseDropDown.vue.js → chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.Cb0-JXG0.js} +25 -25
- package/dist/{packages/components/lib/UIKit/BaseModal.vue.js → chunks/BaseModal.vue_vue_type_style_index_0_lang.CCb032YN.js} +61 -56
- package/dist/{packages/components/lib/UIKit/BasePagination.vue.js → chunks/BasePagination.vue_vue_type_script_setup_true_lang.Cbo8eLhz.js} +83 -71
- package/dist/{packages/components/lib/UIKit/Tab/BaseTab.vue.js → chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js} +3 -3
- package/dist/{packages/components/lib/UIKit/Tab/BaseTabList.vue.js → chunks/BaseTabList.vue_vue_type_script_setup_true_lang.CHOGs5d-.js} +1 -1
- package/dist/{packages/components/lib/UIKit/Tab/BaseTabPanel.vue.js → chunks/BaseTabPanel.vue_vue_type_script_setup_true_lang.CVJUssBq.js} +1 -1
- package/dist/{packages/components/lib/UIKit/Tab/BaseTabView.vue.js → chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CUgJNst9.js} +17 -17
- package/dist/{packages/components/lib/UIKit/BaseUploadFile.vue.js → chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.CdwKhQoc.js} +2 -2
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.C9gKO-hI.js +111 -0
- package/dist/{node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js → chunks/CloseIcon.BZ4U3aiI.js} +11 -11
- package/dist/chunks/DoughnutChart.vue_vue_type_script_setup_true_lang.M0NEigw0.js +27 -0
- package/dist/{packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js → chunks/IntersectionObservable.vue_vue_type_script_setup_true_lang.DC17cx-h.js} +5 -5
- package/dist/{packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js → chunks/IntersectionObserver.vue_vue_type_script_setup_true_lang.BKewKDXG.js} +4 -4
- package/dist/{packages/components/lib/chart/LineChart.vue.js → chunks/LineChart.vue_vue_type_script_setup_true_lang.ByrHxeZr.js} +2 -2
- package/dist/chunks/ObjectUtils.DwkJjVq1.js +10 -0
- package/dist/chunks/PharmacyIcon.DEQ8mOEJ.js +11 -0
- package/dist/{packages/components/lib/UIKit/Radio/RadioButton.vue.js → chunks/RadioButton.vue_vue_type_script_setup_true_lang.DRQnjRA7.js} +9 -9
- package/dist/{packages/components/lib/UIKit/Radio/RadioGroup.vue.js → chunks/RadioGroup.vue_vue_type_script_setup_true_lang.CpsMf2PN.js} +6 -6
- package/dist/{packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js → chunks/SelectItem.vue_vue_type_script_setup_true_lang.Drq_K7Vx.js} +1 -1
- package/dist/{packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js → chunks/ShimmerMultiLine.vue_vue_type_script_setup_true_lang.BoEMYLem.js} +8 -8
- package/dist/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/dist/chunks/polyline.tNTK3v2u.js +129 -0
- package/dist/chunks/useKeyboardController.Cs_5GQTJ.js +41 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.js +1 -1
- package/dist/components/IntersectionObserver/IntersectionObserver.js +1 -1
- package/dist/components/carousel/SwiperCarousel.js +1593 -6
- package/dist/components/carousel/SwiperSlide.js +1 -1
- package/dist/index.js +85 -89
- package/package.json +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/_virtual/polyline.js +0 -2
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/free-mode.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/navigation.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/pagination.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/zoom.css +0 -1
- package/dist/assets/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/swiper.css +0 -1
- package/dist/assets/packages/components/lib/components/carousel/SwiperCarousel.css +0 -1
- package/dist/assets/packages/components/lib/components/carousel/SwiperCarousel2.css +0 -1
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -9
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -2
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -40
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js +0 -4
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js +0 -4
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js +0 -15
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js +0 -12
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/NumberUtils.js +0 -18
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +0 -10
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js +0 -4
- package/dist/node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js +0 -41
- package/dist/node_modules/.pnpm/google-polyline@1.0.3/node_modules/google-polyline/lib/decode.js +0 -22
- package/dist/node_modules/.pnpm/google-polyline@1.0.3/node_modules/google-polyline/lib/encode.js +0 -34
- package/dist/node_modules/.pnpm/google-polyline@1.0.3/node_modules/google-polyline/lib/polyline.js +0 -12
- package/dist/node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js +0 -71
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/autoplay.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/autoplay.js +0 -129
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/controller.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/controller.js +0 -101
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/free-mode.js +0 -125
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/keyboard.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/keyboard.js +0 -67
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/navigation.js +0 -127
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/pagination.js +0 -227
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/thumbs.css.js +0 -1
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/thumbs.js +0 -121
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/modules/zoom.js +0 -310
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/shared/classes-to-selector.js +0 -6
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/shared/create-element-if-not-defined.js +0 -12
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/shared/ssr-window.esm.js +0 -135
- package/dist/node_modules/.pnpm/swiper@11.2.6/node_modules/swiper/shared/utils.js +0 -85
- package/dist/packages/components/lazyModules/Swiper/autoplay.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/controller.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/free-mode.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/keyboard.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/navigation.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/pagination.js +0 -5
- package/dist/packages/components/lazyModules/Swiper/thumbs.js +0 -5
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +0 -213
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +0 -33
- package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +0 -19
- package/dist/packages/components/lib/UIKit/BaseCard.vue.js +0 -37
- package/dist/packages/components/lib/UIKit/BaseComplexToggle.vue.js +0 -106
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +0 -40
- package/dist/packages/components/lib/UIKit/BaseIcon.vue.js +0 -27
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +0 -211
- package/dist/packages/components/lib/UIKit/BasePaper.vue.js +0 -7
- package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +0 -207
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +0 -81
- package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +0 -127
- package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +0 -42
- package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +0 -41
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +0 -75
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +0 -114
- package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +0 -21
- package/dist/packages/components/lib/UIKit/Slider/SimpleSlider.vue.js +0 -82
- package/dist/packages/components/lib/UIKit/StaticSpinner.vue.js +0 -27
- package/dist/packages/components/lib/chart/DoughnutChart.vue.js +0 -27
- package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +0 -242
- /package/dist/assets/{packages/components/lib/UIKit/BaseAlert.css → BaseAlert.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseBadge.css → BaseBadge.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseCard.css → BaseCard.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseComplexToggle.css → BaseComplexToggle.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseFloatingLabel.css → BaseFloatingLabel.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseIcon.css → BaseIcon.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseInput.css → BaseInput.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseModal.css → BaseModal.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BasePaper.css → BasePaper.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.css → BaseShimmerLoader.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseSlider.css → BaseSlider.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseSnackbar.css → BaseSnackbar.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseTextarea.css → BaseTextarea.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseToggle.css → BaseToggle.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/BaseTooltip.css → BaseTooltip.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/Checkbox/CheckboxBtn.css → CheckboxBtn.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/Slider/SimpleSlider.css → SimpleSlider.css} +0 -0
- /package/dist/assets/{packages/components/lib/UIKit/StaticSpinner.css → StaticSpinner.css} +0 -0
- /package/dist/assets/{packages/components/src/tailwind.css → index.css} +0 -0
package/dist/UIKit/BaseSlider.js
CHANGED
|
@@ -1,7 +1,208 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as R, mergeModels as j, useModel as D, ref as p, useTemplateRef as T, useAttrs as q, onMounted as G, createElementBlock as H, openBlock as J, createElementVNode as x, withModifiers as _, unref as h, createVNode as k } from "vue";
|
|
2
|
+
import C from "./BaseInput.js";
|
|
3
|
+
import { _ as K } from "../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
4
|
+
import '../assets/BaseSlider.css';const O = { class: "range_container" }, Q = { class: "sliders_control" }, W = ["value", "min", "max", "step"], X = ["value", "min", "max", "step"], Y = { class: "form_control row" }, Z = { class: "pb-15 pb-sm-0 col-sm-6 col-xl-4" }, ee = { class: "col-sm-6 col-xl-4" }, le = /* @__PURE__ */ R({
|
|
5
|
+
__name: "BaseSlider",
|
|
6
|
+
props: /* @__PURE__ */ j({
|
|
7
|
+
type: { default: "linear" },
|
|
8
|
+
min: { default: 0 },
|
|
9
|
+
max: { default: 100 }
|
|
10
|
+
}, {
|
|
11
|
+
minValue: { default: 0 },
|
|
12
|
+
minValueModifiers: {},
|
|
13
|
+
maxValue: { default: 0 },
|
|
14
|
+
maxValueModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: ["update:minValue", "update:maxValue"],
|
|
17
|
+
setup(m) {
|
|
18
|
+
function M(e, l) {
|
|
19
|
+
const a = parseInt(e.value, 10), t = parseInt(l.value, 10);
|
|
20
|
+
return [a, t];
|
|
21
|
+
}
|
|
22
|
+
const E = (e) => e.minPos + (Math.log(e.value) - e.minlval) / e.scale, L = (e) => Math.exp(
|
|
23
|
+
(e.position - e.minPos) * e.scale + e.minlval
|
|
24
|
+
);
|
|
25
|
+
function V(e, l, a, t, v) {
|
|
26
|
+
const i = l.max - l.min, f = e - l.min, $ = l.value - l.min;
|
|
27
|
+
v.style.background = `linear-gradient(
|
|
28
|
+
to right,
|
|
29
|
+
${a} 0%,
|
|
30
|
+
${a} ${f / i * 100}%,
|
|
31
|
+
${t} ${f / i * 100}%,
|
|
32
|
+
${t} ${$ / i * 100}%,
|
|
33
|
+
${a} ${$ / i * 100}%,
|
|
34
|
+
${a} 100%)`;
|
|
35
|
+
}
|
|
36
|
+
function y(e, l) {
|
|
37
|
+
e <= 0 ? l.style.zIndex = "2" : l.style.zIndex = "0";
|
|
38
|
+
}
|
|
39
|
+
const r = D(m, "minValue"), o = D(m, "maxValue"), n = p(0), u = p(100), c = p(10), d = p(40), F = p(0), P = p(0), B = p(0), g = T("fromSlider"), s = T("toSlider"), S = (e, l) => {
|
|
40
|
+
if (!g.value || !s.value) return;
|
|
41
|
+
l || (l = "0");
|
|
42
|
+
const a = parseInt(l, 10);
|
|
43
|
+
if (e == "min-input") {
|
|
44
|
+
if (a >= o.value) return;
|
|
45
|
+
r.value = a, z(s.value, a, o.value);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
a < r.value || (o.value = a, A(s.value, s.value, r.value, a));
|
|
49
|
+
}, I = (e) => {
|
|
50
|
+
if (m.type === "logarithmic")
|
|
51
|
+
return e = e || 1, parseInt(
|
|
52
|
+
E({
|
|
53
|
+
value: e,
|
|
54
|
+
minPos: n.value,
|
|
55
|
+
minlval: F.value,
|
|
56
|
+
scale: B.value
|
|
57
|
+
}).toFixed(0),
|
|
58
|
+
10
|
|
59
|
+
);
|
|
60
|
+
if (m.type === "linear")
|
|
61
|
+
return e;
|
|
62
|
+
throw new Error("The slider type has not been implemented");
|
|
63
|
+
}, b = (e) => {
|
|
64
|
+
if (m.type === "logarithmic")
|
|
65
|
+
return e = e || 1, parseInt(
|
|
66
|
+
L({
|
|
67
|
+
position: e,
|
|
68
|
+
scale: B.value,
|
|
69
|
+
minlval: F.value,
|
|
70
|
+
minPos: n.value
|
|
71
|
+
}).toFixed(0),
|
|
72
|
+
10
|
|
73
|
+
);
|
|
74
|
+
if (m.type === "linear")
|
|
75
|
+
return e;
|
|
76
|
+
throw new Error("The slider type has not been implemented");
|
|
77
|
+
}, z = (e, l, a) => {
|
|
78
|
+
const t = I(l), v = I(a);
|
|
79
|
+
V(
|
|
80
|
+
t,
|
|
81
|
+
{
|
|
82
|
+
min: n.value,
|
|
83
|
+
max: u.value,
|
|
84
|
+
value: v
|
|
85
|
+
},
|
|
86
|
+
"#B4C2F0",
|
|
87
|
+
"#2B5DFF",
|
|
88
|
+
e
|
|
89
|
+
);
|
|
90
|
+
const i = t, f = o.value;
|
|
91
|
+
i > f ? c.value = f : c.value = i;
|
|
92
|
+
}, A = (e, l, a, t) => {
|
|
93
|
+
const v = I(a), i = I(t);
|
|
94
|
+
V(
|
|
95
|
+
v,
|
|
96
|
+
{
|
|
97
|
+
min: n.value,
|
|
98
|
+
max: u.value,
|
|
99
|
+
value: i
|
|
100
|
+
},
|
|
101
|
+
"#B4C2F0",
|
|
102
|
+
"#2B5DFF",
|
|
103
|
+
l
|
|
104
|
+
);
|
|
105
|
+
const f = r.value, $ = i;
|
|
106
|
+
y(o.value, e), f <= $ ? d.value = $ : d.value = f;
|
|
107
|
+
}, N = (e, l) => {
|
|
108
|
+
if (!l.value) return;
|
|
109
|
+
const [a, t] = M(e, l), v = b(a);
|
|
110
|
+
V(
|
|
111
|
+
a,
|
|
112
|
+
{
|
|
113
|
+
min: n.value,
|
|
114
|
+
max: u.value,
|
|
115
|
+
value: t
|
|
116
|
+
},
|
|
117
|
+
"#B4C2F0",
|
|
118
|
+
"#2B5DFF",
|
|
119
|
+
l
|
|
120
|
+
), a > t ? (e.value = `${t}`, c.value = t, r.value = t) : (c.value = a, r.value = v);
|
|
121
|
+
}, U = (e, l) => {
|
|
122
|
+
if (!l.value) return;
|
|
123
|
+
const [a, t] = M(e, l), v = b(t);
|
|
124
|
+
V(
|
|
125
|
+
c.value,
|
|
126
|
+
{
|
|
127
|
+
min: n.value,
|
|
128
|
+
max: u.value,
|
|
129
|
+
value: t
|
|
130
|
+
},
|
|
131
|
+
"#B4C2F0",
|
|
132
|
+
"#2B5DFF",
|
|
133
|
+
l
|
|
134
|
+
), y(parseInt(l.value, 10), l), a <= t ? (d.value = t, o.value = v) : (l.value = `${a}`, d.value = a, o.value = a);
|
|
135
|
+
}, w = q();
|
|
136
|
+
return (() => {
|
|
137
|
+
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(`${w.minValue || n.value}`, 10), o.value = parseInt(`${w.maxValue || u.value}`, 10), F.value = Math.log(r.value || 1), P.value = Math.log(o.value), B.value = (P.value - F.value) / (u.value - n.value);
|
|
138
|
+
})(), G(() => {
|
|
139
|
+
!g.value || !s.value || (V(
|
|
140
|
+
c.value,
|
|
141
|
+
{
|
|
142
|
+
min: n.value,
|
|
143
|
+
max: u.value,
|
|
144
|
+
value: d.value
|
|
145
|
+
},
|
|
146
|
+
"#B4C2F0",
|
|
147
|
+
"#2B5DFF",
|
|
148
|
+
s.value
|
|
149
|
+
), y(d.value, s.value));
|
|
150
|
+
}), (e, l) => (J(), H("div", O, [
|
|
151
|
+
x("div", Q, [
|
|
152
|
+
x("input", {
|
|
153
|
+
ref_key: "fromSlider",
|
|
154
|
+
ref: g,
|
|
155
|
+
class: "fromSlider",
|
|
156
|
+
type: "range",
|
|
157
|
+
value: c.value,
|
|
158
|
+
min: n.value,
|
|
159
|
+
max: u.value,
|
|
160
|
+
step: e.$attrs.step,
|
|
161
|
+
onInput: l[0] || (l[0] = _((a) => N(
|
|
162
|
+
h(g),
|
|
163
|
+
h(s)
|
|
164
|
+
), ["stop"]))
|
|
165
|
+
}, null, 40, W),
|
|
166
|
+
x("input", {
|
|
167
|
+
ref_key: "toSlider",
|
|
168
|
+
ref: s,
|
|
169
|
+
class: "toSlider",
|
|
170
|
+
type: "range",
|
|
171
|
+
value: d.value,
|
|
172
|
+
min: n.value,
|
|
173
|
+
max: u.value,
|
|
174
|
+
step: e.$attrs.step,
|
|
175
|
+
onInput: l[1] || (l[1] = _((a) => U(
|
|
176
|
+
h(g),
|
|
177
|
+
h(s)
|
|
178
|
+
), ["stop"]))
|
|
179
|
+
}, null, 40, X)
|
|
180
|
+
]),
|
|
181
|
+
x("div", Y, [
|
|
182
|
+
x("div", Z, [
|
|
183
|
+
k(C, {
|
|
184
|
+
"label-text": "Min",
|
|
185
|
+
type: "text",
|
|
186
|
+
pattern: "[0-9]*",
|
|
187
|
+
inputmode: "numeric",
|
|
188
|
+
"model-value": r.value,
|
|
189
|
+
"onUpdate:modelValue": l[2] || (l[2] = (a) => S("min-input", `${a || ""}`))
|
|
190
|
+
}, null, 8, ["model-value"])
|
|
191
|
+
]),
|
|
192
|
+
x("div", ee, [
|
|
193
|
+
k(C, {
|
|
194
|
+
"label-text": "Max",
|
|
195
|
+
type: "text",
|
|
196
|
+
pattern: "[0-9]*",
|
|
197
|
+
inputmode: "numeric",
|
|
198
|
+
"model-value": o.value,
|
|
199
|
+
"onUpdate:modelValue": l[3] || (l[3] = (a) => S("max-input", `${a || ""}`))
|
|
200
|
+
}, null, 8, ["model-value"])
|
|
201
|
+
])
|
|
202
|
+
])
|
|
203
|
+
]));
|
|
204
|
+
}
|
|
205
|
+
}), oe = /* @__PURE__ */ K(le, [["__scopeId", "data-v-581ec7f4"]]);
|
|
5
206
|
export {
|
|
6
|
-
|
|
207
|
+
oe as default
|
|
7
208
|
};
|
|
@@ -1,7 +1,82 @@
|
|
|
1
|
-
import a from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as b, ref as u, onBeforeMount as f, createBlock as h, openBlock as i, Teleport as y, createElementVNode as e, withModifiers as l, normalizeClass as x, createElementBlock as a, createCommentVNode as s, createVNode as _, unref as v } from "vue";
|
|
2
|
+
import { l as g } from "../chunks/CloseIcon.BZ4U3aiI.js";
|
|
3
|
+
import "../chunks/PharmacyIcon.DEQ8mOEJ.js";
|
|
4
|
+
import { _ as C } from "../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
+
import '../assets/BaseSnackbar.css';const T = { class: "snackbar-container uikit-fixed uikit-bottom-10px uikit-left-10px uikit-z-[2000] max-sm:uikit-left-0 max-sm:uikit-w-full" }, w = ["data-cy"], B = ["src", "alt"], L = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "snackbar-type-icon uikit-bg-contain uikit-bg-no-repeat"
|
|
8
|
+
}, M = { class: "snackbar-text uikit-px-4 uikit-py-0 uikit-text uikit-font-regular max-sm:uikit-max-w-[80%] max-sm:uikit-pr-0 sm:uikit-text-16" }, S = ["innerHTML"], H = ["innerHTML"], E = /* @__PURE__ */ b({
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "BaseSnackbar",
|
|
11
|
+
props: {
|
|
12
|
+
type: { default: "" },
|
|
13
|
+
title: {},
|
|
14
|
+
body: {},
|
|
15
|
+
icon: {},
|
|
16
|
+
timeout: { default: 55e4 },
|
|
17
|
+
cb: { default: null }
|
|
18
|
+
},
|
|
19
|
+
emits: ["snackbar-hidden"],
|
|
20
|
+
setup(k, { emit: m }) {
|
|
21
|
+
const n = k, d = m, o = u(null), r = u(null), p = () => {
|
|
22
|
+
o.value && o.value();
|
|
23
|
+
}, c = () => {
|
|
24
|
+
const t = r.value;
|
|
25
|
+
t && (t.classList.remove("snackbar-active"), t.classList.add("snackbar-hidden"), setTimeout(() => {
|
|
26
|
+
d("snackbar-hidden");
|
|
27
|
+
}, 300));
|
|
28
|
+
};
|
|
29
|
+
return f(() => {
|
|
30
|
+
n.cb && (o.value = n.cb), setTimeout(() => {
|
|
31
|
+
c();
|
|
32
|
+
}, n.timeout);
|
|
33
|
+
}), (t, N) => (i(), h(y, { to: "body" }, [
|
|
34
|
+
e("div", T, [
|
|
35
|
+
e("div", {
|
|
36
|
+
ref_key: "snackbar",
|
|
37
|
+
ref: r,
|
|
38
|
+
"data-cy": t.$attrs["data-cy"],
|
|
39
|
+
class: x(["snackbar snackbar-active uikit-flex uikit-items-center uikit-rounded-[5px] uikit-px-4 uikit-py-10px uikit-font-medium uikit-shadow hover:uikit-cursor-pointer max-sm:uikit-relative max-sm:uikit-mx-10px max-sm:uikit-my-0", t.type]),
|
|
40
|
+
onClick: l(p, ["stop"])
|
|
41
|
+
}, [
|
|
42
|
+
t.icon ? (i(), a("img", {
|
|
43
|
+
key: 0,
|
|
44
|
+
src: t.icon.src,
|
|
45
|
+
alt: `${t.icon.alt}`,
|
|
46
|
+
width: "20",
|
|
47
|
+
height: "20"
|
|
48
|
+
}, null, 8, B)) : s("", !0),
|
|
49
|
+
t.type && !t.icon ? (i(), a("span", L)) : s("", !0),
|
|
50
|
+
e("div", M, [
|
|
51
|
+
t.title ? (i(), a("p", {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "uikit-m-0",
|
|
54
|
+
innerHTML: t.title
|
|
55
|
+
}, null, 8, S)) : s("", !0),
|
|
56
|
+
t.body ? (i(), a("p", {
|
|
57
|
+
key: 1,
|
|
58
|
+
class: "uikit-m-0",
|
|
59
|
+
innerHTML: t.body
|
|
60
|
+
}, null, 8, H)) : s("", !0)
|
|
61
|
+
]),
|
|
62
|
+
e("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
"data-cy": "base-snackbar-close-btn",
|
|
65
|
+
class: "uikit-bg-transparent max-sm:uikit-absolute max-sm:uikit-right-5",
|
|
66
|
+
onClick: l(c, ["stop"])
|
|
67
|
+
}, [
|
|
68
|
+
_(v(g), {
|
|
69
|
+
class: "snackbar-close-icon",
|
|
70
|
+
width: 20,
|
|
71
|
+
height: 20,
|
|
72
|
+
"stroke-color": "#000"
|
|
73
|
+
})
|
|
74
|
+
])
|
|
75
|
+
], 10, w)
|
|
76
|
+
])
|
|
77
|
+
]));
|
|
78
|
+
}
|
|
79
|
+
}), I = /* @__PURE__ */ C(E, [["__scopeId", "data-v-ac8cba3f"]]);
|
|
5
80
|
export {
|
|
6
|
-
|
|
81
|
+
I as default
|
|
7
82
|
};
|
|
@@ -1,7 +1,128 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as h, mergeModels as f, useModel as x, ref as $, watch as L, createElementBlock as k, openBlock as b, normalizeClass as s, createElementVNode as o, createCommentVNode as p, unref as l, createVNode as M, withModifiers as d, nextTick as C } from "vue";
|
|
2
|
+
import F from "./BaseFloatingLabel.js";
|
|
3
|
+
import { useFloatingLabel as B } from "../composables/useFloatingLabel.js";
|
|
4
|
+
import { _ as z } from "../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
5
|
+
import '../assets/BaseTextarea.css';const E = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "value"], H = {
|
|
6
|
+
key: 0,
|
|
7
|
+
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"
|
|
8
|
+
}, I = ["innerHTML"], q = ["innerHTML"], A = /* @__PURE__ */ h({
|
|
9
|
+
inheritAttrs: !1,
|
|
10
|
+
__name: "BaseTextarea",
|
|
11
|
+
props: /* @__PURE__ */ f({
|
|
12
|
+
labelText: { default: "" },
|
|
13
|
+
feedback: {},
|
|
14
|
+
isValid: { default: null },
|
|
15
|
+
resize: { type: Boolean, default: !1 },
|
|
16
|
+
labelClasses: {}
|
|
17
|
+
}, {
|
|
18
|
+
modelValue: { default: "" },
|
|
19
|
+
modelModifiers: {}
|
|
20
|
+
}),
|
|
21
|
+
emits: /* @__PURE__ */ f(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
|
|
22
|
+
setup(v, { expose: m, emit: c }) {
|
|
23
|
+
const r = x(v, "modelValue"), n = c, {
|
|
24
|
+
labelState: a,
|
|
25
|
+
handleFocusIn: w,
|
|
26
|
+
handleFocusOut: g,
|
|
27
|
+
setFloatingLabel: y,
|
|
28
|
+
setInlineLabel: V
|
|
29
|
+
} = B(n), i = $(null);
|
|
30
|
+
L(
|
|
31
|
+
r,
|
|
32
|
+
(e) => {
|
|
33
|
+
`${e}`.length && a.value !== "floating-label" ? y() : !e?.length && a.value !== "inline-label" && document.activeElement !== i.value && V();
|
|
34
|
+
},
|
|
35
|
+
{ immediate: !0 }
|
|
36
|
+
);
|
|
37
|
+
const T = ({ target: e }) => {
|
|
38
|
+
r.value = e.value;
|
|
39
|
+
};
|
|
40
|
+
return m({
|
|
41
|
+
disableTextarea: () => {
|
|
42
|
+
i.value && (i.value.setAttribute("readonly", "readonly"), i.value.classList.add("disabled"));
|
|
43
|
+
},
|
|
44
|
+
clearTextareaElem: () => {
|
|
45
|
+
i.value && (i.value.value = "");
|
|
46
|
+
},
|
|
47
|
+
focusDisabledTextarea: () => {
|
|
48
|
+
i.value && (i.value.removeAttribute("readonly"), i.value.classList.remove("disabled"), C(() => {
|
|
49
|
+
i.value && i.value.focus();
|
|
50
|
+
}));
|
|
51
|
+
}
|
|
52
|
+
}), (e, t) => (b(), k("div", {
|
|
53
|
+
class: s(e.$attrs["wrapper-classes"])
|
|
54
|
+
}, [
|
|
55
|
+
o("div", {
|
|
56
|
+
class: s(["input-wrapper uikit-relative uikit-rounded-xs uikit-px-0", [
|
|
57
|
+
l(a) === "floating-label" ? "floating-state" : "inline-state"
|
|
58
|
+
]])
|
|
59
|
+
}, [
|
|
60
|
+
o("textarea", {
|
|
61
|
+
id: e.$attrs.id,
|
|
62
|
+
ref_key: "textarea",
|
|
63
|
+
ref: i,
|
|
64
|
+
"data-cy": e.$attrs["data-cy"],
|
|
65
|
+
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", [
|
|
66
|
+
{ "is-invalid invalid-bg !uikit-pr-10": e.isValid === !1 },
|
|
67
|
+
{ "is-valid valid-bg !uikit-pr-10": e.isValid },
|
|
68
|
+
{ "uikit-resize-none": !e.resize },
|
|
69
|
+
e.$attrs.class
|
|
70
|
+
]]),
|
|
71
|
+
rows: e.$attrs.rows,
|
|
72
|
+
disabled: e.$attrs.disabled,
|
|
73
|
+
"aria-labelledby": e.$attrs.id,
|
|
74
|
+
readonly: e.$attrs.readonly,
|
|
75
|
+
onFocusin: t[0] || (t[0] = d((u) => l(w)(), ["stop"])),
|
|
76
|
+
onFocusout: t[1] || (t[1] = d((u) => l(g)(`${r.value}`.trim()), ["stop"])),
|
|
77
|
+
onInput: d(T, ["stop"]),
|
|
78
|
+
onKeydown: t[2] || (t[2] = d((u) => n("keydown", u), ["stop"])),
|
|
79
|
+
onClick: t[3] || (t[3] = (u) => n("click", u)),
|
|
80
|
+
value: r.value
|
|
81
|
+
}, null, 42, E),
|
|
82
|
+
o("fieldset", {
|
|
83
|
+
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", [
|
|
84
|
+
{ "is-invalid": e.isValid === !1, "is-valid": e.isValid },
|
|
85
|
+
{ "uikit-border-w-danger": e.isValid === !1 },
|
|
86
|
+
{ "uikit-border-w-primary": e.isValid },
|
|
87
|
+
{ "uikit-border-w-secondary": e.isValid === null }
|
|
88
|
+
]])
|
|
89
|
+
}, [
|
|
90
|
+
e.labelText ? (b(), k("legend", H, [
|
|
91
|
+
o("span", {
|
|
92
|
+
class: s(["uikit-px-5px uikit-opacity-0", [
|
|
93
|
+
{
|
|
94
|
+
"uikit-visible uikit-inline-block": l(a) === "floating-label"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"uikit-invisible uikit-hidden": l(a) === "inline-label"
|
|
98
|
+
}
|
|
99
|
+
]]),
|
|
100
|
+
innerHTML: e.labelText
|
|
101
|
+
}, null, 10, I)
|
|
102
|
+
])) : p("", !0)
|
|
103
|
+
], 2),
|
|
104
|
+
M(F, {
|
|
105
|
+
for: e.$attrs.id,
|
|
106
|
+
"label-text": e.labelText,
|
|
107
|
+
"label-state": l(a),
|
|
108
|
+
required: e.$attrs.required,
|
|
109
|
+
"is-valid": e.isValid,
|
|
110
|
+
"label-classes": [
|
|
111
|
+
l(a) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
|
|
112
|
+
e.labelClasses
|
|
113
|
+
]
|
|
114
|
+
}, null, 8, ["for", "label-text", "label-state", "required", "is-valid", "label-classes"])
|
|
115
|
+
], 2),
|
|
116
|
+
(e.isValid || e.isValid === !1) && e.feedback ? (b(), k("div", {
|
|
117
|
+
key: 0,
|
|
118
|
+
class: s(
|
|
119
|
+
e.isValid === !1 ? "uikit-mt-1 uikit-text-12 uikit-text-w-danger" : "uikit-mt-1 uikit-text-12 uikit-text-w-primary"
|
|
120
|
+
),
|
|
121
|
+
innerHTML: e.isValid === !1 ? e.feedback.invalid : e.feedback.valid
|
|
122
|
+
}, null, 10, q)) : p("", !0)
|
|
123
|
+
], 2));
|
|
124
|
+
}
|
|
125
|
+
}), J = /* @__PURE__ */ z(A, [["__scopeId", "data-v-4c1a3e1d"]]);
|
|
5
126
|
export {
|
|
6
|
-
|
|
127
|
+
J as default
|
|
7
128
|
};
|
package/dist/UIKit/BaseToggle.js
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as a, mergeModels as n, useModel as d, createElementBlock as k, openBlock as b, normalizeClass as c, renderSlot as l, createElementVNode as i, createCommentVNode as f, withModifiers as p } from "vue";
|
|
2
|
+
import { _ as m } from "../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import '../assets/BaseToggle.css';const h = { class: "switch uikit-relative uikit-inline-block uikit-min-w-[40px] uikit-text-sm" }, g = ["data-cy", "checked"], w = ["innerHTML"], y = /* @__PURE__ */ a({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "BaseToggle",
|
|
6
|
+
props: /* @__PURE__ */ n({
|
|
7
|
+
withRightLabel: { type: Boolean, default: !0 },
|
|
8
|
+
label: { default: "" }
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: { type: Boolean, default: !1 },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const o = d(r, "modelValue"), u = ({ target: e }) => {
|
|
16
|
+
o.value = e.checked;
|
|
17
|
+
};
|
|
18
|
+
return (e, t) => (b(), k("div", {
|
|
19
|
+
class: c(["switch-container uikit-inline-block uikit-items-center", e.$attrs.class])
|
|
20
|
+
}, [
|
|
21
|
+
l(e.$slots, "leftLabel", {}, void 0, !0),
|
|
22
|
+
i("label", h, [
|
|
23
|
+
i("input", {
|
|
24
|
+
"data-cy": e.$attrs["data-cy"] ?? "",
|
|
25
|
+
class: "uikit-peer/toggle uikit-h-0 uikit-w-0 uikit-opacity-0",
|
|
26
|
+
type: "checkbox",
|
|
27
|
+
checked: o.value,
|
|
28
|
+
onInput: t[0] || (t[0] = p((s) => u(s), ["stop"]))
|
|
29
|
+
}, null, 40, g),
|
|
30
|
+
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))
|
|
31
|
+
]),
|
|
32
|
+
e.withRightLabel ? l(e.$slots, "rightLabel", { key: 0 }, () => [
|
|
33
|
+
i("span", {
|
|
34
|
+
class: "uikit-ml-10px",
|
|
35
|
+
innerHTML: e.label
|
|
36
|
+
}, null, 8, w)
|
|
37
|
+
], !0) : f("", !0)
|
|
38
|
+
], 2));
|
|
39
|
+
}
|
|
40
|
+
}), B = /* @__PURE__ */ m(y, [["__scopeId", "data-v-1e6f488b"]]);
|
|
5
41
|
export {
|
|
6
|
-
|
|
42
|
+
B as default
|
|
7
43
|
};
|
|
@@ -1,7 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as a, createElementBlock as e, openBlock as t, renderSlot as s, createElementVNode as i, normalizeClass as l, createCommentVNode as n } from "vue";
|
|
2
|
+
import { _ as r } from "../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import '../assets/BaseTooltip.css';const p = { class: "base-tooltip" }, d = /* @__PURE__ */ a({
|
|
4
|
+
__name: "BaseTooltip",
|
|
5
|
+
props: {
|
|
6
|
+
theme: { default: () => ({
|
|
7
|
+
color: "blue",
|
|
8
|
+
size: "sm"
|
|
9
|
+
}) },
|
|
10
|
+
direction: { default: "top" },
|
|
11
|
+
customTooltipClass: { default: "" },
|
|
12
|
+
showTooltipContentManually: { type: Boolean, default: !0 },
|
|
13
|
+
tooltipContentClasses: { default: "" }
|
|
14
|
+
},
|
|
15
|
+
setup(m) {
|
|
16
|
+
return (o, u) => (t(), e("div", p, [
|
|
17
|
+
s(o.$slots, "trigger", {}, void 0, !0),
|
|
18
|
+
i("div", {
|
|
19
|
+
class: l(["bg-transparent", [
|
|
20
|
+
o.theme.size,
|
|
21
|
+
`${o.customTooltipClass ? o.customTooltipClass : "tooltip-content-wrapper"}`
|
|
22
|
+
]])
|
|
23
|
+
}, [
|
|
24
|
+
o.showTooltipContentManually ? (t(), e("div", {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: l(["tooltip-content uikit-shadow-lg uikit-shadow-w-primary/10", [
|
|
27
|
+
"base-tooltip-arrow",
|
|
28
|
+
o.direction,
|
|
29
|
+
o.theme.color,
|
|
30
|
+
o.theme.size,
|
|
31
|
+
o.tooltipContentClasses
|
|
32
|
+
]])
|
|
33
|
+
}, [
|
|
34
|
+
s(o.$slots, "content", {}, void 0, !0)
|
|
35
|
+
], 2)) : n("", !0)
|
|
36
|
+
], 2)
|
|
37
|
+
]));
|
|
38
|
+
}
|
|
39
|
+
}), f = /* @__PURE__ */ r(d, [["__scopeId", "data-v-b0e473d5"]]);
|
|
5
40
|
export {
|
|
6
|
-
|
|
41
|
+
f as default
|
|
7
42
|
};
|
|
@@ -1,7 +1,76 @@
|
|
|
1
|
-
import o from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { defineComponent as b, useId as f, computed as h, createElementBlock as s, openBlock as r, withModifiers as o, normalizeClass as l, createElementVNode as u, renderSlot as m, createCommentVNode as C, toDisplayString as g } from "vue";
|
|
2
|
+
import { _ as y } from "../../chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import '../../assets/CheckboxBtn.css';const v = ["id"], V = ["id", "data-cy", "checked", "disabled"], B = ["for"], w = /* @__PURE__ */ b({
|
|
4
|
+
__name: "CheckboxBtn",
|
|
5
|
+
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
dataCy: {},
|
|
8
|
+
disabled: { type: Boolean },
|
|
9
|
+
checked: { type: Boolean, default: () => {
|
|
10
|
+
} },
|
|
11
|
+
required: { type: Boolean },
|
|
12
|
+
inputClass: {},
|
|
13
|
+
inline: { type: Boolean, default: !1 },
|
|
14
|
+
label: { default: "" },
|
|
15
|
+
labelClass: {},
|
|
16
|
+
isValid: { default: null },
|
|
17
|
+
containerId: {},
|
|
18
|
+
handleLabelClick: { type: Boolean, default: !0 },
|
|
19
|
+
modelValue: { type: Boolean, default: !1 }
|
|
20
|
+
},
|
|
21
|
+
emits: ["click", "change", "update:modelValue"],
|
|
22
|
+
setup(i, { emit: c }) {
|
|
23
|
+
const a = c, d = f(), n = h(() => `${i.id ?? d}`), k = () => {
|
|
24
|
+
const e = i.checked ?? i.modelValue;
|
|
25
|
+
a("change", {
|
|
26
|
+
id: i.id ?? d,
|
|
27
|
+
label: i.label,
|
|
28
|
+
checked: !e
|
|
29
|
+
}), a("update:modelValue", !e);
|
|
30
|
+
}, p = () => {
|
|
31
|
+
k(), i.handleLabelClick && a("click");
|
|
32
|
+
};
|
|
33
|
+
return (e, t) => (r(), s("div", {
|
|
34
|
+
id: e.containerId,
|
|
35
|
+
class: l(["uikit-group uikit-relative uikit-items-center uikit-pl-30px hover:uikit-cursor-pointer", [
|
|
36
|
+
{ "uikit-inline-flex": e.inline },
|
|
37
|
+
{ "uikit-flex": !e.inline },
|
|
38
|
+
e.$attrs["wrapper-classes"]
|
|
39
|
+
]]),
|
|
40
|
+
onClick: o(p, ["stop"])
|
|
41
|
+
}, [
|
|
42
|
+
u("input", {
|
|
43
|
+
id: n.value,
|
|
44
|
+
ref: "checkbox",
|
|
45
|
+
"data-cy": e.dataCy,
|
|
46
|
+
class: l(["uikit-pointer-events-none uikit-absolute uikit-left-0 uikit-size-4 uikit-appearance-none uikit-rounded-3xs uikit-border uikit-border-solid uikit-border-w-secondary uikit-bg-white checked:uikit-bg-center checked:uikit-bg-no-repeat group-hover:uikit-cursor-pointer", [
|
|
47
|
+
{ "!uikit-border-w-danger": e.isValid === !1 },
|
|
48
|
+
e.inputClass,
|
|
49
|
+
e.isValid === !1 ? "checked-bg-invalid" : "checked-bg"
|
|
50
|
+
]]),
|
|
51
|
+
type: "checkbox",
|
|
52
|
+
checked: e.checked ?? e.modelValue,
|
|
53
|
+
disabled: e.disabled,
|
|
54
|
+
onChange: t[0] || (t[0] = o(() => {
|
|
55
|
+
}, ["prevent", "stop"])),
|
|
56
|
+
onClick: t[1] || (t[1] = o(() => {
|
|
57
|
+
}, ["prevent", "stop"]))
|
|
58
|
+
}, null, 42, V),
|
|
59
|
+
m(e.$slots, "label", {}, () => [
|
|
60
|
+
u("label", {
|
|
61
|
+
class: l(["uikit-text-sm group-hover:uikit-cursor-pointer", [e.labelClass, { "uikit-text-w-danger": e.isValid === !1 }]]),
|
|
62
|
+
for: n.value
|
|
63
|
+
}, g(e.label), 11, B),
|
|
64
|
+
e.required ? (r(), s("span", {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: l(["required after:uikit-content-['*']", [
|
|
67
|
+
e.isValid !== !1 ? "after:uikit-text-w-primary" : "after:uikit-text-w-danger"
|
|
68
|
+
]])
|
|
69
|
+
}, null, 2)) : C("", !0)
|
|
70
|
+
], !0)
|
|
71
|
+
], 10, v));
|
|
72
|
+
}
|
|
73
|
+
}), $ = /* @__PURE__ */ y(w, [["__scopeId", "data-v-505c1129"]]);
|
|
5
74
|
export {
|
|
6
|
-
|
|
75
|
+
$ as default
|
|
7
76
|
};
|