@nmorph/nmorph-ui-kit 2.2.44 → 2.2.45
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/assets/icons/burger.svg.js +5 -5
- package/dist/assets/icons/chevron-up.svg.js +4 -4
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +179 -74
- package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.css +1 -1
- package/dist/components/data/nmorph-emoji-picker/NmorphEmojiPicker.vue.js +285 -251
- package/dist/hooks/use-common-styles.js +92 -12
- package/dist/index.umd.js +107 -27
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-scroll/NmorphScroll.vue.d.ts +1 -0
- package/dist/src/components/data/nmorph-emoji-picker/types.d.ts +1 -0
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
- package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
import './NmorphEmojiPicker.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { createCssSizeVariables as
|
|
5
|
-
import
|
|
2
|
+
import { defineComponent as we, ref as S, computed as s, watch as Q, openBlock as c, createElementBlock as d, normalizeStyle as Se, normalizeClass as J, createBlock as le, unref as f, withModifiers as Ce, withCtx as v, createVNode as k, createElementVNode as L, toDisplayString as E, createCommentVNode as W, Fragment as O, renderList as $, nextTick as Ae } from "vue";
|
|
3
|
+
import { useModifiers as Ke } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { createCssSizeVariables as Me } from "../../../utils/common.js";
|
|
5
|
+
import Ne from "../../form/nmorph-checkbox/NmorphCheckbox.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import X from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
6
8
|
/* empty css */
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import ze from "../../../assets/icons/burger.svg.js";
|
|
10
|
+
import Y from "../../basic/nmorph-scroll/NmorphScroll.vue.js";
|
|
11
|
+
/* empty css */
|
|
12
|
+
import Be from "../../form/nmorph-text-input/NmorphTextInput.vue.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import Ie from "../../../assets/icons/search.svg.js";
|
|
15
|
+
import Oe from "../../../assets/icons/smile.svg.js";
|
|
16
|
+
const $e = ["lang"], Ve = { class: "nmorph-emoji-picker__button-label" }, qe = ["aria-label"], De = ["aria-label", "title", "disabled", "onClick"], Te = {
|
|
17
|
+
key: 2,
|
|
13
18
|
class: "nmorph-emoji-picker__panel"
|
|
14
|
-
},
|
|
19
|
+
}, Fe = { class: "nmorph-emoji-picker__toolbar" }, Re = ["aria-selected", "disabled", "onClick"], He = ["aria-label"], Pe = {
|
|
15
20
|
key: 0,
|
|
16
21
|
class: "nmorph-emoji-picker__section-title"
|
|
17
|
-
},
|
|
22
|
+
}, Ue = { class: "nmorph-emoji-picker__grid" }, Qe = ["aria-label", "title", "disabled", "onFocus", "onClick"], Je = { class: "nmorph-emoji-picker__emoji-symbol" }, We = {
|
|
18
23
|
key: 1,
|
|
19
24
|
class: "nmorph-emoji-picker__empty"
|
|
20
|
-
},
|
|
25
|
+
}, uo = /* @__PURE__ */ we({
|
|
21
26
|
__name: "NmorphEmojiPicker",
|
|
22
27
|
props: {
|
|
23
28
|
language: { default: "en" },
|
|
@@ -31,8 +36,8 @@ const Oe = ["lang"], ze = ["aria-label"], Be = { class: "nmorph-emoji-picker__qu
|
|
|
31
36
|
disabled: { type: Boolean, default: !1 }
|
|
32
37
|
},
|
|
33
38
|
emits: ["select", "expand", "collapse"],
|
|
34
|
-
setup(
|
|
35
|
-
const l =
|
|
39
|
+
setup(ie, { emit: se }) {
|
|
40
|
+
const l = ie, V = se, q = S(""), b = S(l.initialExpanded), y = S(""), C = S(0), Z = S(null), ce = {
|
|
36
41
|
searchPlaceholder: "Search emoji",
|
|
37
42
|
searchLabel: "Search emoji",
|
|
38
43
|
quickLabel: "Frequent emoji",
|
|
@@ -41,331 +46,360 @@ const Oe = ["lang"], ze = ["aria-label"], Be = { class: "nmorph-emoji-picker__qu
|
|
|
41
46
|
noResults: "No emoji found",
|
|
42
47
|
categoryLabel: "Emoji categories",
|
|
43
48
|
resultsLabel: "Emoji results"
|
|
44
|
-
},
|
|
45
|
-
for (const
|
|
46
|
-
const
|
|
47
|
-
if (typeof
|
|
48
|
-
if (typeof
|
|
49
|
+
}, _ = (e) => !!e && typeof e == "object" && !Array.isArray(e), G = (e) => e.trim().toLocaleLowerCase(l.language || void 0), g = (e, o) => {
|
|
50
|
+
for (const r of o) {
|
|
51
|
+
const t = e[r];
|
|
52
|
+
if (typeof t == "string" && t.trim()) return t.trim();
|
|
53
|
+
if (typeof t == "number") return String(t);
|
|
49
54
|
}
|
|
50
55
|
return "";
|
|
51
|
-
},
|
|
52
|
-
for (const
|
|
53
|
-
const n = e[
|
|
56
|
+
}, A = (e) => Array.isArray(e) ? e.flatMap(A) : typeof e == "string" ? e.trim() ? [e.trim()] : [] : typeof e == "number" ? [String(e)] : _(e) ? Object.values(e).flatMap(A) : [], K = (e, o, r) => {
|
|
57
|
+
for (const t of o) {
|
|
58
|
+
const n = e[t], a = typeof n == "number" ? n : Number(n);
|
|
54
59
|
if (Number.isFinite(a)) return a;
|
|
55
60
|
}
|
|
56
|
-
return
|
|
57
|
-
},
|
|
58
|
-
for (const
|
|
59
|
-
const
|
|
60
|
-
if (Array.isArray(
|
|
61
|
+
return r;
|
|
62
|
+
}, ee = (e, o) => {
|
|
63
|
+
for (const r of o) {
|
|
64
|
+
const t = e[r];
|
|
65
|
+
if (Array.isArray(t)) return t;
|
|
61
66
|
}
|
|
62
|
-
},
|
|
67
|
+
}, M = (e) => {
|
|
63
68
|
if (typeof e == "string") return e.trim();
|
|
64
|
-
if (!
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
return
|
|
69
|
-
},
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
72
|
-
if (typeof
|
|
73
|
-
const
|
|
69
|
+
if (!_(e)) return "";
|
|
70
|
+
const o = g(e, ["emoji", "native", "char", "unicode", "value"]);
|
|
71
|
+
if (o) return o;
|
|
72
|
+
const r = ee(e, ["skinToneVariants", "skins", "variants"])?.[0];
|
|
73
|
+
return M(r);
|
|
74
|
+
}, ue = (e) => !!M(e), pe = (e) => Array.isArray(e) ? e.map((o) => {
|
|
75
|
+
const r = M(o);
|
|
76
|
+
if (!r) return null;
|
|
77
|
+
if (typeof o == "string") return { emoji: r };
|
|
78
|
+
const t = _(o) ? o : {};
|
|
74
79
|
return {
|
|
75
|
-
emoji:
|
|
76
|
-
annotation:
|
|
77
|
-
tags:
|
|
78
|
-
tone:
|
|
80
|
+
emoji: r,
|
|
81
|
+
annotation: g(t, ["annotation", "label", "name", "description"]),
|
|
82
|
+
tags: A(t.tags || t.keywords || t.aliases || t.shortcodes),
|
|
83
|
+
tone: g(t, ["tone", "skinTone", "skin_tone"])
|
|
79
84
|
};
|
|
80
|
-
}).filter((
|
|
81
|
-
if (!
|
|
85
|
+
}).filter((o) => !!o) : [], de = (e, o, r) => {
|
|
86
|
+
if (!_(e))
|
|
82
87
|
return {
|
|
83
|
-
key:
|
|
84
|
-
label:
|
|
85
|
-
sort:
|
|
88
|
+
key: o,
|
|
89
|
+
label: o,
|
|
90
|
+
sort: r
|
|
86
91
|
};
|
|
87
|
-
const
|
|
92
|
+
const t = g(e, ["group", "category", "groupName", "categoryName"]) || o, n = g(e, ["groupLabel", "categoryLabel"]) || t, a = K(e, ["groupOrder", "categoryOrder"], Number(t));
|
|
88
93
|
return {
|
|
89
|
-
key:
|
|
94
|
+
key: t,
|
|
90
95
|
label: n,
|
|
91
|
-
sort: Number.isFinite(a) ? a :
|
|
96
|
+
sort: Number.isFinite(a) ? a : r
|
|
92
97
|
};
|
|
93
|
-
},
|
|
94
|
-
const a =
|
|
98
|
+
}, me = (e, o, r, t, n) => {
|
|
99
|
+
const a = M(e);
|
|
95
100
|
if (!a) return null;
|
|
96
|
-
const
|
|
97
|
-
[a, m,
|
|
101
|
+
const i = _(e) ? e : {}, p = de(i, o, t), m = g(i, ["annotation", "label", "name", "description"]) || a, h = A(i.tags || i.keywords || i.aliases || i.shortcodes), z = K(i, ["order", "sortOrder", "sort_order", "index"], n), U = i.skinToneVariants || i.skins || i.variants, B = pe(U).filter((I) => I.emoji !== a), w = p.key || o, ne = p.label || r || w, Ee = G(
|
|
102
|
+
[a, m, ne, ...h, ...B.map((I) => I.annotation || I.emoji)].filter(Boolean).join(" ")
|
|
98
103
|
);
|
|
99
104
|
return {
|
|
100
|
-
key: `${
|
|
105
|
+
key: `${w}-${z}-${a}`,
|
|
101
106
|
emoji: a,
|
|
102
107
|
annotation: m,
|
|
103
|
-
tags:
|
|
104
|
-
groupKey:
|
|
105
|
-
groupLabel:
|
|
106
|
-
groupSort:
|
|
107
|
-
order:
|
|
108
|
-
skinToneVariants:
|
|
109
|
-
searchText:
|
|
108
|
+
tags: h,
|
|
109
|
+
groupKey: w,
|
|
110
|
+
groupLabel: ne,
|
|
111
|
+
groupSort: p.sort,
|
|
112
|
+
order: z,
|
|
113
|
+
skinToneVariants: B,
|
|
114
|
+
searchText: Ee
|
|
110
115
|
};
|
|
111
|
-
},
|
|
112
|
-
if (!(!
|
|
113
|
-
return
|
|
114
|
-
},
|
|
115
|
-
const
|
|
116
|
-
const
|
|
116
|
+
}, D = (e) => {
|
|
117
|
+
if (!(!_(e) || ue(e)))
|
|
118
|
+
return ee(e, ["emojis", "items", "children", "data"]);
|
|
119
|
+
}, he = (e) => {
|
|
120
|
+
const o = [], r = (n, a = "emoji", i = a, p = 0, m = o.length) => {
|
|
121
|
+
const h = me(
|
|
117
122
|
n,
|
|
118
123
|
a,
|
|
119
|
-
|
|
120
|
-
|
|
124
|
+
i,
|
|
125
|
+
p,
|
|
121
126
|
m
|
|
122
127
|
);
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
const
|
|
126
|
-
if (!
|
|
127
|
-
|
|
128
|
+
h && o.push(h);
|
|
129
|
+
}, t = (n, a, i) => {
|
|
130
|
+
const p = D(n);
|
|
131
|
+
if (!p) {
|
|
132
|
+
r(n, "emoji", "emoji", 0, i);
|
|
128
133
|
return;
|
|
129
134
|
}
|
|
130
|
-
const m =
|
|
131
|
-
|
|
135
|
+
const m = _(n) ? n : {}, h = g(m, ["group", "category", "name", "label"]) || a, z = g(m, ["label", "name", "title", "groupLabel", "categoryLabel"]) || h, U = K(m, ["order", "groupOrder", "categoryOrder"], i);
|
|
136
|
+
p.forEach((B, w) => r(B, h, z, U, w));
|
|
132
137
|
};
|
|
133
138
|
if (Array.isArray(e))
|
|
134
139
|
e.forEach((n, a) => {
|
|
135
|
-
|
|
140
|
+
D(n) ? t(n, `group-${a + 1}`, a) : r(n, "emoji", "emoji", 0, a);
|
|
136
141
|
});
|
|
137
|
-
else if (
|
|
138
|
-
const n =
|
|
142
|
+
else if (_(e)) {
|
|
143
|
+
const n = D(e);
|
|
139
144
|
if (n) {
|
|
140
|
-
const a =
|
|
141
|
-
n.forEach((m,
|
|
145
|
+
const a = g(e, ["group", "category", "name", "label"]) || "emoji", i = g(e, ["label", "name", "title", "groupLabel", "categoryLabel"]) || a, p = K(e, ["order", "groupOrder", "categoryOrder"], 0);
|
|
146
|
+
n.forEach((m, h) => r(m, a, i, p, h));
|
|
142
147
|
} else
|
|
143
|
-
Object.entries(e).forEach(([a,
|
|
144
|
-
Array.isArray(
|
|
148
|
+
Object.entries(e).forEach(([a, i], p) => {
|
|
149
|
+
Array.isArray(i) ? i.forEach((m, h) => r(m, a, a, p, h)) : t(i, a, p);
|
|
145
150
|
});
|
|
146
151
|
}
|
|
147
|
-
return
|
|
148
|
-
},
|
|
149
|
-
...
|
|
152
|
+
return o.sort((n, a) => n.groupSort !== a.groupSort ? n.groupSort - a.groupSort : n.order - a.order);
|
|
153
|
+
}, u = s(() => ({
|
|
154
|
+
...ce,
|
|
150
155
|
...l.i18n
|
|
151
|
-
})),
|
|
156
|
+
})), oe = s(() => ({
|
|
152
157
|
...l.i18n?.categories || {},
|
|
153
158
|
...l.i18n?.categoryLabels || {}
|
|
154
|
-
})),
|
|
159
|
+
})), j = s(() => he(l.dataSource)), be = s(() => {
|
|
155
160
|
const e = /* @__PURE__ */ new Map();
|
|
156
|
-
return
|
|
157
|
-
}),
|
|
161
|
+
return j.value.forEach((o) => e.set(o.emoji, o.annotation || o.emoji)), e;
|
|
162
|
+
}), T = s(() => Array.from(new Set(l.quickList.map((e) => e.trim()).filter(Boolean)))), re = s(() => !b.value && T.value.length > 0), x = s(() => G(q.value)), N = s(() => {
|
|
158
163
|
const e = /* @__PURE__ */ new Map();
|
|
159
|
-
return
|
|
160
|
-
e.has(
|
|
161
|
-
key:
|
|
162
|
-
label:
|
|
163
|
-
sort:
|
|
164
|
+
return j.value.forEach((o) => {
|
|
165
|
+
e.has(o.groupKey) || e.set(o.groupKey, {
|
|
166
|
+
key: o.groupKey,
|
|
167
|
+
label: oe.value[o.groupKey] || o.groupLabel,
|
|
168
|
+
sort: o.groupSort
|
|
164
169
|
});
|
|
165
|
-
}), Array.from(e.values()).sort((
|
|
170
|
+
}), Array.from(e.values()).sort((o, r) => o.sort - r.sort);
|
|
166
171
|
});
|
|
167
172
|
Q(
|
|
168
173
|
N,
|
|
169
174
|
(e) => {
|
|
170
175
|
if (!e.length) {
|
|
171
|
-
|
|
176
|
+
y.value = "";
|
|
172
177
|
return;
|
|
173
178
|
}
|
|
174
|
-
e.some((
|
|
179
|
+
e.some((o) => o.key === y.value) || (y.value = e[0].key);
|
|
175
180
|
},
|
|
176
181
|
{ immediate: !0 }
|
|
177
182
|
), Q(
|
|
178
183
|
() => l.initialExpanded,
|
|
179
184
|
(e) => {
|
|
180
|
-
|
|
185
|
+
b.value = e;
|
|
181
186
|
}
|
|
182
|
-
), Q([
|
|
183
|
-
|
|
187
|
+
), Q([x, y], () => {
|
|
188
|
+
C.value = 0;
|
|
184
189
|
});
|
|
185
|
-
const
|
|
190
|
+
const fe = s(() => x.value ? j.value.filter((e) => e.searchText.includes(x.value)) : y.value ? j.value.filter((e) => e.groupKey === y.value) : j.value), F = s(() => {
|
|
186
191
|
const e = /* @__PURE__ */ new Map();
|
|
187
|
-
return
|
|
188
|
-
const
|
|
189
|
-
key:
|
|
190
|
-
label:
|
|
192
|
+
return fe.value.forEach((o) => {
|
|
193
|
+
const r = oe.value[o.groupKey] || o.groupLabel, t = e.get(o.groupKey) || {
|
|
194
|
+
key: o.groupKey,
|
|
195
|
+
label: r,
|
|
191
196
|
items: []
|
|
192
197
|
};
|
|
193
|
-
|
|
198
|
+
t.items.push(o), e.set(o.groupKey, t);
|
|
194
199
|
}), Array.from(e.values());
|
|
195
|
-
}),
|
|
196
|
-
() => N.value.find((e) => e.key ===
|
|
197
|
-
),
|
|
198
|
-
() =>
|
|
200
|
+
}), R = s(() => F.value.flatMap((e) => e.items)), ye = s(
|
|
201
|
+
() => N.value.find((e) => e.key === y.value)?.label || u.value.resultsLabel
|
|
202
|
+
), ge = s(() => x.value ? u.value.resultsLabel : ye.value), H = s(() => !l.initialExpanded && T.value.length > 0), ke = s(
|
|
203
|
+
() => Ke({
|
|
199
204
|
"nmorph-emoji-picker": [
|
|
200
|
-
|
|
201
|
-
|
|
205
|
+
re.value && "compact",
|
|
206
|
+
b.value && "expanded",
|
|
207
|
+
H.value && "collapsible",
|
|
202
208
|
l.disabled && "disabled",
|
|
203
|
-
!
|
|
209
|
+
!j.value.length && "empty"
|
|
204
210
|
]
|
|
205
211
|
})
|
|
206
|
-
),
|
|
207
|
-
...
|
|
212
|
+
), _e = s(() => ({
|
|
213
|
+
...Me({
|
|
208
214
|
"--nmorph-emoji-picker-width": l.width,
|
|
209
215
|
"--nmorph-emoji-picker-height": l.height
|
|
210
216
|
}),
|
|
211
217
|
"--nmorph-emoji-picker-columns": Math.max(1, Math.floor(l.columns))
|
|
212
|
-
})), te = (e) =>
|
|
218
|
+
})), te = (e) => be.value.get(e) || e, ae = (e) => {
|
|
213
219
|
l.disabled || V("select", e);
|
|
214
|
-
},
|
|
215
|
-
l.disabled || (
|
|
216
|
-
},
|
|
217
|
-
l.disabled || !
|
|
220
|
+
}, ve = () => {
|
|
221
|
+
l.disabled || (b.value = !0, V("expand"));
|
|
222
|
+
}, je = () => {
|
|
223
|
+
l.disabled || !H.value || (b.value = !1, V("collapse"));
|
|
224
|
+
}, xe = (e) => {
|
|
225
|
+
if (e) {
|
|
226
|
+
ve();
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
je();
|
|
218
230
|
}, P = async (e) => {
|
|
219
|
-
const
|
|
220
|
-
if (!
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
if (l.disabled || !
|
|
225
|
-
const
|
|
231
|
+
const o = Z.value?.querySelectorAll(".nmorph-emoji-picker__emoji");
|
|
232
|
+
if (!o?.length) return;
|
|
233
|
+
const r = Math.min(Math.max(e, 0), o.length - 1);
|
|
234
|
+
C.value = r, await Ae(), o[r]?.focus();
|
|
235
|
+
}, Le = (e) => {
|
|
236
|
+
if (l.disabled || !R.value.length || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
|
|
237
|
+
const o = Math.max(1, Math.floor(l.columns)), r = R.value.length - 1, t = {
|
|
226
238
|
ArrowRight: 1,
|
|
227
239
|
ArrowLeft: -1,
|
|
228
|
-
ArrowDown:
|
|
229
|
-
ArrowUp: -
|
|
240
|
+
ArrowDown: o,
|
|
241
|
+
ArrowUp: -o
|
|
230
242
|
};
|
|
231
|
-
e.key in
|
|
243
|
+
e.key in t && (e.preventDefault(), P(C.value + t[e.key])), e.key === "Home" && (e.preventDefault(), P(0)), e.key === "End" && (e.preventDefault(), P(r));
|
|
232
244
|
};
|
|
233
|
-
return (e,
|
|
234
|
-
class:
|
|
235
|
-
style:
|
|
245
|
+
return (e, o) => (c(), d("div", {
|
|
246
|
+
class: J(ke.value),
|
|
247
|
+
style: Se(_e.value),
|
|
236
248
|
lang: l.language
|
|
237
249
|
}, [
|
|
238
|
-
|
|
250
|
+
H.value ? (c(), le(f(Ne), {
|
|
239
251
|
key: 0,
|
|
252
|
+
class: J(["nmorph-emoji-picker__toggle-button nmorph-emoji-picker__expand-button", { "nmorph-emoji-picker__collapse-button": b.value }]),
|
|
253
|
+
design: "button",
|
|
254
|
+
"model-value": b.value,
|
|
255
|
+
"aria-label": b.value ? u.value.collapseLabel : u.value.expandLabel,
|
|
256
|
+
title: b.value ? u.value.collapseLabel : u.value.expandLabel,
|
|
257
|
+
disabled: l.disabled,
|
|
258
|
+
onClick: o[0] || (o[0] = Ce((r) => xe(!b.value), ["prevent"]))
|
|
259
|
+
}, {
|
|
260
|
+
label: v(() => [
|
|
261
|
+
k(f(X), { size: "small" }, {
|
|
262
|
+
default: v(() => [
|
|
263
|
+
k(f(ze))
|
|
264
|
+
]),
|
|
265
|
+
_: 1
|
|
266
|
+
}),
|
|
267
|
+
L("span", Ve, E(b.value ? u.value.collapseLabel : u.value.expandLabel), 1)
|
|
268
|
+
]),
|
|
269
|
+
_: 1
|
|
270
|
+
}, 8, ["class", "model-value", "aria-label", "title", "disabled"])) : W("", !0),
|
|
271
|
+
re.value ? (c(), d("div", {
|
|
272
|
+
key: 1,
|
|
240
273
|
class: "nmorph-emoji-picker__compact",
|
|
241
274
|
role: "group",
|
|
242
|
-
"aria-label":
|
|
275
|
+
"aria-label": u.value.quickLabel
|
|
243
276
|
}, [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
277
|
+
k(f(Y), {
|
|
278
|
+
class: "nmorph-emoji-picker__quick-list",
|
|
279
|
+
height: "calc(var(--nmorph-emoji-picker-cell-size) + var(--nmorph-emoji-picker-scrollbar-size))",
|
|
280
|
+
"max-height": "calc(var(--nmorph-emoji-picker-cell-size) + var(--nmorph-emoji-picker-scrollbar-size))",
|
|
281
|
+
"scroll-y-prop": "hidden",
|
|
282
|
+
"scroll-x-prop": "auto",
|
|
283
|
+
"css-scroll-behavior": "auto",
|
|
284
|
+
"x-bar-width-in-px": 6
|
|
285
|
+
}, {
|
|
286
|
+
default: v(() => [
|
|
287
|
+
(c(!0), d(O, null, $(T.value, (r) => (c(), d("button", {
|
|
288
|
+
key: r,
|
|
289
|
+
type: "button",
|
|
290
|
+
class: "nmorph-emoji-picker__quick-button",
|
|
291
|
+
"aria-label": te(r),
|
|
292
|
+
title: te(r),
|
|
293
|
+
disabled: l.disabled,
|
|
294
|
+
onClick: (t) => ae(r)
|
|
295
|
+
}, E(r), 9, De))), 128))
|
|
296
|
+
]),
|
|
297
|
+
_: 1
|
|
298
|
+
})
|
|
299
|
+
], 8, qe)) : (c(), d("div", Te, [
|
|
300
|
+
L("div", Fe, [
|
|
301
|
+
k(f(Be), {
|
|
302
|
+
modelValue: q.value,
|
|
303
|
+
"onUpdate:modelValue": o[1] || (o[1] = (r) => q.value = r),
|
|
304
|
+
class: "nmorph-emoji-picker__search",
|
|
305
|
+
placeholder: u.value.searchPlaceholder,
|
|
251
306
|
disabled: l.disabled,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
_(k(Ie))
|
|
307
|
+
"input-attrs": {
|
|
308
|
+
class: "nmorph-emoji-picker__search-input",
|
|
309
|
+
role: "searchbox",
|
|
310
|
+
"aria-label": u.value.searchLabel
|
|
311
|
+
}
|
|
312
|
+
}, {
|
|
313
|
+
"prepend-icon": v(() => [
|
|
314
|
+
k(f(X), { size: "small" }, {
|
|
315
|
+
default: v(() => [
|
|
316
|
+
k(f(Ie))
|
|
317
|
+
]),
|
|
318
|
+
_: 1
|
|
319
|
+
})
|
|
266
320
|
]),
|
|
267
321
|
_: 1
|
|
268
|
-
})
|
|
269
|
-
], 8, De)
|
|
270
|
-
], 8, ze)) : (c(), u("div", Ve, [
|
|
271
|
-
y("div", Te, [
|
|
272
|
-
y("label", {
|
|
273
|
-
class: "nmorph-emoji-picker__search",
|
|
274
|
-
"aria-label": p.value.searchLabel
|
|
275
|
-
}, [
|
|
276
|
-
_(k(D), {
|
|
277
|
-
size: "small",
|
|
278
|
-
class: "nmorph-emoji-picker__search-icon"
|
|
279
|
-
}, {
|
|
280
|
-
default: q(() => [
|
|
281
|
-
_(k(Ke))
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
}),
|
|
285
|
-
Ce(y("input", {
|
|
286
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) => T.value = o),
|
|
287
|
-
class: "nmorph-emoji-picker__search-input",
|
|
288
|
-
type: "search",
|
|
289
|
-
placeholder: p.value.searchPlaceholder,
|
|
290
|
-
"aria-label": p.value.searchLabel,
|
|
291
|
-
disabled: l.disabled
|
|
292
|
-
}, null, 8, Fe), [
|
|
293
|
-
[Ee, T.value]
|
|
294
|
-
])
|
|
295
|
-
], 8, $e),
|
|
296
|
-
ee.value ? (c(), u("button", {
|
|
297
|
-
key: 0,
|
|
298
|
-
type: "button",
|
|
299
|
-
class: "nmorph-emoji-picker__collapse-button",
|
|
300
|
-
"aria-label": p.value.collapseLabel,
|
|
301
|
-
title: p.value.collapseLabel,
|
|
302
|
-
disabled: l.disabled,
|
|
303
|
-
onClick: ke
|
|
304
|
-
}, [
|
|
305
|
-
_(k(D), { size: "small" }, {
|
|
306
|
-
default: q(() => [
|
|
307
|
-
_(k(Ne))
|
|
308
|
-
]),
|
|
309
|
-
_: 1
|
|
310
|
-
})
|
|
311
|
-
], 8, Re)) : J("", !0)
|
|
322
|
+
}, 8, ["modelValue", "placeholder", "disabled", "input-attrs"])
|
|
312
323
|
]),
|
|
313
|
-
N.value.length && !
|
|
324
|
+
N.value.length && !x.value ? (c(), le(f(Y), {
|
|
314
325
|
key: 0,
|
|
315
326
|
class: "nmorph-emoji-picker__categories",
|
|
327
|
+
height: "40px",
|
|
328
|
+
"max-height": "40px",
|
|
329
|
+
"scroll-y-prop": "hidden",
|
|
330
|
+
"scroll-x-prop": "auto",
|
|
331
|
+
"css-scroll-behavior": "auto",
|
|
332
|
+
"x-bar-width-in-px": 6,
|
|
333
|
+
"x-gap-in-px": 6,
|
|
316
334
|
role: "tablist",
|
|
317
|
-
"aria-label":
|
|
318
|
-
},
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
335
|
+
"aria-label": u.value.categoryLabel
|
|
336
|
+
}, {
|
|
337
|
+
default: v(() => [
|
|
338
|
+
(c(!0), d(O, null, $(N.value, (r) => (c(), d("button", {
|
|
339
|
+
key: r.key,
|
|
340
|
+
type: "button",
|
|
341
|
+
class: J(["nmorph-emoji-picker__category", { "nmorph-emoji-picker__category--active": r.key === y.value }]),
|
|
342
|
+
role: "tab",
|
|
343
|
+
"aria-selected": r.key === y.value,
|
|
344
|
+
disabled: l.disabled,
|
|
345
|
+
onClick: (t) => y.value = r.key
|
|
346
|
+
}, E(r.label), 11, Re))), 128))
|
|
347
|
+
]),
|
|
348
|
+
_: 1
|
|
349
|
+
}, 8, ["aria-label"])) : W("", !0),
|
|
350
|
+
k(f(Y), {
|
|
332
351
|
class: "nmorph-emoji-picker__body",
|
|
333
|
-
"
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
352
|
+
height: "100%",
|
|
353
|
+
"max-height": "100%",
|
|
354
|
+
"scroll-x-prop": "hidden",
|
|
355
|
+
"scroll-y-prop": "auto",
|
|
356
|
+
"css-scroll-behavior": "auto",
|
|
357
|
+
"y-bar-width-in-px": 8
|
|
358
|
+
}, {
|
|
359
|
+
default: v(() => [
|
|
360
|
+
L("div", {
|
|
361
|
+
ref_key: "gridRef",
|
|
362
|
+
ref: Z,
|
|
363
|
+
class: "nmorph-emoji-picker__body-content",
|
|
364
|
+
"aria-label": ge.value,
|
|
365
|
+
onKeydown: Le
|
|
366
|
+
}, [
|
|
367
|
+
F.value.length ? (c(!0), d(O, { key: 0 }, $(F.value, (r) => (c(), d("section", {
|
|
343
368
|
key: r.key,
|
|
344
|
-
|
|
345
|
-
class: "nmorph-emoji-picker__emoji",
|
|
346
|
-
"aria-label": r.annotation,
|
|
347
|
-
title: r.annotation,
|
|
348
|
-
disabled: l.disabled,
|
|
349
|
-
onFocus: (n) => w.value = H.value.findIndex((a) => a.key === r.key),
|
|
350
|
-
onClick: (n) => oe(r.emoji)
|
|
369
|
+
class: "nmorph-emoji-picker__section"
|
|
351
370
|
}, [
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
371
|
+
x.value ? (c(), d("div", Pe, E(r.label), 1)) : W("", !0),
|
|
372
|
+
L("div", Ue, [
|
|
373
|
+
(c(!0), d(O, null, $(r.items, (t) => (c(), d("button", {
|
|
374
|
+
key: t.key,
|
|
375
|
+
type: "button",
|
|
376
|
+
class: "nmorph-emoji-picker__emoji",
|
|
377
|
+
"aria-label": t.annotation,
|
|
378
|
+
title: t.annotation,
|
|
379
|
+
disabled: l.disabled,
|
|
380
|
+
onFocus: (n) => C.value = R.value.findIndex((a) => a.key === t.key),
|
|
381
|
+
onClick: (n) => ae(t.emoji)
|
|
382
|
+
}, [
|
|
383
|
+
L("span", Je, E(t.emoji), 1)
|
|
384
|
+
], 40, Qe))), 128))
|
|
385
|
+
])
|
|
386
|
+
]))), 128)) : (c(), d("div", We, [
|
|
387
|
+
k(f(X), null, {
|
|
388
|
+
default: v(() => [
|
|
389
|
+
k(f(Oe))
|
|
390
|
+
]),
|
|
391
|
+
_: 1
|
|
392
|
+
}),
|
|
393
|
+
L("span", null, E(u.value.noResults), 1)
|
|
394
|
+
]))
|
|
395
|
+
], 40, He)
|
|
396
|
+
]),
|
|
397
|
+
_: 1
|
|
398
|
+
})
|
|
365
399
|
]))
|
|
366
|
-
], 14,
|
|
400
|
+
], 14, $e));
|
|
367
401
|
}
|
|
368
402
|
});
|
|
369
403
|
export {
|
|
370
|
-
|
|
404
|
+
uo as default
|
|
371
405
|
};
|