@fluidattacks/design 9.5.0 → 9.5.2

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.
@@ -44,7 +44,7 @@ declare const Default: {
44
44
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
45
45
  itemsProps: ICardWithImageProps[];
46
46
  }> | undefined;
47
- tags?: import('storybook/internal/csf').Tag[];
47
+ tags?: string[] | undefined;
48
48
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
49
49
  itemsProps: ICardWithImageProps[];
50
50
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -53,7 +53,7 @@ declare const Default: {
53
53
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
54
54
  itemsProps: ICardWithImageProps[];
55
55
  }> | undefined;
56
- globals?: import('storybook/internal/csf').Globals | undefined;
56
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
57
57
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
58
58
  itemsProps: ICardWithImageProps[];
59
59
  }, Partial<{
@@ -35,7 +35,7 @@ declare const Default: {
35
35
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
36
36
  props: ICardWithInputProps;
37
37
  }> | undefined;
38
- tags?: import('storybook/internal/csf').Tag[];
38
+ tags?: string[] | undefined;
39
39
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
40
40
  props: ICardWithInputProps;
41
41
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -44,7 +44,7 @@ declare const Default: {
44
44
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
45
45
  props: ICardWithInputProps;
46
46
  }> | undefined;
47
- globals?: import('storybook/internal/csf').Globals | undefined;
47
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
48
48
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
49
49
  props: ICardWithInputProps;
50
50
  }, Partial<{
@@ -86,7 +86,7 @@ declare const WithTitle: {
86
86
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
87
87
  props: ICardWithInputProps;
88
88
  }> | undefined;
89
- tags?: import('storybook/internal/csf').Tag[];
89
+ tags?: string[] | undefined;
90
90
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
91
91
  props: ICardWithInputProps;
92
92
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -95,7 +95,7 @@ declare const WithTitle: {
95
95
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
96
96
  props: ICardWithInputProps;
97
97
  }> | undefined;
98
- globals?: import('storybook/internal/csf').Globals | undefined;
98
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
99
99
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
100
100
  props: ICardWithInputProps;
101
101
  }, Partial<{
@@ -137,7 +137,7 @@ declare const WithIcon: {
137
137
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
138
138
  props: ICardWithInputProps;
139
139
  }> | undefined;
140
- tags?: import('storybook/internal/csf').Tag[];
140
+ tags?: string[] | undefined;
141
141
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
142
142
  props: ICardWithInputProps;
143
143
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -146,7 +146,7 @@ declare const WithIcon: {
146
146
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
147
147
  props: ICardWithInputProps;
148
148
  }> | undefined;
149
- globals?: import('storybook/internal/csf').Globals | undefined;
149
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
150
150
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
151
151
  props: ICardWithInputProps;
152
152
  }, Partial<{
@@ -189,7 +189,7 @@ declare const InputAlignStart: {
189
189
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
190
190
  props: ICardWithInputProps;
191
191
  }> | undefined;
192
- tags?: import('storybook/internal/csf').Tag[];
192
+ tags?: string[] | undefined;
193
193
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
194
194
  props: ICardWithInputProps;
195
195
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -198,7 +198,7 @@ declare const InputAlignStart: {
198
198
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
199
199
  props: ICardWithInputProps;
200
200
  }> | undefined;
201
- globals?: import('storybook/internal/csf').Globals | undefined;
201
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
202
202
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
203
203
  props: ICardWithInputProps;
204
204
  }, Partial<{
@@ -241,7 +241,7 @@ declare const NumberInput: {
241
241
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
242
242
  props: ICardWithInputProps;
243
243
  }> | undefined;
244
- tags?: import('storybook/internal/csf').Tag[];
244
+ tags?: string[] | undefined;
245
245
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
246
246
  props: ICardWithInputProps;
247
247
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -250,7 +250,7 @@ declare const NumberInput: {
250
250
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
251
251
  props: ICardWithInputProps;
252
252
  }> | undefined;
253
- globals?: import('storybook/internal/csf').Globals | undefined;
253
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
254
254
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
255
255
  props: ICardWithInputProps;
256
256
  }, Partial<{
@@ -292,7 +292,7 @@ declare const DateInput: {
292
292
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
293
293
  props: ICardWithInputProps;
294
294
  }> | undefined;
295
- tags?: import('storybook/internal/csf').Tag[];
295
+ tags?: string[] | undefined;
296
296
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
297
297
  props: ICardWithInputProps;
298
298
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -301,7 +301,7 @@ declare const DateInput: {
301
301
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
302
302
  props: ICardWithInputProps;
303
303
  }> | undefined;
304
- globals?: import('storybook/internal/csf').Globals | undefined;
304
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
305
305
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
306
306
  props: ICardWithInputProps;
307
307
  }, Partial<{
@@ -348,7 +348,7 @@ declare const ComboBox: {
348
348
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
349
349
  props: ICardWithInputProps;
350
350
  }> | undefined;
351
- tags?: import('storybook/internal/csf').Tag[];
351
+ tags?: string[] | undefined;
352
352
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
353
353
  props: ICardWithInputProps;
354
354
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -357,7 +357,7 @@ declare const ComboBox: {
357
357
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
358
358
  props: ICardWithInputProps;
359
359
  }> | undefined;
360
- globals?: import('storybook/internal/csf').Globals | undefined;
360
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
361
361
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
362
362
  props: ICardWithInputProps;
363
363
  }, Partial<{
@@ -39,12 +39,12 @@ declare const Default: {
39
39
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>[] | undefined;
40
40
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>[] | undefined;
41
41
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | undefined;
42
- tags?: import('storybook/internal/csf').Tag[];
42
+ tags?: string[] | undefined;
43
43
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
44
44
  name?: import('storybook/internal/csf').StoryName;
45
45
  storyName?: import('storybook/internal/csf').StoryName;
46
46
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | undefined;
47
- globals?: import('storybook/internal/csf').Globals | undefined;
47
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
48
48
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>, Partial<Readonly<IIndicatorCardProps>>>, "story"> | undefined;
49
49
  };
50
50
  declare const LeftAligned: {
@@ -85,12 +85,12 @@ declare const LeftAligned: {
85
85
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>[] | undefined;
86
86
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>[] | undefined;
87
87
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | undefined;
88
- tags?: import('storybook/internal/csf').Tag[];
88
+ tags?: string[] | undefined;
89
89
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
90
90
  name?: import('storybook/internal/csf').StoryName;
91
91
  storyName?: import('storybook/internal/csf').StoryName;
92
92
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>> | undefined;
93
- globals?: import('storybook/internal/csf').Globals | undefined;
93
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
94
94
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, Readonly<IIndicatorCardProps>, Partial<Readonly<IIndicatorCardProps>>>, "story"> | undefined;
95
95
  };
96
96
  export default config;
@@ -1,93 +1,95 @@
1
- import { jsx as t, jsxs as F } from "react/jsx-runtime";
2
- import { useVirtualizer as We } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
- import { useState as v, useMemo as x, useRef as g, useCallback as y } from "react";
4
- import { useButton as Ye } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
5
- import { useComboBox as qe } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
6
- import { useFilter as Je } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
7
- import { useListBox as Pe } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
8
- import { useComboBoxState as Qe } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
9
- import { Item as Xe } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
10
- import { useTheme as Ze } from "styled-components";
11
- import { OutlineContainer as _e } from "../../../outline-container/index.js";
12
- import { StyledTextInputContainer as eo } from "../../../styles.js";
13
- import { Popover as de } from "../../../utils/popover/index.js";
14
- import { Option as oo } from "../option/index.js";
15
- import { StyledStatusMessage as to, ChevronIconButton as ro, StyledDropdown as he, StyledGroupHeader as no, StyledEmptyMessage as so } from "../styles.js";
16
- import { describeSelection as lo, toSelection as me } from "../utils.js";
17
- import { Icon as q } from "../../../../icon/index.js";
18
- import { IconButton as ao } from "../../../../icon-button/index.js";
1
+ import { jsx as r, jsxs as G } from "react/jsx-runtime";
2
+ import { useVirtualizer as qe } from "../../../../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
3
+ import { useState as g, useMemo as $, useRef as y, useCallback as v } from "react";
4
+ import { useButton as Je } from "../../../../../node_modules/react-aria/dist/private/button/useButton.js";
5
+ import { useComboBox as Pe } from "../../../../../node_modules/react-aria/dist/private/combobox/useComboBox.js";
6
+ import { useFilter as Qe } from "../../../../../node_modules/react-aria/dist/private/i18n/useFilter.js";
7
+ import { useListBox as Xe } from "../../../../../node_modules/react-aria/dist/private/listbox/useListBox.js";
8
+ import { useComboBoxState as Ze } from "../../../../../node_modules/react-stately/dist/private/combobox/useComboBoxState.js";
9
+ import { Item as _e } from "../../../../../node_modules/react-stately/dist/private/collections/Item.js";
10
+ import { useTheme as eo } from "styled-components";
11
+ import { OutlineContainer as oo } from "../../../outline-container/index.js";
12
+ import { StyledTextInputContainer as to } from "../../../styles.js";
13
+ import { Popover as ge } from "../../../utils/popover/index.js";
14
+ import { Option as ro } from "../option/index.js";
15
+ import { StyledStatusMessage as no, ChevronIconButton as so, StyledDropdown as ye, StyledGroupHeader as lo, StyledEmptyMessage as ao } from "../styles.js";
16
+ import { describeSelection as co, toSelection as ve } from "../utils.js";
17
+ import { Icon as J } from "../../../../icon/index.js";
18
+ import { IconButton as io } from "../../../../icon-button/index.js";
19
19
  import "../../../../typography/heading/index.js";
20
20
  import "../../../../typography/span/index.js";
21
- import { Text as J } from "../../../../typography/text/index.js";
22
- import { useClickOutside as co } from "../../../../../hooks/use-click-outside.js";
21
+ import { Text as P } from "../../../../typography/text/index.js";
22
+ import { useClickOutside as po } from "../../../../../hooks/use-click-outside.js";
23
23
  const ko = ({
24
- field: u,
24
+ field: i,
25
25
  disabled: h = !1,
26
- disabledKeys: $,
27
- error: ge,
28
- helpLink: ye,
29
- helpLinkText: ve,
30
- helpText: xe,
31
- label: P,
32
- loadingItems: $e,
26
+ disabledKeys: b,
27
+ error: xe,
28
+ helpLink: $e,
29
+ helpLinkText: be,
30
+ helpText: we,
31
+ label: Q,
32
+ loadingItems: X,
33
33
  name: l,
34
- multiSelection: r = !1,
34
+ multiSelection: t = !1,
35
35
  items: o,
36
- onBlur: K,
37
- onChange: f,
38
- onClear: Q,
39
- placeholder: be,
40
- clearable: we = !1,
41
- emptyMessage: X,
42
- statusMessage: Z,
43
- required: Se,
44
- setValue: b,
45
- tooltip: Be,
46
- value: Ce,
47
- watch: w,
48
- weight: Ae
36
+ onBlur: j,
37
+ onChange: d,
38
+ onClear: Z,
39
+ placeholder: Se,
40
+ clearable: Be = !1,
41
+ emptyMessage: _,
42
+ statusMessage: ee,
43
+ required: Ce,
44
+ setValue: w,
45
+ tooltip: Ae,
46
+ value: Oe,
47
+ watch: S,
48
+ weight: ze
49
49
  }) => {
50
- const m = Ze(), k = h ? void 0 : ge, d = u?.value ?? Ce, [D, S] = v(() => r ? lo(
51
- me(w?.(`${l}Options`)),
50
+ const m = eo(), k = h ? void 0 : xe, a = i?.value ?? Oe, [M, x] = g(() => t ? co(
51
+ ve(S?.(`${l}Options`)),
52
52
  o.map((e) => e.value),
53
- $ ?? [],
53
+ b ?? [],
54
54
  o.find((e) => e.value === "All")?.name
55
- ).text : o.find((e) => e.value === d)?.name ?? ""), [_, G] = v(d), j = ($e === !1 || !d) && !r, M = x(
56
- () => j ? o.find((e) => e.value === d)?.name ?? "" : "",
57
- [j, d, o]
58
- ), [Oe, ze] = v(d), [Ie, Re] = v(M);
59
- j && (d !== Oe || M !== Ie) && (ze(d), Re(M), S(M), G(d ?? ""));
60
- const [Fe, H] = v(o), [ee, B] = v(!1), { contains: N } = Je({ sensitivity: "base" }), U = g(null), W = g(null), C = g(null), A = g(null), oe = g(null), O = g(null), Y = g(/* @__PURE__ */ new Set()), ke = x(() => {
61
- const e = Y.current, s = Array.from($ ?? []), c = o.some((n) => n.group !== void 0);
62
- return o.toSorted((n, p) => {
55
+ ).text : o.find((e) => e.value === a)?.name ?? ""), [oe, B] = g(a), H = (X === !1 || !a) && !t, C = $(
56
+ () => H ? o.find((e) => e.value === a)?.name ?? "" : "",
57
+ [H, a, o]
58
+ ), [Re, Ie] = g(a), [Fe, te] = g(C), [De, N] = g(a);
59
+ a !== Re ? (Ie(a), te(C), !t && (X !== !0 || !a) && a !== De && (N(a), x(
60
+ o.find((e) => e.value === a)?.name ?? ""
61
+ ), B(a ?? ""))) : H && C !== Fe && (te(C), x(C), B(a ?? ""));
62
+ const [Ge, U] = g(o), [re, A] = g(!1), { contains: V } = Qe({ sensitivity: "base" }), W = y(null), Y = y(null), O = y(null), z = y(null), ne = y(null), R = y(null), q = y(/* @__PURE__ */ new Set()), ke = $(() => {
63
+ const e = q.current, s = Array.from(b ?? []), p = o.some((n) => n.group !== void 0);
64
+ return o.toSorted((n, f) => {
63
65
  if (n.value === "All") return -1;
64
- if (p.value === "All") return 1;
65
- const E = s.includes(n.value), L = s.includes(p.value);
66
- if (c) {
67
- const I = n.group ?? "", R = p.group ?? "";
68
- if (!n.group && p.group) return -1;
69
- if (n.group && !p.group) return 1;
70
- if (I !== R)
71
- return I.localeCompare(R);
72
- if (E && !L) return 1;
73
- if (!E && L) return -1;
74
- if (r) {
75
- const ue = e.has(n.value), fe = e.has(p.value);
76
- if (ue && !fe) return -1;
77
- if (!ue && fe) return 1;
66
+ if (f.value === "All") return 1;
67
+ const K = s.includes(n.value), L = s.includes(f.value);
68
+ if (p) {
69
+ const F = n.group ?? "", D = f.group ?? "";
70
+ if (!n.group && f.group) return -1;
71
+ if (n.group && !f.group) return 1;
72
+ if (F !== D)
73
+ return F.localeCompare(D);
74
+ if (K && !L) return 1;
75
+ if (!K && L) return -1;
76
+ if (t) {
77
+ const he = e.has(n.value), me = e.has(f.value);
78
+ if (he && !me) return -1;
79
+ if (!he && me) return 1;
78
80
  }
79
- return n.name.localeCompare(p.name);
81
+ return n.name.localeCompare(f.name);
80
82
  }
81
- if (E && !L) return 1;
82
- if (!E && L) return -1;
83
- if (r) {
84
- const I = e.has(n.value), R = e.has(p.value);
85
- return I && !R ? -1 : !I && R ? 1 : n.name.localeCompare(p.name);
83
+ if (K && !L) return 1;
84
+ if (!K && L) return -1;
85
+ if (t) {
86
+ const F = e.has(n.value), D = e.has(f.value);
87
+ return F && !D ? -1 : !F && D ? 1 : n.name.localeCompare(f.name);
86
88
  }
87
89
  return 0;
88
90
  }).map(
89
- (n) => N(n.name, D) || ee ? /* @__PURE__ */ t(
90
- Xe,
91
+ (n) => V(n.name, M) || re ? /* @__PURE__ */ r(
92
+ _e,
91
93
  {
92
94
  "aria-label": n.value,
93
95
  hrefLang: n.href,
@@ -97,153 +99,162 @@ const ko = ({
97
99
  n.value
98
100
  ) : null
99
101
  );
100
- }, [N, $, D, o, r, ee]), De = y(
102
+ }, [V, b, M, o, t, re]), Me = v(
101
103
  (e) => {
102
104
  const s = e.split(/,|\s/u).slice(-1)[0].trim();
103
- S(r ? s : e), e === "" || e.endsWith(",") ? B(!0) : (B(!1), G((c) => {
104
- const i = e === "" ? "" : c;
105
- return u && u.onChange(i), f && f(e), i;
106
- }), H(
105
+ x(t ? s : e), e === "" || e.endsWith(",") ? A(!0) : (A(!1), i || N(e), B((p) => {
106
+ const u = e === "" ? "" : p;
107
+ return i && i.onChange(u), d && d(e), u;
108
+ }), U(
107
109
  o.filter(
108
- (c) => N(c.name, r ? s : e)
110
+ (p) => V(p.name, t ? s : e)
109
111
  )
110
112
  ));
111
113
  },
112
- [N, o, u, r, f]
113
- ), Ge = y(
114
+ [V, o, i, t, d]
115
+ ), Ne = v(
114
116
  (e) => {
115
- S(o.find((s) => s.value === e)?.name ?? ""), G(e ? String(e) : ""), u && u.onChange(e), f && f(e ? String(e) : ""), H(o);
117
+ x(o.find((s) => s.value === e)?.name ?? ""), B(e ? String(e) : ""), N(i ? e : String(e ?? "")), i && i.onChange(e), d && d(e ? String(e) : ""), U(o);
116
118
  },
117
- [o, u, f]
118
- ), te = y(
119
+ [o, i, d]
120
+ ), se = v(
119
121
  (e) => {
120
- e.key === "Enter" && e.preventDefault(), B(!1);
122
+ e.key === "Enter" && e.preventDefault(), A(!1);
121
123
  },
122
124
  []
123
- ), Me = y(() => {
124
- K && K(), u && u.onBlur();
125
- }, [u, K]), Ne = y(() => {
126
- B(!0);
127
- }, []), a = Qe({
128
- allowsCustomValue: r,
125
+ ), Ve = v(() => {
126
+ j && j(), i && i.onBlur();
127
+ }, [i, j]), Te = v(() => {
128
+ A(!0);
129
+ }, []), c = Ze({
130
+ allowsCustomValue: t,
129
131
  allowsEmptyCollection: !0,
130
- disabledKeys: $,
131
- inputValue: D,
132
- items: Fe,
132
+ disabledKeys: b,
133
+ inputValue: M,
134
+ items: Ge,
133
135
  menuTrigger: "focus",
134
- shouldCloseOnBlur: !r,
135
- selectedKey: _,
136
- onBlur: Me,
137
- onInputChange: De,
138
- onKeyDown: te,
139
- onKeyUp: Ne,
136
+ shouldCloseOnBlur: !t,
137
+ selectedKey: oe,
138
+ onBlur: Ve,
139
+ onInputChange: Me,
140
+ onKeyDown: se,
141
+ onKeyUp: Te,
140
142
  onOpenChange(e, s) {
141
- e && r && w && (Y.current = new Set(
142
- me(w(`${l}Options`)).filter(Boolean)
143
- )), B(
143
+ e && t && S && (q.current = new Set(
144
+ ve(S(`${l}Options`)).filter(Boolean)
145
+ )), A(
144
146
  e && (s === "manual" || s === "focus")
145
147
  ), e && s !== "focus" && requestAnimationFrame(() => {
146
- U.current?.focus();
148
+ W.current?.focus();
147
149
  });
148
150
  },
149
- onSelectionChange: r ? void 0 : Ge,
151
+ onSelectionChange: t ? void 0 : Ne,
150
152
  children: ke
151
- }), Te = y(() => {
152
- S(""), G(null), H(o), a.setSelectedKey(null), a.setInputValue(""), f && f(""), r && b && (b(`${l}Options`, []), b(`${l}CheckAll`, "")), Q?.();
153
- }, [o, r, l, Q, f, b, a]), {
154
- buttonProps: Ve,
155
- inputProps: Ee,
156
- listBoxProps: Le
157
- } = qe(
153
+ }), Ee = v(() => {
154
+ x(""), B(null), U(o), c.setSelectedKey(null), c.setInputValue(""), i || N(""), d && d(""), t && w && (w(`${l}Options`, []), w(`${l}CheckAll`, "")), Z?.();
155
+ }, [
156
+ i,
157
+ o,
158
+ t,
159
+ l,
160
+ Z,
161
+ d,
162
+ w,
163
+ c
164
+ ]), {
165
+ buttonProps: Ke,
166
+ inputProps: Le,
167
+ listBoxProps: je
168
+ } = Pe(
158
169
  {
159
- inputValue: D,
160
- buttonRef: W,
170
+ inputValue: M,
171
+ buttonRef: Y,
161
172
  id: l,
162
- inputRef: U,
163
- label: P ?? l,
164
- listBoxRef: C,
173
+ inputRef: W,
174
+ label: Q ?? l,
175
+ listBoxRef: O,
165
176
  name: l,
166
- placeholder: be,
167
- popoverRef: O
177
+ placeholder: Se,
178
+ popoverRef: R
168
179
  },
169
- a
170
- ), { listBoxProps: re } = Pe(Le, a, C), { buttonProps: Ke } = Ye(Ve, W), { width: ne } = A.current?.getBoundingClientRect() ?? {
180
+ c
181
+ ), { listBoxProps: le } = Xe(je, c, O), { buttonProps: He } = Je(Ke, Y), { width: ae } = z.current?.getBoundingClientRect() ?? {
171
182
  width: 240
172
183
  };
173
- co(A, () => {
174
- a.isOpen && !r && a.close();
175
- }, [O]);
176
- const z = Array.from(a.collection), se = r ? z.findLastIndex(
177
- (e) => e.key === "All" || Y.current.has(String(e.key))
178
- ) : -1, je = x(() => o.map((e) => e.value), [o]), le = x(
184
+ po(z, () => {
185
+ c.isOpen && !t && c.close();
186
+ }, [R]);
187
+ const I = Array.from(c.collection), ce = t ? I.findLastIndex(
188
+ (e) => e.key === "All" || q.current.has(String(e.key))
189
+ ) : -1, Ue = $(() => o.map((e) => e.value), [o]), ie = $(
179
190
  () => new Map(o.map((e) => [e.value, e.group])),
180
191
  [o]
181
- ), He = x(
192
+ ), We = $(
182
193
  () => new Map(o.map((e) => [e.value, e.tag])),
183
194
  [o]
184
- ), T = x(() => z.reduce(
185
- (e, s, c) => {
186
- const i = le.get(String(s.key));
187
- return i !== void 0 && i !== e.currentGroup ? (e.result.push({ type: "header", group: i }), e.currentGroup = i) : i === void 0 && e.currentGroup !== void 0 && (e.currentGroup = void 0), e.result.push({ type: "item", index: c }), e;
195
+ ), T = $(() => I.reduce(
196
+ (e, s, p) => {
197
+ const u = ie.get(String(s.key));
198
+ return u !== void 0 && u !== e.currentGroup ? (e.result.push({ type: "header", group: u }), e.currentGroup = u) : u === void 0 && e.currentGroup !== void 0 && (e.currentGroup = void 0), e.result.push({ type: "item", index: p }), e;
188
199
  },
189
200
  { result: [], currentGroup: void 0 }
190
- ).result, [z, le]), ae = We({
201
+ ).result, [I, ie]), pe = qe({
191
202
  count: T.length,
192
203
  estimateSize: (e) => T[e].type === "header" ? 44 : 28,
193
- getScrollElement: () => C.current,
204
+ getScrollElement: () => O.current,
194
205
  useFlushSync: !1
195
- }), ce = a.isOpen && !h, V = ce && !!Z, ie = ce && o.length === 0 && !!X, Ue = y(
206
+ }), ue = c.isOpen && !h, E = ue && !!ee, fe = ue && o.length === 0 && !!_, Ye = v(
196
207
  (e) => {
197
208
  e.preventDefault();
198
209
  },
199
210
  []
200
- ), pe = V ? (
211
+ ), de = E ? (
201
212
  // A listbox only owns options, so the row itself must stay presentational
202
- /* @__PURE__ */ t(to, { onMouseDown: Ue, role: "presentation", children: /* @__PURE__ */ t("div", { "aria-live": "polite", role: "status", children: /* @__PURE__ */ t(
203
- J,
213
+ /* @__PURE__ */ r(no, { onMouseDown: Ye, role: "presentation", children: /* @__PURE__ */ r("div", { "aria-live": "polite", role: "status", children: /* @__PURE__ */ r(
214
+ P,
204
215
  {
205
216
  color: m.palette.gray[400],
206
217
  size: "sm",
207
218
  textOverflow: "auto",
208
219
  whiteSpace: "wrap",
209
- children: Z
220
+ children: ee
210
221
  }
211
222
  ) }) })
212
223
  ) : null;
213
- return /* @__PURE__ */ F(
214
- _e,
224
+ return /* @__PURE__ */ G(
225
+ oo,
215
226
  {
216
- containerRef: oe,
227
+ containerRef: ne,
217
228
  error: k,
218
- helpLink: ye,
219
- helpLinkText: ve,
220
- helpText: xe,
229
+ helpLink: $e,
230
+ helpLinkText: be,
231
+ helpText: we,
221
232
  htmlFor: l,
222
233
  id: `combobox-${l}`,
223
- label: P,
224
- required: Se,
225
- tooltip: Be,
226
- weight: Ae,
234
+ label: Q,
235
+ required: Ce,
236
+ tooltip: Ae,
237
+ weight: ze,
227
238
  children: [
228
- /* @__PURE__ */ F(
229
- eo,
239
+ /* @__PURE__ */ G(
240
+ to,
230
241
  {
231
242
  className: `${h ? "disabled" : ""} ${k ? "error" : ""}`,
232
- ref: A,
243
+ ref: z,
233
244
  children: [
234
- /* @__PURE__ */ t(
245
+ /* @__PURE__ */ r(
235
246
  "input",
236
247
  {
237
- ...Ee,
248
+ ...Le,
238
249
  "aria-invalid": k ? "true" : "false",
239
250
  "aria-label": l,
240
251
  disabled: h,
241
- onKeyDown: te,
242
- ref: U
252
+ onKeyDown: se,
253
+ ref: W
243
254
  }
244
255
  ),
245
- k ? /* @__PURE__ */ t(
246
- q,
256
+ k ? /* @__PURE__ */ r(
257
+ J,
247
258
  {
248
259
  icon: "exclamation-circle",
249
260
  iconClass: "error-icon",
@@ -251,34 +262,34 @@ const ko = ({
251
262
  iconSize: "lg"
252
263
  }
253
264
  ) : void 0,
254
- we && !h && (r ? (w?.(`${l}Options`)?.length ?? 0) > 0 : _) ? /* @__PURE__ */ t(
255
- ao,
265
+ Be && !h && (t ? (S?.(`${l}Options`)?.length ?? 0) > 0 : oe) ? /* @__PURE__ */ r(
266
+ io,
256
267
  {
257
268
  icon: "xmark",
258
269
  iconColor: m.palette.gray[400],
259
270
  iconSize: "sm",
260
271
  iconType: "fa-light",
261
- onClick: Te,
272
+ onClick: Ee,
262
273
  px: 0.125,
263
274
  py: 0.125,
264
275
  type: "reset",
265
276
  variant: "ghost"
266
277
  }
267
278
  ) : void 0,
268
- /* @__PURE__ */ F(
269
- ro,
279
+ /* @__PURE__ */ G(
280
+ so,
270
281
  {
271
- ...Ke,
282
+ ...He,
272
283
  $variant: "ghost",
273
- className: `action ${a.isOpen && !h ? "open" : "closed"}`,
284
+ className: `action ${c.isOpen && !h ? "open" : "closed"}`,
274
285
  disabled: h,
275
286
  px: 0.125,
276
287
  py: 0.125,
277
- ref: W,
288
+ ref: Y,
278
289
  type: "button",
279
290
  children: [
280
- /* @__PURE__ */ t("div", { className: "chevron-down", children: /* @__PURE__ */ t(
281
- q,
291
+ /* @__PURE__ */ r("div", { className: "chevron-down", children: /* @__PURE__ */ r(
292
+ J,
282
293
  {
283
294
  clickable: !1,
284
295
  icon: "chevron-down",
@@ -287,8 +298,8 @@ const ko = ({
287
298
  iconType: "fa-light"
288
299
  }
289
300
  ) }),
290
- /* @__PURE__ */ t("div", { className: "chevron-up", children: /* @__PURE__ */ t(
291
- q,
301
+ /* @__PURE__ */ r("div", { className: "chevron-up", children: /* @__PURE__ */ r(
302
+ J,
292
303
  {
293
304
  clickable: !1,
294
305
  icon: "chevron-up",
@@ -303,36 +314,36 @@ const ko = ({
303
314
  ]
304
315
  }
305
316
  ),
306
- a.isOpen && a.collection.size > 0 && !h ? /* @__PURE__ */ t(
307
- de,
317
+ c.isOpen && c.collection.size > 0 && !h ? /* @__PURE__ */ r(
318
+ ge,
308
319
  {
309
320
  className: "dropdown",
310
321
  id: `popover-${l}`,
311
322
  offset: 4,
312
323
  placement: "bottom start",
313
- popoverRef: O,
314
- state: a,
315
- triggerRef: A,
316
- children: /* @__PURE__ */ F(
317
- he,
324
+ popoverRef: R,
325
+ state: c,
326
+ triggerRef: z,
327
+ children: /* @__PURE__ */ G(
328
+ ye,
318
329
  {
319
- ...re,
320
- $hasStatus: V,
321
- $multiSelection: r && !Array.from($ ?? []).includes("All"),
322
- $width: ne,
323
- ref: C,
330
+ ...le,
331
+ $hasStatus: E,
332
+ $multiSelection: t && !Array.from(b ?? []).includes("All"),
333
+ $width: ae,
334
+ ref: O,
324
335
  children: [
325
- /* @__PURE__ */ t(
336
+ /* @__PURE__ */ r(
326
337
  "div",
327
338
  {
328
339
  style: {
329
- height: `${ae.getTotalSize()}px`,
340
+ height: `${pe.getTotalSize()}px`,
330
341
  position: "relative"
331
342
  },
332
- children: ae.getVirtualItems().map((e) => {
343
+ children: pe.getVirtualItems().map((e) => {
333
344
  const s = T[e.index];
334
345
  if (s.type === "header")
335
- return /* @__PURE__ */ t(
346
+ return /* @__PURE__ */ r(
336
347
  "div",
337
348
  {
338
349
  style: {
@@ -343,8 +354,8 @@ const ko = ({
343
354
  height: `${e.size}px`,
344
355
  transform: `translateY(${e.start}px)`
345
356
  },
346
- children: /* @__PURE__ */ t(no, { children: /* @__PURE__ */ t(
347
- J,
357
+ children: /* @__PURE__ */ r(lo, { children: /* @__PURE__ */ r(
358
+ P,
348
359
  {
349
360
  color: m.palette.gray[400],
350
361
  fontWeight: "bold",
@@ -355,8 +366,8 @@ const ko = ({
355
366
  },
356
367
  `header-${e.index}`
357
368
  );
358
- const c = z[s.index], i = T[e.index + 1], n = c.key === "All" && i?.type === "header", p = r && s.index === se && se >= 0 && s.index < z.length - 1 && !n;
359
- return /* @__PURE__ */ t(
369
+ const p = I[s.index], u = T[e.index + 1], n = p.key === "All" && u?.type === "header", f = t && s.index === ce && ce >= 0 && s.index < I.length - 1 && !n;
370
+ return /* @__PURE__ */ r(
360
371
  "div",
361
372
  {
362
373
  style: {
@@ -366,65 +377,65 @@ const ko = ({
366
377
  width: "100%",
367
378
  height: `${e.size}px`,
368
379
  transform: `translateY(${e.start}px)`,
369
- borderBottom: p ? `1px solid ${m.palette.gray[200]}` : void 0
380
+ borderBottom: f ? `1px solid ${m.palette.gray[200]}` : void 0
370
381
  },
371
- children: /* @__PURE__ */ t(
372
- oo,
382
+ children: /* @__PURE__ */ r(
383
+ ro,
373
384
  {
374
- allItemKeys: je,
375
- containerRef: oe,
376
- item: c,
377
- multiSelection: r,
385
+ allItemKeys: Ue,
386
+ containerRef: ne,
387
+ item: p,
388
+ multiSelection: t,
378
389
  name: l,
379
- popoverRef: O,
380
- setInputValue: S,
381
- setValue: b,
382
- state: a,
383
- tag: He.get(String(c.key)),
384
- watch: w
390
+ popoverRef: R,
391
+ setInputValue: x,
392
+ setValue: w,
393
+ state: c,
394
+ tag: We.get(String(p.key)),
395
+ watch: S
385
396
  }
386
397
  )
387
398
  },
388
- c.key
399
+ p.key
389
400
  );
390
401
  })
391
402
  }
392
403
  ),
393
- pe
404
+ de
394
405
  ]
395
406
  }
396
407
  )
397
408
  }
398
- ) : !ie && !V ? null : /* @__PURE__ */ t(
399
- de,
409
+ ) : !fe && !E ? null : /* @__PURE__ */ r(
410
+ ge,
400
411
  {
401
412
  className: "dropdown",
402
413
  id: `popover-${l}-empty`,
403
414
  offset: 4,
404
415
  placement: "bottom start",
405
- popoverRef: O,
406
- state: a,
407
- triggerRef: A,
408
- children: /* @__PURE__ */ F(
409
- he,
416
+ popoverRef: R,
417
+ state: c,
418
+ triggerRef: z,
419
+ children: /* @__PURE__ */ G(
420
+ ye,
410
421
  {
411
- ...re,
412
- $hasStatus: V,
422
+ ...le,
423
+ $hasStatus: E,
413
424
  $multiSelection: !1,
414
- $width: ne,
415
- ref: C,
425
+ $width: ae,
426
+ ref: O,
416
427
  children: [
417
- ie ? /* @__PURE__ */ t(so, { children: /* @__PURE__ */ t(
418
- J,
428
+ fe ? /* @__PURE__ */ r(ao, { children: /* @__PURE__ */ r(
429
+ P,
419
430
  {
420
431
  color: m.palette.gray[400],
421
432
  size: "md",
422
433
  textOverflow: "auto",
423
434
  whiteSpace: "wrap",
424
- children: X
435
+ children: _
425
436
  }
426
437
  ) }) : null,
427
- pe
438
+ de
428
439
  ]
429
440
  }
430
441
  )
@@ -42,7 +42,7 @@ declare const Default: {
42
42
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
43
43
  itemsProps: IProgressBarProps[];
44
44
  }> | undefined;
45
- tags?: import('storybook/internal/csf').Tag[];
45
+ tags?: string[] | undefined;
46
46
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
47
47
  itemsProps: IProgressBarProps[];
48
48
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -51,7 +51,7 @@ declare const Default: {
51
51
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
52
52
  itemsProps: IProgressBarProps[];
53
53
  }> | undefined;
54
- globals?: import('storybook/internal/csf').Globals | undefined;
54
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
55
55
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
56
56
  itemsProps: IProgressBarProps[];
57
57
  }, Partial<{
@@ -94,7 +94,7 @@ declare const Compliance: {
94
94
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
95
95
  itemsProps: IProgressBarProps[];
96
96
  }> | undefined;
97
- tags?: import('storybook/internal/csf').Tag[];
97
+ tags?: string[] | undefined;
98
98
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
99
99
  itemsProps: IProgressBarProps[];
100
100
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -103,7 +103,7 @@ declare const Compliance: {
103
103
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
104
104
  itemsProps: IProgressBarProps[];
105
105
  }> | undefined;
106
- globals?: import('storybook/internal/csf').Globals | undefined;
106
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
107
107
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
108
108
  itemsProps: IProgressBarProps[];
109
109
  }, Partial<{
@@ -165,7 +165,7 @@ declare const Variants: {
165
165
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
166
166
  itemsProps: IProgressBarProps[];
167
167
  }> | undefined;
168
- tags?: import('storybook/internal/csf').Tag[];
168
+ tags?: string[] | undefined;
169
169
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
170
170
  itemsProps: IProgressBarProps[];
171
171
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -174,7 +174,7 @@ declare const Variants: {
174
174
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
175
175
  itemsProps: IProgressBarProps[];
176
176
  }> | undefined;
177
- globals?: import('storybook/internal/csf').Globals | undefined;
177
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
178
178
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
179
179
  itemsProps: IProgressBarProps[];
180
180
  }, Partial<{
@@ -42,7 +42,7 @@ declare const Default: {
42
42
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
43
43
  itemsProps: IRadioButtonProps[];
44
44
  }> | undefined;
45
- tags?: import('storybook/internal/csf').Tag[];
45
+ tags?: string[] | undefined;
46
46
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
47
47
  itemsProps: IRadioButtonProps[];
48
48
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -51,7 +51,7 @@ declare const Default: {
51
51
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
52
52
  itemsProps: IRadioButtonProps[];
53
53
  }> | undefined;
54
- globals?: import('storybook/internal/csf').Globals | undefined;
54
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
55
55
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
56
56
  itemsProps: IRadioButtonProps[];
57
57
  }, Partial<{
@@ -101,7 +101,7 @@ declare const Disabled: {
101
101
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
102
102
  itemsProps: IRadioButtonProps[];
103
103
  }> | undefined;
104
- tags?: import('storybook/internal/csf').Tag[];
104
+ tags?: string[] | undefined;
105
105
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
106
106
  itemsProps: IRadioButtonProps[];
107
107
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -110,7 +110,7 @@ declare const Disabled: {
110
110
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
111
111
  itemsProps: IRadioButtonProps[];
112
112
  }> | undefined;
113
- globals?: import('storybook/internal/csf').Globals | undefined;
113
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
114
114
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
115
115
  itemsProps: IRadioButtonProps[];
116
116
  }, Partial<{
@@ -30,12 +30,12 @@ declare const Default: {
30
30
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
31
31
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
32
32
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
33
- tags?: import('storybook/internal/csf').Tag[];
33
+ tags?: string[] | undefined;
34
34
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, ISegmentedControlProps>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
35
35
  name?: import('storybook/internal/csf').StoryName;
36
36
  storyName?: import('storybook/internal/csf').StoryName;
37
37
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
38
- globals?: import('storybook/internal/csf').Globals | undefined;
38
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
39
39
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, ISegmentedControlProps, Partial<ISegmentedControlProps>>, "story"> | undefined;
40
40
  };
41
41
  declare const WithDisabledOption: {
@@ -72,12 +72,12 @@ declare const WithDisabledOption: {
72
72
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
73
73
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
74
74
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
75
- tags?: import('storybook/internal/csf').Tag[];
75
+ tags?: string[] | undefined;
76
76
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, ISegmentedControlProps>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
77
77
  name?: import('storybook/internal/csf').StoryName;
78
78
  storyName?: import('storybook/internal/csf').StoryName;
79
79
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
80
- globals?: import('storybook/internal/csf').Globals | undefined;
80
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
81
81
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, ISegmentedControlProps, Partial<ISegmentedControlProps>>, "story"> | undefined;
82
82
  };
83
83
  declare const Disabled: {
@@ -109,12 +109,12 @@ declare const Disabled: {
109
109
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
110
110
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, ISegmentedControlProps>[] | undefined;
111
111
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
112
- tags?: import('storybook/internal/csf').Tag[];
112
+ tags?: string[] | undefined;
113
113
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, ISegmentedControlProps>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
114
114
  name?: import('storybook/internal/csf').StoryName;
115
115
  storyName?: import('storybook/internal/csf').StoryName;
116
116
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, ISegmentedControlProps> | undefined;
117
- globals?: import('storybook/internal/csf').Globals | undefined;
117
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
118
118
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, ISegmentedControlProps, Partial<ISegmentedControlProps>>, "story"> | undefined;
119
119
  };
120
120
  export { Default, Disabled, WithDisabledOption };
@@ -1,50 +1,53 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useTheme as f } from "styled-components";
3
- import { StyledBarContainer as w, StyledSegment as S } from "./styles.js";
4
- const B = ({
5
- segments: t,
6
- backgroundColor: m,
7
- height: n = "14px",
8
- width: $ = "100%",
9
- margin: p,
10
- mx: g,
11
- my: h,
12
- ml: i,
13
- mr: s,
14
- mt: c,
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { useTheme as S } from "styled-components";
3
+ import { StyledBarContainer as v, StyledSegment as w } from "./styles.js";
4
+ const x = ({
5
+ segments: m,
6
+ backgroundColor: n,
7
+ height: i = "14px",
8
+ width: p = "100%",
9
+ margin: s,
10
+ mx: $,
11
+ my: c,
12
+ ml: g,
13
+ mr: h,
14
+ mt: u,
15
15
  mb: d
16
16
  }) => {
17
- const r = f(), o = [
18
- r.palette.primary[700],
19
- r.palette.error[500],
20
- r.palette.warning[500]
21
- ], u = r.palette.warning[200];
22
- return /* @__PURE__ */ l(
23
- w,
17
+ const e = S(), t = [
18
+ e.palette.primary[700],
19
+ e.palette.error[500],
20
+ e.palette.warning[500]
21
+ ], f = e.palette.warning[200], l = m.map((r, o) => ({
22
+ color: r.color ?? t[o % t.length],
23
+ value: r.value
24
+ })).filter((r) => r.value > 0);
25
+ return /* @__PURE__ */ a(
26
+ v,
24
27
  {
25
- $backgroundColor: m ?? u,
26
- $height: n,
27
- $margin: p,
28
+ $backgroundColor: n ?? f,
29
+ $height: i,
30
+ $margin: s,
28
31
  $mb: d,
29
- $ml: i,
30
- $mr: s,
31
- $mt: c,
32
- $mx: g,
33
- $my: h,
34
- $width: $,
32
+ $ml: g,
33
+ $mr: h,
34
+ $mt: u,
35
+ $mx: $,
36
+ $my: c,
37
+ $width: p,
35
38
  role: "progressbar",
36
- children: t.map((a, e) => /* @__PURE__ */ l(
37
- S,
39
+ children: l.map((r, o) => /* @__PURE__ */ a(
40
+ w,
38
41
  {
39
- $color: a.color ?? o[e % o.length],
40
- $showSeparator: e < t.length - 1,
41
- $width: a.value
42
+ $color: r.color,
43
+ $showSeparator: o < l.length - 1,
44
+ $width: r.value
42
45
  },
43
- `segment-${e}`
46
+ `segment-${o}`
44
47
  ))
45
48
  }
46
49
  );
47
50
  };
48
51
  export {
49
- B as SegmentedProgressBar
52
+ x as SegmentedProgressBar
50
53
  };
@@ -4,5 +4,6 @@ declare const config: Meta<ISegmentedProgressBarProps>;
4
4
  type Story = StoryFn<ISegmentedProgressBarProps>;
5
5
  declare const Default: Story;
6
6
  declare const SingleSegment: Story;
7
- export { Default, SingleSegment };
7
+ declare const EmptySegments: Story;
8
+ export { Default, EmptySegments, SingleSegment };
8
9
  export default config;
@@ -2,7 +2,7 @@ import { IDisplayModifiable, IMarginModifiable } from '../@core';
2
2
  /**
3
3
  * Segment configuration for the progress bar.
4
4
  * @interface ISegment
5
- * @property { number } value - Percentage width of the segment (0-100).
5
+ * @property { number } value - Percentage width of the segment (0-100). A segment with 0 or less is not drawn.
6
6
  * @property { string } [color] - Background color of the segment. Defaults to primary[700], error[500], warning[500] in order.
7
7
  */
8
8
  interface ISegment {
@@ -38,7 +38,7 @@ declare const SpecialButtons: {
38
38
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
39
39
  items: PropsWithChildren<ITableButtonProps>[];
40
40
  }> | undefined;
41
- tags?: import('storybook/internal/csf').Tag[];
41
+ tags?: string[] | undefined;
42
42
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
43
43
  items: PropsWithChildren<ITableButtonProps>[];
44
44
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -47,7 +47,7 @@ declare const SpecialButtons: {
47
47
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
48
48
  items: PropsWithChildren<ITableButtonProps>[];
49
49
  }> | undefined;
50
- globals?: import('storybook/internal/csf').Globals | undefined;
50
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
51
51
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
52
52
  items: PropsWithChildren<ITableButtonProps>[];
53
53
  }, Partial<{
@@ -620,12 +620,12 @@ declare const Default: {
620
620
  beforeEach?: import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, IToggleProps> | import('storybook/internal/csf').BeforeEach<import('@storybook/react').ReactRenderer, IToggleProps>[] | undefined;
621
621
  afterEach?: import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, IToggleProps> | import('storybook/internal/csf').AfterEach<import('@storybook/react').ReactRenderer, IToggleProps>[] | undefined;
622
622
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, IToggleProps> | undefined;
623
- tags?: import('storybook/internal/csf').Tag[];
623
+ tags?: string[] | undefined;
624
624
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, IToggleProps>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
625
625
  name?: import('storybook/internal/csf').StoryName;
626
626
  storyName?: import('storybook/internal/csf').StoryName;
627
627
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, IToggleProps> | undefined;
628
- globals?: import('storybook/internal/csf').Globals | undefined;
628
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
629
629
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, IToggleProps, Partial<IToggleProps>>, "story"> | undefined;
630
630
  };
631
631
  declare const WithInnerIcon: {
@@ -665,7 +665,7 @@ declare const WithInnerIcon: {
665
665
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
666
666
  itemsProps: IToggleProps[];
667
667
  }> | undefined;
668
- tags?: import('storybook/internal/csf').Tag[];
668
+ tags?: string[] | undefined;
669
669
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
670
670
  itemsProps: IToggleProps[];
671
671
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -674,7 +674,7 @@ declare const WithInnerIcon: {
674
674
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
675
675
  itemsProps: IToggleProps[];
676
676
  }> | undefined;
677
- globals?: import('storybook/internal/csf').Globals | undefined;
677
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
678
678
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
679
679
  itemsProps: IToggleProps[];
680
680
  }, Partial<{
@@ -722,7 +722,7 @@ declare const WithInnerText: {
722
722
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
723
723
  itemsProps: IToggleProps[];
724
724
  }> | undefined;
725
- tags?: import('storybook/internal/csf').Tag[];
725
+ tags?: string[] | undefined;
726
726
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
727
727
  itemsProps: IToggleProps[];
728
728
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -731,7 +731,7 @@ declare const WithInnerText: {
731
731
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
732
732
  itemsProps: IToggleProps[];
733
733
  }> | undefined;
734
- globals?: import('storybook/internal/csf').Globals | undefined;
734
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
735
735
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
736
736
  itemsProps: IToggleProps[];
737
737
  }, Partial<{
@@ -790,7 +790,7 @@ declare const WithExternalLabel: {
790
790
  render?: import('storybook/internal/csf').ArgsStoryFn<import('@storybook/react').ReactRenderer, {
791
791
  itemsProps: IToggleProps[];
792
792
  }> | undefined;
793
- tags?: import('storybook/internal/csf').Tag[];
793
+ tags?: string[] | undefined;
794
794
  mount?: ((context: import('storybook/internal/csf').StoryContext<import('@storybook/react').ReactRenderer, {
795
795
  itemsProps: IToggleProps[];
796
796
  }>) => (ui?: import("react").JSX.Element) => Promise<import('storybook/internal/csf').Canvas>) | undefined;
@@ -799,7 +799,7 @@ declare const WithExternalLabel: {
799
799
  play?: import('storybook/internal/csf').PlayFunction<import('@storybook/react').ReactRenderer, {
800
800
  itemsProps: IToggleProps[];
801
801
  }> | undefined;
802
- globals?: import('storybook/internal/csf').Globals | undefined;
802
+ globals?: Partial<import('storybook/internal/csf').Globals> | undefined;
803
803
  story?: Omit<import('storybook/internal/csf').StoryAnnotations<import('@storybook/react').ReactRenderer, {
804
804
  itemsProps: IToggleProps[];
805
805
  }, Partial<{
package/package.json CHANGED
@@ -29,11 +29,11 @@
29
29
  },
30
30
  "description": "Fluid Attacks core components library",
31
31
  "devDependencies": {
32
- "@storybook/addon-a11y": "10.4.1",
33
- "@storybook/addon-docs": "10.4.1",
34
- "@storybook/addon-links": "10.4.1",
35
- "@storybook/addon-vitest": "10.4.1",
36
- "@storybook/react-vite": "10.4.1",
32
+ "@storybook/addon-a11y": "10.6.2",
33
+ "@storybook/addon-docs": "10.6.2",
34
+ "@storybook/addon-links": "10.6.2",
35
+ "@storybook/addon-vitest": "10.6.2",
36
+ "@storybook/react-vite": "10.6.2",
37
37
  "@tailwindcss/vite": "4.3.0",
38
38
  "@testing-library/react": "16.3.1",
39
39
  "@types/node": "25.9.1",
@@ -55,7 +55,7 @@
55
55
  "eslint-plugin-project-structure": "3.0.1",
56
56
  "eslint-plugin-react": "7.37.4",
57
57
  "eslint-plugin-react-hooks": "7.1.1",
58
- "eslint-plugin-storybook": "10.4.0",
58
+ "eslint-plugin-storybook": "10.6.2",
59
59
  "jsdom": "27.4.0",
60
60
  "next": "16.3.8",
61
61
  "playwright": "1.60.0",
@@ -64,13 +64,13 @@
64
64
  "react-router": "7.18.2",
65
65
  "remark-gfm": "4.0.0",
66
66
  "rollup-plugin-visualizer": "5.14.0",
67
- "storybook": "10.4.1",
67
+ "storybook": "10.6.2",
68
68
  "stylelint": "16.14.1",
69
69
  "stylelint-config-standard": "37.0.0",
70
70
  "tailwindcss": "4.3.0",
71
71
  "typescript": "6.0.3",
72
72
  "typescript-eslint": "8.59.4",
73
- "vite": "6.4.3",
73
+ "vite": "6.4.4",
74
74
  "vite-plugin-dts": "5.0.3",
75
75
  "vite-plugin-lib-inject-css": "2.2.2",
76
76
  "vitest": "4.1.11"
@@ -135,5 +135,5 @@
135
135
  "./dist/index.js"
136
136
  ],
137
137
  "typings": "./dist/index.d.ts",
138
- "version": "9.5.0"
138
+ "version": "9.5.2"
139
139
  }