@fluidattacks/design 9.0.0 → 9.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,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
  };
@@ -16,7 +16,6 @@ import "react-dom";
16
16
  import "../../../typography/heading/index.js";
17
17
  import { Span as G } from "../../../typography/span/index.js";
18
18
  import "../../../typography/text/index.js";
19
- import "../../../inputs/styles.js";
20
19
  import "../../../container/index.js";
21
20
  import { Tag as H } from "../../../tag/index.js";
22
21
  import "../../../../_virtual/isEqual.js";
@@ -281,7 +280,7 @@ const Z = ({
281
280
  }
282
281
  ) });
283
282
  }
284
- }, Ee = ({
283
+ }, De = ({
285
284
  id: i,
286
285
  filteredItems: n,
287
286
  filterValue: l,
@@ -359,6 +358,6 @@ const Z = ({
359
358
  }) ?? null });
360
359
  };
361
360
  export {
362
- Ee as Options,
361
+ De as Options,
363
362
  Z as TextFilterRenderer
364
363
  };
@@ -1,48 +1,48 @@
1
1
  import { jsxs as e, jsx as i, Fragment as j } from "react/jsx-runtime";
2
2
  import { useTheme as z } from "styled-components";
3
- import { Label as x } from "../label/index.js";
4
- import { StyledOutlineContainer as I } from "../styles.js";
5
- import { Container as a } from "../../container/index.js";
6
- import { Icon as O } from "../../icon/index.js";
7
- import { Link as S } from "../../link/index.js";
8
- import { Tag as T } from "../../tag/index.js";
3
+ import { Label as $ } from "../label/index.js";
4
+ import { StyledOutlineContainer as x } from "../styles.js";
5
+ import { Container as s } from "../../container/index.js";
6
+ import { Icon as I } from "../../icon/index.js";
7
+ import { Link as O } from "../../link/index.js";
8
+ import { Tag as S } from "../../tag/index.js";
9
9
  import "../../typography/heading/index.js";
10
10
  import "../../typography/span/index.js";
11
11
  import { Text as p } from "../../typography/text/index.js";
12
12
  const J = ({
13
- children: s,
14
- containerRef: f,
15
- disabled: y,
16
- id: g,
13
+ children: f,
14
+ containerRef: y,
15
+ disabled: g,
16
+ id: v,
17
17
  error: o,
18
18
  helpLink: r,
19
19
  helpLinkText: h = "Link here",
20
20
  helpText: t,
21
- htmlFor: v,
22
- label: d,
23
- linkPosition: l = "down",
21
+ htmlFor: m,
22
+ label: a,
23
+ linkPosition: c = "down",
24
24
  maxLength: n,
25
25
  required: u,
26
26
  tooltip: w,
27
- value: c,
27
+ value: l,
28
28
  weight: b
29
29
  }) => {
30
- const m = z(), C = c ? c.length : 0;
31
- return /* @__PURE__ */ e(I, { id: g, ref: f, children: [
32
- d === void 0 ? void 0 : /* @__PURE__ */ i(
33
- x,
30
+ const d = z(), C = l ? l.length : 0;
31
+ return /* @__PURE__ */ e(x, { id: v, ref: y, children: [
32
+ a === void 0 ? void 0 : /* @__PURE__ */ i(
33
+ $,
34
34
  {
35
- htmlFor: v,
36
- label: d,
37
- link: l === "up" ? r : void 0,
35
+ htmlFor: m,
36
+ label: a,
37
+ link: c === "up" ? r : void 0,
38
38
  required: u,
39
39
  tooltip: w,
40
40
  weight: b
41
41
  }
42
42
  ),
43
- s,
43
+ f,
44
44
  o || n ? /* @__PURE__ */ e(
45
- a,
45
+ s,
46
46
  {
47
47
  display: "flex",
48
48
  justify: o === void 0 ? "end" : "space-between",
@@ -52,25 +52,26 @@ const J = ({
52
52
  p,
53
53
  {
54
54
  className: "error-msg",
55
- color: m.palette.error[500],
55
+ color: d.palette.error[500],
56
+ "data-testid": `${m}-error`,
56
57
  display: "block",
57
58
  size: "md",
58
59
  children: o
59
60
  }
60
61
  ),
61
62
  n && /* @__PURE__ */ i(
62
- T,
63
+ S,
63
64
  {
64
65
  priority: "low",
65
66
  tagLabel: `${C}/${n}`,
66
- variant: y ? "inactive" : "error"
67
+ variant: g ? "inactive" : "error"
67
68
  }
68
69
  )
69
70
  ]
70
71
  }
71
72
  ) : void 0,
72
73
  t || r ? /* @__PURE__ */ e(
73
- a,
74
+ s,
74
75
  {
75
76
  alignItems: "center",
76
77
  display: "flex",
@@ -79,10 +80,10 @@ const J = ({
79
80
  children: [
80
81
  t && /* @__PURE__ */ e(j, { children: [
81
82
  /* @__PURE__ */ i(
82
- O,
83
+ I,
83
84
  {
84
85
  icon: "circle-info",
85
- iconColor: m.palette.gray[400],
86
+ iconColor: d.palette.gray[400],
86
87
  iconSize: "sm",
87
88
  iconType: "fa-light"
88
89
  }
@@ -90,14 +91,14 @@ const J = ({
90
91
  /* @__PURE__ */ i(
91
92
  p,
92
93
  {
93
- color: m.palette.gray[400],
94
+ color: d.palette.gray[400],
94
95
  display: "inline-block",
95
96
  size: "md",
96
97
  children: t
97
98
  }
98
99
  )
99
100
  ] }),
100
- r && l === "down" ? /* @__PURE__ */ i(S, { href: r, children: h }) : void 0
101
+ r && c === "down" ? /* @__PURE__ */ i(O, { href: r, children: h }) : void 0
101
102
  ]
102
103
  }
103
104
  ) : void 0
@@ -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 "../../_virtual/isEqual.js";
14
13
  import "../checkbox/index.js";
15
14
  import "../icon/index.js";
@@ -24,7 +23,7 @@ import "react-dom";
24
23
  import "../layout/categories/buttons/index.js";
25
24
  import "../inputs/utils/action-button/index.js";
26
25
  import "../../node_modules/react-international-phone/dist/index.js";
27
- const te = (o) => {
26
+ const re = (o) => {
28
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({
29
28
  ...o,
30
29
  numberFormatter: a,
@@ -77,6 +76,6 @@ const te = (o) => {
77
76
  ) });
78
77
  };
79
78
  export {
80
- te as Slider,
79
+ re as Slider,
81
80
  x as useNumberFormatter
82
81
  };
package/package.json CHANGED
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-react-hooks": "7.1.1",
58
58
  "eslint-plugin-storybook": "10.4.0",
59
59
  "jsdom": "27.4.0",
60
- "next": "16.3.3",
60
+ "next": "16.3.7",
61
61
  "playwright": "1.60.0",
62
62
  "postcss-styled-syntax": "0.7.1",
63
63
  "prettier": "3.9.6",
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "9.0.0"
138
+ "version": "9.1.0"
139
139
  }