@fluidattacks/design 10.0.1 → 10.1.0

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,6 +12,7 @@ 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";
15
16
  import "../../container/index.js";
16
17
  import "../../icon-button/index.js";
17
18
  import "../../../_virtual/dayjs.min.js";
@@ -20,7 +21,7 @@ import "../../layout/categories/buttons/index.js";
20
21
  import { InputNumber as S } from "../../inputs/fields/number/index.js";
21
22
  import "../../inputs/utils/action-button/index.js";
22
23
  import "../../../node_modules/react-international-phone/dist/index.js";
23
- const it = ({
24
+ const pt = ({
24
25
  control: u,
25
26
  description: B,
26
27
  disabled: t,
@@ -141,5 +142,5 @@ const it = ({
141
142
  );
142
143
  };
143
144
  export {
144
- it as CardWithInput
145
+ pt as CardWithInput
145
146
  };
@@ -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 h, Fragment as L } from "react";
3
+ import { forwardRef as O, useContext as $, useMemo as B, useCallback as p, 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,6 +15,7 @@ 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";
18
19
  import { Tag as K } from "../../tag/index.js";
19
20
  import "../../../_virtual/dayjs.min.js";
20
21
  import "../../icon-button/index.js";
@@ -26,8 +27,8 @@ import { parseTextFilterValue as U, parseCheckboxesFilterValue as X, parseInclud
26
27
  const Z = (c, d) => {
27
28
  if (d?.some((t) => t.type === "text") ?? !1)
28
29
  return U(c ?? "").text ? "1" : "0";
29
- const l = new Set(d?.map((t) => t.type) ?? []);
30
- if (l.size === 1 && l.has("checkboxes"))
30
+ const i = new Set(d?.map((t) => t.type) ?? []);
31
+ if (i.size === 1 && i.has("checkboxes"))
31
32
  return X(
32
33
  c ?? ""
33
34
  ).values.length.toString();
@@ -38,11 +39,11 @@ const Z = (c, d) => {
38
39
  return (t.length + f.length).toString();
39
40
  }
40
41
  return (c ?? "").split(",").filter((t) => t && t !== "-").length.toString();
41
- }, ke = O(function({
42
+ }, Te = O(function({
42
43
  includeSearch: d = !1,
43
44
  groupedFilters: g,
44
- handleChangeId: l,
45
- pinnedFilters: p
45
+ handleChangeId: i,
46
+ pinnedFilters: h
46
47
  }, b) {
47
48
  const t = R(), {
48
49
  id: f,
@@ -51,16 +52,16 @@ const Z = (c, d) => {
51
52
  values: s,
52
53
  updateSearch: v,
53
54
  setValues: u
54
- } = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = p.length > 0, V = h(
55
+ } = $(A), C = q(g, y), w = B(() => Object.values(s).filter(Boolean).length > 0, [s]), S = h.length > 0, V = p(
55
56
  (e) => () => {
56
- l(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
57
+ i(e), v({ previousValue: s[e] ?? "" }), m({ searchFilter: "", searchGlobal: "" });
57
58
  },
58
- [l, v, m, s]
59
- ), j = h(() => {
59
+ [i, v, m, s]
60
+ ), j = p(() => {
60
61
  u(
61
62
  (e) => Object.keys(e).reduce((n, r) => ({ ...n, [r]: "" }), {})
62
- ), l("");
63
- }, [u, l]), z = h(
63
+ ), i("");
64
+ }, [u, i]), z = p(
64
65
  (e) => {
65
66
  m((n) => ({
66
67
  ...n,
@@ -68,7 +69,7 @@ const Z = (c, d) => {
68
69
  }));
69
70
  },
70
71
  [m]
71
- ), E = h(
72
+ ), E = p(
72
73
  (e) => (n) => {
73
74
  u((r) => ({ ...r, [e]: n }));
74
75
  },
@@ -107,7 +108,7 @@ const Z = (c, d) => {
107
108
  scroll: "y",
108
109
  width: "100%",
109
110
  children: [
110
- S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: p.map((e) => {
111
+ S ? /* @__PURE__ */ o(k, { "data-testid": "menu-pinned", children: h.map((e) => {
111
112
  const n = e.options?.[0]?.items?.map((r) => ({
112
113
  name: r.label ?? r.value,
113
114
  value: r.value
@@ -140,17 +141,17 @@ const Z = (c, d) => {
140
141
  children: e
141
142
  }
142
143
  ) : void 0,
143
- n.map((i) => {
144
- const G = s[i.id], F = Z(
144
+ n.map((l) => {
145
+ const G = s[l.id], F = Z(
145
146
  G,
146
- i.options
147
+ l.options
147
148
  );
148
149
  return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ a(
149
150
  N,
150
151
  {
151
152
  as: "button",
152
- "data-testid": i.id,
153
- onClick: V(i.id),
153
+ "data-testid": l.id,
154
+ onClick: V(l.id),
154
155
  children: [
155
156
  /* @__PURE__ */ o(
156
157
  T,
@@ -161,7 +162,7 @@ const Z = (c, d) => {
161
162
  iconType: "fa-light"
162
163
  }
163
164
  ),
164
- i.label,
165
+ l.label,
165
166
  /* @__PURE__ */ a(
166
167
  x,
167
168
  {
@@ -170,7 +171,7 @@ const Z = (c, d) => {
170
171
  gap: 0.5,
171
172
  style: { marginLeft: "auto" },
172
173
  children: [
173
- f === i.id ? /* @__PURE__ */ o(
174
+ f === l.id ? /* @__PURE__ */ o(
174
175
  T,
175
176
  {
176
177
  icon: "chevron-right",
@@ -185,7 +186,7 @@ const Z = (c, d) => {
185
186
  )
186
187
  ]
187
188
  }
188
- ) }, i.id);
189
+ ) }, l.id);
189
190
  })
190
191
  ]
191
192
  },
@@ -197,5 +198,5 @@ const Z = (c, d) => {
197
198
  ] });
198
199
  });
199
200
  export {
200
- ke as FiltersMenu
201
+ Te as FiltersMenu
201
202
  };
@@ -1,4 +1,4 @@
1
- import { jsx as r, Fragment as q, jsxs as w } from "react/jsx-runtime";
1
+ import { jsx as n, Fragment as q, jsxs as w } from "react/jsx-runtime";
2
2
  import { useVirtualizer as H } from "../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
3
  import J from "../../../../_virtual/dayjs.min.js";
4
4
  import E from "../../../../_virtual/isNaN.js";
@@ -16,15 +16,16 @@ import "react-dom";
16
16
  import "../../../typography/heading/index.js";
17
17
  import { Span as ee } from "../../../typography/span/index.js";
18
18
  import "../../../typography/text/index.js";
19
+ import "../../../inputs/styles.js";
19
20
  import "../../../container/index.js";
20
21
  import { Tag as te } from "../../../tag/index.js";
21
22
  import "../../../icon-button/index.js";
22
23
  import "../../../button/index.js";
23
24
  import { InputDateRange as oe } from "../../../inputs/fields/date-range/index.js";
24
- import { TextInput as ne } from "../../../inputs/fields/text-input/index.js";
25
+ import { TextInput as re } from "../../../inputs/fields/text-input/index.js";
25
26
  import "../../../layout/categories/buttons/index.js";
26
27
  import "../../../inputs/utils/action-button/index.js";
27
- import { InputNumberRange as re } from "../../../inputs/fields/number-range/index.js";
28
+ import { InputNumberRange as ne } from "../../../inputs/fields/number-range/index.js";
28
29
  import "../../../../node_modules/react-international-phone/dist/index.js";
29
30
  import { useDebouncedCallback as le } from "../../../../hooks/use-debounced-callback.js";
30
31
  import { useMountEffect as ae } from "../../../../hooks/use-mount-effect.js";
@@ -36,11 +37,11 @@ const ce = ({
36
37
  onTextValue: t,
37
38
  checkboxLabel: s,
38
39
  onCheckboxChange: e,
39
- debounceMs: n
40
+ debounceMs: r
40
41
  }) => {
41
42
  const { text: c, checked: f } = se(
42
43
  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
+ ), [u, d] = T(c), [g, R] = T(c), h = Number.isFinite(r) && (r ?? 0) >= 0 ? Math.min(r ?? 0, 5e3) : 0, b = le(t, h);
44
45
  c !== g && (R(c), d(c), b.cancel());
45
46
  const k = p(
46
47
  (x) => {
@@ -60,7 +61,7 @@ const ce = ({
60
61
  width: "100%"
61
62
  },
62
63
  children: [
63
- s ? /* @__PURE__ */ r(
64
+ s ? /* @__PURE__ */ n(
64
65
  O,
65
66
  {
66
67
  checked: f,
@@ -70,8 +71,8 @@ const ce = ({
70
71
  value: "textCheck"
71
72
  }
72
73
  ) : void 0,
73
- /* @__PURE__ */ r(
74
- ne,
74
+ /* @__PURE__ */ n(
75
+ re,
75
76
  {
76
77
  name: i,
77
78
  onChange: k,
@@ -90,12 +91,12 @@ const ce = ({
90
91
  onTextValue: t,
91
92
  checkboxLabel: s,
92
93
  onCheckboxChange: e,
93
- debounceMs: n
94
- }) => t === void 0 ? null : /* @__PURE__ */ r(
94
+ debounceMs: r
95
+ }) => t === void 0 ? null : /* @__PURE__ */ n(
95
96
  ce,
96
97
  {
97
98
  checkboxLabel: s,
98
- debounceMs: n,
99
+ debounceMs: r,
99
100
  filterValue: l,
100
101
  id: i,
101
102
  label: a,
@@ -110,7 +111,7 @@ const ce = ({
110
111
  listRef: t,
111
112
  ref: s,
112
113
  scrollMargin: e,
113
- totalSize: n,
114
+ totalSize: r,
114
115
  onChange: c
115
116
  }) => {
116
117
  const f = new Set(
@@ -118,19 +119,19 @@ const ce = ({
118
119
  );
119
120
  return l.length > 0 ? (
120
121
  // Positioning context for the absolute rows, and it reserves their height
121
- /* @__PURE__ */ r(
122
+ /* @__PURE__ */ n(
122
123
  "div",
123
124
  {
124
125
  "data-testid": "options-virtual-list",
125
126
  ref: t,
126
127
  style: {
127
- height: `${n}px`,
128
+ height: `${r}px`,
128
129
  position: "relative",
129
130
  width: "100%"
130
131
  },
131
132
  children: l.map((u) => {
132
133
  const d = i[u.index], g = f.has(d?.value);
133
- return /* @__PURE__ */ r(
134
+ return /* @__PURE__ */ n(
134
135
  "div",
135
136
  {
136
137
  "data-index": u.index,
@@ -141,7 +142,7 @@ const ce = ({
141
142
  left: 0,
142
143
  width: "100%"
143
144
  },
144
- children: /* @__PURE__ */ r(y, { "aria-selected": g, children: /* @__PURE__ */ r(
145
+ children: /* @__PURE__ */ n(y, { "aria-selected": g, children: /* @__PURE__ */ n(
145
146
  O,
146
147
  {
147
148
  checked: g,
@@ -157,7 +158,7 @@ const ce = ({
157
158
  })
158
159
  }
159
160
  )
160
- ) : /* @__PURE__ */ r(X, {});
161
+ ) : /* @__PURE__ */ n(X, {});
161
162
  },
162
163
  combobox: ({
163
164
  id: i,
@@ -165,14 +166,14 @@ const ce = ({
165
166
  filterValue: a,
166
167
  label: t,
167
168
  onSelectChange: s
168
- }) => /* @__PURE__ */ r(
169
+ }) => /* @__PURE__ */ n(
169
170
  Z,
170
171
  {
171
172
  items: l,
172
173
  name: i,
173
174
  onSelect: s,
174
175
  placeholder: `Search ${t}`,
175
- selected: a?.split(",").map((e) => e.trim()).find((e) => l.some((n) => n.value === e)) ?? null
176
+ selected: a?.split(",").map((e) => e.trim()).find((e) => l.some((r) => r.value === e)) ?? null
176
177
  }
177
178
  ),
178
179
  list: ({ items: i, filterValue: l, onListChange: a }) => i.map((t) => /* @__PURE__ */ w(
@@ -182,7 +183,7 @@ const ce = ({
182
183
  as: "button",
183
184
  onClick: a?.(t.value),
184
185
  children: [
185
- t.icon ? /* @__PURE__ */ r(
186
+ t.icon ? /* @__PURE__ */ n(
186
187
  z,
187
188
  {
188
189
  icon: t.icon,
@@ -191,7 +192,7 @@ const ce = ({
191
192
  iconType: t.iconType ?? "fa-light"
192
193
  }
193
194
  ) : void 0,
194
- /* @__PURE__ */ r(
195
+ /* @__PURE__ */ n(
195
196
  ee,
196
197
  {
197
198
  color: L.palette.gray[800],
@@ -204,15 +205,15 @@ const ce = ({
204
205
  children: t.label
205
206
  }
206
207
  ),
207
- /* @__PURE__ */ r("span", { className: "filter-item" }),
208
- t.count === void 0 ? void 0 : /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ r(
208
+ /* @__PURE__ */ n("span", { className: "filter-item" }),
209
+ t.count === void 0 ? void 0 : /* @__PURE__ */ n(Y, { children: /* @__PURE__ */ n(
209
210
  te,
210
211
  {
211
212
  tagLabel: t.count.toLocaleString("en-US"),
212
213
  variant: "default"
213
214
  }
214
215
  ) }),
215
- l?.split(",").includes(t?.value) ? /* @__PURE__ */ r("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ r(
216
+ l?.split(",").includes(t?.value) ? /* @__PURE__ */ n("div", { style: { marginLeft: "auto" }, children: /* @__PURE__ */ n(
216
217
  z,
217
218
  {
218
219
  icon: "check",
@@ -231,8 +232,8 @@ const ce = ({
231
232
  onRangeChange: a,
232
233
  updateCalendarState: t
233
234
  }) => {
234
- const [s, e] = l?.split(",").filter((n) => J(n).isValid() || n === "-") ?? [];
235
- return /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
235
+ const [s, e] = l?.split(",").filter((r) => J(r).isValid() || r === "-") ?? [];
236
+ return /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(
236
237
  oe,
237
238
  {
238
239
  name: i,
@@ -258,9 +259,9 @@ const ce = ({
258
259
  maxValue: t,
259
260
  onRangeNumberChange: s
260
261
  }) => {
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,
262
+ const e = l?.split(",") ?? [], r = e[0]?.trim(), c = e[1]?.trim(), f = r && r !== "" && r !== "-" && !E(Number(r)) ? Number(r) : void 0, u = c && c !== "" && c !== "-" && !E(Number(c)) ? Number(c) : void 0;
263
+ return /* @__PURE__ */ n(y, { children: /* @__PURE__ */ n(
264
+ ne,
264
265
  {
265
266
  name: i,
266
267
  propsMax: {
@@ -283,7 +284,7 @@ const ce = ({
283
284
  }
284
285
  ) });
285
286
  }
286
- }, Ge = ({
287
+ }, Ue = ({
287
288
  id: i,
288
289
  filteredItems: l,
289
290
  filterValue: a,
@@ -291,7 +292,7 @@ const ce = ({
291
292
  option: s,
292
293
  onChange: e
293
294
  }) => {
294
- const { type: n, minValue: c, maxValue: f, checkboxLabel: u, debounceMs: d } = s ?? {}, g = n && me[n], {
295
+ const { type: r, minValue: c, maxValue: f, checkboxLabel: u, debounceMs: d } = s ?? {}, g = r && me[r], {
295
296
  calendarState: { updateCalendarState: R },
296
297
  scrollState: h
297
298
  } = K(W), b = p(() => 36, []), k = p(
@@ -332,9 +333,9 @@ const ce = ({
332
333
  useFlushSync: !1
333
334
  }), D = N.getVirtualItems(), F = p(
334
335
  (o) => {
335
- o.stopPropagation(), o.preventDefault(), e(o.target.value, n ?? "");
336
+ o.stopPropagation(), o.preventDefault(), e(o.target.value, r ?? "");
336
337
  },
337
- [e, n]
338
+ [e, r]
338
339
  ), P = p(
339
340
  (o) => (m) => {
340
341
  e(m, "dateRange", o);
@@ -362,11 +363,11 @@ const ce = ({
362
363
  [e]
363
364
  ), G = p(
364
365
  (o) => {
365
- e(o, n ?? "text");
366
+ e(o, r ?? "text");
366
367
  },
367
- [e, n]
368
+ [e, r]
368
369
  ), U = N.getTotalSize();
369
- return /* @__PURE__ */ r(q, { children: g?.({
370
+ return /* @__PURE__ */ n(q, { children: g?.({
370
371
  items: l,
371
372
  label: t,
372
373
  virtualItems: D,
@@ -391,6 +392,6 @@ const ce = ({
391
392
  }) ?? null });
392
393
  };
393
394
  export {
394
- Ge as Options,
395
+ Ue as Options,
395
396
  ce as TextFilterRenderer
396
397
  };
@@ -1,39 +1,39 @@
1
- const g = 7, m = (n) => n.reduce(
1
+ const a = 7, g = (n) => n.reduce(
2
2
  (e, t) => t.type === "toggle" ? { ...e, inline: [...e.inline, t] } : t.type === "select" ? { ...e, pinned: [...e.pinned, t] } : { ...e, menu: [...e.menu, t] },
3
3
  { menu: [], inline: [], pinned: [] }
4
- ), b = (n) => n.reduce(
4
+ ), m = (n) => n.reduce(
5
5
  (e, t) => (t.group ? (e[t.group] || (e[t.group] = []), e[t.group].push(t)) : e.default = [...e.default || [], t], e),
6
6
  {}
7
- ), h = (n, e, t) => {
8
- const s = n.find((r) => r.id === e), u = s?.hideMenuTitle ?? !1;
7
+ );
8
+ const i = (n, e) => n.value === "" ? 0 : e.includes(n.value) ? 1 : 2, b = (n, e, t) => {
9
+ const s = n.find((r) => r.id === e), o = s?.hideMenuTitle ?? !1;
9
10
  if (!s || !t)
10
11
  return {
11
- hideMenuTitle: u,
12
+ hideMenuTitle: o,
12
13
  label: s?.label ?? "",
13
14
  options: s?.options ?? []
14
15
  };
15
- const o = t.split(","), l = s.options?.map((r) => {
16
+ const u = t.split(","), l = s.options?.map((r) => {
16
17
  if (!r.items) return r;
17
- const d = [...r.items].sort((p, a) => {
18
- const i = o.includes(p.value), c = o.includes(a.value);
19
- return i === c ? 0 : i ? -1 : 1;
20
- });
18
+ const d = [...r.items].sort(
19
+ (p, L) => i(p, u) - i(L, u)
20
+ );
21
21
  return { ...r, items: d };
22
22
  });
23
- return { hideMenuTitle: u, label: s.label, options: l };
24
- }, L = (n, e) => Object.entries(n).map(([t, s]) => {
25
- const u = s.filter(
26
- (o) => !o.hide && o.label.toLowerCase().includes(e.toLowerCase())
23
+ return { hideMenuTitle: o, label: s.label, options: l };
24
+ }, c = (n, e) => Object.entries(n).map(([t, s]) => {
25
+ const o = s.filter(
26
+ (u) => !u.hide && u.label.toLowerCase().includes(e.toLowerCase())
27
27
  );
28
- return u.length > 0 ? { group: t, filters: u } : void 0;
29
- }).filter((t) => t !== void 0), f = (n, e) => n.value.toLowerCase().includes(e) || (n.label ?? "").toLowerCase().includes(e) || (n.searchTerms ?? []).some(
28
+ return o.length > 0 ? { group: t, filters: o } : void 0;
29
+ }).filter((t) => t !== void 0), h = (n, e) => n.value.toLowerCase().includes(e) || (n.label ?? "").toLowerCase().includes(e) || (n.searchTerms ?? []).some(
30
30
  (t) => t.toLowerCase().includes(e)
31
31
  );
32
32
  export {
33
- g as MAX_FILTERS_LENGTH,
34
- L as filterMenu,
35
- b as getGroupedFilters,
36
- h as getSelectedFilter,
37
- f as matchesQuery,
38
- m as partitionFilters
33
+ a as MAX_FILTERS_LENGTH,
34
+ c as filterMenu,
35
+ m as getGroupedFilters,
36
+ b as getSelectedFilter,
37
+ h as matchesQuery,
38
+ g as partitionFilters
39
39
  };
@@ -1,40 +1,40 @@
1
- import { jsx as r, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
2
  import { yupResolver as S } from "../../node_modules/@hookform/resolvers/yup/dist/yup.js";
3
3
  import { useForm as j, FormProvider as k } from "../../node_modules/react-hook-form/dist/index.esm.js";
4
- import { Controller as G, useController as J, useFieldArray as K, useFormContext as L, useWatch as M } from "../../node_modules/react-hook-form/dist/index.esm.js";
4
+ import { Controller as J, useController as K, useFieldArray as L, useFormContext as M, useWatch as N } from "../../node_modules/react-hook-form/dist/index.esm.js";
5
5
  import { useTheme as D } from "styled-components";
6
- import { InnerForm as Q } from "./inner-form/index.js";
7
- import { StyledForm as P } from "./styles.js";
6
+ import { InnerForm as U } from "./inner-form/index.js";
7
+ import { StyledForm as P, FormContent as R } from "./styles.js";
8
8
  import { Button as h } from "../button/index.js";
9
- import { Container as t } from "../container/index.js";
10
- const z = ({
9
+ import { Container as l } from "../container/index.js";
10
+ const A = ({
11
11
  alert: n,
12
12
  buttonAlignment: a,
13
13
  cancelButton: o,
14
14
  children: u,
15
- confirmButton: s,
15
+ confirmButton: t,
16
16
  defaultDisabled: x = !0,
17
17
  id: d = "modal-confirm",
18
18
  maxButtonWidth: y = "392px",
19
19
  mode: b,
20
20
  onSubmit: g,
21
21
  padding: C = !0,
22
- showButtons: p = !0,
23
- yupSchema: m,
22
+ showButtons: m = !0,
23
+ yupSchema: p,
24
24
  ...F
25
25
  }) => {
26
26
  const e = D(), i = j({
27
27
  ...F,
28
28
  mode: b ?? "all",
29
- resolver: m ? S(m) : void 0
29
+ resolver: p ? S(p) : void 0
30
30
  });
31
31
  function $(f) {
32
32
  f.stopPropagation(), i.handleSubmit(g)(f);
33
33
  }
34
- const v = p ? `calc(100% - ${n ? "139px" : "83px"})` : "100%", c = C ? 1.5 : 0;
35
- return /* @__PURE__ */ r(k, { ...i, children: /* @__PURE__ */ r(P, { onSubmit: $, children: /* @__PURE__ */ l(t, { scroll: "y", width: "100%", children: [
34
+ const v = m ? `calc(100% - ${n ? "139px" : "83px"})` : "100%", c = C ? 1.5 : 0;
35
+ return /* @__PURE__ */ r(k, { ...i, children: /* @__PURE__ */ r(P, { onSubmit: $, children: /* @__PURE__ */ s(l, { scroll: "y", width: "100%", children: [
36
36
  /* @__PURE__ */ r(
37
- t,
37
+ R,
38
38
  {
39
39
  borderRadius: `0 0 ${e.spacing[0.25]} ${e.spacing[0.25]}`,
40
40
  display: "flex",
@@ -48,8 +48,8 @@ const z = ({
48
48
  children: u
49
49
  }
50
50
  ),
51
- p && /* @__PURE__ */ l(
52
- t,
51
+ m && /* @__PURE__ */ s(
52
+ l,
53
53
  {
54
54
  borderRadius: `0 0 ${e.spacing[0.25]} ${e.spacing[0.25]}`,
55
55
  borderTop: `1px solid ${e.palette.gray[200]}`,
@@ -62,7 +62,7 @@ const z = ({
62
62
  py: 1.25,
63
63
  children: [
64
64
  n,
65
- /* @__PURE__ */ l(t, { display: "flex", gap: 0.75, maxWidth: y, children: [
65
+ /* @__PURE__ */ s(l, { display: "flex", gap: 0.75, maxWidth: y, children: [
66
66
  o ? /* @__PURE__ */ r(
67
67
  h,
68
68
  {
@@ -79,13 +79,13 @@ const z = ({
79
79
  /* @__PURE__ */ r(
80
80
  h,
81
81
  {
82
- disabled: (s?.disabled ?? !1) || i.formState.isSubmitting || x && !i.formState.isDirty,
83
- icon: s?.icon,
82
+ disabled: (t?.disabled ?? !1) || i.formState.isSubmitting || x && !i.formState.isDirty,
83
+ icon: t?.icon,
84
84
  id: d,
85
85
  justify: "center",
86
86
  type: "submit",
87
87
  width: "100%",
88
- children: s?.label ?? "Confirm"
88
+ children: t?.label ?? "Confirm"
89
89
  }
90
90
  )
91
91
  ] })
@@ -95,11 +95,11 @@ const z = ({
95
95
  ] }) }) });
96
96
  };
97
97
  export {
98
- G as Controller,
99
- z as Form,
100
- Q as InnerForm,
101
- J as useController,
102
- K as useFieldArray,
103
- L as useFormContext,
104
- M as useWatch
98
+ J as Controller,
99
+ A as Form,
100
+ U as InnerForm,
101
+ K as useController,
102
+ L as useFieldArray,
103
+ M as useFormContext,
104
+ N as useWatch
105
105
  };
@@ -1,2 +1,7 @@
1
+ declare const FormContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
2
+ ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
3
+ }, never> & Partial<Pick<Omit<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
4
+ ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
5
+ }, never>>> & string & Omit<import('react').ForwardRefExoticComponent<Readonly<import('react').PropsWithChildren<import('../container').IContainerProps>> & import('react').RefAttributes<HTMLDivElement>>, keyof import('react').Component<any, {}, any>>;
1
6
  declare const StyledForm: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, never>>> & string;
2
- export { StyledForm };
7
+ export { FormContent, StyledForm };
@@ -1,15 +1,21 @@
1
- import { styled as e } from "styled-components";
2
- const o = e.form`
3
- ${({ theme: t }) => `
1
+ import { styled as t } from "styled-components";
2
+ import { Container as e } from "../container/index.js";
3
+ const n = t(e)`
4
+ > * {
5
+ flex-shrink: 0;
6
+ }
7
+ `, l = t.form`
8
+ ${({ theme: o }) => `
4
9
  align-items: flex-start;
5
10
  align-self: stretch;
6
11
  display: flex;
7
12
  flex-direction: column;
8
- gap: ${t.spacing[0.5]};
13
+ gap: ${o.spacing[0.5]};
9
14
  overflow: hidden auto;
10
15
  width: 100%;
11
16
  `}
12
17
  `;
13
18
  export {
14
- o as StyledForm
19
+ n as FormContent,
20
+ l as StyledForm
15
21
  };
@@ -21,6 +21,8 @@ const p = o.li`
21
21
  word-break: break-word;
22
22
  }
23
23
 
24
+ ${r ? `& button { --btn-padding-y: ${a.spacing[0.25]}; }` : ""}
25
+
24
26
  & > label {
25
27
  margin: unset;
26
28
  }
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/react-vite';
1
+ import { Meta, StoryFn } from '@storybook/react-vite';
2
2
  import { default as React } from 'react';
3
3
  import { IModalProps } from './types';
4
4
  declare const config: Meta;
@@ -8,6 +8,7 @@ declare const Default: import('storybook/internal/csf').AnnotatedStoryFn<import(
8
8
  declare const WithForm: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
9
9
  id: string;
10
10
  }>>;
11
+ declare const WithTabsAndLongForm: StoryFn;
11
12
  declare const ScrollableContent: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react').ReactRenderer, React.PropsWithChildren<IModalProps & {
12
13
  id: string;
13
14
  }>>;
@@ -24,4 +25,4 @@ declare const WithTabs: import('storybook/internal/csf').AnnotatedStoryFn<import
24
25
  id: string;
25
26
  }>>;
26
27
  export default config;
27
- export { Default, ImageModal, WithTabs, ScrollableContent, SingleAction, WithoutFooter, WithForm, };
28
+ export { Default, ImageModal, WithTabs, ScrollableContent, SingleAction, WithoutFooter, WithForm, WithTabsAndLongForm, };
@@ -9,6 +9,7 @@ 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";
12
13
  import "../checkbox/index.js";
13
14
  import "../icon/index.js";
14
15
  import "../../_virtual/lodash.js";
@@ -22,7 +23,7 @@ import "react-dom";
22
23
  import "../layout/categories/buttons/index.js";
23
24
  import "../inputs/utils/action-button/index.js";
24
25
  import "../../node_modules/react-international-phone/dist/index.js";
25
- const ee = (o) => {
26
+ const re = (o) => {
26
27
  const p = S(), m = $(null), { label: s, minValue: i = 0, maxValue: n = 100, name: r, setValue: d, watch: c } = o, a = x(), t = V({
27
28
  ...o,
28
29
  numberFormatter: a,
@@ -75,6 +76,6 @@ const ee = (o) => {
75
76
  ) });
76
77
  };
77
78
  export {
78
- ee as Slider,
79
+ re as Slider,
79
80
  x as useNumberFormatter
80
81
  };
package/package.json CHANGED
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "10.0.1"
138
+ "version": "10.1.0"
139
139
  }