@wikicasa-dev/components 2.1.4-alpha.8 → 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 -6
- package/dist/index.js +85 -100
- 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 +17 -20
- 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/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/create-plugin.js +0 -4
- package/dist/_virtual/createPlugin.js +0 -4
- package/dist/_virtual/plugin.js +0 -7
- 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/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/public/create-plugin.js +0 -25
- package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/lib/util/createPlugin.js +0 -34
- package/dist/node_modules/.pnpm/tailwindcss@3.4.15_ts-node@10.9.2_@types_node@24.0.1_typescript@5.8.3_/node_modules/tailwindcss/plugin.js +0 -11
- 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/dist/plugins/buttonPlugin.d.ts +0 -4
- package/dist/plugins/buttonPlugin.js +0 -232
- /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,56 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
3
|
-
const _ = /* @__PURE__ */ s({
|
|
1
|
+
import { defineComponent as a, createElementBlock as e, openBlock as t, renderSlot as s, createElementVNode as n, normalizeClass as l, createCommentVNode as i } from "vue";
|
|
2
|
+
const r = { class: "base-tooltip" }, m = /* @__PURE__ */ a({
|
|
4
3
|
__name: "BaseTooltip",
|
|
5
4
|
props: {
|
|
5
|
+
theme: { default: () => ({
|
|
6
|
+
color: "blue",
|
|
7
|
+
size: "sm"
|
|
8
|
+
}) },
|
|
6
9
|
direction: { default: "top" },
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
customTooltipClass: { default: "" },
|
|
11
|
+
showTooltipContentManually: { type: Boolean, default: !0 },
|
|
12
|
+
tooltipContentClasses: { default: "" }
|
|
10
13
|
},
|
|
11
|
-
setup(
|
|
12
|
-
return (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
o
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
default: i(() => l[0] || (l[0] = [
|
|
35
|
-
d("span", { class: "uikit-pin-arrow" }, null, -1)
|
|
36
|
-
])),
|
|
37
|
-
_: 1,
|
|
38
|
-
__: [0]
|
|
39
|
-
})
|
|
40
|
-
]),
|
|
41
|
-
_: 3
|
|
42
|
-
}, 8, ["class", "side"])
|
|
43
|
-
]),
|
|
44
|
-
_: 3
|
|
45
|
-
})
|
|
46
|
-
]),
|
|
47
|
-
_: 3
|
|
48
|
-
})
|
|
49
|
-
]),
|
|
50
|
-
_: 3
|
|
51
|
-
}, 8, ["delay-duration"]));
|
|
14
|
+
setup(p) {
|
|
15
|
+
return (o, u) => (t(), e("div", r, [
|
|
16
|
+
s(o.$slots, "trigger", {}, void 0, !0),
|
|
17
|
+
n("div", {
|
|
18
|
+
class: l(["bg-transparent", [
|
|
19
|
+
o.theme.size,
|
|
20
|
+
`${o.customTooltipClass ? o.customTooltipClass : "tooltip-content-wrapper"}`
|
|
21
|
+
]])
|
|
22
|
+
}, [
|
|
23
|
+
o.showTooltipContentManually ? (t(), e("div", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: l(["tooltip-content uikit-shadow-lg uikit-shadow-w-primary/10", [
|
|
26
|
+
"base-tooltip-arrow",
|
|
27
|
+
o.direction,
|
|
28
|
+
o.theme.color,
|
|
29
|
+
o.theme.size,
|
|
30
|
+
o.tooltipContentClasses
|
|
31
|
+
]])
|
|
32
|
+
}, [
|
|
33
|
+
s(o.$slots, "content", {}, void 0, !0)
|
|
34
|
+
], 2)) : i("", !0)
|
|
35
|
+
], 2)
|
|
36
|
+
]));
|
|
52
37
|
}
|
|
53
38
|
});
|
|
54
39
|
export {
|
|
55
|
-
|
|
40
|
+
m as default
|
|
56
41
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as c, ref as b, watch as m, createElementBlock as o, openBlock as s, normalizeClass as t, createElementVNode as l, createBlock as h, createCommentVNode as n, renderSlot as v } from "vue";
|
|
2
|
+
import w from "../../../../UIKit/BaseFloatingLabel.js";
|
|
3
|
+
const C = ["innerHTML"], g = ["for"], y = ["id", "multiple", "accept"], B = /* @__PURE__ */ c({
|
|
3
4
|
inheritAttrs: !1,
|
|
4
5
|
__name: "BaseUploadFile",
|
|
5
6
|
props: {
|
|
@@ -12,36 +13,56 @@ const h = ["for"], k = ["id", "multiple", "accept"], B = /* @__PURE__ */ p({
|
|
|
12
13
|
legendClasses: { default: "" }
|
|
13
14
|
},
|
|
14
15
|
emits: ["cleared", "uploaded"],
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
() =>
|
|
16
|
+
setup(r, { emit: d }) {
|
|
17
|
+
const k = r, u = d, a = b("");
|
|
18
|
+
m(
|
|
19
|
+
() => k.clear,
|
|
19
20
|
(e) => {
|
|
20
|
-
e && (
|
|
21
|
+
e && (a.value = "", u("cleared"));
|
|
21
22
|
}
|
|
22
23
|
);
|
|
23
|
-
const
|
|
24
|
+
const p = ({ target: e }) => {
|
|
24
25
|
if (!e) return;
|
|
25
|
-
const
|
|
26
|
-
|
|
26
|
+
const i = e.files;
|
|
27
|
+
i?.length && (a.value = i[0].name, u("uploaded", i[0]));
|
|
27
28
|
};
|
|
28
|
-
return (e,
|
|
29
|
-
class:
|
|
29
|
+
return (e, i) => (s(), o("div", {
|
|
30
|
+
class: t(["base-upload-file-wrapper uikit-relative", [e.$attrs.class]])
|
|
30
31
|
}, [
|
|
31
|
-
|
|
32
|
-
class:
|
|
32
|
+
l("fieldset", {
|
|
33
|
+
class: t(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-overflow-hidden uikit-rounded-xs uikit-border uikit-border-dashed uikit-border-w-secondary uikit-bg-w-lavender uikit-px-2 uikit-py-0 uikit-text-start", e.fieldsetClasses])
|
|
34
|
+
}, [
|
|
35
|
+
e.labelText ? (s(), o("legend", {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: t(["uikit-invisible 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", e.legendClasses])
|
|
38
|
+
}, [
|
|
39
|
+
l("span", {
|
|
40
|
+
class: "uikit-visible uikit-inline-block uikit-px-5px uikit-opacity-0",
|
|
41
|
+
innerHTML: e.labelText
|
|
42
|
+
}, null, 8, C)
|
|
43
|
+
], 2)) : n("", !0)
|
|
44
|
+
], 2),
|
|
45
|
+
e.labelText ? (s(), h(w, {
|
|
46
|
+
key: 0,
|
|
47
|
+
class: t(e.floatingLabelClasses),
|
|
48
|
+
"label-text": e.labelText,
|
|
49
|
+
"label-state": "floating-label",
|
|
50
|
+
"label-classes": "!-uikit-top-1"
|
|
51
|
+
}, null, 8, ["class", "label-text"])) : n("", !0),
|
|
52
|
+
l("label", {
|
|
53
|
+
class: t(["upload-file-input uikit-relative uikit-z-10 uikit-flex uikit-h-12 uikit-w-full uikit-cursor-pointer uikit-items-center uikit-justify-center uikit-rounded-xs uikit-text-sm", e.labelClasses]),
|
|
33
54
|
for: e.id
|
|
34
55
|
}, [
|
|
35
|
-
|
|
56
|
+
l("input", {
|
|
36
57
|
id: e.id,
|
|
37
58
|
multiple: e.$attrs.multiple,
|
|
38
59
|
type: "file",
|
|
39
60
|
class: "uikit-hidden",
|
|
40
61
|
accept: e.$attrs.accept,
|
|
41
|
-
onInput:
|
|
42
|
-
}, null, 40,
|
|
43
|
-
|
|
44
|
-
], 10,
|
|
62
|
+
onInput: i[0] || (i[0] = (f) => p(f))
|
|
63
|
+
}, null, 40, y),
|
|
64
|
+
v(e.$slots, "label", { filename: a.value })
|
|
65
|
+
], 10, g)
|
|
45
66
|
], 2));
|
|
46
67
|
}
|
|
47
68
|
});
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
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
|
-
import { CheckboxRoot as v, CheckboxIndicator as x } from "reka-ui";
|
|
5
|
-
const N = ["for"], q = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as b, useId as f, computed as h, createElementBlock as r, openBlock as s, withModifiers as d, normalizeClass as l, createElementVNode as u, renderSlot as m, createCommentVNode as C, toDisplayString as g } from "vue";
|
|
2
|
+
const y = ["id"], V = ["id", "data-cy", "checked", "disabled"], v = ["for"], w = /* @__PURE__ */ b({
|
|
6
3
|
__name: "CheckboxBtn",
|
|
7
4
|
props: {
|
|
8
5
|
id: {},
|
|
@@ -12,67 +9,67 @@ const N = ["for"], q = /* @__PURE__ */ m({
|
|
|
12
9
|
} },
|
|
13
10
|
required: { type: Boolean },
|
|
14
11
|
inputClass: {},
|
|
12
|
+
inline: { type: Boolean, default: !1 },
|
|
15
13
|
label: { default: "" },
|
|
16
14
|
labelClass: {},
|
|
15
|
+
isValid: { default: null },
|
|
17
16
|
containerId: {},
|
|
17
|
+
handleLabelClick: { type: Boolean, default: !0 },
|
|
18
18
|
modelValue: { type: Boolean, default: !1 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["click", "change", "update:modelValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
id: t.id ?? i,
|
|
32
|
-
label: t.label,
|
|
33
|
-
checked: e
|
|
34
|
-
}), a("update:modelValue", e));
|
|
21
|
+
setup(i, { emit: c }) {
|
|
22
|
+
const a = c, n = f(), o = h(() => `${i.id ?? n}`), k = () => {
|
|
23
|
+
const e = i.checked ?? i.modelValue;
|
|
24
|
+
a("change", {
|
|
25
|
+
id: i.id ?? n,
|
|
26
|
+
label: i.label,
|
|
27
|
+
checked: !e
|
|
28
|
+
}), a("update:modelValue", !e);
|
|
29
|
+
}, p = () => {
|
|
30
|
+
k(), i.handleLabelClick && a("click");
|
|
35
31
|
};
|
|
36
|
-
return (e,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
return (e, t) => (s(), r("div", {
|
|
33
|
+
id: e.containerId,
|
|
34
|
+
class: l(["uikit-group uikit-relative uikit-items-center uikit-pl-30px hover:uikit-cursor-pointer", [
|
|
35
|
+
{ "uikit-inline-flex": e.inline },
|
|
36
|
+
{ "uikit-flex": !e.inline },
|
|
37
|
+
e.$attrs["wrapper-classes"]
|
|
38
|
+
]]),
|
|
39
|
+
onClick: d(p, ["stop"])
|
|
40
40
|
}, [
|
|
41
|
-
|
|
42
|
-
id:
|
|
43
|
-
"
|
|
41
|
+
u("input", {
|
|
42
|
+
id: o.value,
|
|
43
|
+
ref: "checkbox",
|
|
44
44
|
"data-cy": e.dataCy,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"uikit-bg-w-blue": e.modelValue
|
|
50
|
-
},
|
|
51
|
-
e.inputClass
|
|
45
|
+
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", [
|
|
46
|
+
{ "!uikit-border-w-danger": e.isValid === !1 },
|
|
47
|
+
e.inputClass,
|
|
48
|
+
e.isValid === !1 ? "checked-bg-invalid" : "checked-bg"
|
|
52
49
|
]]),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
])
|
|
73
|
-
],
|
|
50
|
+
type: "checkbox",
|
|
51
|
+
checked: e.checked ?? e.modelValue,
|
|
52
|
+
disabled: e.disabled,
|
|
53
|
+
onChange: t[0] || (t[0] = d(() => {
|
|
54
|
+
}, ["prevent", "stop"])),
|
|
55
|
+
onClick: t[1] || (t[1] = d(() => {
|
|
56
|
+
}, ["prevent", "stop"]))
|
|
57
|
+
}, null, 42, V),
|
|
58
|
+
m(e.$slots, "label", {}, () => [
|
|
59
|
+
u("label", {
|
|
60
|
+
class: l(["uikit-text-sm group-hover:uikit-cursor-pointer", [e.labelClass, { "uikit-text-w-danger": e.isValid === !1 }]]),
|
|
61
|
+
for: o.value
|
|
62
|
+
}, g(e.label), 11, v),
|
|
63
|
+
e.required ? (s(), r("span", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: l(["required after:uikit-content-['*']", [
|
|
66
|
+
e.isValid !== !1 ? "after:uikit-text-w-primary" : "after:uikit-text-w-danger"
|
|
67
|
+
]])
|
|
68
|
+
}, null, 2)) : C("", !0)
|
|
69
|
+
], !0)
|
|
70
|
+
], 10, y));
|
|
74
71
|
}
|
|
75
72
|
});
|
|
76
73
|
export {
|
|
77
|
-
|
|
74
|
+
w as default
|
|
78
75
|
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import V from "
|
|
3
|
-
|
|
1
|
+
import { defineComponent as y, ref as v, computed as h, watch as x, renderSlot as m, createElementVNode as D, normalizeClass as E, createElementBlock as $, createCommentVNode as B, openBlock as b, Fragment as A, renderList as I, createBlock as R, unref as K } from "vue";
|
|
2
|
+
import { isArrNullOrEmpty as V } from "../../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/ArrayUtils.js";
|
|
3
|
+
import "../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js";
|
|
4
|
+
import { stringToHyphened as L } from "../../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.21/node_modules/@wikicasa-dev/utilities/dist/utils/StringUtils.js";
|
|
5
|
+
import "../../../../../_virtual/polyline.js";
|
|
6
|
+
import G from "../../../../../UIKit/Checkbox/CheckboxBtn.js";
|
|
7
|
+
const N = ["id", "data-cy"], F = /* @__PURE__ */ y({
|
|
4
8
|
inheritAttrs: !1,
|
|
5
9
|
__name: "CheckboxGroup",
|
|
6
10
|
props: {
|
|
@@ -13,17 +17,19 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
13
17
|
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
14
18
|
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
15
19
|
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
16
|
-
getKey: {
|
|
20
|
+
getKey: { default() {
|
|
21
|
+
return (r) => typeof r == "string" || typeof r == "number" ? `${r}` : `${r.id}`;
|
|
22
|
+
} },
|
|
17
23
|
groupId: { default: "" },
|
|
18
24
|
dataCy: { default: "" }
|
|
19
25
|
},
|
|
20
26
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
21
|
-
setup(
|
|
22
|
-
const
|
|
27
|
+
setup(r, { emit: g }) {
|
|
28
|
+
const o = r, n = g, c = v(/* @__PURE__ */ new Map()), s = h(() => {
|
|
23
29
|
for (const e of o.checkboxData)
|
|
24
30
|
if (e.reset) return e;
|
|
25
31
|
return null;
|
|
26
|
-
}),
|
|
32
|
+
}), C = h(() => o.checkboxData.length), f = h(() => {
|
|
27
33
|
let e = 0;
|
|
28
34
|
return c.value.forEach((t) => {
|
|
29
35
|
t.checked && e++;
|
|
@@ -36,7 +42,7 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
36
42
|
`${t.id}`,
|
|
37
43
|
t
|
|
38
44
|
), t.checked && e.push(t);
|
|
39
|
-
|
|
45
|
+
n("update:modelValue", e);
|
|
40
46
|
})();
|
|
41
47
|
const u = (e, t) => {
|
|
42
48
|
const a = c.value.get(e);
|
|
@@ -52,19 +58,19 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
52
58
|
e.checked = !1;
|
|
53
59
|
});
|
|
54
60
|
}, p = () => {
|
|
55
|
-
k(),
|
|
61
|
+
k(), n("update:modelValue", []), n("resetted");
|
|
56
62
|
}, d = (e) => c.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
57
|
-
if (
|
|
63
|
+
if (V(o.checkboxData)) return;
|
|
58
64
|
const t = c.value.get(e.id);
|
|
59
|
-
t?.reset && e.checked ? k() :
|
|
65
|
+
t?.reset && e.checked ? k() : s.value && !t?.reset && u(o.getKey(s.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && s.value && f.value === C.value - 1 && c.value.forEach((l) => {
|
|
60
66
|
l.checked = !!l.reset;
|
|
61
|
-
}), o.autoCheckResetEmpty &&
|
|
67
|
+
}), o.autoCheckResetEmpty && s.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(s.value), { checked: !0 });
|
|
62
68
|
const a = [];
|
|
63
69
|
c.value.forEach((l) => {
|
|
64
70
|
l.checked && a.push(l);
|
|
65
|
-
}),
|
|
71
|
+
}), n("update:modelValue", a), n("checkedGroup", o.groupId);
|
|
66
72
|
};
|
|
67
|
-
return
|
|
73
|
+
return x(
|
|
68
74
|
() => o.reset,
|
|
69
75
|
(e) => {
|
|
70
76
|
e && p();
|
|
@@ -74,9 +80,9 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
74
80
|
handleChange: i,
|
|
75
81
|
checkboxesData: e.checkboxData
|
|
76
82
|
}, () => [
|
|
77
|
-
|
|
83
|
+
D("div", {
|
|
78
84
|
id: e.groupId,
|
|
79
|
-
class:
|
|
85
|
+
class: E(["checkbox-group-container", e.$attrs.class || ""]),
|
|
80
86
|
"data-cy": e.dataCy
|
|
81
87
|
}, [
|
|
82
88
|
m(e.$slots, "checkbox_elements", {
|
|
@@ -85,10 +91,10 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
85
91
|
checkboxesData: e.checkboxData,
|
|
86
92
|
reset: p
|
|
87
93
|
}, () => [
|
|
88
|
-
e.checkboxData ? (b(!0), A
|
|
94
|
+
e.checkboxData ? (b(!0), $(A, { key: 0 }, I(e.checkboxData, (a, l) => (b(), R(G, {
|
|
89
95
|
id: e.getKey(a),
|
|
90
96
|
key: l,
|
|
91
|
-
"data-cy": a.dataCy ?? `checkbox_${
|
|
97
|
+
"data-cy": a.dataCy ?? `checkbox_${K(L)(`${a.label}`)}`,
|
|
92
98
|
label: a.label,
|
|
93
99
|
inline: e.formCheckInline,
|
|
94
100
|
"model-value": d(a),
|
|
@@ -97,9 +103,9 @@ const w = ["id", "data-cy"], F = /* @__PURE__ */ x({
|
|
|
97
103
|
e.checkboxContainerClasses
|
|
98
104
|
],
|
|
99
105
|
onChange: i
|
|
100
|
-
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) :
|
|
106
|
+
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : B("", !0)
|
|
101
107
|
])
|
|
102
|
-
], 10,
|
|
108
|
+
], 10, N)
|
|
103
109
|
]);
|
|
104
110
|
}
|
|
105
111
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as k, useId as m, computed as c, createElementBlock as
|
|
2
|
-
const C = ["id", "name", "checked"],
|
|
1
|
+
import { defineComponent as k, useId as m, computed as c, createElementBlock as f, openBlock as p, withModifiers as l, createElementVNode as n, normalizeClass as s, createTextVNode as b, toDisplayString as h } from "vue";
|
|
2
|
+
const C = ["id", "name", "checked"], V = ["for"], y = /* @__PURE__ */ k({
|
|
3
3
|
__name: "RadioButton",
|
|
4
4
|
props: {
|
|
5
5
|
id: {},
|
|
@@ -20,7 +20,7 @@ const C = ["id", "name", "checked"], g = ["for"], v = /* @__PURE__ */ k({
|
|
|
20
20
|
};
|
|
21
21
|
o("change", e), o("update:modelValue", !i.modelValue);
|
|
22
22
|
};
|
|
23
|
-
return (e, t) => (
|
|
23
|
+
return (e, t) => (p(), f("div", {
|
|
24
24
|
class: "uikit-inline-block",
|
|
25
25
|
onClick: l(r, ["stop"])
|
|
26
26
|
}, [
|
|
@@ -37,22 +37,22 @@ const C = ["id", "name", "checked"], g = ["for"], v = /* @__PURE__ */ k({
|
|
|
37
37
|
}, ["prevent"]))
|
|
38
38
|
}, null, 40, C),
|
|
39
39
|
n("label", {
|
|
40
|
-
class: s([e.labelClasses, "uikit-
|
|
40
|
+
class: s([e.labelClasses, "uikit-flex uikit-cursor-pointer uikit-items-center uikit-text-sm"]),
|
|
41
41
|
for: u.value
|
|
42
42
|
}, [
|
|
43
43
|
n("span", {
|
|
44
|
-
class: s(["uikit-flex-no-shrink uikit-inline-block uikit-
|
|
44
|
+
class: s(["uikit-flex-no-shrink uikit-mr-2 uikit-inline-block uikit-h-4 uikit-w-4 uikit-transform uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-secondary uikit-transition-colors uikit-duration-200", [
|
|
45
45
|
{
|
|
46
|
-
"checked uikit-border-w-
|
|
46
|
+
"checked uikit-border-w-primary uikit-bg-w-primary uikit-shadow-[0_0_0_2px_white_inset]": e.modelValue
|
|
47
47
|
},
|
|
48
48
|
e.inputClasses
|
|
49
49
|
]])
|
|
50
50
|
}, null, 2),
|
|
51
|
-
|
|
52
|
-
], 10,
|
|
51
|
+
b(" " + h(e.label), 1)
|
|
52
|
+
], 10, V)
|
|
53
53
|
]));
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
export {
|
|
57
|
-
|
|
57
|
+
y as default
|
|
58
58
|
};
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { defineComponent as i, createElementBlock as s, openBlock as l,
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as i, createElementBlock as s, openBlock as l, normalizeClass as t, createElementVNode as r, renderSlot as a } from "vue";
|
|
2
|
+
const m = /* @__PURE__ */ i({
|
|
3
3
|
inheritAttrs: !1,
|
|
4
4
|
__name: "BaseShimmerLoader",
|
|
5
5
|
props: {
|
|
6
6
|
shimmerClasses: { default: "" }
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
return (e,
|
|
10
|
-
class: t(["uikit-
|
|
11
|
-
style: r(e.$attrs.style)
|
|
8
|
+
setup(o) {
|
|
9
|
+
return (e, u) => (l(), s("div", {
|
|
10
|
+
class: t(["uikit-relative uikit-overflow-hidden uikit-bg-w-lavender", e.$attrs.class])
|
|
12
11
|
}, [
|
|
13
|
-
|
|
12
|
+
r("div", {
|
|
14
13
|
class: t(["shimmer uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-top-0 uikit-h-full -uikit-translate-x-full", e.shimmerClasses])
|
|
15
14
|
}, null, 2),
|
|
16
|
-
|
|
17
|
-
],
|
|
15
|
+
a(e.$slots, "default", {}, void 0, !0)
|
|
16
|
+
], 2));
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
m as default
|
|
22
21
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent as i, createElementBlock as n, openBlock as r, Fragment as s, renderList as l, createBlock as
|
|
2
|
-
import u from "
|
|
3
|
-
|
|
4
|
-
const k = /* @__PURE__ */ i({
|
|
1
|
+
import { defineComponent as i, createElementBlock as n, openBlock as r, Fragment as s, renderList as l, createBlock as a, normalizeStyle as m, normalizeClass as o } from "vue";
|
|
2
|
+
import u from "../../../../../UIKit/ShimmerLoader/BaseShimmerLoader.js";
|
|
3
|
+
const c = /* @__PURE__ */ i({
|
|
5
4
|
__name: "ShimmerMultiLine",
|
|
6
5
|
props: {
|
|
7
6
|
lines: { default: 1 },
|
|
@@ -10,21 +9,21 @@ const k = /* @__PURE__ */ i({
|
|
|
10
9
|
inheritHeight: { type: Boolean, default: !1 }
|
|
11
10
|
},
|
|
12
11
|
setup(h) {
|
|
13
|
-
return (e,
|
|
14
|
-
key: `sml-${t}`,
|
|
12
|
+
return (e, d) => (r(!0), n(s, null, l(e.lines, (t) => (r(), a(u, {
|
|
15
13
|
ref_for: !0,
|
|
16
14
|
ref: "shimmerLines",
|
|
17
15
|
class: o(["shimmer-line", [
|
|
18
16
|
e.shimmerClasses,
|
|
19
|
-
e.inheritHeight ? "uikit-h-[1em]" : "uikit-h-
|
|
20
|
-
"uikit-mb-
|
|
17
|
+
e.inheritHeight ? "uikit-h-[1em]" : "uikit-h-8",
|
|
18
|
+
"uikit-mb-2 uikit-rounded-xs"
|
|
21
19
|
]]),
|
|
22
|
-
|
|
20
|
+
key: `sml-${t}`,
|
|
21
|
+
style: m({
|
|
23
22
|
marginRight: e.randomLength ? `${Math.round(Math.random() * 5) * 10}%` : 0
|
|
24
23
|
})
|
|
25
24
|
}, null, 8, ["class", "style"]))), 128));
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
export {
|
|
29
|
-
|
|
28
|
+
c as default
|
|
30
29
|
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as V, mergeModels as L, useCssVars as T, ref as m, useTemplateRef as y, useModel as E, watch as S, onMounted as C, createElementBlock as X, openBlock as $, createElementVNode as d, withModifiers as B } from "vue";
|
|
2
|
+
const D = ["aria-valuemin", "aria-valuemax", "aria-valuenow"], P = /* @__PURE__ */ V({
|
|
3
|
+
__name: "SimpleSlider",
|
|
4
|
+
props: /* @__PURE__ */ L({
|
|
5
|
+
min: { default: 0 },
|
|
6
|
+
max: { default: 100 },
|
|
7
|
+
step: { default: 1 },
|
|
8
|
+
dataCy: {},
|
|
9
|
+
logarithmic: { type: Boolean, default: !1 }
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: { default: 0 },
|
|
12
|
+
modelModifiers: {}
|
|
13
|
+
}),
|
|
14
|
+
emits: ["update:modelValue"],
|
|
15
|
+
setup(t) {
|
|
16
|
+
T((i) => ({
|
|
17
|
+
"0f43c897": r.value,
|
|
18
|
+
ec9c737a: s.value
|
|
19
|
+
}));
|
|
20
|
+
const u = y("customSlider"), l = E(t, "modelValue"), o = m(!1), s = m("50%"), r = m("50%"), c = (i = 0) => {
|
|
21
|
+
const e = t.logarithmic ? b(i) : k(i), a = (e - t.min) / (t.max - t.min), f = t.logarithmic ? h(e) : a * 100;
|
|
22
|
+
l.value = Math.round(e), s.value = `${Math.round(f)}%`, r.value = t.logarithmic ? `${Math.round(h(e))}%` : `${a * 100}%`;
|
|
23
|
+
}, k = (i = 0) => {
|
|
24
|
+
const e = Math.round((i - t.min) / t.step) * t.step + t.min;
|
|
25
|
+
return Math.max(t.min, Math.min(t.max, e));
|
|
26
|
+
}, x = (i = 0) => {
|
|
27
|
+
const e = Math.log10(t.min), a = Math.log10(t.max);
|
|
28
|
+
return Math.pow(10, e + i / 100 * (a - e));
|
|
29
|
+
}, h = (i = 0) => {
|
|
30
|
+
const e = Math.log10(t.min), a = Math.log10(t.max);
|
|
31
|
+
return (Math.log10(i) - e) / (a - e) * 100;
|
|
32
|
+
}, b = (i = 0) => {
|
|
33
|
+
if (t.step === 1)
|
|
34
|
+
return Math.max(t.min, Math.min(t.max, i));
|
|
35
|
+
const e = Math.pow(
|
|
36
|
+
10,
|
|
37
|
+
Math.round(Math.log10(i) / Math.log10(t.step)) * Math.log10(t.step)
|
|
38
|
+
);
|
|
39
|
+
return Math.max(t.min, Math.min(t.max, e));
|
|
40
|
+
}, v = (i) => {
|
|
41
|
+
if (!o.value || !u.value) return;
|
|
42
|
+
const e = u.value.getBoundingClientRect(), a = u.value.offsetWidth;
|
|
43
|
+
let n = ("touches" in i ? i.touches[0].clientX : i.clientX) - e.left;
|
|
44
|
+
n = Math.max(0, Math.min(a, n));
|
|
45
|
+
const w = t.logarithmic ? x(n / a * 100) : n / a * (t.max - t.min) + t.min;
|
|
46
|
+
c(w);
|
|
47
|
+
}, M = () => {
|
|
48
|
+
o.value = !0;
|
|
49
|
+
}, g = () => {
|
|
50
|
+
o.value = !1;
|
|
51
|
+
};
|
|
52
|
+
return S(
|
|
53
|
+
l,
|
|
54
|
+
(i) => {
|
|
55
|
+
c(i);
|
|
56
|
+
},
|
|
57
|
+
{ immediate: !0 }
|
|
58
|
+
), C(() => {
|
|
59
|
+
document.addEventListener("mousemove", v), document.addEventListener("mouseup", g), document.addEventListener("touchmove", v, { passive: !0 }), document.addEventListener("touchend", g, { passive: !0 });
|
|
60
|
+
}), (i, e) => ($(), X("div", null, [
|
|
61
|
+
d("div", {
|
|
62
|
+
ref: "customSlider",
|
|
63
|
+
class: "uikit-relative uikit-my-20px uikit-h-1 uikit-rounded-2xs uikit-bg-w-secondary",
|
|
64
|
+
role: "slider",
|
|
65
|
+
"aria-valuemin": i.min,
|
|
66
|
+
"aria-valuemax": i.max,
|
|
67
|
+
"aria-valuenow": l.value,
|
|
68
|
+
tabindex: "0"
|
|
69
|
+
}, [
|
|
70
|
+
e[2] || (e[2] = d("div", { class: "slider-track uikit-absolute uikit-left-0 uikit-top-0 uikit-h-full uikit-rounded-2xs uikit-bg-w-primary" }, null, -1)),
|
|
71
|
+
d("div", {
|
|
72
|
+
class: "slider-thumb uikit-absolute -uikit-top-2 uikit-size-20px -uikit-translate-x-1/2 uikit-cursor-pointer uikit-rounded-full uikit-border-2 uikit-border-solid uikit-border-w-primary uikit-bg-white",
|
|
73
|
+
onMousedown: e[0] || (e[0] = (a) => M()),
|
|
74
|
+
onTouchstart: e[1] || (e[1] = B((a) => M(), ["prevent"]))
|
|
75
|
+
}, null, 32)
|
|
76
|
+
], 8, D)
|
|
77
|
+
]));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
P as default
|
|
82
|
+
};
|