@wikicasa-dev/components 2.1.4-alpha.9 → 2.1.4
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/BaseAlert.d.ts +9 -20
- package/dist/UIKit/BaseBadge.d.ts +5 -40
- package/dist/UIKit/BaseBreadcrumb.js +2 -3
- package/dist/UIKit/BaseButton.d.ts +8 -9
- package/dist/UIKit/BaseComplexToggle.d.ts +1 -1
- package/dist/UIKit/BaseComplexToggle.js +2 -2
- package/dist/UIKit/BaseDropDown.d.ts +0 -5
- package/dist/UIKit/BaseFloatingLabel.js +3 -1
- package/dist/UIKit/BaseInput.d.ts +5 -4
- package/dist/UIKit/BaseInput.js +3 -1
- package/dist/UIKit/BasePagination.d.ts +3 -10
- package/dist/UIKit/BaseSlider.d.ts +10 -14
- package/dist/UIKit/BaseSlider.js +4 -1
- package/dist/UIKit/BaseSnackbar.js +4 -4
- package/dist/UIKit/BaseTextarea.d.ts +4 -4
- package/dist/UIKit/BaseTextarea.js +3 -3
- package/dist/UIKit/BaseToggle.d.ts +8 -5
- package/dist/UIKit/BaseToggle.js +4 -1
- package/dist/UIKit/BaseTooltip.d.ts +20 -10
- package/dist/UIKit/BaseTooltip.js +2 -2
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +16 -9
- package/dist/UIKit/Checkbox/CheckboxBtn.js +5 -2
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +3 -2
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +3 -1
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.d.ts +5 -1
- package/dist/UIKit/Slider/SimpleSlider.d.ts +19 -0
- package/dist/UIKit/Slider/SimpleSlider.js +7 -0
- package/dist/UIKit/Tab/BaseTabList.d.ts +0 -1
- package/dist/UIKit/types.d.ts +6 -11
- package/dist/assets/packages/components/lib/UIKit/BaseAlert.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseBadge.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseCard.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseComplexToggle.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseFloatingLabel.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseInput.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseModal.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseSlider.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/BaseSnackbar.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseTextarea.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseToggle.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/BaseTooltip.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/Checkbox/CheckboxBtn.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/Slider/SimpleSlider.css +1 -0
- package/dist/assets/packages/components/src/tailwind.css +1 -1
- package/dist/composables/useFloatingLabel.d.ts +1 -1
- package/dist/composables/useFloatingLabel.js +20 -20
- package/dist/index.d.ts +2 -5
- package/dist/index.js +85 -98
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js +4 -0
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/DeviceDetectionUtils.js +4 -0
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/GenericUtils.js +12 -0
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/NumberUtils.js +18 -0
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js +4 -0
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/controller.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/free-mode.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/keyboard.js +9 -9
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/pagination.js +17 -17
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/zoom.js +13 -13
- package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/shared/utils.js +26 -32
- package/dist/packages/components/lazyModules/Swiper/autoplay.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/controller.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/free-mode.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/keyboard.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/navigation.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/pagination.js +2 -2
- package/dist/packages/components/lazyModules/Swiper/thumbs.js +2 -2
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +30 -30
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +9 -9
- package/dist/packages/components/lib/UIKit/BaseAlert.vue.js +13 -107
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +27 -28
- package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +11 -46
- package/dist/packages/components/lib/UIKit/BaseBreadcrumb.vue.js +35 -32
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +36 -56
- package/dist/packages/components/lib/UIKit/BaseComplexToggle.vue.js +12 -12
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +45 -48
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +17 -14
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +119 -93
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +66 -70
- package/dist/packages/components/lib/UIKit/BasePagination.vue.js +134 -89
- package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +178 -107
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +7 -7
- package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +73 -55
- package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +31 -27
- package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +33 -48
- package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +40 -19
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +52 -55
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +26 -20
- package/dist/packages/components/lib/UIKit/Radio/RadioButton.vue.js +9 -9
- package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +9 -10
- package/dist/packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +9 -10
- package/dist/packages/components/lib/UIKit/Slider/SimpleSlider.vue.js +82 -0
- package/dist/packages/components/lib/UIKit/Tab/BaseTabList.vue.js +27 -28
- package/dist/packages/components/lib/UIKit/Tab/BaseTabView.vue.js +19 -21
- package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +6 -5
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +3 -5
- package/package.json +18 -25
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement1.js +0 -4
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement2.js +0 -4
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement3.js +0 -4
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement4.js +0 -4
- package/dist/UIKit/BaseBanner.js +0 -4
- package/dist/UIKit/BaseChip.js +0 -4
- package/dist/UIKit/BaseCollapse.js +0 -7
- package/dist/UIKit/BaseNotificationBadge.js +0 -4
- package/dist/UIKit/BasePin.d.ts +0 -22
- package/dist/UIKit/BasePin.js +0 -5
- package/dist/UIKit/BaseSelect.d.ts +0 -26
- package/dist/UIKit/BaseSelect.js +0 -5
- package/dist/UIKit/DatePicker.js +0 -5
- package/dist/UIKit/InputDropdown.js +0 -4
- package/dist/UIKit/Navigation/NavigationBar.d.ts +0 -17
- package/dist/UIKit/Navigation/NavigationBar.js +0 -5
- package/dist/UIKit/Navigation/NavigationBarItem.d.ts +0 -34
- package/dist/UIKit/Navigation/NavigationBarItem.js +0 -4
- package/dist/UIKit/SegmentedControl/SegmentedControl.js +0 -4
- package/dist/UIKit/SegmentedControl/SegmentedControlItem.js +0 -4
- package/dist/UIKit/Tab/BaseTabItem.d.ts +0 -27
- package/dist/UIKit/Tab/BaseTabItem.js +0 -4
- package/dist/assets/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.16_typescript@5.8.3_/node_modules/@vuepic/vue-datepicker/dist/main.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseBreadcrumb.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseCollapse.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BasePin.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseSelect.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/DatePicker.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/Navigation/NavigationBar.css +0 -1
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/ArrowFilledIcon.js +0 -19
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CheckIcon.js +0 -16
- package/dist/node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/svgIconFactory-BpnFimFz.js +0 -29
- package/dist/node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.23_typescript@5.8.3/node_modules/@wikicasa-dev/vue-composables/dist/useBreakpoints.js +0 -33
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement1.vue.js +0 -29
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement2.vue.js +0 -56
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement3.vue.js +0 -56
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement4.vue.js +0 -56
- package/dist/packages/components/lib/UIKit/BaseBanner.vue.js +0 -75
- package/dist/packages/components/lib/UIKit/BaseChip.vue.js +0 -38
- package/dist/packages/components/lib/UIKit/BaseCollapse.vue.js +0 -54
- package/dist/packages/components/lib/UIKit/BaseNotificationBadge.vue.js +0 -19
- package/dist/packages/components/lib/UIKit/BasePin.vue.js +0 -37
- package/dist/packages/components/lib/UIKit/BaseSelect.vue.js +0 -65
- package/dist/packages/components/lib/UIKit/DatePicker.vue.js +0 -143
- package/dist/packages/components/lib/UIKit/InputDropdown.vue.js +0 -152
- package/dist/packages/components/lib/UIKit/Navigation/NavigationBar.vue.js +0 -21
- package/dist/packages/components/lib/UIKit/Navigation/NavigationBarItem.vue.js +0 -48
- package/dist/packages/components/lib/UIKit/SegmentedControl/SegmentedControl.vue.js +0 -93
- package/dist/packages/components/lib/UIKit/SegmentedControl/SegmentedControlItem.vue.js +0 -30
- package/dist/packages/components/lib/UIKit/Tab/BaseTabItem.vue.js +0 -39
- package/plugins/buttonPlugin.ts +0 -290
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/free-mode.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/navigation.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/pagination.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/zoom.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/swiper.css +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/DefaultValues-CpabIgVz.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/autoplay.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/autoplay.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/controller.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/keyboard.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/modules/thumbs.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/shared/classes-to-selector.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.8 → swiper@11.2.6}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
|
@@ -1,136 +1,207 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import '../../../../assets/packages/components/lib/UIKit/BaseInput.css';/* empty css */
|
|
5
|
-
const j = { class: "uikit-mt-[20px] uikit-flex uikit-justify-between uikit-gap-x-sm" }, J = /* @__PURE__ */ E({
|
|
1
|
+
import { defineComponent as _, 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 k, unref as h, createVNode as C } from "vue";
|
|
2
|
+
import E from "../../../../UIKit/BaseInput.js";
|
|
3
|
+
const K = { class: "range_container" }, O = { class: "sliders_control" }, Q = ["value", "min", "max", "step"], W = ["value", "min", "max", "step"], X = { class: "form_control row" }, Y = { class: "pb-15 pb-sm-0 col-sm-6 col-xl-4" }, Z = { class: "col-sm-6 col-xl-4" }, te = /* @__PURE__ */ _({
|
|
6
4
|
__name: "BaseSlider",
|
|
7
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ j({
|
|
8
6
|
type: { default: "linear" },
|
|
9
7
|
min: { default: 0 },
|
|
10
|
-
max: { default: 100 }
|
|
11
|
-
step: {},
|
|
12
|
-
dataCy: {}
|
|
8
|
+
max: { default: 100 }
|
|
13
9
|
}, {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
minValue: { default: 0 },
|
|
11
|
+
minValueModifiers: {},
|
|
12
|
+
maxValue: { default: 0 },
|
|
13
|
+
maxValueModifiers: {}
|
|
18
14
|
}),
|
|
19
|
-
emits: ["update:
|
|
20
|
-
setup(
|
|
21
|
-
|
|
15
|
+
emits: ["update:minValue", "update:maxValue"],
|
|
16
|
+
setup(m) {
|
|
17
|
+
function M(e, l) {
|
|
18
|
+
const a = parseInt(e.value, 10), t = parseInt(l.value, 10);
|
|
19
|
+
return [a, t];
|
|
20
|
+
}
|
|
21
|
+
const L = (e) => e.minPos + (Math.log(e.value) - e.minlval) / e.scale, z = (e) => Math.exp(
|
|
22
22
|
(e.position - e.minPos) * e.scale + e.minlval
|
|
23
|
-
)
|
|
24
|
-
|
|
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 y(e, l) {
|
|
36
|
+
e <= 0 ? l.style.zIndex = "2" : l.style.zIndex = "0";
|
|
37
|
+
}
|
|
38
|
+
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"), i = T("toSlider"), S = (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, A(i.value, a, o.value);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
a < r.value || (o.value = a, N(i.value, i.value, r.value, a));
|
|
48
|
+
}, I = (e) => {
|
|
49
|
+
if (m.type === "logarithmic")
|
|
25
50
|
return e = e || 1, parseInt(
|
|
26
|
-
|
|
51
|
+
L({
|
|
27
52
|
value: e,
|
|
28
53
|
minPos: n.value,
|
|
29
|
-
minlval:
|
|
30
|
-
scale:
|
|
54
|
+
minlval: F.value,
|
|
55
|
+
scale: B.value
|
|
31
56
|
}).toFixed(0),
|
|
32
57
|
10
|
|
33
58
|
);
|
|
34
|
-
if (
|
|
59
|
+
if (m.type === "linear")
|
|
35
60
|
return e;
|
|
36
61
|
throw new Error("The slider type has not been implemented");
|
|
37
62
|
}, b = (e) => {
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
F({
|
|
63
|
+
if (m.type === "logarithmic")
|
|
64
|
+
return e = e || 1, parseInt(
|
|
65
|
+
z({
|
|
42
66
|
position: e,
|
|
43
|
-
scale:
|
|
44
|
-
minlval:
|
|
67
|
+
scale: B.value,
|
|
68
|
+
minlval: F.value,
|
|
45
69
|
minPos: n.value
|
|
46
70
|
}).toFixed(0),
|
|
47
71
|
10
|
|
48
72
|
);
|
|
49
|
-
if (
|
|
73
|
+
if (m.type === "linear")
|
|
50
74
|
return e;
|
|
51
75
|
throw new Error("The slider type has not been implemented");
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
76
|
+
}, A = (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
|
+
}, N = (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
|
+
y(o.value, e), f <= $ ? d.value = $ : d.value = f;
|
|
106
|
+
}, U = (e, l) => {
|
|
107
|
+
if (!l.value) return;
|
|
108
|
+
const [a, t] = M(e, l), v = b(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
|
+
}, R = (e, l) => {
|
|
121
|
+
if (!l.value) return;
|
|
122
|
+
const [a, t] = M(e, l), v = b(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
|
+
), y(parseInt(l.value, 10), l), a <= t ? (d.value = t, o.value = v) : (l.value = `${a}`, d.value = a, o.value = a);
|
|
134
|
+
}, w = q();
|
|
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(`${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);
|
|
137
|
+
})(), G(() => {
|
|
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
|
+
), y(d.value, i.value));
|
|
149
|
+
}), (e, l) => (J(), H("div", K, [
|
|
150
|
+
x("div", O, [
|
|
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] = k((a) => U(
|
|
161
|
+
h(g),
|
|
162
|
+
h(i)
|
|
163
|
+
), ["stop"]))
|
|
164
|
+
}, null, 40, Q),
|
|
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] = k((a) => R(
|
|
175
|
+
h(g),
|
|
176
|
+
h(i)
|
|
177
|
+
), ["stop"]))
|
|
178
|
+
}, null, 40, W)
|
|
179
|
+
]),
|
|
180
|
+
x("div", X, [
|
|
181
|
+
x("div", Y, [
|
|
182
|
+
C(E, {
|
|
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) => S("min-input", `${a || ""}`))
|
|
189
|
+
}, null, 8, ["model-value"])
|
|
104
190
|
]),
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
d.value = !0, v.value = !1;
|
|
116
|
-
}),
|
|
117
|
-
onFocusout: t[2] || (t[2] = (i) => d.value = !1)
|
|
118
|
-
}, null, 8, ["modelValue", "data-cy"]),
|
|
119
|
-
u(V, {
|
|
120
|
-
modelValue: s.value,
|
|
121
|
-
"onUpdate:modelValue": t[3] || (t[3] = (i) => s.value = i),
|
|
122
|
-
"label-text": "Max",
|
|
123
|
-
"data-cy": e.dataCy?.rangeMaxInput,
|
|
124
|
-
formatter: M,
|
|
125
|
-
onFocusin: t[4] || (t[4] = (i) => {
|
|
126
|
-
d.value = !0, v.value = !1;
|
|
127
|
-
}),
|
|
128
|
-
onFocusout: t[5] || (t[5] = (i) => d.value = !1)
|
|
129
|
-
}, null, 8, ["modelValue", "data-cy"])
|
|
191
|
+
x("div", Z, [
|
|
192
|
+
C(E, {
|
|
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) => S("max-input", `${a || ""}`))
|
|
199
|
+
}, null, 8, ["model-value"])
|
|
200
|
+
])
|
|
130
201
|
])
|
|
131
202
|
]));
|
|
132
203
|
}
|
|
133
204
|
});
|
|
134
205
|
export {
|
|
135
|
-
|
|
206
|
+
te as default
|
|
136
207
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CloseIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
3
|
-
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.
|
|
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 v, unref as _ } from "vue";
|
|
2
|
+
import { CloseIcon as C } from "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js";
|
|
3
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
4
4
|
const g = { class: "snackbar-container uikit-fixed uikit-bottom-10px uikit-left-10px uikit-z-[2000] max-sm:uikit-left-0 max-sm:uikit-w-full" }, T = ["data-cy"], w = ["src", "alt"], L = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "snackbar-type-icon uikit-bg-contain uikit-bg-no-repeat"
|
|
7
|
-
}, 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" }, B = ["innerHTML"], H = ["innerHTML"], z = /* @__PURE__ */
|
|
7
|
+
}, 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" }, B = ["innerHTML"], H = ["innerHTML"], z = /* @__PURE__ */ b({
|
|
8
8
|
inheritAttrs: !1,
|
|
9
9
|
__name: "BaseSnackbar",
|
|
10
10
|
props: {
|
|
@@ -17,7 +17,7 @@ const g = { class: "snackbar-container uikit-fixed uikit-bottom-10px uikit-left-
|
|
|
17
17
|
},
|
|
18
18
|
emits: ["snackbar-hidden"],
|
|
19
19
|
setup(k, { emit: m }) {
|
|
20
|
-
const n = k, d = m, o = u(null), r = u(null),
|
|
20
|
+
const n = k, d = m, o = u(null), r = u(null), p = () => {
|
|
21
21
|
o.value && o.value();
|
|
22
22
|
}, c = () => {
|
|
23
23
|
const t = r.value;
|
|
@@ -35,8 +35,8 @@ const g = { class: "snackbar-container uikit-fixed uikit-bottom-10px uikit-left-
|
|
|
35
35
|
ref_key: "snackbar",
|
|
36
36
|
ref: r,
|
|
37
37
|
"data-cy": t.$attrs["data-cy"],
|
|
38
|
-
class: x(["snackbar snackbar-active uikit-
|
|
39
|
-
onClick: l(
|
|
38
|
+
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]),
|
|
39
|
+
onClick: l(p, ["stop"])
|
|
40
40
|
}, [
|
|
41
41
|
t.icon ? (i(), a("img", {
|
|
42
42
|
key: 0,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as h, mergeModels as f, useModel as $, ref as x, watch as L, createElementBlock as k, openBlock as b, normalizeClass as s, createElementVNode as o, createCommentVNode as p, unref as a, createVNode as M, withModifiers as d, nextTick as C } from "vue";
|
|
2
|
+
import F from "../../../../UIKit/BaseFloatingLabel.js";
|
|
3
|
+
import { useFloatingLabel as z } from "../../../../composables/useFloatingLabel.js";
|
|
4
|
+
const B = ["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__ */ h({
|
|
6
8
|
inheritAttrs: !1,
|
|
7
9
|
__name: "BaseTextarea",
|
|
8
|
-
props: /* @__PURE__ */
|
|
10
|
+
props: /* @__PURE__ */ f({
|
|
9
11
|
labelText: { default: "" },
|
|
10
12
|
feedback: {},
|
|
11
13
|
isValid: { default: null },
|
|
@@ -15,92 +17,108 @@ const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelle
|
|
|
15
17
|
modelValue: { default: "" },
|
|
16
18
|
modelModifiers: {}
|
|
17
19
|
}),
|
|
18
|
-
emits: /* @__PURE__ */
|
|
19
|
-
setup(
|
|
20
|
-
const
|
|
21
|
-
labelState:
|
|
20
|
+
emits: /* @__PURE__ */ f(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
|
|
21
|
+
setup(v, { expose: m, emit: w }) {
|
|
22
|
+
const r = $(v, "modelValue"), n = w, {
|
|
23
|
+
labelState: l,
|
|
22
24
|
handleFocusIn: c,
|
|
23
|
-
handleFocusOut:
|
|
25
|
+
handleFocusOut: g,
|
|
24
26
|
setFloatingLabel: y,
|
|
25
27
|
setInlineLabel: V
|
|
26
|
-
} =
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
} = z(n), i = x(null);
|
|
29
|
+
L(
|
|
30
|
+
r,
|
|
29
31
|
(e) => {
|
|
30
|
-
`${e}`.length &&
|
|
32
|
+
`${e}`.length && l.value !== "floating-label" ? y() : !e?.length && l.value !== "inline-label" && document.activeElement !== i.value && V();
|
|
31
33
|
},
|
|
32
34
|
{ immediate: !0 }
|
|
33
35
|
);
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
+
const T = ({ target: e }) => {
|
|
37
|
+
r.value = e.value;
|
|
36
38
|
};
|
|
37
39
|
return m({
|
|
38
40
|
disableTextarea: () => {
|
|
39
|
-
|
|
41
|
+
i.value && (i.value.setAttribute("readonly", "readonly"), i.value.classList.add("disabled"));
|
|
40
42
|
},
|
|
41
43
|
clearTextareaElem: () => {
|
|
42
|
-
|
|
44
|
+
i.value && (i.value.value = "");
|
|
43
45
|
},
|
|
44
46
|
focusDisabledTextarea: () => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
i.value && (i.value.removeAttribute("readonly"), i.value.classList.remove("disabled"), C(() => {
|
|
48
|
+
i.value && i.value.focus();
|
|
47
49
|
}));
|
|
48
50
|
}
|
|
49
|
-
}), (e,
|
|
50
|
-
class:
|
|
51
|
+
}), (e, t) => (b(), k("div", {
|
|
52
|
+
class: s(e.$attrs["wrapper-classes"])
|
|
51
53
|
}, [
|
|
52
|
-
|
|
53
|
-
class:
|
|
54
|
-
|
|
54
|
+
o("div", {
|
|
55
|
+
class: s(["input-wrapper uikit-relative uikit-rounded-xs uikit-px-0", [
|
|
56
|
+
a(l) === "floating-label" ? "floating-state" : "inline-state"
|
|
55
57
|
]])
|
|
56
58
|
}, [
|
|
57
|
-
|
|
59
|
+
o("textarea", {
|
|
58
60
|
id: e.$attrs.id,
|
|
59
61
|
ref_key: "textarea",
|
|
60
|
-
ref:
|
|
62
|
+
ref: i,
|
|
61
63
|
"data-cy": e.$attrs["data-cy"],
|
|
62
|
-
class:
|
|
63
|
-
{ "is-invalid": e.isValid === !1 },
|
|
64
|
-
{ "is-valid": e.isValid },
|
|
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 },
|
|
65
67
|
{ "uikit-resize-none": !e.resize },
|
|
66
68
|
e.$attrs.class
|
|
67
69
|
]]),
|
|
68
|
-
"data-validation": e.isValid ? "valid" : e.isValid === !1 ? "invalid" : "",
|
|
69
70
|
rows: e.$attrs.rows,
|
|
70
71
|
disabled: e.$attrs.disabled,
|
|
71
72
|
"aria-labelledby": e.$attrs.id,
|
|
72
73
|
readonly: e.$attrs.readonly,
|
|
73
|
-
onFocusin:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
74
|
+
onFocusin: t[0] || (t[0] = d((u) => a(c)(), ["stop"])),
|
|
75
|
+
onFocusout: t[1] || (t[1] = d((u) => a(g)(`${r.value}`.trim()), ["stop"])),
|
|
76
|
+
onInput: d(T, ["stop"]),
|
|
77
|
+
onKeydown: t[2] || (t[2] = d((u) => n("keydown", u), ["stop"])),
|
|
78
|
+
onClick: t[3] || (t[3] = (u) => n("click", u)),
|
|
79
|
+
value: r.value
|
|
80
|
+
}, null, 42, B),
|
|
81
|
+
o("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 ? (b(), k("legend", E, [
|
|
90
|
+
o("span", {
|
|
91
|
+
class: s(["uikit-px-5px uikit-opacity-0", [
|
|
92
|
+
{
|
|
93
|
+
"uikit-visible uikit-inline-block": a(l) === "floating-label"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"uikit-invisible uikit-hidden": a(l) === "inline-label"
|
|
97
|
+
}
|
|
98
|
+
]]),
|
|
99
|
+
innerHTML: e.labelText
|
|
100
|
+
}, null, 10, H)
|
|
101
|
+
])) : p("", !0)
|
|
102
|
+
], 2),
|
|
103
|
+
M(F, {
|
|
91
104
|
for: e.$attrs.id,
|
|
92
105
|
"label-text": e.labelText,
|
|
93
|
-
"label-state":
|
|
106
|
+
"label-state": a(l),
|
|
94
107
|
required: e.$attrs.required,
|
|
95
108
|
"is-valid": e.isValid,
|
|
96
|
-
"label-classes": [
|
|
109
|
+
"label-classes": [
|
|
110
|
+
a(l) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
|
|
111
|
+
e.labelClasses
|
|
112
|
+
]
|
|
97
113
|
}, null, 8, ["for", "label-text", "label-state", "required", "is-valid", "label-classes"])
|
|
98
114
|
], 2),
|
|
99
|
-
(e.isValid || e.isValid === !1) && e.feedback ? (b(),
|
|
115
|
+
(e.isValid || e.isValid === !1) && e.feedback ? (b(), k("div", {
|
|
100
116
|
key: 0,
|
|
101
|
-
class:
|
|
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
|
+
),
|
|
102
120
|
innerHTML: e.isValid === !1 ? e.feedback.invalid : e.feedback.valid
|
|
103
|
-
}, null, 10,
|
|
121
|
+
}, null, 10, q)) : p("", !0)
|
|
104
122
|
], 2));
|
|
105
123
|
}
|
|
106
124
|
});
|
|
@@ -1,38 +1,42 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
const g = { class: "uikit-flex uikit-items-center uikit-gap-xs" }, x = ["innerHTML"], L = /* @__PURE__ */ r({
|
|
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 t, createCommentVNode as f, withModifiers as p } from "vue";
|
|
2
|
+
const m = { class: "switch uikit-relative uikit-inline-block uikit-min-w-[40px] uikit-text-sm" }, h = ["data-cy", "checked"], g = ["innerHTML"], y = /* @__PURE__ */ a({
|
|
4
3
|
inheritAttrs: !1,
|
|
5
4
|
__name: "BaseToggle",
|
|
6
|
-
props: /* @__PURE__ */
|
|
7
|
-
|
|
5
|
+
props: /* @__PURE__ */ n({
|
|
6
|
+
withRightLabel: { type: Boolean, default: !0 },
|
|
7
|
+
label: { default: "" }
|
|
8
8
|
}, {
|
|
9
|
-
modelValue: { default: !1 },
|
|
9
|
+
modelValue: { type: Boolean, default: !1 },
|
|
10
10
|
modelModifiers: {}
|
|
11
11
|
}),
|
|
12
12
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
setup(r) {
|
|
14
|
+
const o = d(r, "modelValue"), u = ({ target: e }) => {
|
|
15
|
+
o.value = e.checked;
|
|
16
|
+
};
|
|
17
|
+
return (e, i) => (b(), k("div", {
|
|
18
|
+
class: c(["switch-container uikit-inline-block uikit-items-center", e.$attrs.class])
|
|
19
|
+
}, [
|
|
20
|
+
l(e.$slots, "leftLabel", {}, void 0, !0),
|
|
21
|
+
t("label", m, [
|
|
22
|
+
t("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: o.value,
|
|
27
|
+
onInput: i[0] || (i[0] = p((s) => u(s), ["stop"]))
|
|
28
|
+
}, null, 40, h),
|
|
29
|
+
i[1] || (i[1] = t("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
|
+
e.withRightLabel ? l(e.$slots, "rightLabel", { key: 0 }, () => [
|
|
32
|
+
t("span", {
|
|
33
|
+
class: "uikit-ml-10px",
|
|
30
34
|
innerHTML: e.label
|
|
31
|
-
}, null, 8,
|
|
32
|
-
])
|
|
33
|
-
]));
|
|
35
|
+
}, null, 8, g)
|
|
36
|
+
], !0) : f("", !0)
|
|
37
|
+
], 2));
|
|
34
38
|
}
|
|
35
39
|
});
|
|
36
40
|
export {
|
|
37
|
-
|
|
41
|
+
y as default
|
|
38
42
|
};
|