@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,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useNiceTranslation as
|
|
3
|
-
import { useRef as
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useNiceTranslation as ze, useOverlayFocus as Oe, NiceIcon as I } from "@nice2dev/ui-core";
|
|
3
|
+
import { useRef as D, useState as Z, useCallback as k, useMemo as R, useEffect as ue, useId as Ve, useLayoutEffect as He } from "react";
|
|
4
4
|
import { useListKeyboardNav as Me } from "../../utility/useListKeyboardNav.mjs";
|
|
5
5
|
/* empty css */
|
|
6
|
-
import { useDropdownAlignment as
|
|
7
|
-
const
|
|
6
|
+
import { useDropdownAlignment as je, FlagIcon as ge } from "./pickerCommons.mjs";
|
|
7
|
+
const Je = [
|
|
8
8
|
{ code: "en", nativeName: "English", englishName: "English", flagCountryCode: "GB" },
|
|
9
9
|
{ code: "en-US", nativeName: "English (US)", englishName: "English (US)", flagCountryCode: "US" },
|
|
10
10
|
{ code: "en-GB", nativeName: "English (UK)", englishName: "English (UK)", flagCountryCode: "GB" },
|
|
@@ -80,142 +80,143 @@ const je = [
|
|
|
80
80
|
{ code: "th", nativeName: "ไทย", englishName: "Thai", flagCountryCode: "TH" },
|
|
81
81
|
{ code: "vi", nativeName: "Tiếng Việt", englishName: "Vietnamese", flagCountryCode: "VN" },
|
|
82
82
|
{ code: "id", nativeName: "Bahasa Indonesia", englishName: "Indonesian", flagCountryCode: "ID" }
|
|
83
|
-
],
|
|
83
|
+
], qe = ({
|
|
84
84
|
value: d,
|
|
85
|
-
defaultValue:
|
|
85
|
+
defaultValue: me,
|
|
86
86
|
onChange: w,
|
|
87
|
-
placeholder:
|
|
88
|
-
showSearch:
|
|
89
|
-
searchThreshold:
|
|
90
|
-
searchPlaceholder:
|
|
91
|
-
isOpen:
|
|
92
|
-
onOpenChange:
|
|
93
|
-
showFlagInValue:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
placeholder: he,
|
|
88
|
+
showSearch: Ne = !0,
|
|
89
|
+
searchThreshold: fe = 8,
|
|
90
|
+
searchPlaceholder: Q,
|
|
91
|
+
isOpen: A,
|
|
92
|
+
onOpenChange: Y,
|
|
93
|
+
showFlagInValue: pe = !0,
|
|
94
|
+
triggerIcon: W = "flag",
|
|
95
|
+
showFlagInMenu: Ce = !0,
|
|
96
|
+
showTextInValue: ve,
|
|
97
|
+
showTextInMenu: ye = !0,
|
|
98
|
+
showCodeInValue: _e,
|
|
98
99
|
showCodeInMenu: ke = !0,
|
|
99
|
-
displayName:
|
|
100
|
+
displayName: we = "native",
|
|
100
101
|
compact: r = !1,
|
|
101
|
-
variant:
|
|
102
|
-
dropdownAlign:
|
|
102
|
+
variant: P = "default",
|
|
103
|
+
dropdownAlign: Se,
|
|
103
104
|
disabled: m = !1,
|
|
104
|
-
languages:
|
|
105
|
+
languages: $e,
|
|
105
106
|
allowedCodes: h,
|
|
106
|
-
priorityCodes:
|
|
107
|
-
allowClear:
|
|
108
|
-
size:
|
|
109
|
-
className:
|
|
107
|
+
priorityCodes: x = ["en", "pl", "de", "fr", "es"],
|
|
108
|
+
allowClear: Le = !1,
|
|
109
|
+
size: ee = "md",
|
|
110
|
+
className: be = "",
|
|
110
111
|
style: Ee,
|
|
111
|
-
label:
|
|
112
|
+
label: B,
|
|
112
113
|
helperText: S,
|
|
113
|
-
error:
|
|
114
|
+
error: t,
|
|
114
115
|
required: Ie,
|
|
115
|
-
readOnly:
|
|
116
|
-
loading:
|
|
117
|
-
labelPlacement:
|
|
116
|
+
readOnly: F,
|
|
117
|
+
loading: T,
|
|
118
|
+
labelPlacement: De,
|
|
118
119
|
errorPlacement: N,
|
|
119
120
|
labelWidth: $,
|
|
120
121
|
controlWidth: L,
|
|
121
|
-
id:
|
|
122
|
+
id: Re,
|
|
122
123
|
"data-testid": f = "nice-language-picker",
|
|
123
|
-
"aria-label":
|
|
124
|
+
"aria-label": Ae
|
|
124
125
|
}) => {
|
|
125
|
-
const { t: u } =
|
|
126
|
+
const { t: u } = ze(), G = D(null), ne = D(null), ae = D(null), [Pe, ie] = Z(me), [xe, Be] = Z(!1), i = A ?? xe, c = k(
|
|
126
127
|
(e) => {
|
|
127
128
|
const a = typeof e == "function" ? e(i) : e;
|
|
128
|
-
|
|
129
|
+
A === void 0 && Be(a), Y?.(a);
|
|
129
130
|
},
|
|
130
|
-
[i,
|
|
131
|
-
), [p,
|
|
131
|
+
[i, A, Y]
|
|
132
|
+
), [p, b] = Z(""), oe = ve ?? (!r && P !== "ghost"), Fe = _e ?? !1, te = r ? 320 : 280, Te = je(
|
|
132
133
|
i,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
), C = d !== void 0 ? d :
|
|
134
|
+
ne,
|
|
135
|
+
Se ?? (r ? "auto" : "left"),
|
|
136
|
+
te
|
|
137
|
+
), C = d !== void 0 ? d : Pe, K = $e ?? Je, l = R(() => {
|
|
137
138
|
if (!h || h.length === 0)
|
|
138
|
-
return
|
|
139
|
-
const e = h.map((
|
|
140
|
-
const
|
|
141
|
-
return !!(a.has(
|
|
139
|
+
return K;
|
|
140
|
+
const e = h.map((_) => _.toLowerCase()), a = new Set(e), q = new Set(e.map((_) => _.split("-")[0])), g = K.filter((_) => {
|
|
141
|
+
const X = _.code.toLowerCase();
|
|
142
|
+
return !!(a.has(X) || !X.includes("-") && q.has(X));
|
|
142
143
|
});
|
|
143
144
|
return process.env.NODE_ENV !== "production" && g.length === 0 && console.warn(
|
|
144
145
|
`[Nice2Dev] <NiceLanguagePicker> received \`allowedCodes\` but none matched any entry in the language list. Picker will render empty. Got codes: ${JSON.stringify(h)}. Tip: pass canonical BCP-47 primary tags (e.g. \`pl\`, not \`pl-PL\`).`
|
|
145
146
|
), g;
|
|
146
|
-
}, [
|
|
147
|
-
if (!
|
|
147
|
+
}, [K, h]), U = R(() => {
|
|
148
|
+
if (!x?.length)
|
|
148
149
|
return l;
|
|
149
|
-
const e = new Set(
|
|
150
|
-
return [...a, ...
|
|
151
|
-
}, [l,
|
|
150
|
+
const e = new Set(x), a = l.filter((g) => e.has(g.code)), q = l.filter((g) => !e.has(g.code));
|
|
151
|
+
return [...a, ...q];
|
|
152
|
+
}, [l, x]), E = R(() => {
|
|
152
153
|
if (!p)
|
|
153
|
-
return
|
|
154
|
+
return U;
|
|
154
155
|
const e = p.toLowerCase();
|
|
155
|
-
return
|
|
156
|
+
return U.filter(
|
|
156
157
|
(a) => a.nativeName.toLowerCase().includes(e) || a.englishName.toLowerCase().includes(e) || a.code.toLowerCase().includes(e)
|
|
157
158
|
);
|
|
158
|
-
}, [
|
|
159
|
-
|
|
159
|
+
}, [U, p]), s = R(() => C ? l.find((e) => e.code === C) ?? null : null, [C, l]), z = Ne && l.length >= fe;
|
|
160
|
+
ue(() => {
|
|
160
161
|
if (!i)
|
|
161
162
|
return;
|
|
162
163
|
const e = (a) => {
|
|
163
|
-
|
|
164
|
+
G.current && !G.current.contains(a.target) && (c(!1), b(""));
|
|
164
165
|
};
|
|
165
166
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
166
167
|
}, [i, c]);
|
|
167
|
-
const
|
|
168
|
+
const ce = k(
|
|
168
169
|
(e) => {
|
|
169
|
-
d === void 0 &&
|
|
170
|
+
d === void 0 && ie(e.code), w?.(e), c(!1), b("");
|
|
170
171
|
},
|
|
171
172
|
[d, w, c]
|
|
172
|
-
), O =
|
|
173
|
-
d === void 0 &&
|
|
174
|
-
}, [d, w]),
|
|
173
|
+
), O = k(() => {
|
|
174
|
+
d === void 0 && ie(void 0), w?.(null);
|
|
175
|
+
}, [d, w]), Ge = k(
|
|
175
176
|
(e) => {
|
|
176
177
|
e.stopPropagation(), O();
|
|
177
178
|
},
|
|
178
179
|
[O]
|
|
179
|
-
), V =
|
|
180
|
-
c(!1),
|
|
180
|
+
), V = Le && !!s && !m && !F, H = D(null), se = k(() => {
|
|
181
|
+
c(!1), b("");
|
|
181
182
|
}, [c]), {
|
|
182
183
|
activeIndex: M,
|
|
183
|
-
setActiveIndex:
|
|
184
|
-
handleKeyDown:
|
|
185
|
-
} = Me(
|
|
184
|
+
setActiveIndex: j,
|
|
185
|
+
handleKeyDown: re
|
|
186
|
+
} = Me(E, {
|
|
186
187
|
open: i,
|
|
187
|
-
onSelect: (e) =>
|
|
188
|
-
onClose:
|
|
189
|
-
onOpen: () => !m && !
|
|
188
|
+
onSelect: (e) => ce(e),
|
|
189
|
+
onClose: se,
|
|
190
|
+
onOpen: () => !m && !F && c(!0),
|
|
190
191
|
intentRef: H
|
|
191
|
-
}),
|
|
192
|
+
}), Ke = (e) => {
|
|
192
193
|
if ((e.key === "Delete" || e.key === "Backspace") && V && !i) {
|
|
193
194
|
e.preventDefault(), O();
|
|
194
195
|
return;
|
|
195
196
|
}
|
|
196
|
-
|
|
197
|
+
re(e);
|
|
197
198
|
};
|
|
198
199
|
Oe(H, {
|
|
199
200
|
open: i,
|
|
200
201
|
modal: !1,
|
|
201
|
-
initialFocus:
|
|
202
|
-
onClose:
|
|
203
|
-
}),
|
|
204
|
-
|
|
205
|
-
}, [p,
|
|
206
|
-
const
|
|
202
|
+
initialFocus: z ? ae : "none",
|
|
203
|
+
onClose: se
|
|
204
|
+
}), ue(() => {
|
|
205
|
+
j(0);
|
|
206
|
+
}, [p, j]);
|
|
207
|
+
const le = Ve(), v = `${le}-listbox`, y = i && E[M] ? `${v}-${M}` : void 0;
|
|
207
208
|
He(() => {
|
|
208
209
|
y && document.getElementById(y)?.scrollIntoView?.({ block: "nearest" });
|
|
209
210
|
}, [y]);
|
|
210
|
-
const
|
|
211
|
+
const J = (e) => we === "english" ? e.englishName : e.nativeName, de = Re ?? `${le}-trigger`, Ue = Ae ?? (!!B || (s ? oe : !r) ? void 0 : s ? u("languagePicker.ariaLabelValue", "Language: {name}").replace(
|
|
211
212
|
"{name}",
|
|
212
|
-
|
|
213
|
+
J(s)
|
|
213
214
|
) : u("languagePicker.ariaLabel", "Language"));
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ o(
|
|
215
216
|
"div",
|
|
216
217
|
{
|
|
217
|
-
ref:
|
|
218
|
-
className: `nice-field nice-field--${
|
|
218
|
+
ref: G,
|
|
219
|
+
className: `nice-field nice-field--${ee} nice-field--language-picker ${De === "left" ? "nice-field--label-left" : ""} ${N === "right" ? "nice-field--error-right" : ""} ${t ? "nice-field--error" : ""} ${T ? "nice-field--loading" : ""} nice-country-picker nice-language-picker nice-country-picker--${ee} ${r ? "nice-country-picker--compact" : ""} ${P === "ghost" ? "nice-country-picker--ghost" : ""} ${i ? "nice-country-picker--open" : ""} ${m ? "nice-country-picker--disabled" : ""} ${be}`,
|
|
219
220
|
style: {
|
|
220
221
|
...Ee,
|
|
221
222
|
...$ != null && {
|
|
@@ -226,66 +227,69 @@ const je = [
|
|
|
226
227
|
}
|
|
227
228
|
},
|
|
228
229
|
"data-testid": f,
|
|
229
|
-
"aria-busy":
|
|
230
|
+
"aria-busy": T || void 0,
|
|
230
231
|
children: [
|
|
231
|
-
|
|
232
|
-
|
|
232
|
+
B && /* @__PURE__ */ o("label", { className: "nice-field__label", htmlFor: de, children: [
|
|
233
|
+
B,
|
|
233
234
|
Ie && /* @__PURE__ */ n("span", { className: "nice-field__required", children: "*" })
|
|
234
235
|
] }),
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ o("div", { className: "nice-field__control", children: [
|
|
237
|
+
/* @__PURE__ */ o(
|
|
237
238
|
"button",
|
|
238
239
|
{
|
|
239
|
-
ref:
|
|
240
|
+
ref: ne,
|
|
240
241
|
type: "button",
|
|
241
242
|
className: "nice-country-picker__trigger",
|
|
242
243
|
onClick: (e) => {
|
|
243
|
-
m ||
|
|
244
|
+
m || F || (e.stopPropagation(), c(!i));
|
|
244
245
|
},
|
|
245
|
-
onKeyDown:
|
|
246
|
+
onKeyDown: Ke,
|
|
246
247
|
disabled: m,
|
|
247
|
-
id:
|
|
248
|
-
"aria-label":
|
|
248
|
+
id: de,
|
|
249
|
+
"aria-label": Ue,
|
|
249
250
|
role: "combobox",
|
|
250
251
|
"aria-keyshortcuts": V ? "Delete" : void 0,
|
|
251
252
|
"aria-haspopup": "listbox",
|
|
252
253
|
"aria-expanded": i,
|
|
253
254
|
"aria-controls": i ? v : void 0,
|
|
254
|
-
"aria-activedescendant":
|
|
255
|
-
"aria-invalid":
|
|
255
|
+
"aria-activedescendant": z ? void 0 : y,
|
|
256
|
+
"aria-invalid": t ? !0 : void 0,
|
|
256
257
|
"data-testid": `${f}-trigger`,
|
|
257
258
|
children: [
|
|
258
|
-
s ? /* @__PURE__ */
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
259
|
+
s ? /* @__PURE__ */ o("span", { className: "nice-country-picker__value", children: [
|
|
260
|
+
pe && /* @__PURE__ */ n("span", { className: "nice-country-picker__flag", "aria-hidden": "true", children: W === "globe" ? /* @__PURE__ */ n(I, { name: "globe", size: 18 }) : /* @__PURE__ */ n(ge, { code: s.flagCountryCode }) }),
|
|
261
|
+
oe && /* @__PURE__ */ n("span", { className: "nice-country-picker__name", children: J(s) }),
|
|
262
|
+
Fe && /* @__PURE__ */ o("span", { className: "nice-country-picker__dial-code", children: [
|
|
262
263
|
"(",
|
|
263
264
|
s.code,
|
|
264
265
|
")"
|
|
265
266
|
] })
|
|
266
|
-
] }) : /* @__PURE__ */
|
|
267
|
-
|
|
267
|
+
] }) : /* @__PURE__ */ o("span", { className: "nice-country-picker__placeholder", children: [
|
|
268
|
+
W === "globe" && /* @__PURE__ */ n("span", { className: "nice-country-picker__flag", "aria-hidden": "true", children: /* @__PURE__ */ n(I, { name: "globe", size: 18 }) }),
|
|
269
|
+
r ? "" : he ?? u("controls.select", "Select language")
|
|
270
|
+
] }),
|
|
271
|
+
/* @__PURE__ */ o("span", { className: "nice-country-picker__icons", children: [
|
|
268
272
|
V && // the pointer's shortcut for Delete / Backspace on the trigger
|
|
269
273
|
/* @__PURE__ */ n(
|
|
270
274
|
"span",
|
|
271
275
|
{
|
|
272
276
|
className: "nice-country-picker__clear",
|
|
273
|
-
onClick:
|
|
277
|
+
onClick: Ge,
|
|
274
278
|
role: "presentation",
|
|
275
|
-
children: /* @__PURE__ */ n(
|
|
279
|
+
children: /* @__PURE__ */ n(I, { name: "close", size: 14 })
|
|
276
280
|
}
|
|
277
281
|
),
|
|
278
|
-
|
|
282
|
+
P !== "ghost" && /* @__PURE__ */ n("span", { className: "nice-country-picker__arrow", children: /* @__PURE__ */ n(I, { name: i ? "chevron-up" : "chevron-down", size: 16 }) })
|
|
279
283
|
] })
|
|
280
284
|
]
|
|
281
285
|
}
|
|
282
286
|
),
|
|
283
|
-
i && /* @__PURE__ */
|
|
287
|
+
i && /* @__PURE__ */ o(
|
|
284
288
|
"div",
|
|
285
289
|
{
|
|
286
|
-
className: `nice-country-picker__dropdown nice-country-picker__dropdown--align-${
|
|
290
|
+
className: `nice-country-picker__dropdown nice-country-picker__dropdown--align-${Te}`,
|
|
287
291
|
style: r ? {
|
|
288
|
-
minWidth: `${
|
|
292
|
+
minWidth: `${te}px`,
|
|
289
293
|
maxWidth: "calc(100vw - 16px)"
|
|
290
294
|
} : void 0,
|
|
291
295
|
role: "listbox",
|
|
@@ -293,16 +297,16 @@ const je = [
|
|
|
293
297
|
id: v,
|
|
294
298
|
"data-testid": `${f}-dropdown`,
|
|
295
299
|
children: [
|
|
296
|
-
|
|
300
|
+
z && /* @__PURE__ */ n("div", { className: "nice-country-picker__search", children: /* @__PURE__ */ n(
|
|
297
301
|
"input",
|
|
298
302
|
{
|
|
299
|
-
ref:
|
|
303
|
+
ref: ae,
|
|
300
304
|
type: "text",
|
|
301
305
|
value: p,
|
|
302
|
-
onChange: (e) =>
|
|
303
|
-
onKeyDown:
|
|
304
|
-
placeholder:
|
|
305
|
-
"aria-label":
|
|
306
|
+
onChange: (e) => b(e.target.value),
|
|
307
|
+
onKeyDown: re,
|
|
308
|
+
placeholder: Q ?? u("languagePicker.filter", "Filter languages…"),
|
|
309
|
+
"aria-label": Q ?? u("languagePicker.filter", "Filter languages…"),
|
|
306
310
|
"aria-controls": v,
|
|
307
311
|
"aria-activedescendant": y,
|
|
308
312
|
"aria-autocomplete": "list",
|
|
@@ -310,21 +314,21 @@ const je = [
|
|
|
310
314
|
"data-testid": `${f}-search`
|
|
311
315
|
}
|
|
312
316
|
) }),
|
|
313
|
-
/* @__PURE__ */ n("div", { className: "nice-country-picker__list", children:
|
|
317
|
+
/* @__PURE__ */ n("div", { className: "nice-country-picker__list", children: E.length === 0 ? /* @__PURE__ */ n("div", { className: "nice-country-picker__empty", children: u("noData", "No languages found") }) : E.map((e, a) => (
|
|
314
318
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events -- keys: the combobox (aria-activedescendant)
|
|
315
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ o(
|
|
316
320
|
"div",
|
|
317
321
|
{
|
|
318
322
|
id: `${v}-${a}`,
|
|
319
323
|
className: `nice-country-picker__option ${e.code === C ? "nice-country-picker__option--selected" : ""} ${a === M ? "nice-country-picker__option--highlighted" : ""}`,
|
|
320
|
-
onClick: () =>
|
|
321
|
-
onMouseEnter: () =>
|
|
324
|
+
onClick: () => ce(e),
|
|
325
|
+
onMouseEnter: () => j(a),
|
|
322
326
|
role: "option",
|
|
323
327
|
"aria-selected": e.code === C,
|
|
324
328
|
"data-testid": `${f}-option-${e.code}`,
|
|
325
329
|
children: [
|
|
326
|
-
|
|
327
|
-
|
|
330
|
+
Ce && /* @__PURE__ */ n("span", { className: "nice-country-picker__flag", "aria-hidden": "true", children: /* @__PURE__ */ n(ge, { code: e.flagCountryCode }) }),
|
|
331
|
+
ye && /* @__PURE__ */ n("span", { className: "nice-country-picker__name", children: J(e) }),
|
|
328
332
|
ke && /* @__PURE__ */ n("span", { className: "nice-country-picker__dial-code", children: e.code })
|
|
329
333
|
]
|
|
330
334
|
},
|
|
@@ -334,18 +338,18 @@ const je = [
|
|
|
334
338
|
]
|
|
335
339
|
}
|
|
336
340
|
),
|
|
337
|
-
|
|
338
|
-
N === "right" &&
|
|
339
|
-
N === "right" && !
|
|
341
|
+
T && /* @__PURE__ */ n("span", { className: "nice-field__spinner", children: /* @__PURE__ */ n("span", { className: "nice-spinner nice-spinner--sm" }) }),
|
|
342
|
+
N === "right" && t && /* @__PURE__ */ n("div", { className: "nice-field__error", role: "alert", children: t }),
|
|
343
|
+
N === "right" && !t && S && /* @__PURE__ */ n("div", { className: "nice-field__helper", children: S })
|
|
340
344
|
] }),
|
|
341
|
-
N !== "right" &&
|
|
342
|
-
N !== "right" && !
|
|
345
|
+
N !== "right" && t && /* @__PURE__ */ n("div", { className: "nice-field__error", role: "alert", children: t }),
|
|
346
|
+
N !== "right" && !t && S && /* @__PURE__ */ n("div", { className: "nice-field__helper", children: S })
|
|
343
347
|
]
|
|
344
348
|
}
|
|
345
349
|
);
|
|
346
350
|
};
|
|
347
|
-
process.env.NODE_ENV !== "production" && (
|
|
351
|
+
process.env.NODE_ENV !== "production" && (qe.displayName = "NiceLanguagePicker");
|
|
348
352
|
export {
|
|
349
|
-
|
|
350
|
-
|
|
353
|
+
Je as LANGUAGES,
|
|
354
|
+
qe as NiceLanguagePicker
|
|
351
355
|
};
|
|
@@ -64,7 +64,7 @@ const Ge = (t, v) => {
|
|
|
64
64
|
P === void 0 && Pe(r), Y?.(r);
|
|
65
65
|
},
|
|
66
66
|
[c, P, Y]
|
|
67
|
-
), [k, D] = G(""), ce = Ne ?? (!l && R !== "ghost"), Re = Z ?? (l ? 24 : 28), Se = Z ??
|
|
67
|
+
), [k, D] = G(""), ce = Ne ?? (!l && R !== "ghost"), Re = Z ?? (l ? 24 : 28), Se = Z ?? 40, re = l ? 320 : 280, Oe = qe(
|
|
68
68
|
c,
|
|
69
69
|
ne,
|
|
70
70
|
we ?? (l ? "auto" : "left"),
|