@ryuzaki13/react-foundation-ui 1.1.7 → 1.1.8

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 (71) hide show
  1. package/dist/advanced-search/index.js +136 -136
  2. package/dist/base-table/index.js +2 -2
  3. package/dist/chunks/{CalendarView-C0gJvre1.js → CalendarView-KCkhCtK-.js} +101 -101
  4. package/dist/chunks/{CalendarView-C0gJvre1.js.map → CalendarView-KCkhCtK-.js.map} +1 -1
  5. package/dist/chunks/SelectOptionContent-CI7wq9Oi.js +27 -0
  6. package/dist/chunks/SelectOptionContent-CI7wq9Oi.js.map +1 -0
  7. package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js → TextEditorLexicalClient-DeBA6fQX.js} +157 -157
  8. package/dist/chunks/{TextEditorLexicalClient-DYZ32dnX.js.map → TextEditorLexicalClient-DeBA6fQX.js.map} +1 -1
  9. package/dist/chunks/{base-table-BXKFSgIk.js → base-table-Dv9i3CAT.js} +73 -73
  10. package/dist/chunks/{base-table-BXKFSgIk.js.map → base-table-Dv9i3CAT.js.map} +1 -1
  11. package/dist/chunks/{date-input-DKkW7_uw.js → date-input-DT9E8dhk.js} +44 -44
  12. package/dist/chunks/{date-input-DKkW7_uw.js.map → date-input-DT9E8dhk.js.map} +1 -1
  13. package/dist/chunks/{date-range-preset-select-UgsfaOeM.js → date-range-preset-select-BLnY47cv.js} +20 -20
  14. package/dist/chunks/{date-range-preset-select-UgsfaOeM.js.map → date-range-preset-select-BLnY47cv.js.map} +1 -1
  15. package/dist/chunks/{input-CZLUUggm.js → input-BCJfUdK_.js} +43 -43
  16. package/dist/chunks/{input-CZLUUggm.js.map → input-BCJfUdK_.js.map} +1 -1
  17. package/dist/chunks/{input-files-aB8iaqGk.js → input-files-Dcc5K-_1.js} +2 -2
  18. package/dist/chunks/{input-files-aB8iaqGk.js.map → input-files-Dcc5K-_1.js.map} +1 -1
  19. package/dist/chunks/{input-search-eMvnvgV0.js → input-search-B7HmrAM7.js} +2 -2
  20. package/dist/chunks/{input-search-eMvnvgV0.js.map → input-search-B7HmrAM7.js.map} +1 -1
  21. package/dist/chunks/{multi-select-DaOKgHKE.js → multi-select-BCpRct-k.js} +105 -104
  22. package/dist/chunks/{multi-select-DaOKgHKE.js.map → multi-select-BCpRct-k.js.map} +1 -1
  23. package/dist/chunks/{picker-BZ05h_ZJ.js → picker-DTZk09Ag.js} +27 -27
  24. package/dist/chunks/{picker-BZ05h_ZJ.js.map → picker-DTZk09Ag.js.map} +1 -1
  25. package/dist/chunks/select-Bd48kVI3.js +328 -0
  26. package/dist/chunks/{select-Dj3FfpS0.js.map → select-Bd48kVI3.js.map} +1 -1
  27. package/dist/chunks/{table-BdpMzhLH.js → table-BtXVqa2I.js} +10 -10
  28. package/dist/chunks/{table-BdpMzhLH.js.map → table-BtXVqa2I.js.map} +1 -1
  29. package/dist/chunks/{table-column-interactions-6RGjmiI5.js → table-column-interactions-BGd5Lwy9.js} +19 -19
  30. package/dist/chunks/{table-column-interactions-6RGjmiI5.js.map → table-column-interactions-BGd5Lwy9.js.map} +1 -1
  31. package/dist/chunks/{useODataSelectBase-BxAvhDww.js → useODataSelectBase-wZ07hQFv.js} +10 -10
  32. package/dist/chunks/{useODataSelectBase-BxAvhDww.js.map → useODataSelectBase-wZ07hQFv.js.map} +1 -1
  33. package/dist/date-input/index.js +2 -2
  34. package/dist/date-range-preset-select/index.js +1 -1
  35. package/dist/date-time-input/index.js +41 -41
  36. package/dist/drop-zone/index.js +1 -1
  37. package/dist/errors/index.js +39 -39
  38. package/dist/image/index.js +2 -2
  39. package/dist/input/index.js +1 -1
  40. package/dist/input-date-time/index.js +1 -1
  41. package/dist/input-file/index.js +1 -1
  42. package/dist/input-files/index.js +1 -1
  43. package/dist/input-image/index.js +1 -1
  44. package/dist/input-search/index.js +1 -1
  45. package/dist/layout-picker/index.js +1 -1
  46. package/dist/multi-select/index.js +1 -1
  47. package/dist/notifications/index.js +26 -26
  48. package/dist/period-select/index.js +19 -19
  49. package/dist/picker/index.js +1 -1
  50. package/dist/preset-range-date-input/index.js +2 -2
  51. package/dist/preset-select/index.js +1 -1
  52. package/dist/select/index.js +1 -1
  53. package/dist/simple-table/index.js +1 -1
  54. package/dist/slider/index.js +312 -312
  55. package/dist/slider/index.js.map +1 -1
  56. package/dist/state-select/index.js +14 -14
  57. package/dist/styles.css +1 -1
  58. package/dist/table/index.js +1 -1
  59. package/dist/table-column-interactions/index.js +1 -1
  60. package/dist/tag-input/index.js +1 -1
  61. package/dist/text/index.js +10 -10
  62. package/dist/text-editor/index.js +1 -1
  63. package/dist/textarea/index.js +1 -1
  64. package/dist/tree-select/index.js +240 -239
  65. package/dist/tree-select/index.js.map +1 -1
  66. package/dist/tree-table/index.js +15 -15
  67. package/package.json +2 -1
  68. package/storybook-static/project.json +1 -1
  69. package/dist/chunks/SelectOptionContent-lfEtHXfO.js +0 -1132
  70. package/dist/chunks/SelectOptionContent-lfEtHXfO.js.map +0 -1
  71. package/dist/chunks/select-Dj3FfpS0.js +0 -327
@@ -1,147 +1,147 @@
1
1
  import { n as e, r as t } from "../chunks/popover-xJJqy1v6.js";
2
2
  import { t as n } from "../chunks/ui.module-BisoTevy.js";
3
- import { i as r, l as i, o as a, s as o } from "../chunks/input-CZLUUggm.js";
4
- import { l as s } from "../chunks/picker-BZ05h_ZJ.js";
5
- import { useCallback as c, useEffect as l, useEffectEvent as u, useMemo as d, useRef as f, useState as p } from "react";
6
- import { cn as ee } from "@ryuzaki13/react-foundation-lib/utils";
7
- import { toFiniteNumber as m } from "@ryuzaki13/react-foundation-lib/formatters";
8
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
9
- import { findClosestNumberScaleMark as v, findClosestNumberScaleMarkByPercent as y, getNumberScaleMarkPercent as b, offsetNumberScaleValue as x, percentToNumberScaleValue as S, prepareNumberScaleMarks as C, resolveNumberScaleBounds as w, snapNumberScaleValue as T, snapNumberScaleValueToStep as E, valueToNumberScalePercent as D } from "@ryuzaki13/react-foundation-lib/number-scale";
3
+ import { i as r, l as i, o as a, s as o } from "../chunks/input-BCJfUdK_.js";
4
+ import { l as s } from "../chunks/picker-DTZk09Ag.js";
5
+ import { useCallback as c, useEffect as ee, useEffectEvent as l, useMemo as u, useRef as d, useState as f } from "react";
6
+ import { cn as te } from "@ryuzaki13/react-foundation-lib/utils";
7
+ import { Fragment as ne, jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ import { toFiniteNumber as h } from "@ryuzaki13/react-foundation-lib/formatters";
9
+ import { findClosestNumberScaleMark as g, findClosestNumberScaleMarkByPercent as _, getNumberScaleMarkPercent as v, offsetNumberScaleValue as y, percentToNumberScaleValue as b, prepareNumberScaleMarks as x, resolveNumberScaleBounds as S, snapNumberScaleValue as C, snapNumberScaleValueToStep as w, valueToNumberScalePercent as T } from "@ryuzaki13/react-foundation-lib/number-scale";
10
10
  import "@ryuzaki13/react-foundation-lib/range-output";
11
11
  //#region src/slider/lib/sliderMath.ts
12
- function O(e, t, n) {
13
- return C(e, t, n);
12
+ function E(e, t, n) {
13
+ return x(e, t, n);
14
14
  }
15
- function k(e, t, n) {
15
+ function D(e, t, n) {
16
16
  let r = t.findIndex((t) => t.value === e.value);
17
- return b(Math.max(0, r), t, n.min, n.max, n.marksPosition);
17
+ return v(Math.max(0, r), t, n.min, n.max, n.marksPosition);
18
18
  }
19
- function A(e, t) {
20
- let { min: n, max: r } = w(t.min, t.max), i = O(t.marks, n, r);
19
+ function O(e, t) {
20
+ let { min: n, max: r } = S(t.min, t.max), i = E(t.marks, n, r);
21
21
  if (i.length > 0) {
22
- let a = i.find((t) => t.value === e) ?? v(e, i);
23
- if (a) return k(a, i, {
22
+ let a = i.find((t) => t.value === e) ?? g(e, i);
23
+ if (a) return D(a, i, {
24
24
  ...t,
25
25
  min: n,
26
26
  max: r,
27
27
  marks: i
28
28
  });
29
29
  }
30
- return D(e, n, r);
30
+ return T(e, n, r);
31
31
  }
32
- function j(e, t) {
33
- let { min: n, max: r } = w(t.min, t.max);
34
- return y(e, O(t.marks, n, r), n, r, t.marksPosition);
32
+ function k(e, t) {
33
+ let { min: n, max: r } = S(t.min, t.max);
34
+ return _(e, E(t.marks, n, r), n, r, t.marksPosition);
35
35
  }
36
- function M(e, t) {
37
- return T(e, t);
36
+ function A(e, t) {
37
+ return C(e, t);
38
38
  }
39
- function N(e, t) {
40
- let { min: n, max: r } = w(t.min, t.max);
41
- return e === void 0 ? n : M(e, {
39
+ function j(e, t) {
40
+ let { min: n, max: r } = S(t.min, t.max);
41
+ return e === void 0 ? n : A(e, {
42
42
  ...t,
43
43
  min: n,
44
44
  max: r
45
45
  });
46
46
  }
47
- function P(e) {
47
+ function M(e) {
48
48
  if (e) return !Object.hasOwn(e, "outputValue") || e.outputValue === void 0 ? e.value : e.outputValue;
49
49
  }
50
- function F(e, t, n) {
51
- let r = t.filter((t) => P(t) === e);
50
+ function N(e, t, n) {
51
+ let r = t.filter((t) => M(t) === e);
52
52
  if (r.length) return e === null ? n === 0 ? r[0] : r[r.length - 1] : r[0];
53
53
  }
54
- function I(e, t, n) {
55
- let r = F(e, t, n);
54
+ function P(e, t, n) {
55
+ let r = N(e, t, n);
56
56
  if (r) return r;
57
57
  let i, a = Infinity;
58
58
  for (let n of t) {
59
- let t = P(n);
59
+ let t = M(n);
60
60
  if (typeof t != "number" || !Number.isFinite(t)) continue;
61
61
  let r = Math.abs(e - t);
62
62
  r < a && (i = n, a = r);
63
63
  }
64
64
  return i;
65
65
  }
66
- function L(e, t, n, r) {
66
+ function F(e, t, n, r) {
67
67
  if (e === null) return null;
68
- let { min: i, max: a } = w(r.min, r.max), o = O(r.marks, i, a), s = Number.isFinite(e) ? e : t;
68
+ let { min: i, max: a } = S(r.min, r.max), o = E(r.marks, i, a), s = Number.isFinite(e) ? e : t;
69
69
  if (o.length > 0) {
70
- let e = I(s, o, n), r = P(e);
70
+ let e = P(s, o, n), r = M(e);
71
71
  return r === void 0 ? e?.value ?? t : r;
72
72
  }
73
- return E(s, i, a, r.step);
73
+ return w(s, i, a, r.step);
74
74
  }
75
- function R(e, t) {
76
- let { min: n, max: r } = w(t.min, t.max);
75
+ function I(e, t) {
76
+ let { min: n, max: r } = S(t.min, t.max);
77
77
  if (!e) return [null, null];
78
- let i = L(e[0], n, 0, {
78
+ let i = F(e[0], n, 0, {
79
79
  ...t,
80
80
  min: n,
81
81
  max: r
82
- }), a = L(e[1], r, 1, {
82
+ }), a = F(e[1], r, 1, {
83
83
  ...t,
84
84
  min: n,
85
85
  max: r
86
86
  });
87
87
  return i !== null && a !== null && i > a ? [a, i] : [i, a];
88
88
  }
89
- function z(e, t, n, r) {
89
+ function L(e, t, n, r) {
90
90
  if (e === null) return t;
91
- let { min: i, max: a } = w(r.min, r.max), o = O(r.marks, i, a);
92
- return o.length > 0 ? (F(e, o, n) ?? (typeof e == "number" ? I(e, o, n) : void 0))?.value ?? t : E(e, i, a, r.step);
91
+ let { min: i, max: a } = S(r.min, r.max), o = E(r.marks, i, a);
92
+ return o.length > 0 ? (N(e, o, n) ?? (typeof e == "number" ? P(e, o, n) : void 0))?.value ?? t : w(e, i, a, r.step);
93
93
  }
94
- function te(e, t) {
95
- let { min: n, max: r } = w(t.min, t.max), i = R(e, {
94
+ function re(e, t) {
95
+ let { min: n, max: r } = S(t.min, t.max), i = I(e, {
96
96
  ...t,
97
97
  min: n,
98
98
  max: r
99
- }), a = z(i[0], n, 0, {
99
+ }), a = L(i[0], n, 0, {
100
100
  ...t,
101
101
  min: n,
102
102
  max: r
103
- }), o = z(i[1], r, 1, {
103
+ }), o = L(i[1], r, 1, {
104
104
  ...t,
105
105
  min: n,
106
106
  max: r
107
107
  });
108
108
  return a <= o ? [a, o] : [o, a];
109
109
  }
110
- function B(e, t) {
111
- let { min: n, max: r } = w(t.min, t.max), i = O(t.marks, n, r);
110
+ function R(e, t) {
111
+ let { min: n, max: r } = S(t.min, t.max), i = E(t.marks, n, r);
112
112
  if (i.length > 0) {
113
- let t = v(e, i), n = P(t);
113
+ let t = g(e, i), n = M(t);
114
114
  return n === void 0 ? t?.value ?? e : n;
115
115
  }
116
- return E(e, n, r, t.step);
116
+ return w(e, n, r, t.step);
117
117
  }
118
- function V(e, t) {
118
+ function z(e, t) {
119
119
  let [n, r] = t;
120
120
  return Math.abs(e - n) <= Math.abs(e - r) ? 0 : 1;
121
121
  }
122
- function H(e, t) {
123
- let { min: n, max: r } = w(t.min, t.max);
122
+ function B(e, t) {
123
+ let { min: n, max: r } = S(t.min, t.max);
124
124
  return Array.isArray(e) ? {
125
- startPercent: A(e[0], {
125
+ startPercent: O(e[0], {
126
126
  ...t,
127
127
  min: n,
128
128
  max: r
129
129
  }),
130
- endPercent: A(e[1], {
130
+ endPercent: O(e[1], {
131
131
  ...t,
132
132
  min: n,
133
133
  max: r
134
134
  })
135
135
  } : {
136
136
  startPercent: 0,
137
- endPercent: A(e, {
137
+ endPercent: O(e, {
138
138
  ...t,
139
139
  min: n,
140
140
  max: r
141
141
  })
142
142
  };
143
143
  }
144
- var U = {
144
+ var V = {
145
145
  slider: "fA7zne",
146
146
  sliderCompact: "TMbaqW",
147
147
  trackShell: "_77qn1L",
@@ -161,67 +161,67 @@ var U = {
161
161
  };
162
162
  //#endregion
163
163
  //#region src/slider/Slider.tsx
164
- function ne(e) {
164
+ function H(e) {
165
165
  return e === "ArrowLeft" || e === "ArrowDown" ? -1 : e === "ArrowRight" || e === "ArrowUp" ? 1 : e === "PageDown" ? -10 : e === "PageUp" ? 10 : null;
166
166
  }
167
- function W(e, t) {
167
+ function U(e, t) {
168
168
  return !!e && e[0] === t[0] && e[1] === t[1];
169
169
  }
170
- function re(e, t) {
170
+ function ie(e, t) {
171
171
  return e === null ? t === 0 ? "-∞" : "∞" : String(e);
172
172
  }
173
- function ie(e, t) {
173
+ function ae(e, t) {
174
174
  return t.find((t) => t.value === e)?.label ?? String(e);
175
175
  }
176
- function ae(e) {
177
- return typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ g("span", {
176
+ function W(e) {
177
+ return typeof e == "string" || typeof e == "number" ? /* @__PURE__ */ p("span", {
178
178
  className: "textNoWrap",
179
179
  children: e
180
180
  }) : e;
181
181
  }
182
182
  function G(t) {
183
- let { min: n, max: r, step: a, marks: s, marksPosition: c = "value", marksDisplay: u = "compact", className: m, error: h, onClearError: v, label: y, description: b, disabled: C, size: T } = t, { min: E, max: D } = d(() => w(n, r), [n, r]), M = d(() => O(s, E, D), [
183
+ let { min: n, max: r, step: a, marks: s, marksPosition: c = "value", marksDisplay: l = "compact", className: ne, error: h, onClearError: g, label: _, description: v, disabled: x, size: C } = t, { min: w, max: T } = u(() => S(n, r), [n, r]), A = u(() => E(s, w, T), [
184
184
  s,
185
- E,
186
- D
187
- ]), P = d(() => ({
188
- min: E,
189
- max: D,
185
+ w,
186
+ T
187
+ ]), M = u(() => ({
188
+ min: w,
189
+ max: T,
190
190
  step: a,
191
- marks: M,
191
+ marks: A,
192
192
  marksPosition: c
193
193
  }), [
194
- E,
195
- D,
194
+ w,
195
+ T,
196
196
  a,
197
- M,
197
+ A,
198
198
  c
199
- ]), F = t.mode === "range", I = F ? void 0 : N(t.value, P), L = F ? R(t.value, P) : void 0, z = F ? te(t.value, P) : void 0, G = F ? z : [I], K = H(F ? z : I, P), q = f(null), J = f([]), Y = f(null), X = f(null), [oe, Z] = p(null), { controlId: Q, labelId: se, descriptionId: ce, errorId: le, describedBy: ue } = i({
200
- hasLabel: y != null,
201
- hasDescription: !!b,
199
+ ]), N = t.mode === "range", P = N ? void 0 : j(t.value, M), F = N ? I(t.value, M) : void 0, L = N ? re(t.value, M) : void 0, G = N ? L : [P], K = B(N ? L : P, M), q = d(null), J = d([]), Y = d(null), X = d(null), [oe, Z] = f(null), { controlId: Q, labelId: se, descriptionId: ce, errorId: le, describedBy: ue } = i({
200
+ hasLabel: _ != null,
201
+ hasDescription: !!v,
202
202
  hasError: !!h
203
203
  }), de = (e) => {
204
- C || t.mode !== "single" || t.value !== void 0 && t.value === e || (t.onChange(e), v?.());
204
+ x || t.mode !== "single" || t.value !== void 0 && t.value === e || (t.onChange(e), g?.());
205
205
  }, fe = (e) => {
206
- C || t.mode !== "range" || W(t.value, e) || (t.onChange(e), v?.());
206
+ x || t.mode !== "range" || U(t.value, e) || (t.onChange(e), g?.());
207
207
  }, $ = (e, n) => {
208
- if (!C) {
208
+ if (!x) {
209
209
  if (t.mode === "range") {
210
- let [t, r] = z, [i, a] = L, o = R(n === 0 ? [B(Math.min(e, r), P), a] : [i, B(Math.max(e, t), P)], P);
210
+ let [t, r] = L, [i, a] = F, o = I(n === 0 ? [R(Math.min(e, r), M), a] : [i, R(Math.max(e, t), M)], M);
211
211
  fe(o);
212
212
  return;
213
213
  }
214
- de(N(e, P));
214
+ de(j(e, M));
215
215
  }
216
216
  }, pe = (e) => {
217
217
  let t = q.current?.getBoundingClientRect();
218
- if (!t) return E;
218
+ if (!t) return w;
219
219
  let n = (e - t.left) / t.width * 100;
220
- return (M.length > 0 ? j(n, P) : void 0)?.value ?? S(n, E, D);
221
- }, me = f($), he = f(pe);
222
- l(() => {
220
+ return (A.length > 0 ? k(n, M) : void 0)?.value ?? b(n, w, T);
221
+ }, me = d($), he = d(pe);
222
+ ee(() => {
223
223
  me.current = $, he.current = pe;
224
- }), l(() => {
224
+ }), ee(() => {
225
225
  let e = (e) => {
226
226
  X.current !== null && e && e.pointerId !== X.current || (X.current = null, Y.current = null, Z(null));
227
227
  }, t = (e) => {
@@ -234,15 +234,15 @@ function G(t) {
234
234
  let ge = (e, t) => {
235
235
  X.current = e, Y.current = t, Z(t), J.current[t]?.focus();
236
236
  }, _e = (e) => {
237
- if (C) return;
237
+ if (x) return;
238
238
  e.preventDefault();
239
- let t = pe(e.clientX), n = F ? V(t, z) : 0;
239
+ let t = pe(e.clientX), n = N ? z(t, L) : 0;
240
240
  $(t, n), ge(e.pointerId, n);
241
241
  }, ve = (e) => (t) => {
242
- C || (t.preventDefault(), t.stopPropagation(), ge(t.pointerId, e));
242
+ x || (t.preventDefault(), t.stopPropagation(), ge(t.pointerId, e));
243
243
  }, ye = (e) => (t) => {
244
- if (C) return;
245
- let n = F && e === 1 ? z[0] : E, r = F && e === 0 ? z[1] : D, i = ne(t.key);
244
+ if (x) return;
245
+ let n = N && e === 1 ? L[0] : w, r = N && e === 0 ? L[1] : T, i = H(t.key);
246
246
  if (t.key === "Home") {
247
247
  t.preventDefault(), $(n, e);
248
248
  return;
@@ -253,68 +253,68 @@ function G(t) {
253
253
  }
254
254
  if (i === null) return;
255
255
  t.preventDefault();
256
- let a = G[e], o = x(a, i, P, n, r);
256
+ let a = G[e], o = y(a, i, M, n, r);
257
257
  $(o, e);
258
258
  }, be = (e) => {
259
- if (C) return;
260
- let t = F ? V(e, z) : 0;
259
+ if (x) return;
260
+ let t = N ? z(e, L) : 0;
261
261
  $(e, t), J.current[t]?.focus();
262
262
  }, xe = (e, t) => {
263
- if (F) {
264
- let n = L[t];
265
- return M.find((t) => t.value === e)?.label ?? re(n, t);
263
+ if (N) {
264
+ let n = F[t];
265
+ return A.find((t) => t.value === e)?.label ?? ie(n, t);
266
266
  }
267
- return ie(e, M);
267
+ return ae(e, A);
268
268
  };
269
- return /* @__PURE__ */ g(o, {
270
- label: y,
271
- description: b,
272
- disabled: C,
273
- className: m,
274
- size: T,
269
+ return /* @__PURE__ */ p(o, {
270
+ label: _,
271
+ description: v,
272
+ disabled: x,
273
+ className: ne,
274
+ size: C,
275
275
  error: h,
276
276
  controlId: Q,
277
277
  labelId: se,
278
278
  descriptionId: ce,
279
279
  errorId: le,
280
- children: /* @__PURE__ */ _("div", {
280
+ children: /* @__PURE__ */ m("div", {
281
281
  id: Q,
282
- className: ee(U.slider, u === "compact" && U.sliderCompact),
283
- children: [/* @__PURE__ */ g("div", {
284
- className: U.trackShell,
285
- children: /* @__PURE__ */ _("div", {
282
+ className: te(V.slider, l === "compact" && V.sliderCompact),
283
+ children: [/* @__PURE__ */ p("div", {
284
+ className: V.trackShell,
285
+ children: /* @__PURE__ */ m("div", {
286
286
  ref: q,
287
287
  "data-slot": "track",
288
- className: U.track,
288
+ className: V.track,
289
289
  role: "presentation",
290
290
  onPointerDown: _e,
291
291
  children: [
292
- /* @__PURE__ */ g("div", { className: U.rail }),
293
- /* @__PURE__ */ g("div", {
292
+ /* @__PURE__ */ p("div", { className: V.rail }),
293
+ /* @__PURE__ */ p("div", {
294
294
  "data-slot": "fill",
295
- className: U.fill,
295
+ className: V.fill,
296
296
  style: {
297
297
  left: `${K.startPercent}%`,
298
298
  width: `${K.endPercent - K.startPercent}%`
299
299
  }
300
300
  }),
301
- u === "compact" && M.map((t) => {
302
- let n = k(t, M, P), r = F ? t.value >= z[0] && t.value <= z[1] : t.value <= I;
303
- return /* @__PURE__ */ g(e, {
301
+ l === "compact" && A.map((t) => {
302
+ let n = D(t, A, M), r = N ? t.value >= L[0] && t.value <= L[1] : t.value <= P;
303
+ return /* @__PURE__ */ p(e, {
304
304
  tooltip: !0,
305
305
  placement: "top",
306
- content: ae(t.label),
307
- children: /* @__PURE__ */ g("button", {
306
+ content: W(t.label),
307
+ children: /* @__PURE__ */ p("button", {
308
308
  type: "button",
309
309
  "data-slot": "mark",
310
310
  "data-active": r ? "" : void 0,
311
- className: U.compactMark,
311
+ className: V.compactMark,
312
312
  style: { left: `${n}%` },
313
313
  "aria-label": t.ariaLabel,
314
- disabled: C,
314
+ disabled: x,
315
315
  onClick: () => be(t.value),
316
- children: /* @__PURE__ */ g("span", {
317
- className: U.markDot,
316
+ children: /* @__PURE__ */ p("span", {
317
+ className: V.markDot,
318
318
  "aria-hidden": "true"
319
319
  })
320
320
  })
@@ -322,13 +322,13 @@ function G(t) {
322
322
  }),
323
323
  G.map((t, n) => {
324
324
  let r = xe(t, n);
325
- return /* @__PURE__ */ g(e, {
325
+ return /* @__PURE__ */ p(e, {
326
326
  tooltip: !0,
327
327
  placement: "top",
328
- content: ae(r),
328
+ content: W(r),
329
329
  openDelay: 0,
330
330
  closeDelay: 100,
331
- children: /* @__PURE__ */ g("button", {
331
+ children: /* @__PURE__ */ p("button", {
332
332
  ref: (e) => {
333
333
  J.current[n] = e;
334
334
  },
@@ -337,18 +337,18 @@ function G(t) {
337
337
  "data-slot": "thumb",
338
338
  "data-thumb-index": n,
339
339
  "data-dragging": oe === n ? "" : void 0,
340
- className: U.thumb,
341
- disabled: C,
342
- style: { left: `${A(t, P)}%` },
343
- "aria-disabled": C || void 0,
340
+ className: V.thumb,
341
+ disabled: x,
342
+ style: { left: `${O(t, M)}%` },
343
+ "aria-disabled": x || void 0,
344
344
  "aria-orientation": "horizontal",
345
- "aria-valuemin": F && n === 1 ? z[0] : E,
346
- "aria-valuemax": F && n === 0 ? z[1] : D,
345
+ "aria-valuemin": N && n === 1 ? L[0] : w,
346
+ "aria-valuemax": N && n === 0 ? L[1] : T,
347
347
  "aria-valuenow": t,
348
348
  "aria-valuetext": typeof r == "string" || typeof r == "number" ? String(r) : void 0,
349
349
  "aria-labelledby": se,
350
350
  "aria-describedby": ue,
351
- "aria-label": se ? void 0 : F ? n === 0 ? "Минимальное значение" : "Максимальное значение" : "Значение",
351
+ "aria-label": se ? void 0 : N ? n === 0 ? "Минимальное значение" : "Максимальное значение" : "Значение",
352
352
  onPointerDown: ve(n),
353
353
  onKeyDown: ye(n)
354
354
  })
@@ -356,22 +356,22 @@ function G(t) {
356
356
  })
357
357
  ]
358
358
  })
359
- }), u === "full" && M.length > 0 && /* @__PURE__ */ g("div", {
360
- className: U.marks,
361
- children: M.map((e) => /* @__PURE__ */ _("button", {
359
+ }), l === "full" && A.length > 0 && /* @__PURE__ */ p("div", {
360
+ className: V.marks,
361
+ children: A.map((e) => /* @__PURE__ */ m("button", {
362
362
  type: "button",
363
363
  "data-slot": "mark",
364
- "data-active": (F ? e.value >= z[0] && e.value <= z[1] : e.value <= I) ? "" : void 0,
365
- className: U.mark,
366
- style: { left: `${k(e, M, P)}%` },
364
+ "data-active": (N ? e.value >= L[0] && e.value <= L[1] : e.value <= P) ? "" : void 0,
365
+ className: V.mark,
366
+ style: { left: `${D(e, A, M)}%` },
367
367
  "aria-label": e.ariaLabel,
368
- disabled: C,
368
+ disabled: x,
369
369
  onClick: () => be(e.value),
370
- children: [/* @__PURE__ */ g("span", {
371
- className: U.markDot,
370
+ children: [/* @__PURE__ */ p("span", {
371
+ className: V.markDot,
372
372
  "aria-hidden": "true"
373
- }), /* @__PURE__ */ g("span", {
374
- className: U.markLabel,
373
+ }), /* @__PURE__ */ p("span", {
374
+ className: V.markLabel,
375
375
  children: e.label
376
376
  })]
377
377
  }, e.value))
@@ -380,14 +380,14 @@ function G(t) {
380
380
  });
381
381
  }
382
382
  function K(e) {
383
- return /* @__PURE__ */ g(G, {
383
+ return /* @__PURE__ */ p(G, {
384
384
  ...e,
385
385
  mode: "single",
386
386
  marksDisplay: "compact"
387
387
  });
388
388
  }
389
389
  function q(e) {
390
- return /* @__PURE__ */ g(G, {
390
+ return /* @__PURE__ */ p(G, {
391
391
  ...e,
392
392
  mode: "range",
393
393
  marksDisplay: "compact"
@@ -396,9 +396,9 @@ function q(e) {
396
396
  //#endregion
397
397
  //#region src/slider/SliderInput.tsx
398
398
  function J({ open: e, disabled: n, setOpen: r }) {
399
- return /* @__PURE__ */ g(t.Trigger, {
399
+ return /* @__PURE__ */ p(t.Trigger, {
400
400
  passive: !0,
401
- children: /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(s, {
401
+ children: /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(s, {
402
402
  open: e,
403
403
  disabled: n,
404
404
  openAriaLabel: "Открыть слайдер",
@@ -409,7 +409,7 @@ function J({ open: e, disabled: n, setOpen: r }) {
409
409
  });
410
410
  }
411
411
  function Y(e, t) {
412
- let n = R(e, t);
412
+ let n = I(e, t);
413
413
  return {
414
414
  start: n[0] === null ? "-∞" : String(n[0]),
415
415
  end: n[1] === null ? "∞" : String(n[1])
@@ -417,10 +417,10 @@ function Y(e, t) {
417
417
  }
418
418
  function X(e, t) {
419
419
  let n = e.trim();
420
- return n === "" || n === t ? null : m(n);
420
+ return n === "" || n === t ? null : h(n);
421
421
  }
422
422
  function oe(e, t, n) {
423
- let r = t.filter((t) => P(t) === e);
423
+ let r = t.filter((t) => M(t) === e);
424
424
  if (r.length) return e === null && n === "end" ? r[r.length - 1] : r[0];
425
425
  }
426
426
  function Z(e, t) {
@@ -433,254 +433,254 @@ function se(e, t, n) {
433
433
  let [r, i] = e, a = r === null, o = i === null;
434
434
  return a && o ? n ?? "" : a ? `Меньше ${Q(i, t, "end")}` : o ? `Больше ${Q(r, t, "start")}` : r === i ? `Равно ${Q(r, t, "start")}` : `От ${Q(r, t, "start")} до ${Q(i, t, "end")}`;
435
435
  }
436
- function ce({ value: e, onChange: n, min: r, max: i, step: o, marks: s, marksPosition: f = "value", className: ee, error: h, onClearError: v, label: y, description: b, placeholder: x, disabled: S, size: C }) {
437
- let { min: T, max: E } = d(() => w(r, i), [r, i]), D = d(() => O(s, T, E), [
436
+ function ce({ value: e, onChange: n, min: r, max: i, step: o, marks: s, marksPosition: d = "value", className: te, error: ne, onClearError: g, label: _, description: v, placeholder: y, disabled: b, size: x }) {
437
+ let { min: C, max: w } = u(() => S(r, i), [r, i]), T = u(() => E(s, C, w), [
438
438
  s,
439
- T,
440
- E
441
- ]), k = d(() => ({
442
- min: T,
443
- max: E,
439
+ C,
440
+ w
441
+ ]), D = u(() => ({
442
+ min: C,
443
+ max: w,
444
444
  step: o,
445
- marks: D,
446
- marksPosition: f
445
+ marks: T,
446
+ marksPosition: d
447
447
  }), [
448
- T,
449
- E,
448
+ C,
449
+ w,
450
450
  o,
451
- D,
452
- f
453
- ]), A = N(e, k), [j, M] = p(!1), [P, F] = p(String(A)), I = u((e) => {
454
- F(e);
451
+ T,
452
+ d
453
+ ]), O = j(e, D), [k, A] = f(!1), [M, N] = f(String(O)), P = l((e) => {
454
+ N(e);
455
455
  });
456
- l(() => {
457
- I(String(A));
458
- }, [A]);
459
- let L = c(() => {
460
- if (S) {
461
- F(String(A));
456
+ ee(() => {
457
+ P(String(O));
458
+ }, [O]);
459
+ let F = c(() => {
460
+ if (b) {
461
+ N(String(O));
462
462
  return;
463
463
  }
464
- let t = m(P);
464
+ let t = h(M);
465
465
  if (t === void 0) {
466
- F(String(A));
466
+ N(String(O));
467
467
  return;
468
468
  }
469
- let r = N(t, k);
470
- e !== r && (n(r), v?.()), F(String(r));
469
+ let r = j(t, D);
470
+ e !== r && (n(r), g?.()), N(String(r));
471
471
  }, [
472
- S,
473
- P,
474
- A,
472
+ b,
473
+ M,
474
+ O,
475
475
  n,
476
- v,
477
- k,
476
+ g,
477
+ D,
478
478
  e
479
479
  ]);
480
- return /* @__PURE__ */ _(t, {
481
- open: j,
482
- onOpenChange: M,
483
- children: [/* @__PURE__ */ g(a, {
484
- label: y,
485
- description: b,
486
- placeholder: x,
487
- disabled: S,
488
- size: C,
489
- className: ee,
490
- error: h,
491
- value: P,
492
- onChange: F,
493
- onBlur: L,
480
+ return /* @__PURE__ */ m(t, {
481
+ open: k,
482
+ onOpenChange: A,
483
+ children: [/* @__PURE__ */ p(a, {
484
+ label: _,
485
+ description: v,
486
+ placeholder: y,
487
+ disabled: b,
488
+ size: x,
489
+ className: te,
490
+ error: ne,
491
+ value: M,
492
+ onChange: N,
493
+ onBlur: F,
494
494
  onKeyDown: (e) => {
495
- e.key === "Enter" && (e.preventDefault(), L());
495
+ e.key === "Enter" && (e.preventDefault(), F());
496
496
  },
497
497
  endAdornmentWidth: "var(--control-height)",
498
498
  endAdornment: J({
499
- open: j,
500
- disabled: S,
501
- setOpen: M
499
+ open: k,
500
+ disabled: b,
501
+ setOpen: A
502
502
  })
503
- }), /* @__PURE__ */ g(t.Content, {
503
+ }), /* @__PURE__ */ p(t.Content, {
504
504
  background: "primary",
505
- children: /* @__PURE__ */ g("div", {
506
- className: U.popoverContent,
507
- children: /* @__PURE__ */ g(G, {
505
+ children: /* @__PURE__ */ p("div", {
506
+ className: V.popoverContent,
507
+ children: /* @__PURE__ */ p(G, {
508
508
  mode: "single",
509
- min: T,
510
- max: E,
509
+ min: C,
510
+ max: w,
511
511
  step: o,
512
- marks: D,
513
- marksPosition: f,
512
+ marks: T,
513
+ marksPosition: d,
514
514
  marksDisplay: "full",
515
515
  value: e,
516
516
  onChange: (e) => {
517
- n(e), F(String(e)), v?.();
517
+ n(e), N(String(e)), g?.();
518
518
  },
519
- disabled: S
519
+ disabled: b
520
520
  })
521
521
  })
522
522
  })]
523
523
  });
524
524
  }
525
- function le({ value: e, onChange: a, min: s, max: f, step: m, marks: v, marksPosition: y = "value", className: b, error: x, onClearError: S, label: C, description: T, readonlyValueText: E, placeholder: D, disabled: k, size: A }) {
526
- let { min: j, max: M } = d(() => w(s, f), [s, f]), N = d(() => O(v, j, M), [
527
- v,
528
- j,
529
- M
530
- ]), P = d(() => ({
531
- min: j,
532
- max: M,
533
- step: m,
534
- marks: N,
535
- marksPosition: y
525
+ function le({ value: e, onChange: a, min: s, max: d, step: h, marks: g, marksPosition: _ = "value", className: v, error: y, onClearError: b, label: x, description: C, readonlyValueText: w, placeholder: T, disabled: D, size: O }) {
526
+ let { min: k, max: A } = u(() => S(s, d), [s, d]), j = u(() => E(g, k, A), [
527
+ g,
528
+ k,
529
+ A
530
+ ]), M = u(() => ({
531
+ min: k,
532
+ max: A,
533
+ step: h,
534
+ marks: j,
535
+ marksPosition: _
536
536
  }), [
537
+ k,
538
+ A,
539
+ h,
537
540
  j,
538
- M,
539
- m,
540
- N,
541
- y
542
- ]), F = d(() => R(e, P), [P, e]), I = d(() => Y(F, P), [F, P]), [L, z] = p(!1), [te, B] = p(I.start), [V, H] = p(I.end), [ne, W] = p(F), re = u((e, t) => {
543
- B(e), H(t);
541
+ _
542
+ ]), N = u(() => I(e, M), [M, e]), P = u(() => Y(N, M), [N, M]), [F, L] = f(!1), [re, R] = f(P.start), [z, B] = f(P.end), [H, U] = f(N), ie = l((e, t) => {
543
+ R(e), B(t);
544
544
  });
545
- l(() => {
546
- L || re(I.start, I.end);
545
+ ee(() => {
546
+ F || ie(P.start, P.end);
547
547
  }, [
548
- I.start,
549
- I.end,
550
- F,
551
- L
548
+ P.start,
549
+ P.end,
550
+ N,
551
+ F
552
552
  ]);
553
- let { controlId: ie, labelId: ae, descriptionId: K, errorId: q, describedBy: oe } = i({
554
- hasLabel: C != null,
555
- hasDescription: !!T,
556
- hasError: !!x
553
+ let { controlId: ae, labelId: W, descriptionId: K, errorId: q, describedBy: oe } = i({
554
+ hasLabel: x != null,
555
+ hasDescription: !!C,
556
+ hasError: !!y
557
557
  }), Z = c(() => {
558
- B(I.start), H(I.end);
559
- }, [I.end, I.start]), Q = c(() => {
560
- if (k) {
558
+ R(P.start), B(P.end);
559
+ }, [P.end, P.start]), Q = c(() => {
560
+ if (D) {
561
561
  Z();
562
562
  return;
563
563
  }
564
- let e = X(te, "-∞"), t = X(V, "∞");
564
+ let e = X(re, "-∞"), t = X(z, "∞");
565
565
  if (e === void 0 || t === void 0) {
566
566
  Z();
567
567
  return;
568
568
  }
569
- let n = R([e, t], P);
570
- ue(F, n) || (a(n), S?.());
571
- let r = Y(n, P);
572
- B(r.start), H(r.end), W(n);
569
+ let n = I([e, t], M);
570
+ ue(N, n) || (a(n), b?.());
571
+ let r = Y(n, M);
572
+ R(r.start), B(r.end), U(n);
573
573
  }, [
574
- k,
575
- V,
576
- te,
577
- F,
574
+ D,
575
+ z,
576
+ re,
577
+ N,
578
578
  a,
579
- S,
579
+ b,
580
580
  Z,
581
- P
581
+ M
582
582
  ]), ce = c((e) => {
583
- let t = R(e, P);
584
- ue(F, t) || (a(t), S?.());
585
- let n = Y(t, P);
586
- B(n.start), H(n.end), W(t);
583
+ let t = I(e, M);
584
+ ue(N, t) || (a(t), b?.());
585
+ let n = Y(t, M);
586
+ R(n.start), B(n.end), U(t);
587
587
  }, [
588
- F,
588
+ N,
589
589
  a,
590
- S,
591
- P
590
+ b,
591
+ M
592
592
  ]), le = (e) => {
593
- !L && e && (W(F), B(I.start), H(I.end)), L && !e && !k && ce(ne), z(e);
593
+ !F && e && (U(N), R(P.start), B(P.end)), F && !e && !D && ce(H), L(e);
594
594
  }, de = (e) => {
595
595
  e.key === "Enter" && (e.preventDefault(), Q());
596
596
  }, fe = (e) => {
597
- let t = R(e, P);
598
- W(t);
599
- let n = Y(t, P);
600
- B(n.start), H(n.end);
601
- }, $ = E ? se(L ? ne : F, N, D) : void 0;
602
- return /* @__PURE__ */ _(t, {
603
- open: L,
597
+ let t = I(e, M);
598
+ U(t);
599
+ let n = Y(t, M);
600
+ R(n.start), B(n.end);
601
+ }, $ = w ? se(F ? H : N, j, T) : void 0;
602
+ return /* @__PURE__ */ m(t, {
603
+ open: F,
604
604
  onOpenChange: le,
605
- children: [/* @__PURE__ */ g(o, {
606
- label: C,
607
- description: T,
608
- disabled: k,
609
- className: b,
610
- size: A,
611
- error: x,
612
- controlId: ie,
613
- labelId: ae,
605
+ children: [/* @__PURE__ */ p(o, {
606
+ label: x,
607
+ description: C,
608
+ disabled: D,
609
+ className: v,
610
+ size: O,
611
+ error: y,
612
+ controlId: ae,
613
+ labelId: W,
614
614
  descriptionId: K,
615
615
  errorId: q,
616
- children: /* @__PURE__ */ g(r, {
616
+ children: /* @__PURE__ */ p(r, {
617
617
  endAdornmentWidth: "var(--control-height)",
618
618
  endAdornment: J({
619
- open: L,
620
- disabled: k,
619
+ open: F,
620
+ disabled: D,
621
621
  setOpen: (e) => {
622
- le(typeof e == "function" ? e(L) : e);
622
+ le(typeof e == "function" ? e(F) : e);
623
623
  }
624
624
  }),
625
- children: ({ controlClassName: e }) => /* @__PURE__ */ g("div", {
626
- id: ie,
627
- className: ee(n.uiInputControlFake, U.rangeInputControl, e),
628
- "data-invalid": x ? "" : void 0,
629
- "data-disabled": k || void 0,
625
+ children: ({ controlClassName: e }) => /* @__PURE__ */ p("div", {
626
+ id: ae,
627
+ className: te(n.uiInputControlFake, V.rangeInputControl, e),
628
+ "data-invalid": y ? "" : void 0,
629
+ "data-disabled": D || void 0,
630
630
  role: "group",
631
- "aria-invalid": !!x || void 0,
632
- "aria-label": typeof C == "string" ? C : "Диапазон",
633
- "aria-labelledby": typeof C == "string" ? void 0 : ae,
631
+ "aria-invalid": !!y || void 0,
632
+ "aria-label": typeof x == "string" ? x : "Диапазон",
633
+ "aria-labelledby": typeof x == "string" ? void 0 : W,
634
634
  "aria-describedby": oe,
635
- children: E ? /* @__PURE__ */ g("span", {
636
- className: ee("flexEllipsis", !$ && n.uiPlaceholder),
637
- children: $ || D
638
- }) : /* @__PURE__ */ _(h, { children: [
639
- /* @__PURE__ */ g("input", {
635
+ children: w ? /* @__PURE__ */ p("span", {
636
+ className: te("flexEllipsis", !$ && n.uiPlaceholder),
637
+ children: $ || T
638
+ }) : /* @__PURE__ */ m(ne, { children: [
639
+ /* @__PURE__ */ p("input", {
640
640
  type: "text",
641
641
  inputMode: "decimal",
642
- className: U.rangeSegmentInput,
643
- value: te,
644
- disabled: k,
642
+ className: V.rangeSegmentInput,
643
+ value: re,
644
+ disabled: D,
645
645
  "aria-label": "Начало диапазона",
646
- onChange: (e) => B(e.target.value),
646
+ onChange: (e) => R(e.target.value),
647
647
  onBlur: Q,
648
648
  onKeyDown: de
649
649
  }),
650
- /* @__PURE__ */ g("span", {
651
- className: U.rangeSeparator,
652
- "data-disabled": k || void 0,
650
+ /* @__PURE__ */ p("span", {
651
+ className: V.rangeSeparator,
652
+ "data-disabled": D || void 0,
653
653
  children: "-"
654
654
  }),
655
- /* @__PURE__ */ g("input", {
655
+ /* @__PURE__ */ p("input", {
656
656
  type: "text",
657
657
  inputMode: "decimal",
658
- className: U.rangeSegmentInput,
659
- value: V,
660
- disabled: k,
658
+ className: V.rangeSegmentInput,
659
+ value: z,
660
+ disabled: D,
661
661
  "aria-label": "Конец диапазона",
662
- onChange: (e) => H(e.target.value),
662
+ onChange: (e) => B(e.target.value),
663
663
  onBlur: Q,
664
664
  onKeyDown: de
665
665
  })
666
666
  ] })
667
667
  })
668
668
  })
669
- }), /* @__PURE__ */ g(t.Content, {
669
+ }), /* @__PURE__ */ p(t.Content, {
670
670
  background: "primary",
671
- children: /* @__PURE__ */ g("div", {
672
- className: U.popoverContent,
673
- children: /* @__PURE__ */ g(G, {
671
+ children: /* @__PURE__ */ p("div", {
672
+ className: V.popoverContent,
673
+ children: /* @__PURE__ */ p(G, {
674
674
  mode: "range",
675
- min: j,
676
- max: M,
677
- step: m,
678
- marks: N,
679
- marksPosition: y,
675
+ min: k,
676
+ max: A,
677
+ step: h,
678
+ marks: j,
679
+ marksPosition: _,
680
680
  marksDisplay: "full",
681
- value: ne,
681
+ value: H,
682
682
  onChange: fe,
683
- disabled: k
683
+ disabled: D
684
684
  })
685
685
  })
686
686
  })]