@fluidattacks/design 9.9.0 → 9.9.1

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.
@@ -12,7 +12,6 @@ import "react-dom";
12
12
  import "../../typography/heading/index.js";
13
13
  import "../../typography/span/index.js";
14
14
  import "../../typography/text/index.js";
15
- import "../../inputs/styles.js";
16
15
  import "../../container/index.js";
17
16
  import "../../icon-button/index.js";
18
17
  import "../../../_virtual/dayjs.min.js";
@@ -21,7 +20,7 @@ import "../../layout/categories/buttons/index.js";
21
20
  import { InputNumber as S } from "../../inputs/fields/number/index.js";
22
21
  import "../../inputs/utils/action-button/index.js";
23
22
  import "../../../node_modules/react-international-phone/dist/index.js";
24
- const pt = ({
23
+ const it = ({
25
24
  control: u,
26
25
  description: B,
27
26
  disabled: t,
@@ -142,5 +141,5 @@ const pt = ({
142
141
  );
143
142
  };
144
143
  export {
145
- pt as CardWithInput
144
+ it as CardWithInput
146
145
  };
@@ -1,6 +1,6 @@
1
1
  import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
2
  import I from "../../../_virtual/snakeCase.js";
3
- import { forwardRef as O, useContext as $, useMemo as B, useCallback as p, Fragment as L } from "react";
3
+ import { forwardRef as O, useContext as $, useMemo as B, useCallback as h, Fragment as L } from "react";
4
4
  import { useTheme as R } from "styled-components";
5
5
  import { FiltersContext as A } from "../context/index.js";
6
6
  import { NoMatches as P } from "../search/no-matches/index.js";
@@ -15,7 +15,6 @@ import "react-dom";
15
15
  import "../../typography/heading/index.js";
16
16
  import "../../typography/span/index.js";
17
17
  import { Text as M } from "../../typography/text/index.js";
18
- import "../../inputs/styles.js";
19
18
  import { Tag as K } from "../../tag/index.js";
20
19
  import "../../../_virtual/dayjs.min.js";
21
20
  import "../../icon-button/index.js";
@@ -27,8 +26,8 @@ import { parseTextFilterValue as U, parseCheckboxesFilterValue as X, parseInclud
27
26
  const Z = (c, d) => {
28
27
  if (d?.some((t) => t.type === "text") ?? !1)
29
28
  return U(c ?? "").text ? "1" : "0";
30
- const i = new Set(d?.map((t) => t.type) ?? []);
31
- if (i.size === 1 && i.has("checkboxes"))
29
+ const l = new Set(d?.map((t) => t.type) ?? []);
30
+ if (l.size === 1 && l.has("checkboxes"))
32
31
  return X(
33
32
  c ?? ""
34
33
  ).values.length.toString();
@@ -39,11 +38,11 @@ const Z = (c, d) => {
39
38
  return (t.length + f.length).toString();
40
39
  }
41
40
  return (c ?? "").split(",").filter((t) => t && t !== "-").length.toString();
42
- }, Te = O(function({
41
+ }, ke = O(function({
43
42
  includeSearch: d = !1,
44
43
  groupedFilters: g,
45
- handleChangeId: i,
46
- pinnedFilters: h
44
+ handleChangeId: l,
45
+ pinnedFilters: p
47
46
  }, b) {
48
47
  const t = R(), {
49
48
  id: f,
@@ -52,16 +51,16 @@ const Z = (c, d) => {
52
51
  values: s,
53
52
  updateSearch: v,
54
53
  setValues: u
55
- } = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = h.length > 0, V = p(
54
+ } = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = p.length > 0, V = h(
56
55
  (e) => () => {
57
- i(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
56
+ l(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
58
57
  },
59
- [i, v, m, s]
60
- ), j = p(() => {
58
+ [l, v, m, s]
59
+ ), j = h(() => {
61
60
  u(
62
61
  (e) => Object.keys(e).reduce((n, r) => ({ ...n, [r]: "" }), {})
63
- ), i("");
64
- }, [u, i]), z = p(
62
+ ), l("");
63
+ }, [u, l]), z = h(
65
64
  (e) => {
66
65
  m((n) => ({
67
66
  ...n,
@@ -69,7 +68,7 @@ const Z = (c, d) => {
69
68
  }));
70
69
  },
71
70
  [m]
72
- ), E = p(
71
+ ), E = h(
73
72
  (e) => (n) => {
74
73
  u((r) => ({ ...r, [e]: n }));
75
74
  },
@@ -108,7 +107,7 @@ const Z = (c, d) => {
108
107
  scroll: "y",
109
108
  width: "100%",
110
109
  children: [
111
- S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: h.map((e) => {
110
+ S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: p.map((e) => {
112
111
  const n = e.options?.[0]?.items?.map((r) => ({
113
112
  name: r.label ?? r.value,
114
113
  value: r.value
@@ -141,17 +140,17 @@ const Z = (c, d) => {
141
140
  children: e
142
141
  }
143
142
  ) : void 0,
144
- n.map((l) => {
145
- const G = s[l.id], F = Z(
143
+ n.map((i) => {
144
+ const G = s[i.id], F = Z(
146
145
  G,
147
- l.options
146
+ i.options
148
147
  );
149
148
  return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ a(
150
149
  N,
151
150
  {
152
151
  as: "button",
153
- "data-testid": l.id,
154
- onClick: V(l.id),
152
+ "data-testid": i.id,
153
+ onClick: V(i.id),
155
154
  children: [
156
155
  /* @__PURE__ */ o(
157
156
  T,
@@ -162,7 +161,7 @@ const Z = (c, d) => {
162
161
  iconType: "fa-light"
163
162
  }
164
163
  ),
165
- l.label,
164
+ i.label,
166
165
  /* @__PURE__ */ a(
167
166
  x,
168
167
  {
@@ -171,7 +170,7 @@ const Z = (c, d) => {
171
170
  gap: 0.5,
172
171
  style: { marginLeft: "auto" },
173
172
  children: [
174
- f === l.id ? /* @__PURE__ */ o(
173
+ f === i.id ? /* @__PURE__ */ o(
175
174
  T,
176
175
  {
177
176
  icon: "chevron-right",
@@ -186,7 +185,7 @@ const Z = (c, d) => {
186
185
  )
187
186
  ]
188
187
  }
189
- ) }, l.id);
188
+ ) }, i.id);
190
189
  })
191
190
  ]
192
191
  },
@@ -198,5 +197,5 @@ const Z = (c, d) => {
198
197
  ] });
199
198
  });
200
199
  export {
201
- Te as FiltersMenu
200
+ ke as FiltersMenu
202
201
  };
@@ -1,186 +1,189 @@
1
- import { jsx as a, Fragment as P, jsxs as T } from "react/jsx-runtime";
2
- import { useVirtualizer as I } from "../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
- import j from "../../../../_virtual/dayjs.min.js";
4
- import y from "../../../../_virtual/isNaN.js";
5
- import { useContext as A, useCallback as p, useState as N } from "react";
6
- import { FiltersContext as U } from "../../context/index.js";
7
- import { NoMatches as _ } from "../../search/no-matches/index.js";
8
- import { StyledItem as b, StyledItemCount as q } from "../../styles.js";
9
- import { SingleSelectSearch as B } from "../single-select/index.js";
10
- import { Checkbox as w } from "../../../checkbox/index.js";
11
- import { theme as z } from "../../../colors/index.js";
12
- import { Icon as R } from "../../../icon/index.js";
1
+ import { jsx as r, Fragment as q, jsxs as w } from "react/jsx-runtime";
2
+ import { useVirtualizer as H } from "../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
+ import J from "../../../../_virtual/dayjs.min.js";
4
+ import E from "../../../../_virtual/isNaN.js";
5
+ import { useContext as K, useCallback as p, useRef as Q, useState as T } from "react";
6
+ import { FiltersContext as W } from "../../context/index.js";
7
+ import { NoMatches as X } from "../../search/no-matches/index.js";
8
+ import { StyledItem as y, StyledItemCount as Y } from "../../styles.js";
9
+ import { SingleSelectSearch as Z } from "../single-select/index.js";
10
+ import { Checkbox as O } from "../../../checkbox/index.js";
11
+ import { theme as L } from "../../../colors/index.js";
12
+ import { Icon as z } from "../../../icon/index.js";
13
13
  import "styled-components";
14
14
  import "../../../../_virtual/lodash.js";
15
15
  import "react-dom";
16
16
  import "../../../typography/heading/index.js";
17
- import { Span as G } from "../../../typography/span/index.js";
17
+ import { Span as ee } from "../../../typography/span/index.js";
18
18
  import "../../../typography/text/index.js";
19
- import "../../../inputs/styles.js";
20
19
  import "../../../container/index.js";
21
- import { Tag as H } from "../../../tag/index.js";
20
+ import { Tag as te } from "../../../tag/index.js";
22
21
  import "../../../icon-button/index.js";
23
22
  import "../../../button/index.js";
24
- import { InputDateRange as J } from "../../../inputs/fields/date-range/index.js";
25
- import { TextInput as K } from "../../../inputs/fields/text-input/index.js";
23
+ import { InputDateRange as oe } from "../../../inputs/fields/date-range/index.js";
24
+ import { TextInput as ne } from "../../../inputs/fields/text-input/index.js";
26
25
  import "../../../layout/categories/buttons/index.js";
27
26
  import "../../../inputs/utils/action-button/index.js";
28
- import { InputNumberRange as Q } from "../../../inputs/fields/number-range/index.js";
27
+ import { InputNumberRange as re } from "../../../inputs/fields/number-range/index.js";
29
28
  import "../../../../node_modules/react-international-phone/dist/index.js";
30
- import { useDebouncedCallback as W } from "../../../../hooks/use-debounced-callback.js";
31
- import { parseCheckboxesFilterValue as X, parseTextFilterValue as Y } from "../../../../utils/filters.js";
32
- const Z = ({
29
+ import { useDebouncedCallback as le } from "../../../../hooks/use-debounced-callback.js";
30
+ import { useMountEffect as ae } from "../../../../hooks/use-mount-effect.js";
31
+ import { parseCheckboxesFilterValue as ie, parseTextFilterValue as se } from "../../../../utils/filters.js";
32
+ const ce = ({
33
33
  id: i,
34
- filterValue: n,
35
- label: l,
34
+ filterValue: l,
35
+ label: a,
36
36
  onTextValue: t,
37
37
  checkboxLabel: s,
38
38
  onCheckboxChange: e,
39
- debounceMs: o
39
+ debounceMs: n
40
40
  }) => {
41
- const { text: r, checked: m } = Y(
42
- n ?? ""
43
- ), [d, v] = N(r), [S, C] = N(r), h = Number.isFinite(o) && (o ?? 0) >= 0 ? Math.min(o ?? 0, 5e3) : 0, x = W(t, h);
44
- r !== S && (C(r), v(r), x.cancel());
41
+ const { text: c, checked: f } = se(
42
+ l ?? ""
43
+ ), [u, d] = T(c), [g, R] = T(c), h = Number.isFinite(n) && (n ?? 0) >= 0 ? Math.min(n ?? 0, 5e3) : 0, b = le(t, h);
44
+ c !== g && (R(c), d(c), b.cancel());
45
45
  const k = p(
46
- (u) => {
47
- u.stopPropagation(), u.preventDefault();
48
- const f = u.target.value;
49
- v(f), h > 0 ? x(f) : t(f);
46
+ (x) => {
47
+ x.stopPropagation(), x.preventDefault();
48
+ const v = x.target.value;
49
+ d(v), h > 0 ? b(v) : t(v);
50
50
  },
51
- [h, x, t]
51
+ [h, b, t]
52
52
  );
53
- return /* @__PURE__ */ T(
53
+ return /* @__PURE__ */ w(
54
54
  "div",
55
55
  {
56
56
  style: {
57
57
  display: "flex",
58
58
  flexDirection: "column",
59
- gap: z.spacing[0.25],
59
+ gap: L.spacing[0.25],
60
60
  width: "100%"
61
61
  },
62
62
  children: [
63
- s ? /* @__PURE__ */ a(
64
- w,
63
+ s ? /* @__PURE__ */ r(
64
+ O,
65
65
  {
66
- checked: m,
66
+ checked: f,
67
67
  label: s,
68
68
  name: `${i}-checkbox`,
69
69
  onChange: e,
70
70
  value: "textCheck"
71
71
  }
72
72
  ) : void 0,
73
- /* @__PURE__ */ a(
74
- K,
73
+ /* @__PURE__ */ r(
74
+ ne,
75
75
  {
76
76
  name: i,
77
77
  onChange: k,
78
- placeholder: `Type ${l}...`,
79
- value: d
78
+ placeholder: `Type ${a}...`,
79
+ value: u
80
80
  }
81
81
  )
82
82
  ]
83
83
  }
84
84
  );
85
- }, ee = {
85
+ }, me = {
86
86
  text: ({
87
87
  id: i,
88
- filterValue: n,
89
- label: l,
88
+ filterValue: l,
89
+ label: a,
90
90
  onTextValue: t,
91
91
  checkboxLabel: s,
92
92
  onCheckboxChange: e,
93
- debounceMs: o
94
- }) => t === void 0 ? null : /* @__PURE__ */ a(
95
- Z,
93
+ debounceMs: n
94
+ }) => t === void 0 ? null : /* @__PURE__ */ r(
95
+ ce,
96
96
  {
97
97
  checkboxLabel: s,
98
- debounceMs: o,
99
- filterValue: n,
98
+ debounceMs: n,
99
+ filterValue: l,
100
100
  id: i,
101
- label: l,
101
+ label: a,
102
102
  onCheckboxChange: e,
103
103
  onTextValue: t
104
104
  }
105
105
  ),
106
106
  checkboxes: ({
107
107
  items: i,
108
- virtualItems: n,
109
- filterValue: l,
110
- ref: t,
111
- totalSize: s,
112
- onChange: e
108
+ virtualItems: l,
109
+ filterValue: a,
110
+ listRef: t,
111
+ ref: s,
112
+ scrollMargin: e,
113
+ totalSize: n,
114
+ onChange: c
113
115
  }) => {
114
- const o = new Set(
115
- X(l ?? "").values
116
+ const f = new Set(
117
+ ie(a ?? "").values
116
118
  );
117
- return n.length > 0 ? (
119
+ return l.length > 0 ? (
118
120
  // Positioning context for the absolute rows, and it reserves their height
119
- /* @__PURE__ */ a(
121
+ /* @__PURE__ */ r(
120
122
  "div",
121
123
  {
122
124
  "data-testid": "options-virtual-list",
125
+ ref: t,
123
126
  style: {
124
- height: `${s}px`,
127
+ height: `${n}px`,
125
128
  position: "relative",
126
129
  width: "100%"
127
130
  },
128
- children: n.map((r) => {
129
- const m = i[r.index], d = o.has(m?.value);
130
- return /* @__PURE__ */ a(
131
+ children: l.map((u) => {
132
+ const d = i[u.index], g = f.has(d?.value);
133
+ return /* @__PURE__ */ r(
131
134
  "div",
132
135
  {
133
- "data-index": r.index,
134
- ref: t,
136
+ "data-index": u.index,
137
+ ref: s,
135
138
  style: {
136
139
  position: "absolute",
137
- top: `${r.start}px`,
140
+ top: `${u.start - e}px`,
138
141
  left: 0,
139
142
  width: "100%"
140
143
  },
141
- children: /* @__PURE__ */ a(b, { "aria-selected": d, children: /* @__PURE__ */ a(
142
- w,
144
+ children: /* @__PURE__ */ r(y, { "aria-selected": g, children: /* @__PURE__ */ r(
145
+ O,
143
146
  {
144
- checked: d,
145
- label: m?.label,
146
- name: m?.value,
147
- onChange: e,
148
- value: m?.value
147
+ checked: g,
148
+ label: d?.label,
149
+ name: d?.value,
150
+ onChange: c,
151
+ value: d?.value
149
152
  }
150
153
  ) })
151
154
  },
152
- `${r.index}-${m?.value}`
155
+ `${u.index}-${d?.value}`
153
156
  );
154
157
  })
155
158
  }
156
159
  )
157
- ) : /* @__PURE__ */ a(_, {});
160
+ ) : /* @__PURE__ */ r(X, {});
158
161
  },
159
162
  combobox: ({
160
163
  id: i,
161
- items: n,
162
- filterValue: l,
164
+ items: l,
165
+ filterValue: a,
163
166
  label: t,
164
167
  onSelectChange: s
165
- }) => /* @__PURE__ */ a(
166
- B,
168
+ }) => /* @__PURE__ */ r(
169
+ Z,
167
170
  {
168
- items: n,
171
+ items: l,
169
172
  name: i,
170
173
  onSelect: s,
171
174
  placeholder: `Search ${t}`,
172
- selected: l?.split(",").map((e) => e.trim()).find((e) => n.some((o) => o.value === e)) ?? null
175
+ selected: a?.split(",").map((e) => e.trim()).find((e) => l.some((n) => n.value === e)) ?? null
173
176
  }
174
177
  ),
175
- list: ({ items: i, filterValue: n, onListChange: l }) => i.map((t) => /* @__PURE__ */ T(
176
- b,
178
+ list: ({ items: i, filterValue: l, onListChange: a }) => i.map((t) => /* @__PURE__ */ w(
179
+ y,
177
180
  {
178
- "aria-selected": n?.split(",").includes(t?.value),
181
+ "aria-selected": l?.split(",").includes(t?.value),
179
182
  as: "button",
180
- onClick: l?.(t.value),
183
+ onClick: a?.(t.value),
181
184
  children: [
182
- t.icon ? /* @__PURE__ */ a(
183
- R,
185
+ t.icon ? /* @__PURE__ */ r(
186
+ z,
184
187
  {
185
188
  icon: t.icon,
186
189
  iconColor: t.iconColor,
@@ -188,10 +191,10 @@ const Z = ({
188
191
  iconType: t.iconType ?? "fa-light"
189
192
  }
190
193
  ) : void 0,
191
- /* @__PURE__ */ a(
192
- G,
194
+ /* @__PURE__ */ r(
195
+ ee,
193
196
  {
194
- color: z.palette.gray[800],
197
+ color: L.palette.gray[800],
195
198
  display: "block",
196
199
  overflow: "hidden",
197
200
  size: "md",
@@ -201,16 +204,16 @@ const Z = ({
201
204
  children: t.label
202
205
  }
203
206
  ),
204
- /* @__PURE__ */ a("span", { className: "filter-item" }),
205
- t.count === void 0 ? void 0 : /* @__PURE__ */ a(q, { children: /* @__PURE__ */ a(
206
- H,
207
+ /* @__PURE__ */ r("span", { className: "filter-item" }),
208
+ t.count === void 0 ? void 0 : /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(
209
+ te,
207
210
  {
208
211
  tagLabel: t.count.toLocaleString("en-US"),
209
212
  variant: "default"
210
213
  }
211
214
  ) }),
212
- n?.split(",").includes(t?.value) ? /* @__PURE__ */ a("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ a(
213
- R,
215
+ l?.split(",").includes(t?.value) ? /* @__PURE__ */ r("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ r(
216
+ z,
214
217
  {
215
218
  icon: "check",
216
219
  iconClass: "selected",
@@ -224,25 +227,25 @@ const Z = ({
224
227
  )),
225
228
  dateRange: ({
226
229
  id: i,
227
- filterValue: n,
228
- onRangeChange: l,
230
+ filterValue: l,
231
+ onRangeChange: a,
229
232
  updateCalendarState: t
230
233
  }) => {
231
- const [s, e] = n?.split(",").filter((o) => j(o).isValid() || o === "-") ?? [];
232
- return /* @__PURE__ */ a(b, { children: /* @__PURE__ */ a(
233
- J,
234
+ const [s, e] = l?.split(",").filter((n) => J(n).isValid() || n === "-") ?? [];
235
+ return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
236
+ oe,
234
237
  {
235
238
  name: i,
236
239
  onOpenCalendar: t,
237
240
  propsMax: {
238
241
  name: "maxValue",
239
242
  value: e !== "-" ? e : "",
240
- onChange: l?.(1)
243
+ onChange: a?.(1)
241
244
  },
242
245
  propsMin: {
243
246
  name: "minValue",
244
247
  value: s !== "-" ? s : "",
245
- onChange: l?.(0)
248
+ onChange: a?.(0)
246
249
  },
247
250
  variant: "filters"
248
251
  }
@@ -250,114 +253,144 @@ const Z = ({
250
253
  },
251
254
  numberRange: ({
252
255
  id: i,
253
- filterValue: n,
254
- minValue: l,
256
+ filterValue: l,
257
+ minValue: a,
255
258
  maxValue: t,
256
259
  onRangeNumberChange: s
257
260
  }) => {
258
- const e = n?.split(",") ?? [], o = e[0]?.trim(), r = e[1]?.trim(), m = o && o !== "" && o !== "-" && !y(Number(o)) ? Number(o) : void 0, d = r && r !== "" && r !== "-" && !y(Number(r)) ? Number(r) : void 0;
259
- return /* @__PURE__ */ a(b, { children: /* @__PURE__ */ a(
260
- Q,
261
+ const e = l?.split(",") ?? [], n = e[0]?.trim(), c = e[1]?.trim(), f = n && n !== "" && n !== "-" && !E(Number(n)) ? Number(n) : void 0, u = c && c !== "" && c !== "-" && !E(Number(c)) ? Number(c) : void 0;
262
+ return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
263
+ re,
261
264
  {
262
265
  name: i,
263
266
  propsMax: {
264
267
  name: "maxValue",
265
- min: l,
268
+ min: a,
266
269
  max: t,
267
270
  onChange: s?.(1),
268
271
  placeholder: "Max %",
269
- value: d
272
+ value: u
270
273
  },
271
274
  propsMin: {
272
275
  name: "minValue",
273
- min: l,
276
+ min: a,
274
277
  max: t,
275
278
  onChange: s?.(0),
276
279
  placeholder: "Min %",
277
- value: m
280
+ value: f
278
281
  },
279
282
  variant: "filters"
280
283
  }
281
284
  ) });
282
285
  }
283
- }, De = ({
286
+ }, Ge = ({
284
287
  id: i,
285
- filteredItems: n,
286
- filterValue: l,
288
+ filteredItems: l,
289
+ filterValue: a,
287
290
  label: t,
288
291
  option: s,
289
292
  onChange: e
290
293
  }) => {
291
- const { type: o, minValue: r, maxValue: m, checkboxLabel: d, debounceMs: v } = s ?? {}, S = o && ee[o], {
292
- calendarState: { updateCalendarState: C },
294
+ const { type: n, minValue: c, maxValue: f, checkboxLabel: u, debounceMs: d } = s ?? {}, g = n && me[n], {
295
+ calendarState: { updateCalendarState: R },
293
296
  scrollState: h
294
- } = A(U), x = p(() => 36, []), k = p(
297
+ } = K(W), b = p(() => 36, []), k = p(
295
298
  () => h.ref.current,
296
299
  [h.ref]
297
- ), u = I({
298
- count: n.length,
299
- estimateSize: x,
300
+ ), x = Q(null), [v, V] = T(0), M = p(() => {
301
+ const o = h.ref.current, m = x.current;
302
+ if (o && m) {
303
+ const S = m.getBoundingClientRect().top - o.getBoundingClientRect().top + o.scrollTop;
304
+ V(
305
+ (C) => C === S ? C : S
306
+ );
307
+ }
308
+ }, [h.ref]), $ = p(
309
+ (o) => {
310
+ x.current = o, M();
311
+ },
312
+ [M]
313
+ );
314
+ ae(() => {
315
+ const o = h.ref.current;
316
+ if (o === null || typeof ResizeObserver > "u")
317
+ return;
318
+ const m = new ResizeObserver(M), S = () => {
319
+ m.disconnect(), Array.from(o.children).forEach((_) => {
320
+ m.observe(_);
321
+ });
322
+ }, C = new MutationObserver(S);
323
+ return C.observe(o, { childList: !0 }), S(), () => {
324
+ C.disconnect(), m.disconnect();
325
+ };
326
+ });
327
+ const N = H({
328
+ count: l.length,
329
+ estimateSize: b,
300
330
  getScrollElement: k,
331
+ scrollMargin: v,
301
332
  useFlushSync: !1
302
- }), f = u.getVirtualItems(), M = p(
303
- (c) => {
304
- c.stopPropagation(), c.preventDefault(), e(c.target.value, o ?? "");
333
+ }), D = N.getVirtualItems(), F = p(
334
+ (o) => {
335
+ o.stopPropagation(), o.preventDefault(), e(o.target.value, n ?? "");
305
336
  },
306
- [e, o]
307
- ), V = p(
308
- (c) => (g) => {
309
- e(g, "dateRange", c);
337
+ [e, n]
338
+ ), P = p(
339
+ (o) => (m) => {
340
+ e(m, "dateRange", o);
310
341
  },
311
342
  [e]
312
- ), $ = p(
313
- (c) => (g) => {
314
- g.stopPropagation(), g.preventDefault(), e(g.target.value, "numberRange", c);
343
+ ), I = p(
344
+ (o) => (m) => {
345
+ m.stopPropagation(), m.preventDefault(), e(m.target.value, "numberRange", o);
315
346
  },
316
347
  [e]
317
- ), D = p(
318
- (c) => () => {
319
- e(c, "list");
348
+ ), j = p(
349
+ (o) => () => {
350
+ e(o, "list");
320
351
  },
321
352
  [e]
322
- ), E = p(
323
- (c) => () => {
324
- e(c, "combobox");
353
+ ), A = p(
354
+ (o) => () => {
355
+ e(o, "combobox");
325
356
  },
326
357
  [e]
327
- ), F = p(
328
- (c) => {
329
- c.stopPropagation(), e(c.target.checked ? "true" : "false", "textCheckbox");
358
+ ), B = p(
359
+ (o) => {
360
+ o.stopPropagation(), e(o.target.checked ? "true" : "false", "textCheckbox");
330
361
  },
331
362
  [e]
332
- ), L = p(
333
- (c) => {
334
- e(c, o ?? "text");
363
+ ), G = p(
364
+ (o) => {
365
+ e(o, n ?? "text");
335
366
  },
336
- [e, o]
337
- ), O = u.getTotalSize();
338
- return /* @__PURE__ */ a(P, { children: S?.({
339
- items: n,
367
+ [e, n]
368
+ ), U = N.getTotalSize();
369
+ return /* @__PURE__ */ r(q, { children: g?.({
370
+ items: l,
340
371
  label: t,
341
- virtualItems: f,
372
+ virtualItems: D,
342
373
  id: i,
343
- filterValue: l,
344
- onChange: M,
345
- onListChange: D,
346
- onSelectChange: E,
347
- onRangeChange: V,
348
- onRangeNumberChange: $,
349
- onTextValue: L,
350
- debounceMs: v,
351
- ref: u.measureElement,
352
- totalSize: O,
353
- updateCalendarState: C,
354
- minValue: r,
355
- maxValue: m,
356
- checkboxLabel: d,
357
- onCheckboxChange: F
374
+ filterValue: a,
375
+ onChange: F,
376
+ onListChange: j,
377
+ onSelectChange: A,
378
+ onRangeChange: P,
379
+ onRangeNumberChange: I,
380
+ onTextValue: G,
381
+ debounceMs: d,
382
+ listRef: $,
383
+ ref: N.measureElement,
384
+ scrollMargin: v,
385
+ totalSize: U,
386
+ updateCalendarState: R,
387
+ minValue: c,
388
+ maxValue: f,
389
+ checkboxLabel: u,
390
+ onCheckboxChange: B
358
391
  }) ?? null });
359
392
  };
360
393
  export {
361
- De as Options,
362
- Z as TextFilterRenderer
394
+ Ge as Options,
395
+ ce as TextFilterRenderer
363
396
  };
@@ -24,6 +24,8 @@ interface IRendererConfig {
24
24
  onRangeChange?: (index: number) => (value: string) => void;
25
25
  onRangeNumberChange?: (index: number) => (event: Readonly<ChangeEvent<HTMLInputElement>>) => void;
26
26
  ref: (node: Readonly<Element | null>) => void;
27
+ listRef: (node: Readonly<HTMLDivElement> | null) => void;
28
+ scrollMargin: number;
27
29
  totalSize: number;
28
30
  updateCalendarState: (isOpen: boolean) => void;
29
31
  minValue?: number | string;
@@ -1,9 +1,9 @@
1
- import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
- import { useCallback as c } from "react";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as l } from "react";
3
3
  import { useTheme as f } from "styled-components";
4
4
  import { OptionBoxContainer as a } from "../styles.js";
5
- import { Container as d } from "../../container/index.js";
6
- import { Icon as s } from "../../icon/index.js";
5
+ import { Container as s } from "../../container/index.js";
6
+ import { Icon as d } from "../../icon/index.js";
7
7
  import { ItemAction as h } from "../../list-item/item-action/index.js";
8
8
  import "../../typography/heading/index.js";
9
9
  import "../../typography/span/index.js";
@@ -15,10 +15,10 @@ const T = ({
15
15
  onSelect: t,
16
16
  value: e
17
17
  }) => {
18
- const m = f(), p = c(() => {
18
+ const m = f(), p = l(() => {
19
19
  t && t(i);
20
20
  }, [t, i]);
21
- return /* @__PURE__ */ l(
21
+ return /* @__PURE__ */ c(
22
22
  a,
23
23
  {
24
24
  $hasAction: o !== void 0,
@@ -26,14 +26,14 @@ const T = ({
26
26
  onClick: p,
27
27
  children: [
28
28
  n && o === void 0 ? /* @__PURE__ */ r(
29
- s,
29
+ d,
30
30
  {
31
31
  icon: "check",
32
32
  iconColor: m.palette.gray[800],
33
33
  iconSize: "lg"
34
34
  }
35
35
  ) : null,
36
- /* @__PURE__ */ r(d, { flexGrow: o === void 0 ? void 0 : 1, children: /* @__PURE__ */ r(C, { color: m.palette.gray[800], fontWeight: "bold", size: "md", children: i }) }),
36
+ /* @__PURE__ */ r(s, { flexGrow: 1, children: /* @__PURE__ */ r(C, { color: m.palette.gray[800], fontWeight: "bold", size: "md", children: i }) }),
37
37
  o === void 0 ? null : /* @__PURE__ */ r(h, { action: o, value: e })
38
38
  ]
39
39
  }
@@ -9,7 +9,6 @@ import { Thumb as k } from "./thumb/index.js";
9
9
  import { normalizeValue as v } from "./utils.js";
10
10
  import { Container as w } from "../container/index.js";
11
11
  import { OutlineContainer as y } from "../inputs/outline-container/index.js";
12
- import "../inputs/styles.js";
13
12
  import "../checkbox/index.js";
14
13
  import "../icon/index.js";
15
14
  import "../../_virtual/lodash.js";
@@ -23,7 +22,7 @@ import "react-dom";
23
22
  import "../layout/categories/buttons/index.js";
24
23
  import "../inputs/utils/action-button/index.js";
25
24
  import "../../node_modules/react-international-phone/dist/index.js";
26
- const re = (o) => {
25
+ const ee = (o) => {
27
26
  const p = S(), m = $(null), { label: s, minValue: i = 0, maxValue: n = 100, name: r, setValue: d, watch: c } = o, a = x(), t = V({
28
27
  ...o,
29
28
  numberFormatter: a,
@@ -76,6 +75,6 @@ const re = (o) => {
76
75
  ) });
77
76
  };
78
77
  export {
79
- re as Slider,
78
+ ee as Slider,
80
79
  x as useNumberFormatter
81
80
  };
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "9.9.0"
138
+ "version": "9.9.1"
139
139
  }