@nice2dev/ui 1.1.5 → 1.1.7

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.
Files changed (164) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +50 -29
  3. package/css/legacy-bg-text-aliases.css +65 -61
  4. package/dist/NiceCodeEditor-Bc81wiaN.js +1134 -0
  5. package/dist/NiceCodeEditor-D6f8KdHN.js +1134 -0
  6. package/dist/NiceCodeEditor-DE3saxyt.cjs +260 -0
  7. package/dist/NiceCodeEditor-DZM16My5.cjs +260 -0
  8. package/dist/NiceCodeEditor-HqmcJjmZ.js +1179 -0
  9. package/dist/NiceColorPicker-6EqXaDj0.cjs +1 -0
  10. package/dist/NiceColorPicker-BiEWqWnd.js +596 -0
  11. package/dist/NiceColorPicker-Cuc6YXqz.cjs +1 -0
  12. package/dist/NiceColorPicker-DMATcNWG.js +596 -0
  13. package/dist/NiceColorPicker-R3O1nemp.js +596 -0
  14. package/dist/NiceConfirmDialog-B0e10fRL.cjs +1 -0
  15. package/dist/NiceConfirmDialog-BBDgEMHv.js +81 -0
  16. package/dist/NiceConfirmDialog-C7kdr8jJ.js +81 -0
  17. package/dist/NiceConfirmDialog-DMHqPfFM.js +81 -0
  18. package/dist/NiceConfirmDialog-ZJpQLQQS.cjs +1 -0
  19. package/dist/NiceDataGrid-BzUw4dSu.cjs +10 -0
  20. package/dist/NiceDataGrid-CPKcVOVz.js +1743 -0
  21. package/dist/NiceDataGrid-DJr33WMy.cjs +10 -0
  22. package/dist/NiceDataGrid-D_4gZ1Hu.js +1736 -0
  23. package/dist/NiceDataGrid-DlUAaXhD.js +1736 -0
  24. package/dist/NiceDocumentViewer-8ghRVtfO.js +672 -0
  25. package/dist/NiceDocumentViewer-ChWtA_Ry.cjs +180 -0
  26. package/dist/NiceDocumentViewer-DwLUV7Tc.js +672 -0
  27. package/dist/NiceDocumentViewer-goMzF1w3.cjs +180 -0
  28. package/dist/NiceDocumentViewer-gt1mxzP8.js +672 -0
  29. package/dist/NiceForm-CHEAHxDw.js +4805 -0
  30. package/dist/NiceForm-CJUp1CL0.cjs +1 -0
  31. package/dist/NiceForm-Cp_RH3Yj.js +4805 -0
  32. package/dist/NiceForm-a6tGr6ss.js +4819 -0
  33. package/dist/NiceForm-jU89oe2S.cjs +1 -0
  34. package/dist/NiceGantt-BnQwyTfG.cjs +1 -0
  35. package/dist/NiceGantt-D8coFAvK.js +328 -0
  36. package/dist/NiceGantt-DOZfT6r5.js +328 -0
  37. package/dist/NiceGantt-DQzH1V-R.js +328 -0
  38. package/dist/NiceGantt-jQ8ZpXko.cjs +1 -0
  39. package/dist/NiceHtmlEditor-B1nlXJNW.cjs +10 -0
  40. package/dist/NiceHtmlEditor-Bv3VqJPG.js +862 -0
  41. package/dist/NiceHtmlEditor-CKsGj-Ei.cjs +10 -0
  42. package/dist/NiceHtmlEditor-CloMgyzg.js +841 -0
  43. package/dist/NiceHtmlEditor-DUAHmkWI.js +841 -0
  44. package/dist/NiceLoginForm-Ce_QLnLf.js +736 -0
  45. package/dist/NiceLoginForm-DLpNTQlR.cjs +1 -0
  46. package/dist/NiceLoginForm-Dg0286Cc.js +736 -0
  47. package/dist/NiceLoginForm-X05Vadeg.js +708 -0
  48. package/dist/NiceLoginForm-f_dBCnUi.cjs +1 -0
  49. package/dist/NiceMention-BByI4nFG.js +11120 -0
  50. package/dist/NiceMention-BjeLN4Jx.cjs +430 -0
  51. package/dist/NiceMention-C2TPiMph.cjs +430 -0
  52. package/dist/NiceMention-C67vT6m0.js +11145 -0
  53. package/dist/NiceMention-D1cdy63w.cjs +430 -0
  54. package/dist/NiceMention-OaCi-GNO.js +11094 -0
  55. package/dist/NiceMention-QIuggb9Y.js +11122 -0
  56. package/dist/NiceMention.css +1 -1
  57. package/dist/NiceModal-CHaan9al.js +95 -0
  58. package/dist/NiceModal-Czq6OEAT.js +95 -0
  59. package/dist/NiceModal-D-HFwawr.js +95 -0
  60. package/dist/NiceModal-DOy2XTzc.cjs +1 -0
  61. package/dist/NiceModal-DkawKzEE.cjs +1 -0
  62. package/dist/NiceModuleLifecyclePanel-1CsP8Zst.js +6997 -0
  63. package/dist/NiceModuleLifecyclePanel-Bkx4Yg-3.cjs +1 -0
  64. package/dist/NiceModuleLifecyclePanel-C5oYtczk.js +6999 -0
  65. package/dist/NiceModuleLifecyclePanel-DCcy2yYi.cjs +1 -0
  66. package/dist/NiceModuleLifecyclePanel-DqdgW-0s.js +7004 -0
  67. package/dist/NiceModuleLifecyclePanel.css +1 -1
  68. package/dist/NicePagination-7od5KUa3.cjs +1 -0
  69. package/dist/NicePagination-DMrkR8hH.cjs +1 -0
  70. package/dist/NicePagination-DQmZpsSQ.js +179 -0
  71. package/dist/NicePagination-DipQRjPq.js +172 -0
  72. package/dist/NicePagination-KhlVXYaT.js +172 -0
  73. package/dist/NicePivotGrid-B-KthuqL.cjs +152 -0
  74. package/dist/NicePivotGrid-CLCTHkKO.cjs +152 -0
  75. package/dist/NicePivotGrid-DV54FCsH.js +1174 -0
  76. package/dist/NicePivotGrid-DoWLUPUs.js +1167 -0
  77. package/dist/NicePivotGrid-etwpfccz.js +1167 -0
  78. package/dist/NiceSavedQueryPanel-BABkTNc5.js +5129 -0
  79. package/dist/NiceSavedQueryPanel-Cfeig83P.cjs +586 -0
  80. package/dist/NiceSavedQueryPanel-DTWRLseb.cjs +586 -0
  81. package/dist/NiceSavedQueryPanel-Dy154sxE.js +5129 -0
  82. package/dist/NiceSavedQueryPanel-v7AffOOe.js +5129 -0
  83. package/dist/NiceSavedQueryPanel.css +1 -1
  84. package/dist/NiceScheduler-BEgB7ZgF.cjs +5 -0
  85. package/dist/NiceScheduler-C9JprsEI.cjs +5 -0
  86. package/dist/NiceScheduler-DSP-PPh0.js +1645 -0
  87. package/dist/NiceScheduler-DuPnaA3t.js +1652 -0
  88. package/dist/NiceScheduler-Oa89YZx9.js +1645 -0
  89. package/dist/NiceSelect-A336yeLZ.js +433 -0
  90. package/dist/NiceSelect-B5hTbqi2.js +433 -0
  91. package/dist/NiceSelect-BYSgDYzq.cjs +1 -0
  92. package/dist/NiceSelect-Dudf2T5T.js +433 -0
  93. package/dist/NiceSelect-DwBAIrX7.cjs +1 -0
  94. package/dist/NiceWindow-B6zjBTl9.cjs +1 -0
  95. package/dist/NiceWindow-BKQEx7Vf.js +1623 -0
  96. package/dist/NiceWindow-BnTH7Gy0.js +1623 -0
  97. package/dist/NiceWindow-CZN9NVZw.cjs +1 -0
  98. package/dist/NiceWindow-lxtPR7yZ.js +1623 -0
  99. package/dist/NiceWindow.css +1 -1
  100. package/dist/charts-B8_V3_nq.cjs +882 -0
  101. package/dist/charts-BZgyyybE.js +31933 -0
  102. package/dist/charts-FuDk5-r6.js +31958 -0
  103. package/dist/charts-INj3yFo5.js +31946 -0
  104. package/dist/charts-NolNXKUL.cjs +882 -0
  105. package/dist/charts.cjs +1 -1
  106. package/dist/charts.css +1 -1
  107. package/dist/charts.mjs +1 -1
  108. package/dist/core-A_A6c7an.js +795 -0
  109. package/dist/core-B2iH2J_X.js +795 -0
  110. package/dist/core-BmspZEfD.js +795 -0
  111. package/dist/core-DAfLOet6.cjs +1 -0
  112. package/dist/core-ZG3bgnBR.cjs +1 -0
  113. package/dist/data-branching-B3TOqXAO.cjs +1 -0
  114. package/dist/data-branching-BUGiICDZ.js +6275 -0
  115. package/dist/data-branching-DMXmcocj.js +6275 -0
  116. package/dist/data-branching-YE8P9M5P.js +6275 -0
  117. package/dist/data-branching-t6uhAwIm.cjs +1 -0
  118. package/dist/data-branching.cjs +1 -1
  119. package/dist/data-branching.mjs +1 -1
  120. package/dist/data.cjs +1 -1
  121. package/dist/data.d.ts +7 -2
  122. package/dist/data.mjs +3 -3
  123. package/dist/devops-BhV3OmF7.js +8285 -0
  124. package/dist/devops-BqUxnbRi.cjs +17 -0
  125. package/dist/devops-Bx-Qwj9w.cjs +17 -0
  126. package/dist/devops-DYZatW45.js +8251 -0
  127. package/dist/devops-R98k2zpd.js +8251 -0
  128. package/dist/devops.cjs +1 -1
  129. package/dist/devops.d.ts +29 -16
  130. package/dist/devops.mjs +1 -1
  131. package/dist/editors.cjs +1 -1
  132. package/dist/editors.d.ts +59 -28
  133. package/dist/editors.mjs +7 -7
  134. package/dist/feedback.cjs +1 -1
  135. package/dist/feedback.mjs +3 -3
  136. package/dist/index.cjs +445 -445
  137. package/dist/index.css +1 -1
  138. package/dist/index.d.ts +214 -119
  139. package/dist/index.mjs +16635 -16351
  140. package/dist/lazy.cjs +1 -1
  141. package/dist/lazy.d.ts +31 -18
  142. package/dist/lazy.mjs +24 -24
  143. package/dist/navigation.cjs +1 -1
  144. package/dist/navigation.d.ts +17 -14
  145. package/dist/navigation.mjs +130 -130
  146. package/dist/no-code-BPaAS4wW.cjs +332 -0
  147. package/dist/no-code-CBwUVL1i.js +7447 -0
  148. package/dist/no-code-CjktkQ50.js +7447 -0
  149. package/dist/no-code-DW2NrRba.js +7447 -0
  150. package/dist/no-code-DmFxrZ5T.cjs +332 -0
  151. package/dist/no-code.cjs +1 -1
  152. package/dist/no-code.d.ts +2 -2
  153. package/dist/no-code.mjs +1 -1
  154. package/dist/overlays.cjs +1 -1
  155. package/dist/overlays.d.ts +4 -4
  156. package/dist/overlays.mjs +2 -2
  157. package/dist/pickerCommons-C4XWRUvH.cjs +1 -0
  158. package/dist/pickerCommons-C_BpYs_m.cjs +1 -0
  159. package/dist/pickerCommons-DAOXH_u5.js +1122 -0
  160. package/dist/pickerCommons-Dn4wnDco.js +1122 -0
  161. package/dist/pickerCommons-DskswPS5.js +1122 -0
  162. package/dist/pickerCommons.css +1 -1
  163. package/dist/style.css +7 -7
  164. package/package.json +3 -3
@@ -0,0 +1,433 @@
1
+ import { jsxs as a, jsx as t, Fragment as xe } from "react/jsx-runtime";
2
+ import { E as Oe, D as qe, G as He, r as We, g as Be, c as Ge, n as Ke, p as Pe, q as oe, j as Ue, t as Je, o as be } from "./charts-FuDk5-r6.js";
3
+ import Ye, { useRef as ne, useState as m, useContext as Qe, useLayoutEffect as de, useEffect as Ve, forwardRef as Xe, useMemo as W, useCallback as ae } from "react";
4
+ import { createPortal as Ze } from "react-dom";
5
+ function et(h) {
6
+ const s = h?.closest?.("[data-theme], .nice-dark, .nice-light, .dark");
7
+ if (!s)
8
+ return "";
9
+ const r = s.getAttribute("data-theme");
10
+ return r === "dark" || s.classList.contains("nice-dark") || s.classList.contains("dark") ? "nice-dark" : r === "light" || s.classList.contains("nice-light") ? "nice-light" : "";
11
+ }
12
+ function tt(h, s, r, ue) {
13
+ const k = ne(null), [fe, B] = m(null), [se, G] = m(!1), [ie, I] = m(""), _ = Qe(Oe)?.portalTarget ?? (typeof document < "u" ? document.body : null), d = ne(r);
14
+ return d.current = r, de(() => {
15
+ if (!h || !s.current)
16
+ return;
17
+ I(et(s.current)), G(!1);
18
+ const v = () => {
19
+ const N = s.current;
20
+ if (!N)
21
+ return;
22
+ const l = N.getBoundingClientRect(), $ = k.current?.offsetHeight ?? 320;
23
+ let L = l.bottom;
24
+ L + $ > window.innerHeight - 8 && l.top - $ > 8 && (L = l.top - $);
25
+ let M = l.left;
26
+ M + l.width > window.innerWidth - 8 && (M = Math.max(8, window.innerWidth - l.width - 8)), B(
27
+ (w) => w && w.left === M && w.top === L && w.width === l.width ? w : { left: M, top: L, width: l.width }
28
+ );
29
+ };
30
+ v();
31
+ const c = requestAnimationFrame(() => {
32
+ v(), G(!0);
33
+ }), g = (N) => {
34
+ const l = N.target;
35
+ l instanceof Node && (k.current?.contains(l) || s.current?.contains(l)) || d.current();
36
+ }, p = () => d.current();
37
+ return window.addEventListener("scroll", g, !0), window.addEventListener("resize", p), () => {
38
+ cancelAnimationFrame(c), window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", p);
39
+ };
40
+ }, [h, s, 320]), Ve(() => {
41
+ if (!h)
42
+ return;
43
+ const v = (g) => {
44
+ const p = g.target;
45
+ s.current?.contains(p) || k.current?.contains(p) || (p instanceof Element ? p : p?.parentElement ?? null)?.closest('.nice-select__dropdown, [role="listbox"], [role="option"]') || d.current();
46
+ }, c = (g) => {
47
+ g.key === "Escape" && d.current();
48
+ };
49
+ return document.addEventListener("mousedown", v), document.addEventListener("keydown", c), () => {
50
+ document.removeEventListener("mousedown", v), document.removeEventListener("keydown", c);
51
+ };
52
+ }, [h, s]), { popupRef: k, coords: fe, ready: se, themeClass: ie, portalTarget: _ };
53
+ }
54
+ const ke = Xe(
55
+ ({
56
+ label: h,
57
+ helperText: s,
58
+ error: r,
59
+ required: ue,
60
+ disabled: C,
61
+ size: k = "md",
62
+ name: fe,
63
+ id: B,
64
+ className: se,
65
+ style: G,
66
+ accessMode: ie,
67
+ displayStyle: I,
68
+ options: he,
69
+ value: _,
70
+ onChange: d,
71
+ placeholder: v,
72
+ multiple: c = !1,
73
+ searchable: g = !0,
74
+ clearable: p = !1,
75
+ emptyText: N,
76
+ maxHeight: l = 240,
77
+ optionsSource: $,
78
+ valueField: L,
79
+ labelField: M,
80
+ virtualScroll: w,
81
+ optionHeight: F = 36,
82
+ onSearch: T,
83
+ loading: y,
84
+ renderOption: K,
85
+ multipleAutosize: P = !1,
86
+ showKeyboardHints: Ne,
87
+ labelPlacement: $e,
88
+ errorPlacement: U,
89
+ labelWidth: J,
90
+ controlWidth: j,
91
+ displayMode: Ee
92
+ }, Y) => {
93
+ const ce = qe(ie, B), Ce = ce === "hidden";
94
+ (ce === "disabled" || ce === "readOnly") && (C = !0);
95
+ const { t: x } = He(), Le = We("input", I), Me = Be("input", I), S = Ge(B), pe = Ke({ enabled: Ee, disabled: C }), [b, D] = m(!1), [Q, V] = m(""), [R, z] = m(-1), [me, Se] = m(0), _e = ne(null), O = ne(null), [ve, De] = m(null);
96
+ de(() => {
97
+ !y && O.current && De(O.current.offsetWidth);
98
+ }, [y, _, I]);
99
+ const [q, Re] = m(null);
100
+ de(() => {
101
+ c && !P && O.current && q == null && Re(O.current.offsetWidth);
102
+ }, [c, P, q]);
103
+ const Ae = Pe(
104
+ $ ?? null,
105
+ L ?? $?.keyField ?? "id",
106
+ M ?? "name"
107
+ ), E = $ ? Ae.options : (he ?? []).map(
108
+ (e) => typeof e == "string" ? { value: e, label: e } : e
109
+ ), { popupRef: Ie, coords: H, ready: ge, themeClass: X, portalTarget: we } = tt(
110
+ b,
111
+ _e,
112
+ () => {
113
+ D(!1), V("");
114
+ }
115
+ ), o = W(() => _ ? Array.isArray(_) ? _ : [_] : [], [_]), u = W(() => {
116
+ if (!Q && !T || T)
117
+ return E;
118
+ const e = Q.toLowerCase();
119
+ return E.filter(
120
+ (i) => i.label.toLowerCase().includes(e) || String(i.value).toLowerCase().includes(e)
121
+ );
122
+ }, [E, Q, T]), ye = W(() => {
123
+ const e = /* @__PURE__ */ new Map();
124
+ for (const i of u) {
125
+ const n = i.group || "";
126
+ e.has(n) || e.set(n, []), e.get(n).push(i);
127
+ }
128
+ return e;
129
+ }, [u]), Z = ae(
130
+ (e) => {
131
+ if (c) {
132
+ const i = o.includes(e) ? o.filter((n) => n !== e) : [...o, e];
133
+ d?.(i);
134
+ } else
135
+ d?.(e), D(!1), V("");
136
+ },
137
+ [c, o, d]
138
+ ), Fe = ae(
139
+ (e) => {
140
+ if (e.key === "Escape") {
141
+ D(!1), V("");
142
+ return;
143
+ }
144
+ if (e.key === "Enter" || e.key === " ") {
145
+ if (!b) {
146
+ D(!0), e.preventDefault();
147
+ return;
148
+ }
149
+ R >= 0 && u[R] && (Z(u[R].value), e.preventDefault());
150
+ return;
151
+ }
152
+ e.key === "ArrowDown" && (e.preventDefault(), z((i) => Math.min(i + 1, u.length - 1))), e.key === "ArrowUp" && (e.preventDefault(), z((i) => Math.max(i - 1, 0)));
153
+ },
154
+ [b, R, u, Z]
155
+ ), le = W(() => o.length === 0 ? null : c ? o.map((e) => E.find((i) => i.value === e)?.label || e).join(", ") : E.find((e) => e.value === o[0])?.label || o[0], [o, E, c]), Te = ae(
156
+ (e) => {
157
+ e.stopPropagation(), d?.(c ? [] : "");
158
+ },
159
+ [d, c]
160
+ ), je = W(
161
+ () => [
162
+ { key: "Enter", description: x("shortcuts.select", "Select") },
163
+ { key: "Space", description: x("shortcuts.openDropdown", "Open dropdown") },
164
+ oe.moveUp,
165
+ oe.moveDown,
166
+ oe.cancel
167
+ ],
168
+ [x]
169
+ );
170
+ return Ce ? null : /* @__PURE__ */ a(
171
+ "div",
172
+ {
173
+ className: `nice-field ${j == null ? "nice-field--select-auto" : ""} nice-field--${k} ${$e === "left" ? "nice-field--label-left" : ""} ${y ? "nice-field--loading" : ""} ${se || ""}`,
174
+ style: {
175
+ ...G,
176
+ ...J != null && {
177
+ "--nice-field-label-width": typeof J == "number" ? `${J}px` : J
178
+ },
179
+ ...j != null && {
180
+ "--nice-field-control-width": typeof j == "number" ? `${j}px` : j
181
+ },
182
+ ...y && ve != null && { "--nice-select-locked-width": `${ve}px` }
183
+ },
184
+ "aria-busy": y || void 0,
185
+ children: [
186
+ h && /* @__PURE__ */ a(
187
+ "label",
188
+ {
189
+ htmlFor: S,
190
+ className: `nice-field__label ${ue ? "nice-field__label--required" : ""}`,
191
+ children: [
192
+ h,
193
+ Ne && /* @__PURE__ */ t(Ue, { shortcuts: je, size: "sm" })
194
+ ]
195
+ }
196
+ ),
197
+ /* @__PURE__ */ a("div", { className: "nice-field__control", children: [
198
+ pe.isDisplay ? /* @__PURE__ */ t(
199
+ Je,
200
+ {
201
+ value: le,
202
+ placeholder: v || x("controls.select", "Select..."),
203
+ disabled: C,
204
+ onActivate: () => {
205
+ pe.enterEdit(), D(!0);
206
+ },
207
+ ariaLabel: h
208
+ }
209
+ ) : /* @__PURE__ */ a("div", { className: "nice-select", ref: _e, children: [
210
+ /* @__PURE__ */ a(
211
+ "button",
212
+ {
213
+ ref: (e) => {
214
+ O.current = e, typeof Y == "function" ? Y(e) : Y && (Y.current = e);
215
+ },
216
+ type: "button",
217
+ id: S,
218
+ role: "combobox",
219
+ "aria-expanded": b,
220
+ "aria-haspopup": "listbox",
221
+ "aria-invalid": !!r,
222
+ className: `nice-select__trigger nice-select__trigger--${k} nice-select--ds-${Me} ${b ? "nice-select__trigger--open" : ""} ${r ? "nice-select__trigger--error" : ""} ${C ? "nice-select__trigger--disabled" : ""}`,
223
+ style: {
224
+ ...Le,
225
+ ...c && !P && q != null ? {
226
+ width: q,
227
+ maxWidth: q,
228
+ overflow: "hidden"
229
+ } : {}
230
+ },
231
+ disabled: C,
232
+ onClick: () => D(!b),
233
+ onKeyDown: Fe,
234
+ children: [
235
+ le ? /* @__PURE__ */ t(
236
+ "span",
237
+ {
238
+ style: c && !P ? {
239
+ flex: 1,
240
+ minWidth: 0,
241
+ overflow: "hidden",
242
+ textOverflow: "ellipsis",
243
+ whiteSpace: "nowrap"
244
+ } : void 0,
245
+ children: le
246
+ }
247
+ ) : /* @__PURE__ */ t("span", { className: "nice-select__placeholder", children: v || x("controls.select", "Select...") }),
248
+ /* @__PURE__ */ a("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
249
+ p && o.length > 0 && /* @__PURE__ */ t(
250
+ "span",
251
+ {
252
+ className: "nice-input__clear",
253
+ onClick: Te,
254
+ role: "button",
255
+ "aria-label": x("controls.clear", "Clear"),
256
+ children: /* @__PURE__ */ t(be, { name: "close", size: 14 })
257
+ }
258
+ ),
259
+ /* @__PURE__ */ t(
260
+ "span",
261
+ {
262
+ className: `nice-select__chevron ${b ? "nice-select__chevron--open" : ""}`,
263
+ children: /* @__PURE__ */ t(be, { name: "chevron-down", size: 16 })
264
+ }
265
+ )
266
+ ] })
267
+ ]
268
+ }
269
+ ),
270
+ b && H && we && Ze(
271
+ /* @__PURE__ */ a(
272
+ "div",
273
+ {
274
+ ref: Ie,
275
+ className: `nice-select__dropdown${X ? ` ${X}` : ""}`,
276
+ "data-theme": X === "nice-dark" ? "dark" : X === "nice-light" ? "light" : void 0,
277
+ role: "listbox",
278
+ style: {
279
+ maxHeight: l,
280
+ position: "fixed",
281
+ left: H.left,
282
+ top: H.top,
283
+ width: H.width,
284
+ minWidth: H.width,
285
+ zIndex: 1e3,
286
+ // Hidden until measured so the estimate frame never paints above.
287
+ opacity: ge ? 1 : 0,
288
+ pointerEvents: ge ? void 0 : "none"
289
+ },
290
+ onScroll: w ? (e) => Se(e.currentTarget.scrollTop) : void 0,
291
+ children: [
292
+ (g || T) && /* @__PURE__ */ t("div", { className: "nice-select__search", children: /* @__PURE__ */ t(
293
+ "input",
294
+ {
295
+ type: "text",
296
+ value: Q,
297
+ onChange: (e) => {
298
+ V(e.target.value), z(0), T?.(e.target.value);
299
+ },
300
+ placeholder: x("controls.search", "Search..."),
301
+ autoFocus: !0
302
+ }
303
+ ) }),
304
+ y && /* @__PURE__ */ t("div", { className: "nice-select__loading", children: /* @__PURE__ */ t(
305
+ "div",
306
+ {
307
+ className: "nice-spinner nice-spinner--sm",
308
+ style: { margin: "8px auto" }
309
+ }
310
+ ) }),
311
+ !y && u.length === 0 ? /* @__PURE__ */ t("div", { className: "nice-select__empty", children: N || x("controls.noResults", "No results found") }) : w && !Array.from(ye.keys()).some((e) => e !== "") ? (() => {
312
+ const i = u.length * F, n = Math.max(
313
+ 0,
314
+ Math.floor(me / F) - 3
315
+ ), A = Math.min(
316
+ u.length,
317
+ Math.ceil((me + l) / F) + 3
318
+ ), ee = u.slice(n, A);
319
+ return /* @__PURE__ */ t("div", { style: { height: i, position: "relative" }, children: ee.map((f, ze) => {
320
+ const re = n + ze, te = o.includes(f.value);
321
+ return /* @__PURE__ */ t(
322
+ "div",
323
+ {
324
+ role: "option",
325
+ "aria-selected": te,
326
+ className: `nice-select__option ${te ? "nice-select__option--selected" : ""} ${re === R ? "nice-select__option--highlighted" : ""} ${f.disabled ? "nice-select__option--disabled" : ""}`,
327
+ style: {
328
+ position: "absolute",
329
+ top: re * F,
330
+ left: 0,
331
+ right: 0,
332
+ height: F,
333
+ display: "flex",
334
+ alignItems: "center",
335
+ padding: "0 12px"
336
+ },
337
+ onClick: () => !f.disabled && Z(String(f.value)),
338
+ onMouseEnter: () => z(re),
339
+ children: K ? K(f, te) : /* @__PURE__ */ a(xe, { children: [
340
+ f.icon && /* @__PURE__ */ t("span", { children: f.icon }),
341
+ /* @__PURE__ */ a("div", { style: { flex: 1 }, children: [
342
+ /* @__PURE__ */ t("div", { children: f.label }),
343
+ f.description && /* @__PURE__ */ t("div", { className: "nice-select__option-desc", children: f.description })
344
+ ] }),
345
+ te && /* @__PURE__ */ t(
346
+ "svg",
347
+ {
348
+ className: "nice-select__option-check",
349
+ viewBox: "0 0 20 20",
350
+ fill: "currentColor",
351
+ children: /* @__PURE__ */ t(
352
+ "path",
353
+ {
354
+ fillRule: "evenodd",
355
+ d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",
356
+ clipRule: "evenodd"
357
+ }
358
+ )
359
+ }
360
+ )
361
+ ] })
362
+ },
363
+ f.value
364
+ );
365
+ }) });
366
+ })() : Array.from(ye.entries()).map(([e, i]) => /* @__PURE__ */ a(Ye.Fragment, { children: [
367
+ e && /* @__PURE__ */ t("div", { className: "nice-select__group-label", children: e }),
368
+ i.map((n) => {
369
+ const A = o.includes(n.value), ee = u.indexOf(n);
370
+ return /* @__PURE__ */ t(
371
+ "div",
372
+ {
373
+ role: "option",
374
+ "aria-selected": A,
375
+ className: `nice-select__option ${A ? "nice-select__option--selected" : ""} ${ee === R ? "nice-select__option--highlighted" : ""} ${n.disabled ? "nice-select__option--disabled" : ""}`,
376
+ onClick: () => !n.disabled && Z(String(n.value)),
377
+ onMouseEnter: () => z(ee),
378
+ children: K ? K(n, A) : /* @__PURE__ */ a(xe, { children: [
379
+ n.icon && /* @__PURE__ */ t("span", { children: n.icon }),
380
+ /* @__PURE__ */ a("div", { style: { flex: 1 }, children: [
381
+ /* @__PURE__ */ t("div", { children: n.label }),
382
+ n.description && /* @__PURE__ */ t("div", { className: "nice-select__option-desc", children: n.description })
383
+ ] }),
384
+ A && /* @__PURE__ */ t(
385
+ "svg",
386
+ {
387
+ className: "nice-select__option-check",
388
+ viewBox: "0 0 20 20",
389
+ fill: "currentColor",
390
+ children: /* @__PURE__ */ t(
391
+ "path",
392
+ {
393
+ fillRule: "evenodd",
394
+ d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",
395
+ clipRule: "evenodd"
396
+ }
397
+ )
398
+ }
399
+ )
400
+ ] })
401
+ },
402
+ n.value
403
+ );
404
+ })
405
+ ] }, e))
406
+ ]
407
+ }
408
+ ),
409
+ we
410
+ )
411
+ ] }),
412
+ y && /* @__PURE__ */ t("span", { className: "nice-field__spinner", children: /* @__PURE__ */ t("span", { className: "nice-spinner nice-spinner--sm" }) }),
413
+ U === "right" && r && /* @__PURE__ */ t("div", { id: `${S}-error`, className: "nice-field__error", role: "alert", children: r }),
414
+ U === "right" && !r && s && /* @__PURE__ */ t("div", { id: `${S}-helper`, className: "nice-field__helper", children: s })
415
+ ] }),
416
+ U !== "right" && r && /* @__PURE__ */ t("div", { id: `${S}-error`, className: "nice-field__error", role: "alert", children: r }),
417
+ U !== "right" && !r && s && /* @__PURE__ */ t("div", { id: `${S}-helper`, className: "nice-field__helper", children: s })
418
+ ]
419
+ }
420
+ );
421
+ }
422
+ );
423
+ ke.displayName = "NiceSelect";
424
+ const lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
425
+ __proto__: null,
426
+ NiceSelect: ke
427
+ }, Symbol.toStringTag, { value: "Module" }));
428
+ export {
429
+ ke as N,
430
+ lt as a,
431
+ et as s,
432
+ tt as u
433
+ };