@kiva/kv-components 6.38.0 → 6.39.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/vue/KvCheckbox.css +1 -1
- package/dist/vue/KvCheckbox.js +25 -23
- package/package.json +2 -2
package/dist/vue/KvCheckbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-
|
|
1
|
+
[data-v-b5ec6a0c] .check-icon svg{transform:scale(1.2)}
|
package/dist/vue/KvCheckbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { nanoid as k } from "nanoid";
|
|
2
|
-
import { toRefs as L, ref as v, watch as M, onMounted as I, resolveComponent as K, openBlock as r, createElementBlock as
|
|
2
|
+
import { toRefs as L, ref as v, watch as M, onMounted as I, resolveComponent as K, openBlock as r, createElementBlock as c, normalizeClass as d, normalizeStyle as S, createElementVNode as s, mergeProps as q, toHandlers as R, withModifiers as j, createCommentVNode as b, createBlock as z, renderSlot as D } from "vue";
|
|
3
3
|
import { mdiCheckCircle as E } from "@mdi/js";
|
|
4
4
|
import N from "./KvMaterialIcon.js";
|
|
5
5
|
import { useAttrs as O } from "../utils/attrs.js";
|
|
@@ -65,28 +65,28 @@ const C = [
|
|
|
65
65
|
const {
|
|
66
66
|
modelValue: t,
|
|
67
67
|
value: e
|
|
68
|
-
} = L(i), { emit: u } = l, w = v(`kvc-${k(10)}`), a = v(!1),
|
|
68
|
+
} = L(i), { emit: u } = l, w = v(`kvc-${k(10)}`), a = v(!1), n = v(null), {
|
|
69
69
|
classes: g,
|
|
70
70
|
styles: y,
|
|
71
71
|
inputAttrs: x,
|
|
72
72
|
inputListeners: _
|
|
73
73
|
} = O(l, C), p = (h) => {
|
|
74
74
|
const m = h.target.checked;
|
|
75
|
-
let
|
|
76
|
-
Array.isArray(t.value) ? m ?
|
|
75
|
+
let o;
|
|
76
|
+
Array.isArray(t.value) ? m ? o = [...t.value, h.target.value] : o = t.value.filter((V) => V !== e.value) : o = m, u("change", o), u("update:modelValue", o);
|
|
77
77
|
}, f = () => {
|
|
78
78
|
Array.isArray(t.value) ? a.value = t.value.includes(e.value) : a.value = t.value;
|
|
79
79
|
}, A = () => {
|
|
80
|
-
|
|
80
|
+
n.focus();
|
|
81
81
|
}, B = () => {
|
|
82
|
-
|
|
82
|
+
n.blur();
|
|
83
83
|
};
|
|
84
84
|
return f(), M(t, () => f()), I(() => {
|
|
85
85
|
w.value = `kvc-${k(10)}`;
|
|
86
86
|
}), {
|
|
87
87
|
uuid: w,
|
|
88
88
|
isChecked: a,
|
|
89
|
-
checkboxRef:
|
|
89
|
+
checkboxRef: n,
|
|
90
90
|
onChange: p,
|
|
91
91
|
setChecked: f,
|
|
92
92
|
focus: A,
|
|
@@ -96,7 +96,6 @@ const C = [
|
|
|
96
96
|
inputAttrs: x,
|
|
97
97
|
inputListeners: _,
|
|
98
98
|
iconCheckCircle: E
|
|
99
|
-
// <-- just return the value
|
|
100
99
|
};
|
|
101
100
|
}
|
|
102
101
|
}, Z = ["for"], F = ["id", "checked", "value", "disabled"], G = {
|
|
@@ -108,15 +107,18 @@ const C = [
|
|
|
108
107
|
}, J = { class: "tw-flex-1 peer-focus-visible:tw-ring-2 peer-focus-visible:tw-ring-action" };
|
|
109
108
|
function Q(i, l, t, e, u, w) {
|
|
110
109
|
const a = K("KvMaterialIcon");
|
|
111
|
-
return r(),
|
|
112
|
-
class:
|
|
110
|
+
return r(), c("div", {
|
|
111
|
+
class: d(e.classes),
|
|
113
112
|
style: S(e.styles)
|
|
114
113
|
}, [
|
|
115
|
-
|
|
116
|
-
class:
|
|
114
|
+
s("label", {
|
|
115
|
+
class: d(["tw-inline-flex tw-items-center", [
|
|
116
|
+
{ "tw-opacity-low": t.disabled && t.blurOnDisabled },
|
|
117
|
+
t.variant === "round" ? "tw-align-middle" : ""
|
|
118
|
+
]]),
|
|
117
119
|
for: e.uuid
|
|
118
120
|
}, [
|
|
119
|
-
|
|
121
|
+
s("input", q(e.inputAttrs, {
|
|
120
122
|
id: e.uuid,
|
|
121
123
|
ref: "checkboxRef",
|
|
122
124
|
class: "tw-peer tw-appearance-none tw-w-max",
|
|
@@ -125,11 +127,11 @@ function Q(i, l, t, e, u, w) {
|
|
|
125
127
|
value: t.value,
|
|
126
128
|
disabled: t.disabled
|
|
127
129
|
}, R(e.inputListeners, !0), {
|
|
128
|
-
onChange: l[0] || (l[0] = j((...
|
|
130
|
+
onChange: l[0] || (l[0] = j((...n) => e.onChange && e.onChange(...n), ["prevent"]))
|
|
129
131
|
}), null, 16, F),
|
|
130
|
-
t.variant === "square" ? (r(),
|
|
132
|
+
t.variant === "square" ? (r(), c("div", {
|
|
131
133
|
key: 0,
|
|
132
|
-
class:
|
|
134
|
+
class: d(["tw-w-3 tw-h-3 tw-mr-2 tw-flex-shrink-0 tw-rounded-sm tw-border tw-flex tw-justify-center tw-items-center tw-overflow-hidden tw-transition-all tw-duration-100 peer-focus-visible:tw-ring-2 peer-focus-visible:tw-ring-action", {
|
|
133
135
|
"tw-bg-white": !e.isChecked,
|
|
134
136
|
"tw-bg-action": e.isChecked,
|
|
135
137
|
"tw-border-secondary": !e.isChecked && t.valid,
|
|
@@ -137,16 +139,16 @@ function Q(i, l, t, e, u, w) {
|
|
|
137
139
|
"tw-border-danger": !t.valid
|
|
138
140
|
}])
|
|
139
141
|
}, [
|
|
140
|
-
e.isChecked ? (r(),
|
|
141
|
-
|
|
142
|
+
e.isChecked ? (r(), c("svg", G, l[1] || (l[1] = [
|
|
143
|
+
s("path", {
|
|
142
144
|
d: "M3.99975 6.79988L1.66642 4.46655C1.40642 4.20655 0.993086 4.20655 0.733086 4.46655C0.473086 4.72655 0.473086 5.13988 0.733086 5.39988L3.52642 8.19322C3.78642 8.45322 4.20642 8.45322 4.46642 8.19322L11.5331 1.13322C11.7931 0.873216 11.7931 0.459883 11.5331 0.199883C11.2731 -0.0601172 10.8598 -0.0601172 10.5998 0.199883L3.99975 6.79988Z",
|
|
143
145
|
fill: "white"
|
|
144
146
|
}, null, -1)
|
|
145
147
|
]))) : b("", !0)
|
|
146
|
-
], 2)) : (r(),
|
|
148
|
+
], 2)) : (r(), c("div", {
|
|
147
149
|
key: 1,
|
|
148
|
-
class:
|
|
149
|
-
"tw-w-3 tw-h-3 tw-mr-
|
|
150
|
+
class: d([
|
|
151
|
+
"tw-w-3 tw-h-3 tw-mr-1",
|
|
150
152
|
"tw-flex-shrink-0",
|
|
151
153
|
"tw-rounded-full",
|
|
152
154
|
"tw-flex tw-justify-center tw-items-center",
|
|
@@ -167,13 +169,13 @@ function Q(i, l, t, e, u, w) {
|
|
|
167
169
|
class: "check-icon"
|
|
168
170
|
}, null, 8, ["icon"])) : b("", !0)
|
|
169
171
|
], 2)),
|
|
170
|
-
|
|
172
|
+
s("div", J, [
|
|
171
173
|
D(i.$slots, "default", {}, void 0, !0)
|
|
172
174
|
])
|
|
173
175
|
], 10, Z)
|
|
174
176
|
], 6);
|
|
175
177
|
}
|
|
176
|
-
const te = /* @__PURE__ */ H(P, [["render", Q], ["__scopeId", "data-v-
|
|
178
|
+
const te = /* @__PURE__ */ H(P, [["render", Q], ["__scopeId", "data-v-b5ec6a0c"]]);
|
|
177
179
|
export {
|
|
178
180
|
te as default
|
|
179
181
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.39.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"embla-carousel-fade",
|
|
112
112
|
"popper.js"
|
|
113
113
|
],
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "d1f5e8422acc9bd1cbd36398e524e01b500c192d"
|
|
115
115
|
}
|