@wikicasa-dev/components 2.1.3 → 2.1.4-alpha.10
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 +20 -9
- package/dist/UIKit/BaseBadge.d.ts +40 -5
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement1.js +4 -0
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement2.js +4 -0
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement3.js +4 -0
- package/dist/UIKit/BaseBanner/Background/BaseBannerBgElement4.js +4 -0
- package/dist/UIKit/BaseBanner.js +4 -0
- package/dist/UIKit/BaseBreadcrumb.js +3 -2
- package/dist/UIKit/BaseButton.d.ts +9 -8
- package/dist/UIKit/BaseChip.js +4 -0
- package/dist/UIKit/BaseCollapse.js +7 -0
- package/dist/UIKit/BaseComplexToggle.d.ts +1 -1
- package/dist/UIKit/BaseComplexToggle.js +2 -2
- package/dist/UIKit/BaseDropDown.d.ts +5 -0
- package/dist/UIKit/BaseFloatingLabel.js +1 -3
- package/dist/UIKit/BaseInput.d.ts +4 -5
- package/dist/UIKit/BaseInput.js +1 -3
- package/dist/UIKit/BaseNotificationBadge.js +4 -0
- package/dist/UIKit/BasePagination.d.ts +10 -3
- package/dist/UIKit/BasePin.d.ts +22 -0
- package/dist/UIKit/BasePin.js +5 -0
- package/dist/UIKit/BaseSelect.d.ts +26 -0
- package/dist/UIKit/BaseSelect.js +5 -0
- package/dist/UIKit/BaseSlider.d.ts +14 -10
- package/dist/UIKit/BaseSlider.js +1 -4
- 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 +5 -8
- package/dist/UIKit/BaseToggle.js +1 -4
- package/dist/UIKit/BaseTooltip.d.ts +10 -20
- package/dist/UIKit/BaseTooltip.js +2 -2
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +9 -16
- package/dist/UIKit/Checkbox/CheckboxBtn.js +2 -5
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +2 -3
- package/dist/UIKit/DatePicker.js +5 -0
- package/dist/UIKit/InputDropdown.js +4 -0
- package/dist/UIKit/Navigation/NavigationBar.d.ts +17 -0
- package/dist/UIKit/Navigation/NavigationBar.js +5 -0
- package/dist/UIKit/Navigation/NavigationBarItem.d.ts +34 -0
- package/dist/UIKit/Navigation/NavigationBarItem.js +4 -0
- package/dist/UIKit/SegmentedControl/SegmentedControl.js +4 -0
- package/dist/UIKit/SegmentedControl/SegmentedControlItem.js +4 -0
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +1 -3
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.d.ts +1 -5
- package/dist/UIKit/Tab/BaseTabItem.d.ts +27 -0
- package/dist/UIKit/Tab/BaseTabItem.js +4 -0
- package/dist/UIKit/Tab/BaseTabList.d.ts +3 -3
- package/dist/UIKit/types.d.ts +11 -6
- 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 +1 -0
- 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/BaseBreadcrumb.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/BaseCard.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseCollapse.css +1 -0
- 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/BasePin.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/BaseSelect.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/BaseTooltip.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/DatePicker.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/Navigation/NavigationBar.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.css +1 -1
- 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 +5 -2
- package/dist/index.js +98 -85
- 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 +19 -0
- 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 +16 -0
- 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 +29 -0
- 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 +33 -0
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/controller.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.js +9 -9
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/pagination.js +17 -17
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.js +1 -1
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/zoom.js +13 -13
- package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/utils.js +32 -26
- 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 +107 -13
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +28 -27
- package/dist/packages/components/lib/UIKit/BaseBadge.vue.js +46 -11
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement1.vue.js +29 -0
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement2.vue.js +56 -0
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement3.vue.js +56 -0
- package/dist/packages/components/lib/UIKit/BaseBanner/Background/BaseBannerBgElement4.vue.js +56 -0
- package/dist/packages/components/lib/UIKit/BaseBanner.vue.js +75 -0
- package/dist/packages/components/lib/UIKit/BaseBreadcrumb.vue.js +32 -35
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +56 -36
- package/dist/packages/components/lib/UIKit/BaseChip.vue.js +38 -0
- package/dist/packages/components/lib/UIKit/BaseCollapse.vue.js +54 -0
- package/dist/packages/components/lib/UIKit/BaseComplexToggle.vue.js +12 -12
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +48 -45
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +14 -17
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +93 -119
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +70 -66
- package/dist/packages/components/lib/UIKit/BaseNotificationBadge.vue.js +19 -0
- package/dist/packages/components/lib/UIKit/BasePagination.vue.js +89 -134
- package/dist/packages/components/lib/UIKit/BasePin.vue.js +37 -0
- package/dist/packages/components/lib/UIKit/BaseSelect.vue.js +65 -0
- package/dist/packages/components/lib/UIKit/BaseSlider.vue.js +107 -178
- package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +7 -7
- package/dist/packages/components/lib/UIKit/BaseTextarea.vue.js +55 -73
- package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +27 -31
- package/dist/packages/components/lib/UIKit/BaseTooltip.vue.js +48 -33
- package/dist/packages/components/lib/UIKit/BaseUploadFile.vue.js +19 -40
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +55 -52
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +20 -26
- package/dist/packages/components/lib/UIKit/DatePicker.vue.js +143 -0
- package/dist/packages/components/lib/UIKit/InputDropdown.vue.js +152 -0
- package/dist/packages/components/lib/UIKit/Navigation/NavigationBar.vue.js +21 -0
- package/dist/packages/components/lib/UIKit/Navigation/NavigationBarItem.vue.js +48 -0
- package/dist/packages/components/lib/UIKit/Radio/RadioButton.vue.js +9 -9
- package/dist/packages/components/lib/UIKit/SegmentedControl/SegmentedControl.vue.js +93 -0
- package/dist/packages/components/lib/UIKit/SegmentedControl/SegmentedControlItem.vue.js +30 -0
- package/dist/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +10 -9
- package/dist/packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +10 -9
- package/dist/packages/components/lib/UIKit/Tab/BaseTabItem.vue.js +39 -0
- package/dist/packages/components/lib/UIKit/Tab/BaseTabList.vue.js +30 -27
- package/dist/packages/components/lib/UIKit/Tab/BaseTabView.vue.js +40 -36
- package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +5 -6
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +5 -3
- package/package.json +26 -19
- package/plugins/buttonPlugin.ts +290 -0
- package/dist/UIKit/Slider/SimpleSlider.d.ts +0 -19
- package/dist/UIKit/Slider/SimpleSlider.js +0 -7
- package/dist/assets/packages/components/lib/UIKit/BaseSlider.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/BaseToggle.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/Checkbox/CheckboxBtn.css +0 -1
- package/dist/assets/packages/components/lib/UIKit/Slider/SimpleSlider.css +0 -1
- 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/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/StringUtils.js +0 -4
- package/dist/packages/components/lib/UIKit/Slider/SimpleSlider.vue.js +0 -82
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/free-mode.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/navigation.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/pagination.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/zoom.css +0 -0
- /package/dist/assets/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/swiper.css +0 -0
- /package/dist/node_modules/.pnpm/{@wikicasa-dev_svg-icons@1.2.11_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.12_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.11_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.12_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.11_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.12_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.11_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.12_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.11_typescript@5.8.3 → @wikicasa-dev_svg-icons@1.2.12_typescript@5.8.3}/node_modules/@wikicasa-dev/svg-icons/dist/WarningIconRounded.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/autoplay.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/controller.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/keyboard.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/navigation.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/modules/thumbs.css.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/classes-to-selector.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/create-element-if-not-defined.js +0 -0
- /package/dist/node_modules/.pnpm/{swiper@11.2.6 → swiper@11.2.8}/node_modules/swiper/shared/ssr-window.esm.js +0 -0
|
@@ -1,207 +1,136 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { defineComponent as E, mergeModels as T, useModel as p, ref as l, watch as g, createElementBlock as B, openBlock as L, createVNode as u, createElementVNode as U, unref as m, withCtx as w } from "vue";
|
|
2
|
+
import { SliderRoot as z, SliderTrack as N, SliderRange as R, SliderThumb as y } from "reka-ui";
|
|
3
|
+
import V from "./BaseInput.vue.js";
|
|
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({
|
|
4
6
|
__name: "BaseSlider",
|
|
5
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ T({
|
|
6
8
|
type: { default: "linear" },
|
|
7
9
|
min: { default: 0 },
|
|
8
|
-
max: { default: 100 }
|
|
10
|
+
max: { default: 100 },
|
|
11
|
+
step: {},
|
|
12
|
+
dataCy: {}
|
|
9
13
|
}, {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
rangeMin: { default: 0 },
|
|
15
|
+
rangeMinModifiers: {},
|
|
16
|
+
rangeMax: { default: 100 },
|
|
17
|
+
rangeMaxModifiers: {}
|
|
14
18
|
}),
|
|
15
|
-
emits: ["update:
|
|
16
|
-
setup(
|
|
17
|
-
|
|
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(
|
|
19
|
+
emits: ["update:rangeMin", "update:rangeMax"],
|
|
20
|
+
setup(a) {
|
|
21
|
+
const C = (e) => e.minPos + (Math.log(e.value) - e.minlval) / e.scale, F = (e) => Math.exp(
|
|
22
22
|
(e.position - e.minPos) * e.scale + e.minlval
|
|
23
|
-
)
|
|
24
|
-
|
|
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")
|
|
23
|
+
), o = p(a, "rangeMin"), s = p(a, "rangeMax"), n = l(0), f = l(100), S = l(10), $ = l(40), k = l(0), h = l(0), c = l(0), x = (e) => {
|
|
24
|
+
if (a.type === "logarithmic")
|
|
50
25
|
return e = e || 1, parseInt(
|
|
51
|
-
|
|
26
|
+
C({
|
|
52
27
|
value: e,
|
|
53
28
|
minPos: n.value,
|
|
54
|
-
minlval:
|
|
55
|
-
scale:
|
|
29
|
+
minlval: k.value,
|
|
30
|
+
scale: c.value
|
|
56
31
|
}).toFixed(0),
|
|
57
32
|
10
|
|
58
33
|
);
|
|
59
|
-
if (
|
|
34
|
+
if (a.type === "linear")
|
|
60
35
|
return e;
|
|
61
36
|
throw new Error("The slider type has not been implemented");
|
|
62
37
|
}, b = (e) => {
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
|
|
38
|
+
if (!e) return 0;
|
|
39
|
+
if (a.type === "logarithmic")
|
|
40
|
+
return parseInt(
|
|
41
|
+
F({
|
|
66
42
|
position: e,
|
|
67
|
-
scale:
|
|
68
|
-
minlval:
|
|
43
|
+
scale: c.value,
|
|
44
|
+
minlval: k.value,
|
|
69
45
|
minPos: n.value
|
|
70
46
|
}).toFixed(0),
|
|
71
47
|
10
|
|
72
48
|
);
|
|
73
|
-
if (
|
|
49
|
+
if (a.type === "linear")
|
|
74
50
|
return e;
|
|
75
51
|
throw new Error("The slider type has not been implemented");
|
|
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
|
-
)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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"])
|
|
52
|
+
}, r = l([]), d = l(!1), v = l(!1);
|
|
53
|
+
(() => {
|
|
54
|
+
n.value = parseInt(`${a.min || 0}`, 10), f.value = parseInt(`${a.max || 100}`, 10), S.value = n.value, $.value = f.value;
|
|
55
|
+
const e = n.value, t = f.value;
|
|
56
|
+
k.value = Math.log(e || 1), h.value = Math.log(t), c.value = (h.value - k.value) / (f.value - n.value), r.value = [
|
|
57
|
+
b(o.value),
|
|
58
|
+
b(s.value)
|
|
59
|
+
];
|
|
60
|
+
})();
|
|
61
|
+
const I = (e = []) => {
|
|
62
|
+
r.value = e, v.value = !0;
|
|
63
|
+
}, M = {
|
|
64
|
+
formatFn: (e = "") => typeof e == "number" ? `${e}` : e.replace(/\D/g, ""),
|
|
65
|
+
unFormatFn: (e) => e ? parseInt(e) : 0
|
|
66
|
+
};
|
|
67
|
+
return g(
|
|
68
|
+
r,
|
|
69
|
+
([e, t]) => {
|
|
70
|
+
const i = x(e), P = x(t);
|
|
71
|
+
a.type === "logarithmic" && d.value || (o.value = i, s.value = P);
|
|
72
|
+
},
|
|
73
|
+
{ deep: !0 }
|
|
74
|
+
), g(o, (e) => {
|
|
75
|
+
e === void 0 || v.value || (r.value[0] = b(e));
|
|
76
|
+
}), g(s, (e) => {
|
|
77
|
+
e === void 0 || v.value || (r.value[1] = b(e));
|
|
78
|
+
}), (e, t) => (L(), B("div", null, [
|
|
79
|
+
u(m(z), {
|
|
80
|
+
"model-value": r.value,
|
|
81
|
+
class: "uikit-relative uikit-flex uikit-h-5 uikit-touch-none uikit-select-none uikit-items-center",
|
|
82
|
+
min: e.min,
|
|
83
|
+
max: e.max,
|
|
84
|
+
step: e.step,
|
|
85
|
+
"onUpdate:modelValue": I
|
|
86
|
+
}, {
|
|
87
|
+
default: w(() => [
|
|
88
|
+
u(m(N), { class: "uikit-relative uikit-h-[2px] uikit-grow uikit-rounded-full uikit-bg-w-lightgray" }, {
|
|
89
|
+
default: w(() => [
|
|
90
|
+
u(m(R), { class: "uikit-absolute uikit-h-full uikit-rounded-full uikit-bg-w-blue" })
|
|
91
|
+
]),
|
|
92
|
+
_: 1
|
|
93
|
+
}),
|
|
94
|
+
u(m(y), {
|
|
95
|
+
class: "uikit-block uikit-size-[20px] uikit-rounded-full uikit-border-2 uikit-border-solid uikit-border-w-blue uikit-bg-w-blue uikit-shadow-[0_0_0_2px_#fff_inset] hover:uikit-border-w-blue-hover hover:uikit-bg-w-blue-hover focus:uikit-border-w-blue-hover focus:uikit-bg-w-blue-hover focus:uikit-outline-none",
|
|
96
|
+
"aria-label": "Min Value",
|
|
97
|
+
"data-cy": e.dataCy?.thumbMin
|
|
98
|
+
}, null, 8, ["data-cy"]),
|
|
99
|
+
u(m(y), {
|
|
100
|
+
class: "uikit-block uikit-size-[20px] uikit-rounded-full uikit-border-2 uikit-border-solid uikit-border-w-blue uikit-bg-w-blue uikit-shadow-[0_0_0_2px_#fff_inset] hover:uikit-border-w-blue-hover hover:uikit-bg-w-blue-hover focus:uikit-border-w-blue-hover focus:uikit-bg-w-blue-hover focus:uikit-outline-none",
|
|
101
|
+
"aria-label": "Max Value",
|
|
102
|
+
"data-cy": e.dataCy?.thumbMax
|
|
103
|
+
}, null, 8, ["data-cy"])
|
|
190
104
|
]),
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, ["model-value", "min", "max", "step"]),
|
|
107
|
+
U("div", j, [
|
|
108
|
+
u(V, {
|
|
109
|
+
modelValue: o.value,
|
|
110
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => o.value = i),
|
|
111
|
+
"label-text": "Min",
|
|
112
|
+
"data-cy": e.dataCy?.rangeMinInput,
|
|
113
|
+
formatter: M,
|
|
114
|
+
onFocusin: t[1] || (t[1] = (i) => {
|
|
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"])
|
|
201
130
|
])
|
|
202
131
|
]));
|
|
203
132
|
}
|
|
204
133
|
});
|
|
205
134
|
export {
|
|
206
|
-
|
|
135
|
+
J as default
|
|
207
136
|
};
|
|
@@ -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 p, 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.12_typescript@5.8.3/node_modules/@wikicasa-dev/svg-icons/dist/CloseIcon.js";
|
|
3
|
+
import "../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.12_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__ */ p({
|
|
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), b = () => {
|
|
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-flex uikit-items-center uikit-rounded-[5px] uikit-px-4 uikit-
|
|
39
|
-
onClick: l(
|
|
38
|
+
class: x(["snackbar snackbar-active uikit-py-xs uikit-flex uikit-items-center uikit-rounded-[5px] uikit-px-4 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(b, ["stop"])
|
|
40
40
|
}, [
|
|
41
41
|
t.icon ? (i(), a("img", {
|
|
42
42
|
key: 0,
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
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({
|
|
1
|
+
import { defineComponent as $, mergeModels as n, useModel as T, ref as h, watch as C, createElementBlock as f, openBlock as b, normalizeClass as r, createElementVNode as v, createCommentVNode as L, unref as o, createVNode as x, withModifiers as u, nextTick as F } from "vue";
|
|
2
|
+
import M from "./BaseFloatingLabel.vue.js";
|
|
3
|
+
import '../../../../assets/packages/components/lib/UIKit/BaseFloatingLabel.css';/* empty css */
|
|
4
|
+
import { useFloatingLabel as E } from "../../../../composables/useFloatingLabel.js";
|
|
5
|
+
const z = ["id", "data-cy", "data-validation", "rows", "disabled", "aria-labelledby", "readonly", "value"], B = ["innerHTML"], q = "peer-data-[validation='invalid']/fieldset:uikit-text-w-red peer-data-[validation='valid']/fieldset:uikit-text-w-blue", S = /* @__PURE__ */ $({
|
|
8
6
|
inheritAttrs: !1,
|
|
9
7
|
__name: "BaseTextarea",
|
|
10
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ n({
|
|
11
9
|
labelText: { default: "" },
|
|
12
10
|
feedback: {},
|
|
13
11
|
isValid: { default: null },
|
|
@@ -17,108 +15,92 @@ const B = ["id", "data-cy", "rows", "disabled", "aria-labelledby", "readonly", "
|
|
|
17
15
|
modelValue: { default: "" },
|
|
18
16
|
modelModifiers: {}
|
|
19
17
|
}),
|
|
20
|
-
emits: /* @__PURE__ */
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
labelState:
|
|
18
|
+
emits: /* @__PURE__ */ n(["focusin", "focusout", "click", "keydown"], ["update:modelValue"]),
|
|
19
|
+
setup(k, { expose: m, emit: p }) {
|
|
20
|
+
const t = T(k, "modelValue"), s = p, {
|
|
21
|
+
labelState: d,
|
|
24
22
|
handleFocusIn: c,
|
|
25
|
-
handleFocusOut:
|
|
23
|
+
handleFocusOut: w,
|
|
26
24
|
setFloatingLabel: y,
|
|
27
25
|
setInlineLabel: V
|
|
28
|
-
} =
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
} = E(), a = h(null);
|
|
27
|
+
C(
|
|
28
|
+
t,
|
|
31
29
|
(e) => {
|
|
32
|
-
`${e}`.length &&
|
|
30
|
+
`${e}`.length && d.value !== "floating-label" ? y() : !e?.length && d.value !== "inline-label" && document.activeElement !== a.value && V();
|
|
33
31
|
},
|
|
34
32
|
{ immediate: !0 }
|
|
35
33
|
);
|
|
36
|
-
const
|
|
37
|
-
|
|
34
|
+
const g = ({ target: e }) => {
|
|
35
|
+
t.value = e.value;
|
|
38
36
|
};
|
|
39
37
|
return m({
|
|
40
38
|
disableTextarea: () => {
|
|
41
|
-
|
|
39
|
+
a.value && (a.value.setAttribute("readonly", "readonly"), a.value.classList.add("disabled"));
|
|
42
40
|
},
|
|
43
41
|
clearTextareaElem: () => {
|
|
44
|
-
|
|
42
|
+
a.value && (a.value.value = "");
|
|
45
43
|
},
|
|
46
44
|
focusDisabledTextarea: () => {
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
a.value && (a.value.removeAttribute("readonly"), a.value.classList.remove("disabled"), F(() => {
|
|
46
|
+
a.value && a.value.focus();
|
|
49
47
|
}));
|
|
50
48
|
}
|
|
51
|
-
}), (e,
|
|
52
|
-
class:
|
|
49
|
+
}), (e, i) => (b(), f("div", {
|
|
50
|
+
class: r(e.$attrs["wrapper-classes"])
|
|
53
51
|
}, [
|
|
54
|
-
|
|
55
|
-
class:
|
|
56
|
-
|
|
52
|
+
v("div", {
|
|
53
|
+
class: r(["input-wrapper uikit-relative uikit-rounded-xs uikit-px-0", [
|
|
54
|
+
o(d) === "floating-label" ? "floating-state" : "inline-state"
|
|
57
55
|
]])
|
|
58
56
|
}, [
|
|
59
|
-
|
|
57
|
+
v("textarea", {
|
|
60
58
|
id: e.$attrs.id,
|
|
61
59
|
ref_key: "textarea",
|
|
62
|
-
ref:
|
|
60
|
+
ref: a,
|
|
63
61
|
"data-cy": e.$attrs["data-cy"],
|
|
64
|
-
class:
|
|
65
|
-
{ "is-invalid
|
|
66
|
-
{ "is-valid
|
|
62
|
+
class: r(["textarea-scrollbar uikit-peer/fieldset uikit-relative uikit-min-h-[130px] uikit-min-w-[343px] uikit-overflow-y-auto uikit-whitespace-pre-wrap uikit-rounded-2xs uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-px-sm uikit-py-lg uikit-text-16 uikit-outline-none focus-visible:uikit-border-w-blue data-[validation='invalid']:uikit-border-w-red data-[validation='valid']:uikit-border-w-blue", [
|
|
63
|
+
{ "is-invalid": e.isValid === !1 },
|
|
64
|
+
{ "is-valid": e.isValid },
|
|
67
65
|
{ "uikit-resize-none": !e.resize },
|
|
68
66
|
e.$attrs.class
|
|
69
67
|
]]),
|
|
68
|
+
"data-validation": e.isValid ? "valid" : e.isValid === !1 ? "invalid" : "",
|
|
70
69
|
rows: e.$attrs.rows,
|
|
71
70
|
disabled: e.$attrs.disabled,
|
|
72
71
|
"aria-labelledby": e.$attrs.id,
|
|
73
72
|
readonly: e.$attrs.readonly,
|
|
74
|
-
onFocusin:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
]])
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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, {
|
|
73
|
+
onFocusin: i[0] || (i[0] = u(
|
|
74
|
+
(l) => {
|
|
75
|
+
s("focusin", l), o(c)();
|
|
76
|
+
},
|
|
77
|
+
["stop"]
|
|
78
|
+
)),
|
|
79
|
+
onFocusout: i[1] || (i[1] = u(
|
|
80
|
+
(l) => {
|
|
81
|
+
s("focusout", l), o(w)(`${t.value}`.trim());
|
|
82
|
+
},
|
|
83
|
+
["stop"]
|
|
84
|
+
)),
|
|
85
|
+
onInput: u(g, ["stop"]),
|
|
86
|
+
onKeydown: i[2] || (i[2] = u((l) => s("keydown", l), ["stop"])),
|
|
87
|
+
onClick: i[3] || (i[3] = (l) => s("click", l)),
|
|
88
|
+
value: t.value
|
|
89
|
+
}, null, 42, z),
|
|
90
|
+
x(M, {
|
|
104
91
|
for: e.$attrs.id,
|
|
105
92
|
"label-text": e.labelText,
|
|
106
|
-
"label-state":
|
|
93
|
+
"label-state": o(d),
|
|
107
94
|
required: e.$attrs.required,
|
|
108
95
|
"is-valid": e.isValid,
|
|
109
|
-
"label-classes": [
|
|
110
|
-
a(l) === "floating-label" ? "!-uikit-top-1" : "!uikit-top-4",
|
|
111
|
-
e.labelClasses
|
|
112
|
-
]
|
|
96
|
+
"label-classes": [e.labelClasses, q]
|
|
113
97
|
}, null, 8, ["for", "label-text", "label-state", "required", "is-valid", "label-classes"])
|
|
114
98
|
], 2),
|
|
115
|
-
(e.isValid || e.isValid === !1) && e.feedback ? (b(),
|
|
99
|
+
(e.isValid || e.isValid === !1) && e.feedback ? (b(), f("div", {
|
|
116
100
|
key: 0,
|
|
117
|
-
class:
|
|
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
|
-
),
|
|
101
|
+
class: r(["uikit-mt-1 uikit-text-12", e.isValid === !1 ? "uikit-text-w-red" : "uikit-text-w-blue"]),
|
|
120
102
|
innerHTML: e.isValid === !1 ? e.feedback.invalid : e.feedback.valid
|
|
121
|
-
}, null, 10,
|
|
103
|
+
}, null, 10, B)) : L("", !0)
|
|
122
104
|
], 2));
|
|
123
105
|
}
|
|
124
106
|
});
|
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as r, mergeModels as d, useModel as n, createElementBlock as k, openBlock as m, renderSlot as l, createVNode as u, createCommentVNode as c, unref as a, withCtx as f, createElementVNode as p } from "vue";
|
|
2
|
+
import { SwitchRoot as h, SwitchThumb as b } from "reka-ui";
|
|
3
|
+
const g = { class: "uikit-flex uikit-items-center uikit-gap-xs" }, x = ["innerHTML"], L = /* @__PURE__ */ r({
|
|
3
4
|
inheritAttrs: !1,
|
|
4
5
|
__name: "BaseToggle",
|
|
5
|
-
props: /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
label: { default: "" }
|
|
6
|
+
props: /* @__PURE__ */ d({
|
|
7
|
+
label: {}
|
|
8
8
|
}, {
|
|
9
|
-
modelValue: {
|
|
9
|
+
modelValue: { 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
|
-
|
|
30
|
-
]),
|
|
31
|
-
e.withRightLabel ? l(e.$slots, "rightLabel", { key: 0 }, () => [
|
|
32
|
-
t("span", {
|
|
33
|
-
class: "uikit-ml-10px",
|
|
13
|
+
setup(o) {
|
|
14
|
+
const t = n(o, "modelValue");
|
|
15
|
+
return (e, i) => (m(), k("div", g, [
|
|
16
|
+
l(e.$slots, "leftLabel"),
|
|
17
|
+
u(a(h), {
|
|
18
|
+
modelValue: t.value,
|
|
19
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => t.value = s),
|
|
20
|
+
class: "uikit-flex uikit-h-[20px] uikit-w-2xl uikit-cursor-pointer uikit-rounded-full uikit-p-0 uikit-transition-[background] data-[state=checked]:uikit-bg-w-blue data-[state=unchecked]:uikit-bg-w-cultured"
|
|
21
|
+
}, {
|
|
22
|
+
default: f(() => [
|
|
23
|
+
u(a(b), { class: "uikit-text-xs uikit-shadow-surface uikit-my-auto uikit-flex uikit-size-[20px] uikit-translate-x-0 uikit-items-center uikit-justify-center uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-shadow-xl uikit-transition-transform uikit-will-change-transform data-[state=checked]:uikit-translate-x-full" })
|
|
24
|
+
]),
|
|
25
|
+
_: 1
|
|
26
|
+
}, 8, ["modelValue"]),
|
|
27
|
+
e.$slots.leftLabel ? c("", !0) : l(e.$slots, "rightLabel", { key: 0 }, () => [
|
|
28
|
+
p("span", {
|
|
29
|
+
class: "uikit-ml-[10px]",
|
|
34
30
|
innerHTML: e.label
|
|
35
|
-
}, null, 8,
|
|
36
|
-
]
|
|
37
|
-
]
|
|
31
|
+
}, null, 8, x)
|
|
32
|
+
])
|
|
33
|
+
]));
|
|
38
34
|
}
|
|
39
35
|
});
|
|
40
36
|
export {
|
|
41
|
-
|
|
37
|
+
L as default
|
|
42
38
|
};
|