@wikicasa-dev/components 2.6.13 → 2.6.14-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/UIKit/AccessibleSelect.js +5 -5
- package/dist/UIKit/AccessibleSelect.vue.js +217 -205
- package/dist/UIKit/Accordion/AccordionContentPrimitive.js +5 -4
- package/dist/UIKit/Accordion/AccordionContentPrimitive.vue.js +19 -21
- package/dist/UIKit/Accordion/AccordionHeaderPrimitive.js +5 -4
- package/dist/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +18 -20
- package/dist/UIKit/Accordion/AccordionItemPrimitive.js +5 -4
- package/dist/UIKit/Accordion/AccordionItemPrimitive.vue.js +21 -23
- package/dist/UIKit/Accordion/AccordionTriggerPrimitive.js +5 -4
- package/dist/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +19 -21
- package/dist/UIKit/Accordion/BaseAccordion.js +5 -4
- package/dist/UIKit/Accordion/BaseAccordion.vue.js +38 -36
- package/dist/UIKit/Accordion/BaseAccordionItem.js +5 -5
- package/dist/UIKit/Accordion/BaseAccordionItem.vue.js +64 -81
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +5 -5
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.vue.js +232 -226
- package/dist/UIKit/BaseAlert.js +5 -5
- package/dist/UIKit/BaseAlert.vue.js +14 -18
- package/dist/UIKit/BaseAutocomplete.js +5 -5
- package/dist/UIKit/BaseAutocomplete.vue.js +197 -194
- package/dist/UIKit/BaseBadge.js +5 -5
- package/dist/UIKit/BaseBadge.vue.js +17 -17
- package/dist/UIKit/BaseBreadcrumb.js +5 -4
- package/dist/UIKit/BaseBreadcrumb.vue.js +39 -56
- package/dist/UIKit/BaseButton.js +5 -4
- package/dist/UIKit/BaseButton.vue.js +93 -87
- package/dist/UIKit/BaseComplexToggle.js +5 -6
- package/dist/UIKit/BaseComplexToggle.vue.js +87 -105
- package/dist/UIKit/BaseDropDown.js +5 -5
- package/dist/UIKit/BaseDropDown.vue.js +171 -152
- package/dist/UIKit/BaseFloatingLabel.js +6 -7
- package/dist/UIKit/BaseFloatingLabel.vue.js +43 -39
- package/dist/UIKit/BaseInput.js +6 -7
- package/dist/UIKit/BaseInput.vue.js +191 -210
- package/dist/UIKit/BaseModal.js +5 -5
- package/dist/UIKit/BaseModal.vue.js +160 -169
- package/dist/UIKit/BasePagination.js +5 -4
- package/dist/UIKit/BasePagination.vue.js +192 -229
- package/dist/UIKit/BaseSelect/SelectItem.js +5 -4
- package/dist/UIKit/BaseSelect/SelectItem.vue.js +34 -41
- package/dist/UIKit/BaseSlider.js +6 -7
- package/dist/UIKit/BaseSlider.vue.js +153 -203
- package/dist/UIKit/BaseSnackbar.js +5 -5
- package/dist/UIKit/BaseSnackbar.vue.js +144 -146
- package/dist/UIKit/BaseTextarea.js +5 -6
- package/dist/UIKit/BaseTextarea.vue.js +118 -126
- package/dist/UIKit/BaseToggle.js +5 -4
- package/dist/UIKit/BaseToggle.vue.js +37 -38
- package/dist/UIKit/BaseTooltip.js +6 -7
- package/dist/UIKit/BaseTooltip.vue.js +31 -40
- package/dist/UIKit/BaseUploadFile.js +5 -4
- package/dist/UIKit/BaseUploadFile.vue.js +63 -70
- package/dist/UIKit/Card/BaseCard.js +5 -5
- package/dist/UIKit/Card/BaseCard.vue.js +23 -36
- package/dist/UIKit/Card/CardDescriptionPrimitive.js +9 -11
- package/dist/UIKit/Card/CardImagePrimitive.js +5 -4
- package/dist/UIKit/Card/CardImagePrimitive.vue.js +11 -15
- package/dist/UIKit/Card/CardRootPrimitive.js +5 -5
- package/dist/UIKit/Card/CardRootPrimitive.vue.js +22 -26
- package/dist/UIKit/Card/type.js +4 -4
- package/dist/UIKit/Checkbox/CheckboxBtn.js +5 -5
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.js +76 -81
- package/dist/UIKit/Checkbox/CheckboxGroup.js +5 -4
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.js +137 -116
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.js +5 -4
- package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js +71 -77
- package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.js +5 -4
- package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +32 -34
- package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.js +5 -4
- package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +32 -34
- package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.js +5 -4
- package/dist/UIKit/ProgressBar/ProgressIndicatorPrimitive.vue.js +15 -15
- package/dist/UIKit/ProgressBar/ProgressRootPrimitive.js +5 -4
- package/dist/UIKit/ProgressBar/ProgressRootPrimitive.vue.js +29 -31
- package/dist/UIKit/Radio/RadioButton.js +5 -4
- package/dist/UIKit/Radio/RadioButton.vue.js +51 -59
- package/dist/UIKit/Radio/RadioGroup.js +5 -4
- package/dist/UIKit/Radio/RadioGroup.vue.js +67 -63
- package/dist/UIKit/Radio/v2/RadioButtonGroup.js +5 -4
- package/dist/UIKit/Radio/v2/RadioButtonGroup.vue.js +38 -47
- package/dist/UIKit/Radio/v2/RadioButtonItem.js +5 -5
- package/dist/UIKit/Radio/v2/RadioButtonItem.vue.js +42 -44
- package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.js +5 -4
- package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +28 -30
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +6 -7
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js +19 -19
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.js +5 -4
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js +41 -30
- package/dist/UIKit/Slider/SimpleSlider.js +6 -7
- package/dist/UIKit/Slider/SimpleSlider.vue.js +74 -81
- package/dist/UIKit/StaticSpinner.js +6 -7
- package/dist/UIKit/StaticSpinner.vue.js +24 -26
- package/dist/UIKit/Tab/BaseTab.js +5 -4
- package/dist/UIKit/Tab/BaseTab.vue.js +14 -14
- package/dist/UIKit/Tab/BaseTabList.js +5 -4
- package/dist/UIKit/Tab/BaseTabList.vue.js +45 -44
- package/dist/UIKit/Tab/BaseTabPanel.js +5 -4
- package/dist/UIKit/Tab/BaseTabPanel.vue.js +27 -24
- package/dist/UIKit/Tab/BaseTabView.js +5 -4
- package/dist/UIKit/Tab/BaseTabView.vue.js +107 -105
- package/dist/UIKit/Tab/v2/BaseTabs.js +5 -5
- package/dist/UIKit/Tab/v2/BaseTabs.vue.js +34 -38
- package/dist/UIKit/Tab/v2/BaseTabsContent.js +5 -4
- package/dist/UIKit/Tab/v2/BaseTabsContent.vue.js +21 -23
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.js +5 -5
- package/dist/UIKit/Tab/v2/BaseTabsIndicator.vue.js +24 -33
- package/dist/UIKit/Tab/v2/BaseTabsList.js +5 -4
- package/dist/UIKit/Tab/v2/BaseTabsList.vue.js +20 -22
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.js +5 -4
- package/dist/UIKit/Tab/v2/BaseTabsTrigger.vue.js +21 -30
- package/dist/UIKit/types.js +0 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +7 -8
- package/dist/assets/AccessibleSelect.css +1 -1
- package/dist/assets/BaseAccordionItem.css +1 -1
- package/dist/assets/BaseAutocomplete.css +1 -1
- package/dist/assets/BaseBadge.css +1 -1
- package/dist/assets/BaseComplexToggle2.css +1 -1
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/BaseFloatingLabel2.css +1 -1
- package/dist/assets/BaseInput2.css +1 -1
- package/dist/assets/BaseShimmerLoader.css +1 -1
- package/dist/assets/BaseSlider2.css +1 -1
- package/dist/assets/BaseSnackbar.css +1 -1
- package/dist/assets/BaseTabs.css +1 -1
- package/dist/assets/BaseTextarea2.css +1 -1
- package/dist/assets/BaseTooltip2.css +1 -1
- package/dist/assets/CheckboxBtn.css +1 -1
- package/dist/assets/ClearableAutocomplete.css +1 -1
- package/dist/assets/RadioButtonItem.css +1 -1
- package/dist/assets/StaticSpinner.css +1 -1
- package/dist/assets/SwiperCarousel.css +1 -1
- package/dist/assets/baseAlert.css +1 -1
- package/dist/assets/baseCard.css +1 -1
- package/dist/assets/baseComplexToggle.css +1 -1
- package/dist/assets/baseFloatingLabel.css +1 -1
- package/dist/assets/baseInput.css +1 -1
- package/dist/assets/baseModal.css +1 -1
- package/dist/assets/baseSlider.css +1 -1
- package/dist/assets/baseSpinner.css +1 -1
- package/dist/assets/baseTextarea.css +1 -1
- package/dist/assets/baseTooltip.css +1 -1
- package/dist/assets/swiper-free-mode.css +1 -1
- package/dist/assets/swiper-navigation.css +1 -1
- package/dist/assets/swiper-pagination.css +1 -1
- package/dist/assets/swiper-swiper.css +1 -1
- package/dist/assets/swiper-thumbs.css +1 -0
- package/dist/assets/swiper-zoom.css +1 -1
- package/dist/assets/swiperPaginationBullet.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/chart/DoughnutChart.js +5 -4
- package/dist/chart/DoughnutChart.vue.js +25 -25
- package/dist/chart/LineChart.js +5 -4
- package/dist/chart/LineChart.vue.js +27 -29
- package/dist/components/IntersectionObserver/IntersectionObservable.js +5 -4
- package/dist/components/IntersectionObserver/IntersectionObservable.vue.js +24 -23
- package/dist/components/IntersectionObserver/IntersectionObserver.js +5 -4
- package/dist/components/IntersectionObserver/IntersectionObserver.vue.js +55 -49
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.js +5 -4
- package/dist/components/IntersectionObserver/v2/IntersectionObserverProvider.vue.js +43 -38
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.js +5 -4
- package/dist/components/IntersectionObserver/v2/IntersectionObserverTarget.vue.js +27 -30
- package/dist/components/IntersectionObserver/v2/types.js +4 -6
- package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.js +5 -4
- package/dist/components/carousel/Primitive/SwiperNavigationPrimitive.vue.js +30 -38
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.js +5 -4
- package/dist/components/carousel/Primitive/SwiperPaginationPrimitive.vue.js +28 -32
- package/dist/components/carousel/Primitive/SwiperPrimitive.js +5 -4
- package/dist/components/carousel/Primitive/SwiperPrimitive.vue.js +16 -20
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.js +5 -10
- package/dist/components/carousel/Primitive/SwiperRootPrimitive.vue.js +82 -112
- package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.js +5 -5
- package/dist/components/carousel/Primitive/SwiperSlideImagePrimitive.vue.js +44 -39
- package/dist/components/carousel/SwiperCarousel.js +6 -7
- package/dist/components/carousel/SwiperCarousel.vue.js +195 -229
- package/dist/components/carousel/SwiperSlide.js +9 -13
- package/dist/composables/mock.js +50 -48
- package/dist/composables/useFloatingLabel.js +32 -32
- package/dist/composables/useValidator.js +5 -7
- package/dist/index.js +67 -150
- package/dist/lazyModules/ChartJs/Chart.js +2 -4
- package/dist/lazyModules/ChartJs/DoughnutChart/core.js +5 -6
- package/dist/lazyModules/ChartJs/LineChart/cartesian.js +5 -6
- package/dist/lazyModules/ChartJs/LineChart/core.js +5 -6
- package/dist/lazyModules/ChartJs/Plugins/Legend.js +4 -2
- package/dist/lazyModules/ChartJs/Plugins/TimeScale.js +4 -2
- package/dist/lazyModules/ChartJs/Plugins/Title.js +4 -2
- package/dist/lazyModules/ChartJs/Plugins/Tooltip.js +4 -2
- package/dist/lazyModules/Swiper/Autoplay/factory.js +6 -8
- package/dist/lazyModules/Swiper/Autoplay/index.js +3 -6
- package/dist/lazyModules/Swiper/Controller/factory.js +6 -6
- package/dist/lazyModules/Swiper/Controller/index.js +3 -6
- package/dist/lazyModules/Swiper/FreeMode/factory.js +6 -8
- package/dist/lazyModules/Swiper/FreeMode/index.js +3 -6
- package/dist/lazyModules/Swiper/Keyboard/factory.js +6 -8
- package/dist/lazyModules/Swiper/Keyboard/index.js +3 -6
- package/dist/lazyModules/Swiper/Navigation/factory.js +6 -8
- package/dist/lazyModules/Swiper/Navigation/index.js +3 -6
- package/dist/lazyModules/Swiper/Pagination/factory.js +6 -6
- package/dist/lazyModules/Swiper/Pagination/index.js +3 -6
- package/dist/lazyModules/Swiper/Thumbs/factory.js +6 -6
- package/dist/lazyModules/Swiper/Thumbs/index.js +3 -6
- package/dist/lazyModules/Swiper/Zoom/factory.js +6 -8
- package/dist/lazyModules/Swiper/Zoom/index.js +3 -6
- package/dist/lazyModules/Swiper/factory.js +9 -12
- package/dist/lazyModules/Swiper/index.js +2 -4
- package/dist/lazyModules/Swiper/swiper-css.d.js +0 -1
- package/dist/lazyModules/Swiper/types.js +0 -1
- package/dist/lazyModules/VueChartJs/Doughnut/factory.js +8 -11
- package/dist/lazyModules/VueChartJs/Doughnut/index.js +2 -5
- package/dist/lazyModules/VueChartJs/Line/factory.js +8 -13
- package/dist/lazyModules/VueChartJs/Line/index.js +2 -5
- package/dist/types/index.js +0 -1
- package/dist/types.js +0 -1
- package/dist/utils.js +4 -5
- package/package.json +8 -8
|
@@ -1,82 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
z(S(e.label), 1)
|
|
76
|
-
])
|
|
77
|
-
], 512));
|
|
78
|
-
}
|
|
1
|
+
import { createBlock as e, createCommentVNode as t, createElementBlock as n, createTextVNode as r, createVNode as i, defineComponent as a, inject as o, mergeModels as s, normalizeClass as c, onMounted as l, onUnmounted as u, openBlock as d, renderSlot as f, toDisplayString as p, unref as m, useId as h, useModel as g, useTemplateRef as _, watch as v, withCtx as y } from "vue";
|
|
2
|
+
import { CheckboxIndicator as b, CheckboxRoot as x } from "reka-ui";
|
|
3
|
+
import { CheckIcon as S } from "@wikicasa-dev/svg-icons";
|
|
4
|
+
import '../../assets/CheckboxBtn.css';//#region lib/UIKit/Checkbox/CheckboxBtn.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var C = /*@__PURE__*/ a({
|
|
6
|
+
__name: "CheckboxBtn",
|
|
7
|
+
props: /*@__PURE__*/ s({
|
|
8
|
+
id: {},
|
|
9
|
+
dataCy: {},
|
|
10
|
+
disabled: { type: Boolean },
|
|
11
|
+
checked: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: () => void 0
|
|
14
|
+
},
|
|
15
|
+
required: { type: Boolean },
|
|
16
|
+
inputClass: {},
|
|
17
|
+
label: { default: "" },
|
|
18
|
+
value: {}
|
|
19
|
+
}, {
|
|
20
|
+
modelValue: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !1
|
|
23
|
+
},
|
|
24
|
+
modelModifiers: {}
|
|
25
|
+
}),
|
|
26
|
+
emits: /*@__PURE__*/ s(["click", "change"], ["update:modelValue"]),
|
|
27
|
+
setup(a, { expose: s, emit: C }) {
|
|
28
|
+
let w = h(), T = _("root"), E = _("checkboxRoot"), D = g(a, "modelValue"), O = C;
|
|
29
|
+
v(() => a.checked, (e) => {
|
|
30
|
+
e !== void 0 && (D.value = e);
|
|
31
|
+
});
|
|
32
|
+
let k = (e) => {
|
|
33
|
+
e !== "indeterminate" && (O("change", {
|
|
34
|
+
id: a.id ?? w,
|
|
35
|
+
label: a.label,
|
|
36
|
+
checked: e
|
|
37
|
+
}), D.value = e);
|
|
38
|
+
}, A = o("addItem", void 0), j = o("removeItem", void 0);
|
|
39
|
+
return l(() => {
|
|
40
|
+
A?.(a.value, T.value);
|
|
41
|
+
}), u(() => {
|
|
42
|
+
j?.(a.value);
|
|
43
|
+
}), s({
|
|
44
|
+
getRootElement: () => T.value,
|
|
45
|
+
getCheckboxElement: () => E.value?.$el
|
|
46
|
+
}), (o, s) => (d(), n("label", {
|
|
47
|
+
ref: "root",
|
|
48
|
+
class: "uikit-checkbox-btn uikit-flex uikit-items-center uikit-gap-[12px]",
|
|
49
|
+
onClick: s[0] ||= (e) => O("click", e)
|
|
50
|
+
}, [i(m(x), {
|
|
51
|
+
ref: "checkboxRoot",
|
|
52
|
+
"model-value": D.value,
|
|
53
|
+
"data-cy": a.dataCy,
|
|
54
|
+
disabled: a.disabled,
|
|
55
|
+
class: c(["uikit-inline-flex uikit-size-[20px] uikit-shrink-0 uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray data-[state='checked']:uikit-bg-w-primary data-[state='unchecked']:uikit-bg-white", a.inputClass]),
|
|
56
|
+
"onUpdate:modelValue": k
|
|
57
|
+
}, {
|
|
58
|
+
default: y(() => [i(m(b), { class: "uikit-flex" }, {
|
|
59
|
+
default: y(() => [D.value === !0 ? (d(), e(m(S), {
|
|
60
|
+
key: 0,
|
|
61
|
+
"fill-color": "#fff",
|
|
62
|
+
width: 12,
|
|
63
|
+
height: 14
|
|
64
|
+
})) : t("", !0)]),
|
|
65
|
+
_: 1
|
|
66
|
+
})]),
|
|
67
|
+
_: 1
|
|
68
|
+
}, 8, [
|
|
69
|
+
"model-value",
|
|
70
|
+
"data-cy",
|
|
71
|
+
"disabled",
|
|
72
|
+
"class"
|
|
73
|
+
]), f(o.$slots, "label", {}, () => [r(p(a.label), 1)])], 512));
|
|
74
|
+
}
|
|
79
75
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
};
|
|
76
|
+
//#endregion
|
|
77
|
+
export { C as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./CheckboxGroup.vue.js";
|
|
2
|
+
//#region lib/UIKit/Checkbox/CheckboxGroup.vue
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|
|
@@ -1,117 +1,138 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
import e from "./CheckboxBtn.js";
|
|
2
|
+
import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, defineComponent as s, mergeModels as c, normalizeClass as l, openBlock as u, ref as d, renderList as f, renderSlot as p, unref as m, useModel as h, watch as g } from "vue";
|
|
3
|
+
import { isArrNullOrEmpty as _, stringToHyphened as v } from "@wikicasa-dev/utilities";
|
|
4
|
+
//#region lib/UIKit/Checkbox/CheckboxGroup.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var y = ["id", "data-cy"], b = /*@__PURE__*/ s({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "CheckboxGroup",
|
|
8
|
+
props: /*@__PURE__*/ c({
|
|
9
|
+
checkboxData: { default() {
|
|
10
|
+
return [];
|
|
11
|
+
} },
|
|
12
|
+
formCheckInline: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
reset: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: !1
|
|
19
|
+
},
|
|
20
|
+
checkboxContainerClasses: { default: "" },
|
|
21
|
+
autoCheckResetAll: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !1
|
|
24
|
+
},
|
|
25
|
+
autoCheckResetEmpty: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !1
|
|
28
|
+
},
|
|
29
|
+
manualToggleResetButton: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
getKey: {
|
|
34
|
+
type: Function,
|
|
35
|
+
default: (e) => typeof e == "string" || typeof e == "number" ? `${e}` : `${e.id}`
|
|
36
|
+
},
|
|
37
|
+
groupId: { default: "" },
|
|
38
|
+
dataCy: { default: "" }
|
|
39
|
+
}, {
|
|
40
|
+
refresh: {
|
|
41
|
+
type: Boolean,
|
|
42
|
+
default: !1
|
|
43
|
+
},
|
|
44
|
+
refreshModifiers: {}
|
|
45
|
+
}),
|
|
46
|
+
emits: /*@__PURE__*/ c([
|
|
47
|
+
"resetted",
|
|
48
|
+
"update:modelValue",
|
|
49
|
+
"checkedGroup"
|
|
50
|
+
], ["update:refresh"]),
|
|
51
|
+
setup(s, { emit: c }) {
|
|
52
|
+
let b = s, x = c, S = h(s, "refresh"), C = d(/* @__PURE__ */ new Map()), w = n(() => {
|
|
53
|
+
for (let e of b.checkboxData) if (e.reset) return e;
|
|
54
|
+
return null;
|
|
55
|
+
}), T = n(() => b.checkboxData.length), E = n(() => {
|
|
56
|
+
let e = 0;
|
|
57
|
+
return C.value.forEach((t) => {
|
|
58
|
+
t.checked && e++;
|
|
59
|
+
}), e;
|
|
60
|
+
}), D = () => {
|
|
61
|
+
let e = [], t = /* @__PURE__ */ new Map();
|
|
62
|
+
for (let n of b.checkboxData) t.set(`${n.id}`, {
|
|
63
|
+
...n,
|
|
64
|
+
checked: !!n.checked
|
|
65
|
+
}), n.checked && e.push(n);
|
|
66
|
+
C.value = t, x("update:modelValue", e);
|
|
67
|
+
};
|
|
68
|
+
D();
|
|
69
|
+
let O = (e, t) => {
|
|
70
|
+
let n = C.value.get(e);
|
|
71
|
+
if (n) {
|
|
72
|
+
if (t) {
|
|
73
|
+
C.value.set(e, {
|
|
74
|
+
...n,
|
|
75
|
+
...t
|
|
76
|
+
});
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
C.value.set(e, {
|
|
80
|
+
...n,
|
|
81
|
+
checked: !n.checked
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}, k = () => {
|
|
85
|
+
C.value.forEach((e) => {
|
|
86
|
+
e.checked = !1;
|
|
87
|
+
});
|
|
88
|
+
}, A = () => {
|
|
89
|
+
k(), x("update:modelValue", []), x("resetted");
|
|
90
|
+
}, j = (e) => C.value.get(b.getKey(e))?.checked ?? !1, M = (e) => {
|
|
91
|
+
if (_(b.checkboxData)) return;
|
|
92
|
+
let t = C.value.get(e.id);
|
|
93
|
+
t?.reset && e.checked ? k() : w.value && !t?.reset && O(b.getKey(w.value), { checked: !1 }), O(`${e.id}`), b.autoCheckResetAll && w.value && E.value === T.value - 1 && C.value.forEach((e) => {
|
|
94
|
+
e.checked = !!e.reset;
|
|
95
|
+
}), b.autoCheckResetEmpty && w.value && !E.value && (!b.manualToggleResetButton || !t?.reset) && O(b.getKey(w.value), { checked: !0 });
|
|
96
|
+
let n = [];
|
|
97
|
+
C.value.forEach((e) => {
|
|
98
|
+
e.checked && n.push(e);
|
|
99
|
+
}), x("update:modelValue", n), x("checkedGroup", b.groupId);
|
|
100
|
+
};
|
|
101
|
+
return g(() => b.reset, (e) => {
|
|
102
|
+
e && A();
|
|
103
|
+
}), g(S, (e) => {
|
|
104
|
+
e && (D(), S.value = !1);
|
|
105
|
+
}), (n, c) => p(n.$slots, "default", {
|
|
106
|
+
isActive: j,
|
|
107
|
+
handleChange: M,
|
|
108
|
+
checkboxesData: s.checkboxData
|
|
109
|
+
}, () => [o("div", {
|
|
110
|
+
id: s.groupId,
|
|
111
|
+
class: l(["checkbox-group-container", n.$attrs.class || ""]),
|
|
112
|
+
"data-cy": s.dataCy
|
|
113
|
+
}, [p(n.$slots, "checkbox_elements", {
|
|
114
|
+
isActive: j,
|
|
115
|
+
handleChange: M,
|
|
116
|
+
checkboxesData: s.checkboxData,
|
|
117
|
+
reset: A
|
|
118
|
+
}, () => [s.checkboxData ? (u(!0), a(t, { key: 0 }, f(s.checkboxData, (t, n) => (u(), r(e, {
|
|
119
|
+
id: s.getKey(t),
|
|
120
|
+
key: n,
|
|
121
|
+
"data-cy": t.dataCy ?? `checkbox_${m(v)(`${t.label}`)}`,
|
|
122
|
+
label: t.label,
|
|
123
|
+
inline: s.formCheckInline,
|
|
124
|
+
"model-value": j(t),
|
|
125
|
+
class: l([s.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px", s.checkboxContainerClasses]),
|
|
126
|
+
onChange: c[0] ||= (e) => M(e)
|
|
127
|
+
}, null, 8, [
|
|
128
|
+
"id",
|
|
129
|
+
"data-cy",
|
|
130
|
+
"label",
|
|
131
|
+
"inline",
|
|
132
|
+
"model-value",
|
|
133
|
+
"class"
|
|
134
|
+
]))), 128)) : i("", !0)])], 10, y)]);
|
|
135
|
+
}
|
|
114
136
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
137
|
+
//#endregion
|
|
138
|
+
export { b as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./CheckboxButtonGroup.vue.js";
|
|
2
|
+
//#region lib/UIKit/Checkbox/v2/CheckboxButtonGroup.vue
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|
|
@@ -1,78 +1,72 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
_: 2
|
|
71
|
-
}, 1032, ["required", "data-cy", "model-value", "onUpdate:modelValue"]))), 128))
|
|
72
|
-
])
|
|
73
|
-
], 8, w));
|
|
74
|
-
}
|
|
1
|
+
import e from "../CheckboxBtn.js";
|
|
2
|
+
import { Fragment as t, createBlock as n, createElementBlock as r, createTextVNode as i, defineComponent as a, mergeModels as o, openBlock as s, provide as c, renderList as l, renderSlot as u, toDisplayString as d, useModel as f, watch as p, withCtx as m } from "vue";
|
|
3
|
+
//#region lib/UIKit/Checkbox/v2/CheckboxButtonGroup.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var h = ["data-cy"], g = /*@__PURE__*/ a({
|
|
5
|
+
__name: "CheckboxButtonGroup",
|
|
6
|
+
props: /*@__PURE__*/ o({
|
|
7
|
+
dataCy: {},
|
|
8
|
+
items: { default: () => [] },
|
|
9
|
+
resetValue: {}
|
|
10
|
+
}, {
|
|
11
|
+
modelValue: { default: () => [] },
|
|
12
|
+
modelModifiers: {},
|
|
13
|
+
reset: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
resetModifiers: {}
|
|
18
|
+
}),
|
|
19
|
+
emits: ["update:modelValue", "update:reset"],
|
|
20
|
+
setup(a) {
|
|
21
|
+
let o = f(a, "modelValue"), g = f(a, "reset"), _ = /* @__PURE__ */ new Map(), v = (e) => e ? o.value.includes(e) : !1, y = (e, t) => {
|
|
22
|
+
if (!e) return;
|
|
23
|
+
let n = [];
|
|
24
|
+
if (n = t ? [...o.value, e] : o.value.filter((t) => t !== e), !a.resetValue) {
|
|
25
|
+
o.value = n;
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
n = n.filter((e) => e !== a.resetValue);
|
|
29
|
+
let r = Array.from(_.keys()).filter((e) => !n.includes(e));
|
|
30
|
+
console.log("DEBUG:handleCheck => update", {
|
|
31
|
+
registeredItems: _,
|
|
32
|
+
checkedList: n,
|
|
33
|
+
uncheckedList: r
|
|
34
|
+
}), r.length === _.size && (n = [a.resetValue], _.get(a.resetValue)?.focus?.()), n.length === _.size - 1 && (n = [a.resetValue], _.get(a.resetValue)?.focus?.()), o.value = n;
|
|
35
|
+
}, b = (e) => {
|
|
36
|
+
if (a.resetValue) {
|
|
37
|
+
if (console.log("DEBUG:handleResetCheck", { resetValue: a.resetValue }), e) {
|
|
38
|
+
o.value = [a.resetValue];
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
o.value = o.value.filter((e) => e !== a.resetValue);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return c("addItem", (e, t) => {
|
|
45
|
+
!e || !t || _.set(e, t);
|
|
46
|
+
}), c("removeItem", (e) => {
|
|
47
|
+
e && _.delete(e);
|
|
48
|
+
}), p(g, (e) => {
|
|
49
|
+
e && (o.value = [], g.value = !1);
|
|
50
|
+
}), (o, c) => (s(), r("div", { "data-cy": a.dataCy }, [u(o.$slots, "default", {
|
|
51
|
+
isChecked: v,
|
|
52
|
+
handleCheck: y,
|
|
53
|
+
handleResetCheck: b
|
|
54
|
+
}, () => [(s(!0), r(t, null, l(a.items, (t) => (s(), n(e, {
|
|
55
|
+
key: `checkbox-item-${t.value}`,
|
|
56
|
+
required: t.required,
|
|
57
|
+
"data-cy": t.dataCy,
|
|
58
|
+
"model-value": v(t.value),
|
|
59
|
+
"onUpdate:modelValue": (e) => y(t.value, e)
|
|
60
|
+
}, {
|
|
61
|
+
label: m(() => [i(d(t.label), 1)]),
|
|
62
|
+
_: 2
|
|
63
|
+
}, 1032, [
|
|
64
|
+
"required",
|
|
65
|
+
"data-cy",
|
|
66
|
+
"model-value",
|
|
67
|
+
"onUpdate:modelValue"
|
|
68
|
+
]))), 128))])], 8, h));
|
|
69
|
+
}
|
|
75
70
|
});
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { g as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./CheckboxGroupItemPrimitive.vue.js";
|
|
2
|
+
//#region lib/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|