@wikicasa-dev/components 2.2.9-alpha.61 → 2.2.9-alpha.63
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.
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { CheckboxRootProps, AcceptableValue } from 'reka-ui';
|
|
2
|
+
export interface CheckboxButtonGroupProps {
|
|
3
|
+
dataCy?: string;
|
|
4
|
+
items?: CheckboxButtonItem[];
|
|
5
|
+
/**
|
|
6
|
+
* Value of the reset button
|
|
7
|
+
*/
|
|
8
|
+
resetValue?: AcceptableValue;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckboxButtonItem {
|
|
11
|
+
dataCy?: string;
|
|
12
|
+
value: CheckboxRootProps["value"];
|
|
13
|
+
required?: boolean;
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
17
|
+
modelValue?: NonNullable<AcceptableValue>[];
|
|
18
|
+
reset?: boolean;
|
|
19
|
+
} & CheckboxButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: NonNullable<AcceptableValue>[]) => any;
|
|
21
|
+
"update:reset": (value: boolean) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
23
|
+
modelValue?: NonNullable<AcceptableValue>[];
|
|
24
|
+
reset?: boolean;
|
|
25
|
+
} & CheckboxButtonGroupProps> & Readonly<{
|
|
26
|
+
"onUpdate:modelValue"?: ((value: NonNullable<AcceptableValue>[]) => any) | undefined;
|
|
27
|
+
"onUpdate:reset"?: ((value: boolean) => any) | undefined;
|
|
28
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
29
|
+
default?(_: {
|
|
30
|
+
isChecked: (value: CheckboxRootProps["value"]) => boolean;
|
|
31
|
+
handleCheck: (value: CheckboxRootProps["value"], checked: boolean) => void;
|
|
32
|
+
handleResetCheck: () => void;
|
|
33
|
+
}): any;
|
|
34
|
+
}>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as BaseAccordionItem } from './UIKit/Accordion/BaseAccordionIte
|
|
|
5
5
|
export { default as SelectItem } from './UIKit/BaseSelect/SelectItem';
|
|
6
6
|
export { default as CheckboxBtn } from './UIKit/Checkbox/CheckboxBtn';
|
|
7
7
|
export { default as CheckboxGroup } from './UIKit/Checkbox/CheckboxGroup';
|
|
8
|
+
export { default as CheckboxButtonGroup } from './UIKit/Checkbox/v2/CheckboxButtonGroup';
|
|
8
9
|
export { default as BaseTabView } from './UIKit/Tab/BaseTabView';
|
|
9
10
|
export { default as BaseTab } from './UIKit/Tab/BaseTab';
|
|
10
11
|
export { default as RadioButton } from './UIKit/Radio/RadioButton';
|
package/dist/index.js
CHANGED
|
@@ -1,100 +1,102 @@
|
|
|
1
1
|
import { default as B } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
|
|
2
2
|
import { default as c } from "./packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
|
|
3
|
-
import { default as
|
|
3
|
+
import { default as S } from "./packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
|
|
4
4
|
import { default as g } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
|
|
5
5
|
import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseCard.css';import './assets/BaseBadge.css';import './assets/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/RadioButtonItem.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
|
|
6
|
-
import { default as
|
|
6
|
+
import { default as A } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
|
|
7
7
|
import { default as T } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as F } from "./packages/components/lib/UIKit/
|
|
13
|
-
import { default as O } from "./packages/components/lib/UIKit/Radio/
|
|
14
|
-
import { default as U } from "./packages/components/lib/UIKit/Radio/
|
|
15
|
-
import { default as j } from "./packages/components/lib/UIKit/Radio/v2/
|
|
9
|
+
import { default as w } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
|
|
10
|
+
import { default as L } from "./packages/components/lib/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js";
|
|
11
|
+
import { default as D } from "./packages/components/lib/UIKit/Tab/BaseTabView.vue.js";
|
|
12
|
+
import { default as F } from "./packages/components/lib/UIKit/Tab/BaseTab.vue.js";
|
|
13
|
+
import { default as O } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
|
|
14
|
+
import { default as U } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
|
|
15
|
+
import { default as j } from "./packages/components/lib/UIKit/Radio/v2/RadioButtonGroup.vue.js";
|
|
16
|
+
import { default as y } from "./packages/components/lib/UIKit/Radio/v2/RadioButtonItem.vue.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { default as
|
|
18
|
+
import { default as E } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
|
|
18
19
|
/* empty css */
|
|
19
|
-
import { default as
|
|
20
|
+
import { default as J } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
|
|
20
21
|
/* empty css */
|
|
21
|
-
import { default as
|
|
22
|
+
import { default as N } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
|
|
22
23
|
/* empty css */
|
|
23
|
-
import { default as
|
|
24
|
+
import { default as W } from "./packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js";
|
|
24
25
|
/* empty css */
|
|
25
|
-
import { default as
|
|
26
|
+
import { default as Y } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
26
27
|
/* empty css */
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
28
|
+
import { default as _ } from "./packages/components/lib/UIKit/BaseButton.vue.js";
|
|
29
|
+
import { default as ee } from "./packages/components/lib/UIKit/BaseCard.vue.js";
|
|
29
30
|
/* empty css */
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
31
|
+
import { default as ae } from "./UIKit/BaseComplexToggle.js";
|
|
32
|
+
import { default as re } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
|
|
32
33
|
/* empty css */
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
34
|
+
import { default as se } from "./UIKit/BaseFloatingLabel.js";
|
|
35
|
+
import { default as le } from "./UIKit/BaseInput.js";
|
|
36
|
+
import { default as de } from "./packages/components/lib/UIKit/BasePagination.vue.js";
|
|
37
|
+
import { default as xe } from "./UIKit/BaseSlider.js";
|
|
38
|
+
import { default as Be } from "./UIKit/BaseTextarea.js";
|
|
39
|
+
import { default as ce } from "./UIKit/BaseToggle.js";
|
|
40
|
+
import { default as Se } from "./UIKit/BaseTooltip.js";
|
|
41
|
+
import { default as ge } from "./packages/components/lib/UIKit/BaseUploadFile.vue.js";
|
|
42
|
+
import { default as Ae } from "./packages/components/lib/UIKit/BaseModal.vue.js";
|
|
42
43
|
/* empty css */
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
44
|
+
import { default as Te } from "./UIKit/StaticSpinner.js";
|
|
45
|
+
import { default as we } from "./UIKit/ShimmerLoader/BaseShimmerLoader.js";
|
|
45
46
|
import { default as Le } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
47
|
+
import { default as De } from "./packages/components/lib/chart/DoughnutChart.vue.js";
|
|
48
|
+
import { default as Fe } from "./packages/components/lib/chart/LineChart.vue.js";
|
|
49
|
+
import { default as Oe } from "./UIKit/Slider/SimpleSlider.js";
|
|
50
|
+
import { default as Ue } from "./packages/components/lib/UIKit/BaseSnackbar.vue.js";
|
|
50
51
|
/* empty css */
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
54
|
-
import { default as
|
|
55
|
-
import { default as
|
|
52
|
+
import { default as je } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
|
|
53
|
+
import { default as ye } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
|
|
54
|
+
import { default as Ee } from "./components/carousel/SwiperCarousel.js";
|
|
55
|
+
import { default as Je } from "./components/carousel/SwiperSlide.js";
|
|
56
|
+
import { default as Ne } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
|
|
56
57
|
export {
|
|
57
|
-
|
|
58
|
+
E as AccessibleSelect,
|
|
58
59
|
B as BaseAccordion,
|
|
59
60
|
c as BaseAccordionBtn,
|
|
60
|
-
|
|
61
|
+
S as BaseAccordionContent,
|
|
61
62
|
g as BaseAccordionItem,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
J as BaseAlert,
|
|
64
|
+
N as BaseAutocomplete,
|
|
65
|
+
Y as BaseBadge,
|
|
66
|
+
Ne as BaseBreadcrumb,
|
|
67
|
+
_ as BaseButton,
|
|
68
|
+
ee as BaseCard,
|
|
69
|
+
ae as BaseComplexToggle,
|
|
70
|
+
re as BaseDropDown,
|
|
71
|
+
se as BaseFloatingLabel,
|
|
72
|
+
le as BaseInput,
|
|
73
|
+
Ae as BaseModal,
|
|
74
|
+
de as BasePagination,
|
|
75
|
+
we as BaseShimmerLoader,
|
|
76
|
+
xe as BaseSlider,
|
|
77
|
+
Ue as BaseSnackbar,
|
|
78
|
+
F as BaseTab,
|
|
79
|
+
D as BaseTabView,
|
|
80
|
+
Be as BaseTextarea,
|
|
81
|
+
ce as BaseToggle,
|
|
82
|
+
Se as BaseTooltip,
|
|
83
|
+
ge as BaseUploadFile,
|
|
83
84
|
T as CheckboxBtn,
|
|
84
|
-
L as
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
je as
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
j as
|
|
93
|
-
|
|
94
|
-
|
|
85
|
+
L as CheckboxButtonGroup,
|
|
86
|
+
w as CheckboxGroup,
|
|
87
|
+
W as ClearableAutocomplete,
|
|
88
|
+
De as DoughnutChart,
|
|
89
|
+
je as IntersectionObservable,
|
|
90
|
+
ye as IntersectionObserver,
|
|
91
|
+
Fe as LineChart,
|
|
92
|
+
O as RadioButton,
|
|
93
|
+
j as RadioButtonGroup,
|
|
94
|
+
y as RadioButtonItem,
|
|
95
|
+
U as RadioGroup,
|
|
96
|
+
A as SelectItem,
|
|
95
97
|
Le as ShimmerMultiLine,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
Oe as SimpleSlider,
|
|
99
|
+
Te as StaticSpinner,
|
|
100
|
+
Ee as SwiperCarousel,
|
|
101
|
+
Je as SwiperSlide
|
|
100
102
|
};
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as v, mergeModels as y, useModel as m, provide as h, watch as V, createElementBlock as k, openBlock as n, renderSlot as C, Fragment as g, renderList as B, createBlock as x, withCtx as M, createTextVNode as b, toDisplayString as U } from "vue";
|
|
2
|
+
import q from "../CheckboxBtn.vue.js";
|
|
3
3
|
import '../../../../../../assets/CheckboxBtn.css';/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const w = ["data-cy"], I = /* @__PURE__ */ v({
|
|
5
5
|
__name: "CheckboxButtonGroup",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ y({
|
|
7
7
|
dataCy: {},
|
|
8
8
|
items: { default: () => [] },
|
|
9
9
|
resetValue: {}
|
|
10
10
|
}, {
|
|
11
|
-
modelValue: {
|
|
12
|
-
|
|
11
|
+
modelValue: {
|
|
12
|
+
default: () => []
|
|
13
|
+
},
|
|
14
|
+
modelModifiers: {},
|
|
15
|
+
reset: { type: Boolean, default: !1 },
|
|
16
|
+
resetModifiers: {}
|
|
13
17
|
}),
|
|
14
|
-
emits: ["update:modelValue"],
|
|
18
|
+
emits: ["update:modelValue", "update:reset"],
|
|
15
19
|
setup(l) {
|
|
16
|
-
const r =
|
|
20
|
+
const r = m(l, "modelValue"), o = m(l, "reset"), a = /* @__PURE__ */ new Map(), c = (t) => t ? r.value.includes(t) : !1, i = (t, u) => {
|
|
17
21
|
if (!t) return;
|
|
18
22
|
let e = [];
|
|
19
23
|
if (u ? e = [...r.value, t] : e = r.value.filter((d) => d !== t), !l.resetValue) {
|
|
@@ -21,46 +25,48 @@ const q = ["data-cy"], G = /* @__PURE__ */ h({
|
|
|
21
25
|
return;
|
|
22
26
|
}
|
|
23
27
|
e = e.filter((d) => d !== l.resetValue);
|
|
24
|
-
const
|
|
28
|
+
const s = Array.from(a.keys()).filter(
|
|
25
29
|
(d) => !e.includes(d)
|
|
26
30
|
);
|
|
27
31
|
console.log("DEBUG:handleCheck => update", {
|
|
28
32
|
registeredItems: a,
|
|
29
33
|
checkedList: e,
|
|
30
|
-
uncheckedList:
|
|
31
|
-
}),
|
|
32
|
-
},
|
|
34
|
+
uncheckedList: s
|
|
35
|
+
}), s.length === a.size && (e = [l.resetValue], a.get(l.resetValue)?.focus?.()), e.length === a.size - 1 && (e = [l.resetValue], a.get(l.resetValue)?.focus?.()), r.value = e;
|
|
36
|
+
}, f = () => {
|
|
33
37
|
l.resetValue && (console.log("DEBUG:handleResetCheck", { resetValue: l.resetValue }), r.value = [l.resetValue]);
|
|
34
38
|
};
|
|
35
|
-
return
|
|
39
|
+
return h(
|
|
36
40
|
"addItem",
|
|
37
41
|
(t, u) => {
|
|
38
42
|
!t || !u || a.set(t, u);
|
|
39
43
|
}
|
|
40
|
-
),
|
|
44
|
+
), h("removeItem", (t) => {
|
|
41
45
|
t && a.delete(t);
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
}), V(() => l.resetValue, f, { immediate: !0 }), V(o, (t) => {
|
|
47
|
+
t && (r.value = [], o.value = !1);
|
|
48
|
+
}), (t, u) => (n(), k("div", { "data-cy": l.dataCy }, [
|
|
49
|
+
C(t.$slots, "default", {
|
|
50
|
+
isChecked: c,
|
|
51
|
+
handleCheck: i,
|
|
52
|
+
handleResetCheck: f
|
|
47
53
|
}, () => [
|
|
48
|
-
(
|
|
54
|
+
(n(!0), k(g, null, B(l.items, (e) => (n(), x(q, {
|
|
49
55
|
key: `checkbox-item-${e.value}`,
|
|
50
56
|
required: e.required,
|
|
51
57
|
"data-cy": e.dataCy,
|
|
52
|
-
"model-value":
|
|
53
|
-
"onUpdate:modelValue": (
|
|
58
|
+
"model-value": c(e.value),
|
|
59
|
+
"onUpdate:modelValue": (s) => i(e.value, s)
|
|
54
60
|
}, {
|
|
55
|
-
label:
|
|
56
|
-
b(
|
|
61
|
+
label: M(() => [
|
|
62
|
+
b(U(e.label), 1)
|
|
57
63
|
]),
|
|
58
64
|
_: 2
|
|
59
65
|
}, 1032, ["required", "data-cy", "model-value", "onUpdate:modelValue"]))), 128))
|
|
60
66
|
])
|
|
61
|
-
], 8,
|
|
67
|
+
], 8, w));
|
|
62
68
|
}
|
|
63
69
|
});
|
|
64
70
|
export {
|
|
65
|
-
|
|
71
|
+
I as default
|
|
66
72
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,3 +10,4 @@ export type { ChartOptions, ChartData } from 'chart.js';
|
|
|
10
10
|
export type { BaseAutocompleteThemes } from '../UIKit/BaseAutocomplete';
|
|
11
11
|
export type { RadioButtonGroupProps } from '../UIKit/Radio/v2/RadioButtonGroup';
|
|
12
12
|
export type { RadioButtonItemProps } from '../UIKit/Radio/v2/RadioButtonItem';
|
|
13
|
+
export type { CheckboxButtonGroupProps, CheckboxButtonItem, } from '../UIKit/Checkbox/v2/CheckboxButtonGroup';
|