@nice2dev/ui 1.4.16 → 1.4.18
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/CHANGELOG.md +57 -0
- package/dist/NiceAlert-RVTgQxCE.cjs +1 -0
- package/dist/NiceDataGrid-Cszjz8NV.cjs +10 -0
- package/dist/NiceForm-DM2tARZT.cjs +1 -0
- package/dist/{NiceHtmlEditor-By7R1wRo.cjs → NiceHtmlEditor-BEWNA_UI.cjs} +1 -1
- package/dist/NiceLoginForm-Bkm5j80r.cjs +1 -0
- package/dist/{NiceMention-i7n2BoMw.cjs → NiceMention-DhaTUqvR.cjs} +1 -1
- package/dist/NiceModuleLifecyclePanel-DAIbzfZd.cjs +1 -0
- package/dist/{NicePagination-D9JguOl0.cjs → NicePagination-CnKYyKI5.cjs} +1 -1
- package/dist/{NicePivotGrid-B_7iQJys.cjs → NicePivotGrid-BshofJh1.cjs} +1 -1
- package/dist/NiceSavedQueryPanel-DJKEOqy5.cjs +587 -0
- package/dist/{NiceScheduler-B2DamQ_L.cjs → NiceScheduler-Dff8fuq_.cjs} +1 -1
- package/dist/{core-lazy-ChKRuEPb.cjs → core-lazy-BhQxFuLf.cjs} +1 -1
- package/dist/data/NiceRowEditDialog.mjs +42 -35
- package/dist/data/NiceTreeGrid.mjs +512 -474
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +30 -3
- package/dist/editors/forms/NiceForm.mjs +55 -52
- package/dist/editors/inputs/NiceRadioGroup.mjs +12 -12
- package/dist/editors/inputs/NiceSelect.mjs +51 -51
- package/dist/editors/pickers/NiceLanguagePicker.mjs +129 -125
- package/dist/editors/pickers/NiceThemePicker.mjs +1 -1
- package/dist/editors/pickers/pickerCommons.mjs +155 -203
- package/dist/editors.cjs +1 -1
- package/dist/feedback.cjs +1 -1
- package/dist/index.cjs +96 -96
- package/dist/index.d.ts +41 -7
- package/dist/lazy.cjs +1 -1
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.d.ts +6 -0
- package/dist/{no-code-CN_q6TcB.cjs → no-code-DPc82kyy.cjs} +11 -11
- package/dist/no-code.cjs +1 -1
- package/dist/pickerCommons-CQnae2FM.cjs +1 -0
- package/dist/style.css +2 -2
- package/dist/tools/NiceThemeGalleryPicker.mjs +168 -265
- package/package.json +4 -4
- package/dist/NiceDataGrid-B1AOjgjm.cjs +0 -10
- package/dist/NiceForm-fmePSeA9.cjs +0 -1
- package/dist/NiceLoginForm-C2-WgRn0.cjs +0 -1
- package/dist/NiceModuleLifecyclePanel-DVHQuhc-.cjs +0 -1
- package/dist/NiceSavedQueryPanel-ChY4HwpM.cjs +0 -587
- package/dist/pickerCommons-CwcCc8Qi.cjs +0 -1
|
@@ -1,208 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useNiceTranslation as
|
|
3
|
-
import
|
|
4
|
-
import { NiceModal as
|
|
5
|
-
import { NICE_THEME_CATALOG_ENTRIES as ae, NICE_THEME_CATALOG as
|
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation as K, useControllableState as Q, useRovingFocus as B, NiceIcon as U, themePreviewRoles as Z } from "@nice2dev/ui-core";
|
|
3
|
+
import { useState as N, useRef as j } from "react";
|
|
4
|
+
import { NiceModal as ee } from "../feedback/NiceModal.mjs";
|
|
5
|
+
import { NICE_THEME_CATALOG_ENTRIES as ae, NICE_THEME_CATALOG as te } from "./themeCatalog.mjs";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const
|
|
8
|
-
backgroundColor:
|
|
9
|
-
backgroundImage:
|
|
10
|
-
}),
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
7
|
+
const w = (a, s) => ({
|
|
8
|
+
backgroundColor: a,
|
|
9
|
+
backgroundImage: s
|
|
10
|
+
}), le = ({ roles: a, width: s = 240, label: _ }) => {
|
|
11
|
+
const c = s, g = Math.round(c * 0.62), n = Math.round(g * 0.18), h = Math.round(c * 0.26), t = Math.max(5, Math.round(c * 0.05)), l = Math.max(3, Math.round(g * 0.07)), p = h + t, y = n + t, b = c - p - t, v = g - y - t, C = Math.max(2, Math.round(c * 0.02)), d = (k) => /* @__PURE__ */ r("span", { style: { position: "absolute", ...k } });
|
|
12
|
+
return /* @__PURE__ */ u(
|
|
13
13
|
"span",
|
|
14
14
|
{
|
|
15
15
|
className: "nice-theme-gallery__preview",
|
|
16
16
|
role: "img",
|
|
17
|
-
"aria-label":
|
|
17
|
+
"aria-label": _,
|
|
18
18
|
style: {
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
21
|
-
...
|
|
22
|
-
borderColor:
|
|
19
|
+
width: c,
|
|
20
|
+
height: g,
|
|
21
|
+
...w(a.body, a.bodyImage),
|
|
22
|
+
borderColor: a.panelBorder
|
|
23
23
|
},
|
|
24
24
|
children: [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
top: Math.round(n * 0.28),
|
|
28
|
-
left: r,
|
|
29
|
-
width: Math.round(n * 0.44),
|
|
30
|
-
height: Math.round(n * 0.44),
|
|
31
|
-
borderRadius: "30%",
|
|
32
|
-
background: e.primary
|
|
33
|
-
}),
|
|
34
|
-
o({
|
|
35
|
-
top: Math.round(n * 0.42),
|
|
36
|
-
left: r + n,
|
|
37
|
-
width: Math.round(d * 0.2),
|
|
38
|
-
height: a,
|
|
39
|
-
borderRadius: a,
|
|
40
|
-
background: e.topNavText,
|
|
41
|
-
opacity: 0.85
|
|
42
|
-
}),
|
|
43
|
-
o({
|
|
44
|
-
top: Math.round(n * 0.22),
|
|
45
|
-
right: r,
|
|
46
|
-
width: Math.round(n * 0.56),
|
|
47
|
-
height: Math.round(n * 0.56),
|
|
48
|
-
borderRadius: "50%",
|
|
49
|
-
background: e.accent
|
|
50
|
-
}),
|
|
51
|
-
o({
|
|
25
|
+
d({ top: 0, left: 0, right: 0, height: n, ...w(a.topNav, a.topNavImage) }),
|
|
26
|
+
d({
|
|
52
27
|
top: n,
|
|
53
28
|
bottom: 0,
|
|
54
29
|
left: 0,
|
|
55
|
-
width:
|
|
56
|
-
...
|
|
30
|
+
width: h,
|
|
31
|
+
...w(a.sideNav, a.sideNavImage)
|
|
57
32
|
}),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
o({
|
|
61
|
-
top: n + m * p + Math.round((p - a) / 2),
|
|
62
|
-
left: r,
|
|
63
|
-
width: Math.round(s * (0.6 - m * 0.1)),
|
|
64
|
-
height: a,
|
|
65
|
-
borderRadius: a,
|
|
66
|
-
background: e.headerTexts[m] ?? e.sideNavText,
|
|
67
|
-
opacity: 0.8
|
|
68
|
-
})
|
|
69
|
-
] }, m)),
|
|
70
|
-
o({
|
|
71
|
-
top: n + e.headers.length * p + Math.round(p * 0.3),
|
|
33
|
+
d({
|
|
34
|
+
top: n + t,
|
|
72
35
|
left: 0,
|
|
73
|
-
width:
|
|
74
|
-
height:
|
|
75
|
-
background:
|
|
36
|
+
width: h,
|
|
37
|
+
height: l * 2,
|
|
38
|
+
background: a.highlight
|
|
76
39
|
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
opacity: 0.55
|
|
86
|
-
})
|
|
87
|
-
),
|
|
88
|
-
o({
|
|
89
|
-
top: n + r,
|
|
90
|
-
left: u,
|
|
91
|
-
width: Math.round(M * 0.45),
|
|
92
|
-
height: a * 1.6,
|
|
93
|
-
borderRadius: a,
|
|
94
|
-
background: e.text,
|
|
95
|
-
opacity: 0.9
|
|
40
|
+
d({
|
|
41
|
+
top: y,
|
|
42
|
+
left: p,
|
|
43
|
+
width: b,
|
|
44
|
+
height: v,
|
|
45
|
+
...w(a.panel, a.panelImage),
|
|
46
|
+
border: `1px solid ${a.panelBorder}`,
|
|
47
|
+
borderRadius: C
|
|
96
48
|
}),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
borderRadius: Math.max(2, Math.round(d * 0.012))
|
|
106
|
-
}),
|
|
107
|
-
o({
|
|
108
|
-
top: w + Math.round(x * 0.22),
|
|
109
|
-
left: u + l * (_ + r) + r,
|
|
110
|
-
width: Math.round(_ * 0.45),
|
|
111
|
-
height: a,
|
|
112
|
-
borderRadius: a,
|
|
113
|
-
background: e.text,
|
|
114
|
-
opacity: 0.5
|
|
115
|
-
}),
|
|
116
|
-
o({
|
|
117
|
-
top: w + Math.round(x * 0.55),
|
|
118
|
-
left: u + l * (_ + r) + r,
|
|
119
|
-
width: Math.round(_ * 0.6),
|
|
120
|
-
height: a * 2,
|
|
121
|
-
borderRadius: a,
|
|
122
|
-
background: l === 0 ? e.primary : e.accent
|
|
123
|
-
})
|
|
124
|
-
] }, l)),
|
|
125
|
-
o({
|
|
126
|
-
top: c,
|
|
127
|
-
left: u,
|
|
128
|
-
width: M,
|
|
129
|
-
height: k,
|
|
130
|
-
...T(e.panel, e.panelImage),
|
|
131
|
-
border: `1px solid ${e.panelBorder}`,
|
|
132
|
-
borderRadius: Math.max(2, Math.round(d * 0.012))
|
|
133
|
-
}),
|
|
134
|
-
C.map(
|
|
135
|
-
(l, m) => o({
|
|
136
|
-
bottom: i - c - k + r,
|
|
137
|
-
left: u + r + Math.round(m * N * 1.6),
|
|
138
|
-
width: N,
|
|
139
|
-
height: Math.round((k - r * 2) * l),
|
|
140
|
-
borderRadius: `${Math.max(1, Math.round(N * 0.25))}px ${Math.max(1, Math.round(N * 0.25))}px 0 0`,
|
|
141
|
-
background: m % 3 === 2 ? e.accent : e.primary,
|
|
142
|
-
opacity: m % 3 === 1 ? 0.65 : 1
|
|
143
|
-
})
|
|
144
|
-
),
|
|
145
|
-
o({
|
|
146
|
-
top: R,
|
|
147
|
-
left: u,
|
|
148
|
-
width: Math.round(M * 0.3),
|
|
149
|
-
height: a * 3,
|
|
150
|
-
borderRadius: a * 1.5,
|
|
151
|
-
background: e.primary
|
|
49
|
+
d({
|
|
50
|
+
top: y + t,
|
|
51
|
+
left: p + t,
|
|
52
|
+
width: Math.round((b - t * 2) * 0.7),
|
|
53
|
+
height: l,
|
|
54
|
+
borderRadius: l,
|
|
55
|
+
background: a.text,
|
|
56
|
+
opacity: 0.85
|
|
152
57
|
}),
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
left:
|
|
156
|
-
width: Math.round(
|
|
157
|
-
height:
|
|
158
|
-
borderRadius:
|
|
159
|
-
|
|
160
|
-
boxSizing: "border-box"
|
|
58
|
+
d({
|
|
59
|
+
bottom: t * 2,
|
|
60
|
+
left: p + t,
|
|
61
|
+
width: Math.round((b - t * 2) * 0.42),
|
|
62
|
+
height: l * 2,
|
|
63
|
+
borderRadius: l,
|
|
64
|
+
background: a.primary
|
|
161
65
|
}),
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
right:
|
|
165
|
-
width: Math.round(
|
|
166
|
-
height:
|
|
167
|
-
borderRadius:
|
|
168
|
-
background:
|
|
169
|
-
opacity: 0.85
|
|
66
|
+
d({
|
|
67
|
+
bottom: t * 2 + Math.round(l / 2),
|
|
68
|
+
right: t * 2,
|
|
69
|
+
width: Math.round((b - t * 2) * 0.24),
|
|
70
|
+
height: l,
|
|
71
|
+
borderRadius: l,
|
|
72
|
+
background: a.accent
|
|
170
73
|
})
|
|
171
74
|
]
|
|
172
75
|
}
|
|
173
76
|
);
|
|
174
|
-
},
|
|
175
|
-
({ id:
|
|
77
|
+
}, re = /* @__PURE__ */ te.map(
|
|
78
|
+
({ id: a, label: s }) => ({ id: a, label: s })
|
|
176
79
|
);
|
|
177
|
-
function
|
|
178
|
-
item:
|
|
179
|
-
selected:
|
|
180
|
-
width:
|
|
181
|
-
categoryLabel:
|
|
182
|
-
previewLabel:
|
|
80
|
+
function ne({
|
|
81
|
+
item: a,
|
|
82
|
+
selected: s,
|
|
83
|
+
width: _,
|
|
84
|
+
categoryLabel: c,
|
|
85
|
+
previewLabel: g,
|
|
183
86
|
extra: n,
|
|
184
|
-
className:
|
|
185
|
-
onPick:
|
|
87
|
+
className: h,
|
|
88
|
+
onPick: t
|
|
186
89
|
}) {
|
|
187
|
-
const
|
|
188
|
-
return /* @__PURE__ */
|
|
90
|
+
const l = Z(a.theme);
|
|
91
|
+
return /* @__PURE__ */ u(
|
|
189
92
|
"button",
|
|
190
93
|
{
|
|
191
94
|
type: "button",
|
|
192
|
-
"aria-pressed":
|
|
193
|
-
className: `nice-theme-gallery__card${
|
|
95
|
+
"aria-pressed": s,
|
|
96
|
+
className: `nice-theme-gallery__card${h ? ` ${h}` : ""}`,
|
|
194
97
|
style: {
|
|
195
|
-
"--nice-tgp-accent":
|
|
196
|
-
"--nice-tgp-surface":
|
|
197
|
-
"--nice-tgp-text":
|
|
98
|
+
"--nice-tgp-accent": l.primary,
|
|
99
|
+
"--nice-tgp-surface": l.panel,
|
|
100
|
+
"--nice-tgp-text": l.text
|
|
198
101
|
},
|
|
199
|
-
title:
|
|
200
|
-
onClick:
|
|
102
|
+
title: a.name,
|
|
103
|
+
onClick: t,
|
|
201
104
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
|
|
105
|
+
/* @__PURE__ */ r(le, { roles: l, width: _, label: g }),
|
|
106
|
+
/* @__PURE__ */ u("span", { className: "nice-theme-gallery__footer", children: [
|
|
107
|
+
/* @__PURE__ */ r("span", { className: "nice-theme-gallery__name", children: a.name }),
|
|
108
|
+
c && /* @__PURE__ */ r("span", { className: "nice-theme-gallery__meta", children: c })
|
|
206
109
|
] }),
|
|
207
110
|
n
|
|
208
111
|
]
|
|
@@ -210,145 +113,145 @@ function le({
|
|
|
210
113
|
);
|
|
211
114
|
}
|
|
212
115
|
const me = ({
|
|
213
|
-
themes:
|
|
214
|
-
categories:
|
|
215
|
-
value:
|
|
216
|
-
defaultValue:
|
|
217
|
-
onChange:
|
|
116
|
+
themes: a = ae,
|
|
117
|
+
categories: s = re,
|
|
118
|
+
value: _,
|
|
119
|
+
defaultValue: c,
|
|
120
|
+
onChange: g,
|
|
218
121
|
limit: n,
|
|
219
|
-
previewWidth:
|
|
220
|
-
searchable:
|
|
221
|
-
renderCardExtra:
|
|
122
|
+
previewWidth: h = 240,
|
|
123
|
+
searchable: t = !1,
|
|
124
|
+
renderCardExtra: l,
|
|
222
125
|
cardClassName: p,
|
|
223
|
-
className:
|
|
224
|
-
style:
|
|
225
|
-
id:
|
|
226
|
-
title:
|
|
227
|
-
label:
|
|
228
|
-
"data-testid":
|
|
126
|
+
className: y,
|
|
127
|
+
style: b,
|
|
128
|
+
id: v,
|
|
129
|
+
title: C,
|
|
130
|
+
label: d,
|
|
131
|
+
"data-testid": k
|
|
229
132
|
}) => {
|
|
230
|
-
const { t:
|
|
231
|
-
value:
|
|
232
|
-
defaultValue:
|
|
133
|
+
const { t: m } = K(), [x, W] = Q({
|
|
134
|
+
value: _,
|
|
135
|
+
defaultValue: c,
|
|
233
136
|
fallbackValue: null,
|
|
234
137
|
componentName: "NiceThemeGalleryPicker"
|
|
235
|
-
}), [
|
|
236
|
-
|
|
138
|
+
}), [S, q] = N(""), [V, R] = N(!1), [E, X] = N(""), [M, Y] = N(""), I = j(null), A = j(null);
|
|
139
|
+
B(I, {
|
|
237
140
|
orientation: n ? "horizontal" : "grid",
|
|
238
141
|
itemSelector: ".nice-theme-gallery__card"
|
|
239
|
-
}),
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
142
|
+
}), B(A, { orientation: "grid", itemSelector: ".nice-theme-gallery__card" });
|
|
143
|
+
const f = d ?? m("themeGallery.title", "Theme gallery"), D = m("pickerCommons.themePreview", "Theme preview"), T = (e) => {
|
|
144
|
+
if (!e)
|
|
242
145
|
return;
|
|
243
|
-
const
|
|
244
|
-
return
|
|
245
|
-
},
|
|
246
|
-
const
|
|
247
|
-
return !
|
|
248
|
-
},
|
|
249
|
-
const
|
|
250
|
-
if (!n ||
|
|
251
|
-
return
|
|
252
|
-
const
|
|
253
|
-
return
|
|
254
|
-
})(),
|
|
255
|
-
(
|
|
256
|
-
),
|
|
257
|
-
|
|
258
|
-
},
|
|
259
|
-
|
|
146
|
+
const o = s.find((i) => i.id === e);
|
|
147
|
+
return m(`theme.category.${e}`, o?.label ?? e);
|
|
148
|
+
}, L = (e, o) => {
|
|
149
|
+
const i = o.trim().toLowerCase();
|
|
150
|
+
return !i || e.name.toLowerCase().includes(i) || (T(e.category) ?? "").toLowerCase().includes(i);
|
|
151
|
+
}, $ = (() => {
|
|
152
|
+
const e = a.filter((G) => L(G, S));
|
|
153
|
+
if (!n || e.length <= n)
|
|
154
|
+
return e;
|
|
155
|
+
const o = e.slice(0, n), i = e.find((G) => G.name === x);
|
|
156
|
+
return i && !o.includes(i) && (o[o.length - 1] = i), o;
|
|
157
|
+
})(), P = s.filter((e) => a.some((o) => o.category === e.id)), O = a.filter(
|
|
158
|
+
(e) => (!M || e.category === M) && L(e, E)
|
|
159
|
+
), J = (e) => {
|
|
160
|
+
W(e.name), g?.(e.name, e);
|
|
161
|
+
}, F = (e) => /* @__PURE__ */ r(
|
|
162
|
+
ne,
|
|
260
163
|
{
|
|
261
|
-
item:
|
|
262
|
-
selected:
|
|
263
|
-
width:
|
|
264
|
-
categoryLabel:
|
|
265
|
-
previewLabel:
|
|
266
|
-
extra:
|
|
267
|
-
className: p?.(
|
|
268
|
-
onPick: () =>
|
|
164
|
+
item: e,
|
|
165
|
+
selected: e.name === x,
|
|
166
|
+
width: h,
|
|
167
|
+
categoryLabel: T(e.category),
|
|
168
|
+
previewLabel: D,
|
|
169
|
+
extra: l?.(e),
|
|
170
|
+
className: p?.(e),
|
|
171
|
+
onPick: () => J(e)
|
|
269
172
|
},
|
|
270
|
-
|
|
271
|
-
),
|
|
173
|
+
e.name
|
|
174
|
+
), H = (e, o) => /* @__PURE__ */ r(
|
|
272
175
|
"input",
|
|
273
176
|
{
|
|
274
177
|
type: "search",
|
|
275
178
|
className: "nice-input nice-theme-gallery__search",
|
|
276
|
-
value:
|
|
277
|
-
onChange: (
|
|
278
|
-
placeholder:
|
|
279
|
-
"aria-label":
|
|
179
|
+
value: e,
|
|
180
|
+
onChange: (i) => o(i.target.value),
|
|
181
|
+
placeholder: m("themeGallery.search", "Search themes…"),
|
|
182
|
+
"aria-label": m("themeGallery.search", "Search themes…")
|
|
280
183
|
}
|
|
281
|
-
),
|
|
282
|
-
return /* @__PURE__ */
|
|
184
|
+
), z = { "--nice-tgp-card-width": `${h + 20}px` };
|
|
185
|
+
return /* @__PURE__ */ u(
|
|
283
186
|
"div",
|
|
284
187
|
{
|
|
285
|
-
id:
|
|
286
|
-
className: `nice-theme-gallery${
|
|
287
|
-
style: { ...
|
|
288
|
-
title:
|
|
289
|
-
"data-testid":
|
|
188
|
+
id: v,
|
|
189
|
+
className: `nice-theme-gallery${y ? ` ${y}` : ""}`,
|
|
190
|
+
style: { ...z, ...b },
|
|
191
|
+
title: C,
|
|
192
|
+
"data-testid": k,
|
|
290
193
|
children: [
|
|
291
|
-
|
|
292
|
-
/* @__PURE__ */
|
|
194
|
+
t && H(S, q),
|
|
195
|
+
/* @__PURE__ */ r(
|
|
293
196
|
"div",
|
|
294
197
|
{
|
|
295
|
-
ref:
|
|
198
|
+
ref: I,
|
|
296
199
|
className: `nice-theme-gallery__grid${n ? " nice-theme-gallery__grid--row" : ""}`,
|
|
297
200
|
role: "group",
|
|
298
|
-
"aria-label":
|
|
299
|
-
children:
|
|
201
|
+
"aria-label": f,
|
|
202
|
+
children: $.map(F)
|
|
300
203
|
}
|
|
301
204
|
),
|
|
302
|
-
|
|
303
|
-
n !== void 0 &&
|
|
205
|
+
$.length === 0 && /* @__PURE__ */ r("p", { className: "nice-theme-gallery__empty", children: m("themeGallery.empty", "No theme matches the search.") }),
|
|
206
|
+
n !== void 0 && a.length > n && /* @__PURE__ */ u(
|
|
304
207
|
"button",
|
|
305
208
|
{
|
|
306
209
|
type: "button",
|
|
307
210
|
className: "nice-theme-gallery__more",
|
|
308
|
-
onClick: () =>
|
|
211
|
+
onClick: () => R(!0),
|
|
309
212
|
"aria-haspopup": "dialog",
|
|
310
213
|
children: [
|
|
311
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ r(U, { name: "grid", size: 14 }),
|
|
312
215
|
" ",
|
|
313
|
-
|
|
314
|
-
/* @__PURE__ */
|
|
216
|
+
m("themeGallery.showMore", "Show more"),
|
|
217
|
+
/* @__PURE__ */ r("span", { className: "nice-theme-gallery__count", children: a.length })
|
|
315
218
|
]
|
|
316
219
|
}
|
|
317
220
|
),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
|
|
221
|
+
/* @__PURE__ */ r(
|
|
222
|
+
ee,
|
|
320
223
|
{
|
|
321
|
-
open:
|
|
322
|
-
onClose: () =>
|
|
323
|
-
title:
|
|
224
|
+
open: V,
|
|
225
|
+
onClose: () => R(!1),
|
|
226
|
+
title: f,
|
|
324
227
|
size: "xl",
|
|
325
228
|
className: "nice-theme-gallery__modal",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
|
|
329
|
-
|
|
229
|
+
children: /* @__PURE__ */ u("div", { className: "nice-theme-gallery", style: z, children: [
|
|
230
|
+
/* @__PURE__ */ u("div", { className: "nice-theme-gallery__toolbar", children: [
|
|
231
|
+
H(E, X),
|
|
232
|
+
P.length > 1 && /* @__PURE__ */ r("div", { className: "nice-theme-gallery__tabs", role: "group", "aria-label": f, children: [{ id: "", label: m("themeGallery.all", "All") }, ...P].map((e) => /* @__PURE__ */ r(
|
|
330
233
|
"button",
|
|
331
234
|
{
|
|
332
235
|
type: "button",
|
|
333
236
|
className: "nice-theme-gallery__tab",
|
|
334
|
-
"aria-pressed":
|
|
335
|
-
onClick: () =>
|
|
336
|
-
children:
|
|
237
|
+
"aria-pressed": M === e.id,
|
|
238
|
+
onClick: () => Y(e.id),
|
|
239
|
+
children: e.id ? T(e.id) : e.label
|
|
337
240
|
},
|
|
338
|
-
|
|
241
|
+
e.id
|
|
339
242
|
)) })
|
|
340
243
|
] }),
|
|
341
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ r(
|
|
342
245
|
"div",
|
|
343
246
|
{
|
|
344
|
-
ref:
|
|
247
|
+
ref: A,
|
|
345
248
|
className: "nice-theme-gallery__grid",
|
|
346
249
|
role: "group",
|
|
347
|
-
"aria-label":
|
|
348
|
-
children:
|
|
250
|
+
"aria-label": f,
|
|
251
|
+
children: O.map(F)
|
|
349
252
|
}
|
|
350
253
|
),
|
|
351
|
-
|
|
254
|
+
O.length === 0 && /* @__PURE__ */ r("p", { className: "nice-theme-gallery__empty", children: m("themeGallery.empty", "No theme matches the search.") })
|
|
352
255
|
] })
|
|
353
256
|
}
|
|
354
257
|
)
|
|
@@ -358,5 +261,5 @@ const me = ({
|
|
|
358
261
|
};
|
|
359
262
|
export {
|
|
360
263
|
me as NiceThemeGalleryPicker,
|
|
361
|
-
|
|
264
|
+
le as NiceThemeGalleryPreview
|
|
362
265
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18",
|
|
4
4
|
"description": "Nice2Dev UI — Universal, themeable, i18n-ready React component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
"react-dom": ">=17.0.0"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@nice2dev/i18n": "^1.4.
|
|
101
|
-
"@nice2dev/ui-core": "^1.4.
|
|
100
|
+
"@nice2dev/i18n": "^1.4.18",
|
|
101
|
+
"@nice2dev/ui-core": "^1.4.18",
|
|
102
102
|
"country-flag-icons": "^1.6.20"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@nice2dev/testing": "^1.4.
|
|
105
|
+
"@nice2dev/testing": "^1.4.18",
|
|
106
106
|
"@playwright/test": "^1.62.1",
|
|
107
107
|
"@testing-library/dom": "^10.4.1",
|
|
108
108
|
"@testing-library/jest-dom": "^7.0.1",
|