@itguy614/clean-ui 1.3.1 → 1.3.2
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/clean-ui.css +1 -1
- package/dist/components/CuiColorPicker.vue.d.ts.map +1 -1
- package/dist/components/CuiColorPicker.vue.js +187 -194
- package/dist/components/CuiDataGrid.vue.js +1 -1
- package/dist/components/CuiTooltip.vue.d.ts.map +1 -1
- package/dist/components/CuiTooltip.vue.js +2 -2
- package/dist/components/CuiTooltip.vue2.js +78 -65
- package/dist/composables/useDataGrid.d.ts +3 -2
- package/dist/composables/useDataGrid.d.ts.map +1 -1
- package/dist/composables/useDataGrid.js +222 -190
- package/dist/composables/useFieldDescribedBy.d.ts +1 -2
- package/dist/composables/useFieldDescribedBy.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -26
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { clampSize as
|
|
3
|
-
import
|
|
4
|
-
import { hsvToRgb as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as ce, ref as d, computed as p, watch as U, onMounted as X, onUnmounted as ve, useTemplateRef as G, withDirectives as K, openBlock as c, createElementBlock as v, normalizeStyle as i, withModifiers as $, createElementVNode as u, createCommentVNode as b, withKeys as fe, vModelText as he, createBlock as me, withCtx as pe, createTextVNode as be, toDisplayString as ge, Fragment as ye, renderList as xe, vShow as we } from "vue";
|
|
2
|
+
import { clampSize as ke } from "../utils/sizing.js";
|
|
3
|
+
import Se from "./CuiButton.vue.js";
|
|
4
|
+
import { hsvToRgb as Y, rgbToHex as Re, formatColor as Ee, getThemePalette as ze, PALETTE_BASIC as Ce, PALETTE_MATERIAL as Pe, PALETTE_TAILWIND as Te, parseColor as I, rgbToHsv as V } from "../utils/color.js";
|
|
5
|
+
const Le = {
|
|
6
6
|
key: 0,
|
|
7
7
|
style: { display: "flex", gap: "calc(0.625rem * var(--cui-density-scale, 1))", alignItems: "center" }
|
|
8
|
-
},
|
|
8
|
+
}, Me = { style: { flex: "1", display: "flex", flexDirection: "column", gap: "calc(0.5rem * var(--cui-density-scale, 1))" } }, Be = {
|
|
9
9
|
key: 1,
|
|
10
10
|
style: { display: "flex", gap: "calc(0.375rem * var(--cui-density-scale, 1))", alignItems: "center" }
|
|
11
|
-
},
|
|
11
|
+
}, Ae = ["id", "name", "autocomplete", "aria-describedby", "aria-required", "aria-labelledby"], He = {
|
|
12
12
|
key: 2,
|
|
13
13
|
style: { display: "flex", flexWrap: "wrap", gap: "calc(0.3125rem * var(--cui-density-scale, 1))" }
|
|
14
|
-
},
|
|
14
|
+
}, $e = ["onClick"], Z = "repeating-conic-gradient(#d0d0d0 0% 25%, transparent 0% 50%) 0 0 / 12px 12px", De = /* @__PURE__ */ ce({
|
|
15
15
|
__name: "CuiColorPicker",
|
|
16
16
|
props: {
|
|
17
17
|
modelValue: { default: "#000000" },
|
|
@@ -33,153 +33,142 @@ const De = {
|
|
|
33
33
|
disabled: { type: Boolean, default: !1 }
|
|
34
34
|
},
|
|
35
35
|
emits: ["update:modelValue"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
36
|
+
setup(a, { expose: j, emit: J }) {
|
|
37
|
+
const Q = ["sm", "md", "lg"], n = a, _ = J, f = d(0), g = d(1), y = d(1), s = d(1), z = d(n.format), h = d(""), ee = {
|
|
38
38
|
sm: { width: "220px", gradientHeight: "130px", sliderHeight: "10px", thumbSize: "14px", swatchSize: "20px", fontSize: "0.75rem" },
|
|
39
39
|
md: { width: "280px", gradientHeight: "160px", sliderHeight: "12px", thumbSize: "16px", swatchSize: "24px", fontSize: "0.8125rem" },
|
|
40
40
|
lg: { width: "340px", gradientHeight: "200px", sliderHeight: "14px", thumbSize: "18px", swatchSize: "28px", fontSize: "0.875rem" }
|
|
41
|
-
},
|
|
42
|
-
const { r: e, g: t, b:
|
|
43
|
-
return
|
|
44
|
-
}),
|
|
45
|
-
const { r: e, g: t, b:
|
|
46
|
-
return
|
|
41
|
+
}, r = p(() => ee[ke(n.size, Q)]), w = p(() => Y(f.value, g.value, y.value)), k = p(() => Re(w.value.r, w.value.g, w.value.b)), F = p(() => {
|
|
42
|
+
const { r: e, g: t, b: o } = w.value;
|
|
43
|
+
return s.value < 1 ? `rgba(${e}, ${t}, ${o}, ${s.value.toFixed(2)})` : k.value;
|
|
44
|
+
}), S = p(() => {
|
|
45
|
+
const { r: e, g: t, b: o } = w.value;
|
|
46
|
+
return Ee(e, t, o, s.value, z.value);
|
|
47
47
|
});
|
|
48
|
-
function
|
|
49
|
-
const e =
|
|
48
|
+
function O() {
|
|
49
|
+
const e = I(n.modelValue);
|
|
50
50
|
if (e) {
|
|
51
|
-
const t =
|
|
52
|
-
|
|
51
|
+
const t = V(e.r, e.g, e.b);
|
|
52
|
+
f.value = t.h, g.value = t.s, y.value = t.v, s.value = e.a, h.value = S.value;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
let
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}),
|
|
62
|
-
}),
|
|
63
|
-
|
|
55
|
+
U(() => n.modelValue, O), X(O);
|
|
56
|
+
const D = d(0);
|
|
57
|
+
let R = null;
|
|
58
|
+
X(() => {
|
|
59
|
+
n.presetPalette === "theme" && typeof MutationObserver < "u" && (R = new MutationObserver(() => {
|
|
60
|
+
D.value++;
|
|
61
|
+
}), R.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }));
|
|
62
|
+
}), ve(() => {
|
|
63
|
+
R == null || R.disconnect(), l == null || l();
|
|
64
64
|
});
|
|
65
|
-
function
|
|
66
|
-
|
|
65
|
+
function E() {
|
|
66
|
+
h.value = S.value, _("update:modelValue", S.value);
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
let
|
|
70
|
-
function
|
|
71
|
-
|
|
68
|
+
const W = p(() => n.palette ? n.palette : n.presetPalette === "theme" ? (D.value, ze()) : n.presetPalette === "basic" ? Ce : n.presetPalette === "material" ? Pe : n.presetPalette === "tailwind" ? Te : []);
|
|
69
|
+
let l = null;
|
|
70
|
+
function L(e, t) {
|
|
71
|
+
if (n.disabled) return;
|
|
72
|
+
l == null || l(), t(e);
|
|
73
|
+
const o = (x) => x.pointerId === e.pointerId, m = (x) => {
|
|
74
|
+
o(x) && t(x);
|
|
75
|
+
}, T = (x) => {
|
|
76
|
+
o(x) && H();
|
|
77
|
+
}, H = () => {
|
|
78
|
+
document.removeEventListener("pointermove", m), document.removeEventListener("pointerup", T), document.removeEventListener("pointercancel", T), l === H && (l = null);
|
|
79
|
+
};
|
|
80
|
+
l = H, document.addEventListener("pointermove", m), document.addEventListener("pointerup", T), document.addEventListener("pointercancel", T);
|
|
72
81
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const t = P.value.getBoundingClientRect();
|
|
82
|
-
h.value = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), b.value = Math.max(0, Math.min(1, 1 - (e.clientY - t.top) / t.height)), k();
|
|
83
|
-
}
|
|
84
|
-
const L = s(null);
|
|
85
|
-
let M = !1;
|
|
86
|
-
function ue(e) {
|
|
87
|
-
a.disabled || (M = !0, N(e), document.addEventListener("pointermove", q), document.addEventListener("pointerup", G));
|
|
88
|
-
}
|
|
89
|
-
function q(e) {
|
|
90
|
-
M && N(e);
|
|
91
|
-
}
|
|
92
|
-
function G() {
|
|
93
|
-
M = !1, document.removeEventListener("pointermove", q), document.removeEventListener("pointerup", G);
|
|
94
|
-
}
|
|
95
|
-
function N(e) {
|
|
96
|
-
if (!L.value) return;
|
|
97
|
-
const t = L.value.getBoundingClientRect();
|
|
98
|
-
v.value = Math.max(0, Math.min(360, (e.clientX - t.left) / t.width * 360)), k();
|
|
99
|
-
}
|
|
100
|
-
const T = s(null);
|
|
101
|
-
let B = !1;
|
|
102
|
-
function se(e) {
|
|
103
|
-
a.disabled || (B = !0, Y(e), document.addEventListener("pointermove", X), document.addEventListener("pointerup", K));
|
|
104
|
-
}
|
|
105
|
-
function X(e) {
|
|
106
|
-
B && Y(e);
|
|
82
|
+
U(() => n.disabled, (e) => {
|
|
83
|
+
e && (l == null || l());
|
|
84
|
+
});
|
|
85
|
+
const M = d(null), te = (e) => L(e, ae);
|
|
86
|
+
function ae(e) {
|
|
87
|
+
if (!M.value) return;
|
|
88
|
+
const t = M.value.getBoundingClientRect();
|
|
89
|
+
g.value = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), y.value = Math.max(0, Math.min(1, 1 - (e.clientY - t.top) / t.height)), E();
|
|
107
90
|
}
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
const B = d(null), oe = (e) => L(e, ie);
|
|
92
|
+
function ie(e) {
|
|
93
|
+
if (!B.value) return;
|
|
94
|
+
const t = B.value.getBoundingClientRect();
|
|
95
|
+
f.value = Math.max(0, Math.min(360, (e.clientX - t.left) / t.width * 360)), E();
|
|
110
96
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
97
|
+
const A = d(null), ne = (e) => L(e, re);
|
|
98
|
+
function re(e) {
|
|
99
|
+
if (!A.value) return;
|
|
100
|
+
const t = A.value.getBoundingClientRect();
|
|
101
|
+
s.value = Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)), s.value = Math.round(s.value * 100) / 100, E();
|
|
115
102
|
}
|
|
116
|
-
function
|
|
117
|
-
const e =
|
|
103
|
+
function q() {
|
|
104
|
+
const e = I(h.value);
|
|
118
105
|
if (e) {
|
|
119
|
-
const t =
|
|
120
|
-
|
|
106
|
+
const t = V(e.r, e.g, e.b);
|
|
107
|
+
f.value = t.h, g.value = t.s, y.value = t.v, s.value = e.a, E();
|
|
121
108
|
} else
|
|
122
|
-
|
|
109
|
+
h.value = S.value;
|
|
123
110
|
}
|
|
124
|
-
function
|
|
125
|
-
const e = ["hex", "rgb", "hsl"], t = e.indexOf(
|
|
126
|
-
|
|
111
|
+
function le() {
|
|
112
|
+
const e = ["hex", "rgb", "hsl"], t = e.indexOf(z.value);
|
|
113
|
+
z.value = e[(t + 1) % e.length], h.value = S.value;
|
|
127
114
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
const t =
|
|
115
|
+
function ue(e) {
|
|
116
|
+
if (n.disabled) return;
|
|
117
|
+
const t = I(e);
|
|
131
118
|
if (t) {
|
|
132
|
-
const
|
|
133
|
-
|
|
119
|
+
const o = V(t.r, t.g, t.b);
|
|
120
|
+
f.value = o.h, g.value = o.s, y.value = o.v, s.value = t.a, E();
|
|
134
121
|
}
|
|
135
122
|
}
|
|
136
|
-
const
|
|
137
|
-
const e =
|
|
123
|
+
const N = p(() => {
|
|
124
|
+
const e = Y(f.value, 1, 1);
|
|
138
125
|
return `rgb(${e.r}, ${e.g}, ${e.b})`;
|
|
139
|
-
}),
|
|
140
|
-
function
|
|
126
|
+
}), C = G("rootEl"), P = G("inputEl");
|
|
127
|
+
function se(e) {
|
|
141
128
|
var t;
|
|
142
|
-
|
|
129
|
+
P.value ? P.value.focus(e) : (t = C.value) == null || t.focus(e);
|
|
143
130
|
}
|
|
144
|
-
function
|
|
131
|
+
function de() {
|
|
145
132
|
var e;
|
|
146
|
-
|
|
133
|
+
P.value ? P.value.blur() : (e = C.value) == null || e.blur();
|
|
147
134
|
}
|
|
148
|
-
return
|
|
135
|
+
return j({ el: C, focus: se, blur: de }), (e, t) => K((c(), v("div", {
|
|
149
136
|
class: "cui-color-picker",
|
|
150
137
|
ref_key: "rootEl",
|
|
151
|
-
ref:
|
|
152
|
-
style:
|
|
153
|
-
width:
|
|
154
|
-
opacity:
|
|
155
|
-
pointerEvents:
|
|
138
|
+
ref: C,
|
|
139
|
+
style: i({
|
|
140
|
+
width: r.value.width,
|
|
141
|
+
opacity: a.disabled ? "0.5" : "1",
|
|
142
|
+
pointerEvents: a.disabled ? "none" : void 0,
|
|
156
143
|
userSelect: "none"
|
|
157
144
|
})
|
|
158
145
|
}, [
|
|
159
|
-
|
|
146
|
+
a.swatchOnly ? b("", !0) : (c(), v("div", {
|
|
160
147
|
key: 0,
|
|
161
148
|
ref_key: "gradientRef",
|
|
162
|
-
ref:
|
|
163
|
-
|
|
149
|
+
ref: M,
|
|
150
|
+
class: "cui-color-picker__gradient",
|
|
151
|
+
style: i({
|
|
164
152
|
position: "relative",
|
|
165
153
|
width: "100%",
|
|
166
|
-
height:
|
|
154
|
+
height: r.value.gradientHeight,
|
|
167
155
|
borderRadius: "0.5rem 0.5rem 0 0",
|
|
168
156
|
cursor: "crosshair",
|
|
157
|
+
touchAction: "none",
|
|
169
158
|
overflow: "hidden",
|
|
170
|
-
background:
|
|
159
|
+
background: N.value
|
|
171
160
|
}),
|
|
172
|
-
onPointerdown:
|
|
161
|
+
onPointerdown: $(te, ["prevent"])
|
|
173
162
|
}, [
|
|
174
|
-
t[3] || (t[3] =
|
|
175
|
-
t[4] || (t[4] =
|
|
176
|
-
|
|
177
|
-
style:
|
|
163
|
+
t[3] || (t[3] = u("div", { style: { position: "absolute", inset: "0", background: "linear-gradient(to right, white, transparent)" } }, null, -1)),
|
|
164
|
+
t[4] || (t[4] = u("div", { style: { position: "absolute", inset: "0", background: "linear-gradient(to bottom, transparent, black)" } }, null, -1)),
|
|
165
|
+
u("div", {
|
|
166
|
+
style: i({
|
|
178
167
|
position: "absolute",
|
|
179
|
-
left: `${
|
|
180
|
-
top: `${(1 -
|
|
181
|
-
width:
|
|
182
|
-
height:
|
|
168
|
+
left: `${g.value * 100}%`,
|
|
169
|
+
top: `${(1 - y.value) * 100}%`,
|
|
170
|
+
width: r.value.thumbSize,
|
|
171
|
+
height: r.value.thumbSize,
|
|
183
172
|
borderRadius: "50%",
|
|
184
173
|
border: "2px solid white",
|
|
185
174
|
boxShadow: "0 1px 4px rgba(0,0,0,0.3)",
|
|
@@ -188,124 +177,128 @@ const De = {
|
|
|
188
177
|
})
|
|
189
178
|
}, null, 4)
|
|
190
179
|
], 36)),
|
|
191
|
-
|
|
192
|
-
style:
|
|
180
|
+
u("div", {
|
|
181
|
+
style: i({
|
|
193
182
|
padding: "calc(0.75rem * var(--cui-density-scale, 1))",
|
|
194
183
|
background: "var(--cui-surface-base, white)",
|
|
195
184
|
border: "1px solid var(--cui-border)",
|
|
196
|
-
borderTop:
|
|
197
|
-
borderRadius:
|
|
185
|
+
borderTop: a.swatchOnly ? void 0 : "none",
|
|
186
|
+
borderRadius: a.swatchOnly ? "0.5rem" : "0 0 0.5rem 0.5rem",
|
|
198
187
|
display: "flex",
|
|
199
188
|
flexDirection: "column",
|
|
200
189
|
gap: "calc(0.625rem * var(--cui-density-scale, 1))"
|
|
201
190
|
})
|
|
202
191
|
}, [
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
style:
|
|
192
|
+
a.swatchOnly ? b("", !0) : (c(), v("div", Le, [
|
|
193
|
+
u("div", {
|
|
194
|
+
style: i({
|
|
206
195
|
width: "2rem",
|
|
207
196
|
height: "2rem",
|
|
208
197
|
borderRadius: "50%",
|
|
209
198
|
border: "1px solid var(--cui-border)",
|
|
210
199
|
flexShrink: "0",
|
|
211
|
-
background:
|
|
200
|
+
background: Z,
|
|
212
201
|
position: "relative",
|
|
213
202
|
overflow: "hidden"
|
|
214
203
|
})
|
|
215
204
|
}, [
|
|
216
|
-
|
|
217
|
-
style:
|
|
205
|
+
u("div", {
|
|
206
|
+
style: i({ position: "absolute", inset: "0", borderRadius: "50%", background: F.value })
|
|
218
207
|
}, null, 4)
|
|
219
208
|
], 4),
|
|
220
|
-
|
|
221
|
-
|
|
209
|
+
u("div", Me, [
|
|
210
|
+
u("div", {
|
|
222
211
|
ref_key: "hueRef",
|
|
223
|
-
ref:
|
|
224
|
-
|
|
212
|
+
ref: B,
|
|
213
|
+
class: "cui-color-picker__hue",
|
|
214
|
+
style: i({
|
|
225
215
|
position: "relative",
|
|
226
|
-
height:
|
|
216
|
+
height: r.value.sliderHeight,
|
|
227
217
|
borderRadius: "9999px",
|
|
228
218
|
cursor: "pointer",
|
|
219
|
+
touchAction: "none",
|
|
229
220
|
background: "linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"
|
|
230
221
|
}),
|
|
231
|
-
onPointerdown:
|
|
222
|
+
onPointerdown: $(oe, ["prevent"])
|
|
232
223
|
}, [
|
|
233
|
-
|
|
234
|
-
style:
|
|
224
|
+
u("div", {
|
|
225
|
+
style: i({
|
|
235
226
|
position: "absolute",
|
|
236
|
-
left: `${
|
|
227
|
+
left: `${f.value / 360 * 100}%`,
|
|
237
228
|
top: "50%",
|
|
238
|
-
width:
|
|
239
|
-
height:
|
|
229
|
+
width: r.value.thumbSize,
|
|
230
|
+
height: r.value.thumbSize,
|
|
240
231
|
borderRadius: "50%",
|
|
241
232
|
border: "2px solid white",
|
|
242
233
|
boxShadow: "0 1px 3px rgba(0,0,0,0.3)",
|
|
243
234
|
transform: "translate(-50%, -50%)",
|
|
244
235
|
pointerEvents: "none",
|
|
245
|
-
background:
|
|
236
|
+
background: N.value
|
|
246
237
|
})
|
|
247
238
|
}, null, 4)
|
|
248
239
|
], 36),
|
|
249
|
-
|
|
240
|
+
a.showAlpha ? (c(), v("div", {
|
|
250
241
|
key: 0,
|
|
251
242
|
ref_key: "alphaRef",
|
|
252
|
-
ref:
|
|
253
|
-
|
|
243
|
+
ref: A,
|
|
244
|
+
class: "cui-color-picker__alpha",
|
|
245
|
+
style: i({
|
|
254
246
|
position: "relative",
|
|
255
|
-
height:
|
|
247
|
+
height: r.value.sliderHeight,
|
|
256
248
|
borderRadius: "9999px",
|
|
257
249
|
cursor: "pointer",
|
|
258
|
-
|
|
250
|
+
touchAction: "none",
|
|
251
|
+
background: Z,
|
|
259
252
|
overflow: "hidden"
|
|
260
253
|
}),
|
|
261
|
-
onPointerdown:
|
|
254
|
+
onPointerdown: $(ne, ["prevent"])
|
|
262
255
|
}, [
|
|
263
|
-
|
|
264
|
-
style:
|
|
256
|
+
u("div", {
|
|
257
|
+
style: i({ position: "absolute", inset: "0", borderRadius: "9999px", background: `linear-gradient(to right, transparent, ${k.value})` })
|
|
265
258
|
}, null, 4),
|
|
266
|
-
|
|
267
|
-
style:
|
|
259
|
+
u("div", {
|
|
260
|
+
style: i({
|
|
268
261
|
position: "absolute",
|
|
269
|
-
left: `${
|
|
262
|
+
left: `${s.value * 100}%`,
|
|
270
263
|
top: "50%",
|
|
271
|
-
width:
|
|
272
|
-
height:
|
|
264
|
+
width: r.value.thumbSize,
|
|
265
|
+
height: r.value.thumbSize,
|
|
273
266
|
borderRadius: "50%",
|
|
274
267
|
border: "2px solid white",
|
|
275
268
|
boxShadow: "0 1px 3px rgba(0,0,0,0.3)",
|
|
276
269
|
transform: "translate(-50%, -50%)",
|
|
277
270
|
pointerEvents: "none",
|
|
278
|
-
background:
|
|
271
|
+
background: k.value
|
|
279
272
|
})
|
|
280
273
|
}, null, 4)
|
|
281
|
-
], 36)) :
|
|
274
|
+
], 36)) : b("", !0)
|
|
282
275
|
])
|
|
283
276
|
])),
|
|
284
|
-
|
|
285
|
-
|
|
277
|
+
a.showInput ? (c(), v("div", Be, [
|
|
278
|
+
a.swatchOnly ? (c(), v("div", {
|
|
286
279
|
key: 0,
|
|
287
|
-
style:
|
|
280
|
+
style: i({
|
|
288
281
|
width: "1.5rem",
|
|
289
282
|
height: "1.5rem",
|
|
290
283
|
borderRadius: "0.25rem",
|
|
291
284
|
border: "1px solid var(--cui-border)",
|
|
292
285
|
flexShrink: "0",
|
|
293
|
-
background:
|
|
286
|
+
background: F.value
|
|
294
287
|
})
|
|
295
|
-
}, null, 4)) :
|
|
296
|
-
|
|
288
|
+
}, null, 4)) : b("", !0),
|
|
289
|
+
K(u("input", {
|
|
297
290
|
ref: "inputEl",
|
|
298
|
-
id:
|
|
299
|
-
name:
|
|
300
|
-
autocomplete:
|
|
301
|
-
"aria-describedby":
|
|
302
|
-
"aria-required":
|
|
303
|
-
"aria-labelledby":
|
|
304
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
305
|
-
style:
|
|
291
|
+
id: a.id,
|
|
292
|
+
name: a.name,
|
|
293
|
+
autocomplete: a.autocomplete,
|
|
294
|
+
"aria-describedby": a.ariaDescribedby,
|
|
295
|
+
"aria-required": a.ariaRequired || void 0,
|
|
296
|
+
"aria-labelledby": a.ariaLabelledby,
|
|
297
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => h.value = o),
|
|
298
|
+
style: i({
|
|
306
299
|
flex: "1",
|
|
307
300
|
padding: "calc(0.3125rem * var(--cui-density-scale, 1)) calc(0.5rem * var(--cui-density-scale, 1))",
|
|
308
|
-
fontSize:
|
|
301
|
+
fontSize: r.value.fontSize,
|
|
309
302
|
fontFamily: "var(--cui-font-mono, monospace)",
|
|
310
303
|
border: "1px solid var(--cui-border-strong, var(--cui-border))",
|
|
311
304
|
borderRadius: "0.25rem",
|
|
@@ -314,48 +307,48 @@ const De = {
|
|
|
314
307
|
outline: "none",
|
|
315
308
|
minWidth: "0"
|
|
316
309
|
}),
|
|
317
|
-
onKeydown:
|
|
318
|
-
onBlur:
|
|
319
|
-
}, null, 44,
|
|
320
|
-
[
|
|
310
|
+
onKeydown: fe(q, ["enter"]),
|
|
311
|
+
onBlur: q
|
|
312
|
+
}, null, 44, Ae), [
|
|
313
|
+
[he, h.value]
|
|
321
314
|
]),
|
|
322
|
-
|
|
315
|
+
a.showFormatToggle ? (c(), me(Se, {
|
|
323
316
|
key: 1,
|
|
324
317
|
variant: "ghost",
|
|
325
318
|
size: "xs",
|
|
326
|
-
style:
|
|
327
|
-
onClick:
|
|
319
|
+
style: i({ flexShrink: "0", fontFamily: "var(--cui-font-mono, monospace)", fontSize: r.value.fontSize, fontWeight: "600", minWidth: "2.5rem" }),
|
|
320
|
+
onClick: le
|
|
328
321
|
}, {
|
|
329
|
-
default:
|
|
330
|
-
|
|
322
|
+
default: pe(() => [
|
|
323
|
+
be(ge(z.value.toUpperCase()), 1)
|
|
331
324
|
]),
|
|
332
325
|
_: 1
|
|
333
|
-
}, 8, ["style"])) :
|
|
334
|
-
])) :
|
|
335
|
-
|
|
336
|
-
(
|
|
337
|
-
key:
|
|
338
|
-
style:
|
|
339
|
-
width:
|
|
340
|
-
height:
|
|
326
|
+
}, 8, ["style"])) : b("", !0)
|
|
327
|
+
])) : b("", !0),
|
|
328
|
+
W.value.length > 0 ? (c(), v("div", He, [
|
|
329
|
+
(c(!0), v(ye, null, xe(W.value, (o) => (c(), v("div", {
|
|
330
|
+
key: o,
|
|
331
|
+
style: i({
|
|
332
|
+
width: r.value.swatchSize,
|
|
333
|
+
height: r.value.swatchSize,
|
|
341
334
|
borderRadius: "0.25rem",
|
|
342
|
-
background:
|
|
335
|
+
background: o,
|
|
343
336
|
cursor: "pointer",
|
|
344
|
-
border:
|
|
345
|
-
boxShadow:
|
|
337
|
+
border: k.value.toLowerCase() === o.toLowerCase() ? "2px solid var(--cui-primary)" : "1px solid var(--cui-border)",
|
|
338
|
+
boxShadow: k.value.toLowerCase() === o.toLowerCase() ? "0 0 0 1px var(--cui-primary)" : "none",
|
|
346
339
|
transition: "transform 0.1s ease"
|
|
347
340
|
}),
|
|
348
|
-
onClick: (
|
|
349
|
-
onMouseenter: t[1] || (t[1] = (
|
|
350
|
-
onMouseleave: t[2] || (t[2] = (
|
|
351
|
-
}, null, 44,
|
|
352
|
-
])) :
|
|
341
|
+
onClick: (m) => ue(o),
|
|
342
|
+
onMouseenter: t[1] || (t[1] = (m) => m.target.style.transform = "scale(1.15)"),
|
|
343
|
+
onMouseleave: t[2] || (t[2] = (m) => m.target.style.transform = "scale(1)")
|
|
344
|
+
}, null, 44, $e))), 128))
|
|
345
|
+
])) : b("", !0)
|
|
353
346
|
], 4)
|
|
354
347
|
], 4)), [
|
|
355
|
-
[
|
|
348
|
+
[we, !a.hidden]
|
|
356
349
|
]);
|
|
357
350
|
}
|
|
358
351
|
});
|
|
359
352
|
export {
|
|
360
|
-
|
|
353
|
+
De as default
|
|
361
354
|
};
|
|
@@ -52,7 +52,7 @@ const W = { class: "cui-data-grid" }, X = {
|
|
|
52
52
|
setup(e, { expose: C, emit: P }) {
|
|
53
53
|
var w;
|
|
54
54
|
const l = e, d = P, $ = z(), t = N({
|
|
55
|
-
columns: l.columns,
|
|
55
|
+
columns: () => l.columns,
|
|
56
56
|
// The grid internals operate on the loose DataGridRow shape; T is a public-API
|
|
57
57
|
// refinement, so cast once here at the boundary.
|
|
58
58
|
data: A(l, "data"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiTooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTooltip.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiTooltip.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTooltip.vue"],"names":[],"mappings":"AAwUA,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEvF,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,aAAa,CAAC;AAEzE,MAAM,WAAW,eAAgB,SAAQ,aAAa,EAAE,cAAc,EAAE,gBAAgB;IACtF,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,mCAAmC;IACnC,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gCAAgC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAwRD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwC/C,QAAA,MAAM,eAAe;;;;;;;eA9UP,gBAAgB;aAElB,cAAc;eAEZ,MAAM;eAEN,MAAM;aAER,OAAO;6EA8UjB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CuiTooltip.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-25260ac8"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
i as default
|
|
7
7
|
};
|