@fluidattacks/design 9.4.0 → 9.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/card/card-with-image/index.stories.d.ts +2 -2
- package/dist/components/card/card-with-input/index.stories.d.ts +14 -14
- package/dist/components/card/indicator-card/index.stories.d.ts +4 -4
- package/dist/components/inputs/fields/text-input/index.d.ts +1 -1
- package/dist/components/inputs/fields/text-input/index.js +80 -69
- package/dist/components/inputs/outline-container/index.d.ts +1 -1
- package/dist/components/inputs/outline-container/index.js +62 -50
- package/dist/components/inputs/styles.js +16 -8
- package/dist/components/inputs/types.d.ts +2 -0
- package/dist/components/progress-bar/index.stories.d.ts +6 -6
- package/dist/components/radio-button/index.stories.d.ts +4 -4
- package/dist/components/segmented-control/index.stories.d.ts +6 -6
- package/dist/components/segmented-progress-bar/index.js +40 -37
- package/dist/components/segmented-progress-bar/index.stories.d.ts +2 -1
- package/dist/components/segmented-progress-bar/types.d.ts +1 -1
- package/dist/components/table-button/index.stories.d.ts +2 -2
- package/dist/components/toggle/index.stories.d.ts +8 -8
- package/package.json +9 -9
|
@@ -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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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,3 +1,3 @@
|
|
|
1
1
|
import { IInputProps } from '../../types';
|
|
2
|
-
declare const TextInput: ({ disabled, hasIcon, helpLink, helpLinkText, helpText, error, id, indexArray, isValid, isTouched, label, name, maskValue, maxLength, onPaste, placeholder, removeItemArray, register, suggestions, tooltip, type, weight, ...rest }: Readonly<IInputProps>) => JSX.Element;
|
|
2
|
+
declare const TextInput: ({ disabled, hasIcon, helpLink, helpLinkText, helpText, error, id, indexArray, isValid, isTouched, label, name, maskValue, maxLength, onPaste, placeholder, removeItemArray, register, suggestions, tooltip, type, warning, weight, ...rest }: Readonly<IInputProps>) => JSX.Element;
|
|
3
3
|
export { TextInput };
|
|
@@ -1,125 +1,136 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import { OutlineContainer as
|
|
5
|
-
import { StyledTextInputContainer as
|
|
6
|
-
import { Icon as
|
|
1
|
+
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useCallback as w } from "react";
|
|
3
|
+
import { useTheme as P } from "styled-components";
|
|
4
|
+
import { OutlineContainer as Q } from "../../outline-container/index.js";
|
|
5
|
+
import { StyledTextInputContainer as U } from "../../styles.js";
|
|
6
|
+
import { Icon as c } from "../../../icon/index.js";
|
|
7
7
|
import { IconButton as x } from "../../../icon-button/index.js";
|
|
8
|
-
const
|
|
8
|
+
const eo = ({
|
|
9
9
|
disabled: t = !1,
|
|
10
|
-
hasIcon:
|
|
11
|
-
helpLink:
|
|
10
|
+
hasIcon: S = !1,
|
|
11
|
+
helpLink: T,
|
|
12
12
|
helpLinkText: $,
|
|
13
|
-
helpText:
|
|
14
|
-
error:
|
|
15
|
-
id:
|
|
16
|
-
indexArray:
|
|
17
|
-
isValid:
|
|
18
|
-
isTouched:
|
|
19
|
-
label:
|
|
20
|
-
name:
|
|
21
|
-
maskValue:
|
|
22
|
-
maxLength:
|
|
23
|
-
onPaste:
|
|
24
|
-
placeholder:
|
|
25
|
-
removeItemArray:
|
|
26
|
-
register:
|
|
27
|
-
suggestions:
|
|
13
|
+
helpText: z,
|
|
14
|
+
error: I,
|
|
15
|
+
id: k,
|
|
16
|
+
indexArray: d = 0,
|
|
17
|
+
isValid: R,
|
|
18
|
+
isTouched: j,
|
|
19
|
+
label: q,
|
|
20
|
+
name: e,
|
|
21
|
+
maskValue: u = !1,
|
|
22
|
+
maxLength: B,
|
|
23
|
+
onPaste: D,
|
|
24
|
+
placeholder: M,
|
|
25
|
+
removeItemArray: h,
|
|
26
|
+
register: g,
|
|
27
|
+
suggestions: l,
|
|
28
28
|
tooltip: N,
|
|
29
29
|
type: _ = "text",
|
|
30
|
-
|
|
30
|
+
warning: E,
|
|
31
|
+
weight: F,
|
|
31
32
|
...f
|
|
32
33
|
}) => {
|
|
33
|
-
const { required:
|
|
34
|
-
|
|
34
|
+
const { required: s, onBlur: K, onChange: O } = f, n = P(), a = t ? void 0 : I, r = t || a ? void 0 : E, [V, b] = y(""), [p, G] = y(!1), H = u ? p ? "text" : "password" : _, J = w(() => {
|
|
35
|
+
G((o) => !o);
|
|
35
36
|
}, []), v = (o) => {
|
|
36
|
-
|
|
37
|
-
},
|
|
37
|
+
b(o.target.value), O?.(o);
|
|
38
|
+
}, C = R && j && !t && r === void 0 && V.trim() !== "", L = w(
|
|
38
39
|
(o) => {
|
|
39
40
|
o.key === "Enter" && o.preventDefault();
|
|
40
41
|
},
|
|
41
42
|
[]
|
|
42
43
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
|
|
44
|
+
return /* @__PURE__ */ m(
|
|
45
|
+
Q,
|
|
45
46
|
{
|
|
46
47
|
error: a,
|
|
47
|
-
helpLink:
|
|
48
|
+
helpLink: T,
|
|
48
49
|
helpLinkText: $,
|
|
49
|
-
helpText:
|
|
50
|
-
htmlFor:
|
|
51
|
-
label:
|
|
52
|
-
required:
|
|
50
|
+
helpText: z,
|
|
51
|
+
htmlFor: e,
|
|
52
|
+
label: q,
|
|
53
|
+
required: s,
|
|
53
54
|
tooltip: N,
|
|
54
|
-
|
|
55
|
+
warning: r,
|
|
56
|
+
weight: F,
|
|
55
57
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
+
/* @__PURE__ */ m(
|
|
59
|
+
U,
|
|
58
60
|
{
|
|
59
61
|
className: `
|
|
60
|
-
${t ? "disabled" : ""} ${a ? "error" : ""} ${
|
|
62
|
+
${t ? "disabled" : ""} ${a ? "error" : ""} ${r ? "warning" : ""} ${C ? "success" : ""}
|
|
61
63
|
`,
|
|
62
64
|
children: [
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
S ? /* @__PURE__ */ i(c, { icon: "user", iconSize: "xl", iconType: "fa-light" }) : void 0,
|
|
66
|
+
/* @__PURE__ */ i(
|
|
65
67
|
"input",
|
|
66
68
|
{
|
|
67
69
|
"aria-hidden": !1,
|
|
68
70
|
"aria-invalid": a ? "true" : "false",
|
|
69
|
-
"aria-label":
|
|
70
|
-
"aria-required":
|
|
71
|
+
"aria-label": e,
|
|
72
|
+
"aria-required": s,
|
|
71
73
|
autoComplete: "off",
|
|
72
|
-
"data-testid": `${
|
|
74
|
+
"data-testid": `${e}-input`,
|
|
73
75
|
disabled: t,
|
|
74
|
-
id:
|
|
75
|
-
list:
|
|
76
|
-
maxLength:
|
|
77
|
-
onKeyDown:
|
|
78
|
-
onPaste:
|
|
79
|
-
placeholder:
|
|
80
|
-
type:
|
|
81
|
-
...
|
|
76
|
+
id: e,
|
|
77
|
+
list: l ? `list_${e}` : void 0,
|
|
78
|
+
maxLength: B,
|
|
79
|
+
onKeyDown: L,
|
|
80
|
+
onPaste: D,
|
|
81
|
+
placeholder: M,
|
|
82
|
+
type: H,
|
|
83
|
+
...g ? g(e, { required: s, onBlur: K, onChange: v }) : { ...f, onChange: v }
|
|
82
84
|
}
|
|
83
85
|
),
|
|
84
|
-
a ? /* @__PURE__ */
|
|
85
|
-
|
|
86
|
+
a ? /* @__PURE__ */ i(
|
|
87
|
+
c,
|
|
86
88
|
{
|
|
87
89
|
icon: "exclamation-circle",
|
|
88
90
|
iconClass: "error-icon",
|
|
89
|
-
iconColor:
|
|
91
|
+
iconColor: n.palette.error[500],
|
|
90
92
|
iconSize: "lg"
|
|
91
93
|
}
|
|
92
94
|
) : void 0,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
r ? /* @__PURE__ */ i(
|
|
96
|
+
c,
|
|
97
|
+
{
|
|
98
|
+
icon: "triangle-exclamation",
|
|
99
|
+
iconClass: "warning-icon",
|
|
100
|
+
iconColor: n.palette.warning[500],
|
|
101
|
+
iconSize: "lg"
|
|
102
|
+
}
|
|
103
|
+
) : void 0,
|
|
104
|
+
C ? /* @__PURE__ */ i(
|
|
105
|
+
c,
|
|
95
106
|
{
|
|
96
107
|
icon: "check-circle",
|
|
97
108
|
iconClass: "success-icon",
|
|
98
|
-
iconColor:
|
|
109
|
+
iconColor: n.palette.success[500],
|
|
99
110
|
iconSize: "lg"
|
|
100
111
|
}
|
|
101
112
|
) : void 0,
|
|
102
|
-
|
|
113
|
+
k === "array" && d > 0 ? /* @__PURE__ */ i(
|
|
103
114
|
x,
|
|
104
115
|
{
|
|
105
|
-
color:
|
|
116
|
+
color: n.palette.gray[400],
|
|
106
117
|
icon: "trash",
|
|
107
118
|
iconSize: "sm",
|
|
108
119
|
iconType: "fa-light",
|
|
109
|
-
onClick:
|
|
120
|
+
onClick: h ? h(d) : void 0,
|
|
110
121
|
variant: "ghost"
|
|
111
122
|
}
|
|
112
123
|
) : void 0,
|
|
113
|
-
|
|
124
|
+
u ? /* @__PURE__ */ i(
|
|
114
125
|
x,
|
|
115
126
|
{
|
|
116
|
-
"aria-label":
|
|
127
|
+
"aria-label": p ? "hide password" : "show password",
|
|
117
128
|
className: "toggle-divider",
|
|
118
|
-
icon:
|
|
119
|
-
iconColor:
|
|
129
|
+
icon: p ? "eye-slash" : "eye",
|
|
130
|
+
iconColor: n.palette.gray[800],
|
|
120
131
|
iconSize: "lg",
|
|
121
132
|
iconType: "fa-light",
|
|
122
|
-
onClick:
|
|
133
|
+
onClick: J,
|
|
123
134
|
py: 0,
|
|
124
135
|
variant: "ghost"
|
|
125
136
|
}
|
|
@@ -127,11 +138,11 @@ const oo = ({
|
|
|
127
138
|
]
|
|
128
139
|
}
|
|
129
140
|
),
|
|
130
|
-
|
|
141
|
+
l ? /* @__PURE__ */ i("datalist", { id: `list_${e}`, children: l.map((o) => /* @__PURE__ */ i("option", { value: o }, o)) }) : void 0
|
|
131
142
|
]
|
|
132
143
|
}
|
|
133
144
|
);
|
|
134
145
|
};
|
|
135
146
|
export {
|
|
136
|
-
|
|
147
|
+
eo as TextInput
|
|
137
148
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutableRefObject, PropsWithChildren } from 'react';
|
|
2
2
|
import { IOutlineContainerProps } from '../types';
|
|
3
|
-
declare const OutlineContainer: ({ children, containerRef, disabled, id, error, helpLink, helpLinkText, helpText, htmlFor, label, linkPosition, maxLength, required, tooltip, value, weight, }: Readonly<PropsWithChildren<IOutlineContainerProps & {
|
|
3
|
+
declare const OutlineContainer: ({ children, containerRef, disabled, id, error, helpLink, helpLinkText, helpText, htmlFor, label, linkPosition, maxLength, required, tooltip, value, warning, weight, }: Readonly<PropsWithChildren<IOutlineContainerProps & {
|
|
4
4
|
containerRef?: MutableRefObject<HTMLDivElement | null>;
|
|
5
5
|
}>>) => JSX.Element;
|
|
6
6
|
export { OutlineContainer };
|
|
@@ -1,109 +1,121 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { Label as
|
|
4
|
-
import { StyledOutlineContainer as
|
|
5
|
-
import { Container as
|
|
6
|
-
import { Icon as
|
|
1
|
+
import { jsxs as n, jsx as i, Fragment as j } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme as k } from "styled-components";
|
|
3
|
+
import { Label as x } from "../label/index.js";
|
|
4
|
+
import { StyledOutlineContainer as I } from "../styles.js";
|
|
5
|
+
import { Container as f } from "../../container/index.js";
|
|
6
|
+
import { Icon as N } from "../../icon/index.js";
|
|
7
7
|
import { Link as O } from "../../link/index.js";
|
|
8
8
|
import { Tag as S } from "../../tag/index.js";
|
|
9
9
|
import "../../typography/heading/index.js";
|
|
10
10
|
import "../../typography/span/index.js";
|
|
11
|
-
import { Text as
|
|
12
|
-
const
|
|
13
|
-
children:
|
|
14
|
-
containerRef:
|
|
15
|
-
disabled:
|
|
16
|
-
id:
|
|
11
|
+
import { Text as l } from "../../typography/text/index.js";
|
|
12
|
+
const L = ({
|
|
13
|
+
children: g,
|
|
14
|
+
containerRef: v,
|
|
15
|
+
disabled: y,
|
|
16
|
+
id: w,
|
|
17
17
|
error: o,
|
|
18
|
-
helpLink:
|
|
18
|
+
helpLink: e,
|
|
19
19
|
helpLinkText: h = "Link here",
|
|
20
|
-
helpText:
|
|
21
|
-
htmlFor:
|
|
22
|
-
label:
|
|
23
|
-
linkPosition:
|
|
24
|
-
maxLength:
|
|
20
|
+
helpText: a,
|
|
21
|
+
htmlFor: d,
|
|
22
|
+
label: m,
|
|
23
|
+
linkPosition: s = "down",
|
|
24
|
+
maxLength: c,
|
|
25
25
|
required: u,
|
|
26
|
-
tooltip:
|
|
27
|
-
value:
|
|
28
|
-
|
|
26
|
+
tooltip: b,
|
|
27
|
+
value: p,
|
|
28
|
+
warning: z,
|
|
29
|
+
weight: C
|
|
29
30
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const r = k(), $ = p ? p.length : 0, t = o ? void 0 : z;
|
|
32
|
+
return /* @__PURE__ */ n(I, { id: w, ref: v, children: [
|
|
33
|
+
m === void 0 ? void 0 : /* @__PURE__ */ i(
|
|
34
|
+
x,
|
|
34
35
|
{
|
|
35
|
-
htmlFor:
|
|
36
|
-
label:
|
|
37
|
-
link:
|
|
36
|
+
htmlFor: d,
|
|
37
|
+
label: m,
|
|
38
|
+
link: s === "up" ? e : void 0,
|
|
38
39
|
required: u,
|
|
39
|
-
tooltip:
|
|
40
|
-
weight:
|
|
40
|
+
tooltip: b,
|
|
41
|
+
weight: C
|
|
41
42
|
}
|
|
42
43
|
),
|
|
43
|
-
|
|
44
|
-
o ||
|
|
45
|
-
|
|
44
|
+
g,
|
|
45
|
+
o || t || c ? /* @__PURE__ */ n(
|
|
46
|
+
f,
|
|
46
47
|
{
|
|
47
48
|
display: "flex",
|
|
48
|
-
justify: o === void 0 ? "end" : "space-between",
|
|
49
|
+
justify: o === void 0 && t === void 0 ? "end" : "space-between",
|
|
49
50
|
width: "100%",
|
|
50
51
|
children: [
|
|
51
52
|
o && /* @__PURE__ */ i(
|
|
52
|
-
|
|
53
|
+
l,
|
|
53
54
|
{
|
|
54
55
|
className: "error-msg",
|
|
55
|
-
color:
|
|
56
|
-
"data-testid": `${
|
|
56
|
+
color: r.palette.error[500],
|
|
57
|
+
"data-testid": `${d}-error`,
|
|
57
58
|
display: "block",
|
|
58
59
|
size: "md",
|
|
59
60
|
children: o
|
|
60
61
|
}
|
|
61
62
|
),
|
|
62
|
-
|
|
63
|
+
t && /* @__PURE__ */ i(
|
|
64
|
+
l,
|
|
65
|
+
{
|
|
66
|
+
className: "warning-msg",
|
|
67
|
+
color: r.palette.warning[700],
|
|
68
|
+
"data-testid": `${d}-warning`,
|
|
69
|
+
display: "block",
|
|
70
|
+
size: "md",
|
|
71
|
+
children: t
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
c && /* @__PURE__ */ i(
|
|
63
75
|
S,
|
|
64
76
|
{
|
|
65
77
|
priority: "low",
|
|
66
|
-
tagLabel: `${
|
|
67
|
-
variant:
|
|
78
|
+
tagLabel: `${$}/${c}`,
|
|
79
|
+
variant: y ? "inactive" : "error"
|
|
68
80
|
}
|
|
69
81
|
)
|
|
70
82
|
]
|
|
71
83
|
}
|
|
72
84
|
) : void 0,
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
a || e ? /* @__PURE__ */ n(
|
|
86
|
+
f,
|
|
75
87
|
{
|
|
76
88
|
alignItems: "center",
|
|
77
89
|
display: "flex",
|
|
78
90
|
gap: 0.25,
|
|
79
91
|
width: "100%",
|
|
80
92
|
children: [
|
|
81
|
-
|
|
93
|
+
a && /* @__PURE__ */ n(j, { children: [
|
|
82
94
|
/* @__PURE__ */ i(
|
|
83
|
-
|
|
95
|
+
N,
|
|
84
96
|
{
|
|
85
97
|
icon: "circle-info",
|
|
86
|
-
iconColor:
|
|
98
|
+
iconColor: r.palette.gray[400],
|
|
87
99
|
iconSize: "sm",
|
|
88
100
|
iconType: "fa-light"
|
|
89
101
|
}
|
|
90
102
|
),
|
|
91
103
|
/* @__PURE__ */ i(
|
|
92
|
-
|
|
104
|
+
l,
|
|
93
105
|
{
|
|
94
|
-
color:
|
|
106
|
+
color: r.palette.gray[400],
|
|
95
107
|
display: "inline-block",
|
|
96
108
|
size: "md",
|
|
97
|
-
children:
|
|
109
|
+
children: a
|
|
98
110
|
}
|
|
99
111
|
)
|
|
100
112
|
] }),
|
|
101
|
-
|
|
113
|
+
e && s === "down" ? /* @__PURE__ */ i(O, { href: e, children: h }) : void 0
|
|
102
114
|
]
|
|
103
115
|
}
|
|
104
116
|
) : void 0
|
|
105
117
|
] });
|
|
106
118
|
};
|
|
107
119
|
export {
|
|
108
|
-
|
|
120
|
+
L as OutlineContainer
|
|
109
121
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled as o } from "styled-components";
|
|
2
|
-
const
|
|
2
|
+
const a = o.div`
|
|
3
3
|
${({ theme: t }) => `
|
|
4
4
|
align-items: flex-start;
|
|
5
5
|
display: inline-flex;
|
|
@@ -192,6 +192,14 @@ const n = o.div`
|
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
&.warning:not(.disabled) {
|
|
196
|
+
border: 1px solid ${t.palette.warning[500]};
|
|
197
|
+
|
|
198
|
+
.toggle-divider {
|
|
199
|
+
border-left-color: ${t.palette.warning[500]};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
195
203
|
&.success:not(.disabled) {
|
|
196
204
|
border: 1px solid ${t.palette.success[500]};
|
|
197
205
|
|
|
@@ -200,7 +208,7 @@ const n = o.div`
|
|
|
200
208
|
}
|
|
201
209
|
}
|
|
202
210
|
|
|
203
|
-
&:focus-within:not(:has(.toggle-divider:focus)):not(.disabled, .error) {
|
|
211
|
+
&:focus-within:not(:has(.toggle-divider:focus)):not(.disabled, .error, .warning) {
|
|
204
212
|
background: ${t.palette.white};
|
|
205
213
|
border: 1px solid ${t.palette.black};
|
|
206
214
|
box-shadow: 0 0 0 1px ${t.palette.black};
|
|
@@ -219,7 +227,7 @@ const n = o.div`
|
|
|
219
227
|
}
|
|
220
228
|
}
|
|
221
229
|
|
|
222
|
-
&:hover:not(:has(.toggle-divider:hover)):not(:focus-within, .disabled, .error, .success) {
|
|
230
|
+
&:hover:not(:has(.toggle-divider:hover)):not(:focus-within, .disabled, .error, .warning, .success) {
|
|
223
231
|
background: ${t.palette.white};
|
|
224
232
|
border: 1px solid ${t.palette.gray[600]};
|
|
225
233
|
|
|
@@ -228,18 +236,18 @@ const n = o.div`
|
|
|
228
236
|
}
|
|
229
237
|
}
|
|
230
238
|
`}
|
|
231
|
-
`,
|
|
239
|
+
`, l = o.div`
|
|
232
240
|
height: 1px;
|
|
233
241
|
background-color: ${({ theme: t }) => t.palette.gray[300]};
|
|
234
242
|
flex-shrink: 0;
|
|
235
243
|
transition: background-color 0.2s ease;
|
|
236
244
|
|
|
237
|
-
${e}:hover:not(:has(.toggle-divider:hover)):not(:focus-within, .disabled, .error, .success) & {
|
|
245
|
+
${e}:hover:not(:has(.toggle-divider:hover)):not(:focus-within, .disabled, .error, .warning, .success) & {
|
|
238
246
|
background-color: ${({ theme: t }) => t.palette.gray[600]};
|
|
239
247
|
transition: none;
|
|
240
248
|
}
|
|
241
249
|
|
|
242
|
-
${e}:focus-within:not(:has(.toggle-divider:focus)):not(.disabled, .error) & {
|
|
250
|
+
${e}:focus-within:not(:has(.toggle-divider:focus)):not(.disabled, .error, .warning) & {
|
|
243
251
|
border: 1px solid ${({ theme: t }) => t.palette.black};
|
|
244
252
|
}
|
|
245
253
|
`, p = o.div`
|
|
@@ -258,7 +266,7 @@ const n = o.div`
|
|
|
258
266
|
`;
|
|
259
267
|
export {
|
|
260
268
|
p as ErrorMessage,
|
|
261
|
-
|
|
262
|
-
|
|
269
|
+
l as StyledNumberFieldSeparator,
|
|
270
|
+
a as StyledOutlineContainer,
|
|
263
271
|
e as StyledTextInputContainer
|
|
264
272
|
};
|
|
@@ -41,6 +41,7 @@ interface ILabelProps {
|
|
|
41
41
|
* @property {string} [helpLinkText] - The help link text of the input.
|
|
42
42
|
* @property {string} [helpText] - The help text of the input.
|
|
43
43
|
* @property {number} [maxLength] - The max length of the input.
|
|
44
|
+
* @property {string} [warning] - A non-blocking message shown when there is no error.
|
|
44
45
|
*/
|
|
45
46
|
interface IOutlineContainerProps extends ILabelProps {
|
|
46
47
|
disabled?: boolean;
|
|
@@ -52,6 +53,7 @@ interface IOutlineContainerProps extends ILabelProps {
|
|
|
52
53
|
helpText?: string;
|
|
53
54
|
maxLength?: number;
|
|
54
55
|
value?: string;
|
|
56
|
+
warning?: string;
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Input text component props.
|
|
@@ -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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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
|
|
2
|
-
import { useTheme as
|
|
3
|
-
import { StyledBarContainer as
|
|
4
|
-
const
|
|
5
|
-
segments:
|
|
6
|
-
backgroundColor:
|
|
7
|
-
height:
|
|
8
|
-
width:
|
|
9
|
-
margin:
|
|
10
|
-
mx:
|
|
11
|
-
my:
|
|
12
|
-
ml:
|
|
13
|
-
mr:
|
|
14
|
-
mt:
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
],
|
|
22
|
-
|
|
23
|
-
|
|
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:
|
|
26
|
-
$height:
|
|
27
|
-
$margin:
|
|
28
|
+
$backgroundColor: n ?? f,
|
|
29
|
+
$height: i,
|
|
30
|
+
$margin: s,
|
|
28
31
|
$mb: d,
|
|
29
|
-
$ml:
|
|
30
|
-
$mr:
|
|
31
|
-
$mt:
|
|
32
|
-
$mx:
|
|
33
|
-
$my:
|
|
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:
|
|
37
|
-
|
|
39
|
+
children: l.map((r, o) => /* @__PURE__ */ a(
|
|
40
|
+
w,
|
|
38
41
|
{
|
|
39
|
-
$color:
|
|
40
|
-
$showSeparator:
|
|
41
|
-
$width:
|
|
42
|
+
$color: r.color,
|
|
43
|
+
$showSeparator: o < l.length - 1,
|
|
44
|
+
$width: r.value
|
|
42
45
|
},
|
|
43
|
-
`segment-${
|
|
46
|
+
`segment-${o}`
|
|
44
47
|
))
|
|
45
48
|
}
|
|
46
49
|
);
|
|
47
50
|
};
|
|
48
51
|
export {
|
|
49
|
-
|
|
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
|
-
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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?:
|
|
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.
|
|
33
|
-
"@storybook/addon-docs": "10.
|
|
34
|
-
"@storybook/addon-links": "10.
|
|
35
|
-
"@storybook/addon-vitest": "10.
|
|
36
|
-
"@storybook/react-vite": "10.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
138
|
+
"version": "9.5.1"
|
|
139
139
|
}
|