@arthurzakharov/ui-kit 1.5.6 → 1.5.7
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/assets/box-DOatBkTY.css +1 -0
- package/dist/assets/{main-Dz2hrn4n.css → main-BrKLCio0.css} +1 -1
- package/dist/components/accordion-table/accordion-table.component.js +14 -12
- package/dist/components/bottom-bar/bottom-bar.component.js +5 -3
- package/dist/components/dialog-article/dialog-article.component.js +8 -6
- package/dist/components/sidebar/sidebar.component.js +24 -20
- package/dist/components/signature/signature.component.js +6 -5
- package/dist/components/user-panel/user-panel.component.js +18 -15
- package/dist/controls/{button → buttons/button}/button.component.d.ts +2 -2
- package/dist/controls/{button → buttons/button}/button.component.js +5 -5
- package/dist/controls/{button-card → buttons/button-card}/button-card.component.d.ts +2 -2
- package/dist/controls/{button-card → buttons/button-card}/button-card.component.js +12 -11
- package/dist/controls/{button-radio → buttons/button-radio}/button-radio.component.d.ts +1 -1
- package/dist/controls/{button-radio → buttons/button-radio}/button-radio.component.js +17 -15
- package/dist/controls/{button-text → buttons/button-text}/button-text.component.d.ts +3 -3
- package/dist/controls/{button-text → buttons/button-text}/button-text.component.js +3 -3
- package/dist/controls/buttons/index.d.ts +4 -0
- package/dist/controls/buttons/index.js +10 -0
- package/dist/controls/index.d.ts +3 -21
- package/dist/controls/index.js +48 -48
- package/dist/controls/{card-image → interactives/card-image}/card-image.component.d.ts +3 -3
- package/dist/controls/{card-image → interactives/card-image}/card-image.component.js +23 -21
- package/dist/controls/{card-text → interactives/card-text}/card-text.component.d.ts +3 -3
- package/dist/controls/interactives/card-text/card-text.component.js +77 -0
- package/dist/controls/{checkbox → interactives/checkbox}/checkbox.component.d.ts +3 -3
- package/dist/controls/{checkbox → interactives/checkbox}/checkbox.component.js +19 -17
- package/dist/controls/{dropdown → interactives/dropdown}/dropdown.component.d.ts +2 -2
- package/dist/controls/{dropdown → interactives/dropdown}/dropdown.component.js +9 -9
- package/dist/controls/interactives/index.d.ts +8 -0
- package/dist/controls/interactives/index.js +18 -0
- package/dist/controls/{input → interactives/input}/input.component.d.ts +2 -2
- package/dist/controls/{input → interactives/input}/input.component.js +3 -3
- package/dist/controls/{radio → interactives/radio}/radio.component.d.ts +3 -4
- package/dist/controls/{radio → interactives/radio}/radio.component.js +24 -21
- package/dist/controls/{text-area → interactives/text-area}/text-area.component.d.ts +2 -2
- package/dist/controls/interactives/text-area/text-area.component.js +65 -0
- package/dist/controls/{text-field → interactives/text-field}/text-field.component.d.ts +2 -2
- package/dist/controls/{text-field → interactives/text-field}/text-field.component.js +29 -27
- package/dist/controls/{box → primitives/box}/box.component.d.ts +2 -2
- package/dist/controls/primitives/box/box.component.js +41 -0
- package/dist/controls/{caption → primitives/caption}/caption.component.d.ts +2 -2
- package/dist/controls/{caption → primitives/caption}/caption.component.js +3 -3
- package/dist/controls/{choice → primitives/choice}/choice.component.d.ts +2 -2
- package/dist/controls/{choice → primitives/choice}/choice.component.js +2 -2
- package/dist/controls/{error-message → primitives/error-message}/error-message.component.d.ts +1 -1
- package/dist/controls/{error-message → primitives/error-message}/error-message.component.js +3 -3
- package/dist/controls/{hidden-input → primitives/hidden-input}/hidden-input.component.d.ts +2 -2
- package/dist/controls/{hidden-input → primitives/hidden-input}/hidden-input.component.js +2 -2
- package/dist/controls/primitives/index.d.ts +8 -0
- package/dist/controls/primitives/index.js +18 -0
- package/dist/controls/{label → primitives/label}/label.component.d.ts +2 -2
- package/dist/controls/{label → primitives/label}/label.component.js +3 -3
- package/dist/controls/{radio-label → primitives/radio-label}/radio-label.component.d.ts +2 -2
- package/dist/controls/{radio-label → primitives/radio-label}/radio-label.component.js +2 -2
- package/dist/controls/{status → primitives/status}/status.component.d.ts +2 -2
- package/dist/controls/{status → primitives/status}/status.component.js +2 -2
- package/dist/controls/{hooks → utils/hooks}/use-choice/use-choice.hook.d.ts +1 -1
- package/dist/controls/{hooks → utils/hooks}/use-control-interaction/use-control-interaction.hook.d.ts +1 -1
- package/dist/controls/utils/index.d.ts +1 -0
- package/dist/controls/utils/index.js +8 -4
- package/dist/main.d.ts +20 -20
- package/dist/main.js +102 -101
- package/package.json +8 -8
- package/dist/assets/box-5bAcfszB.css +0 -1
- package/dist/controls/box/box.component.js +0 -40
- package/dist/controls/card-text/card-text.component.js +0 -75
- package/dist/controls/text-area/text-area.component.js +0 -62
- /package/dist/controls/{button → buttons/button}/index.d.ts +0 -0
- /package/dist/controls/{button → buttons/button}/index.js +0 -0
- /package/dist/controls/{button-card → buttons/button-card}/index.d.ts +0 -0
- /package/dist/controls/{button-card → buttons/button-card}/index.js +0 -0
- /package/dist/controls/{button-radio → buttons/button-radio}/index.d.ts +0 -0
- /package/dist/controls/{button-radio → buttons/button-radio}/index.js +0 -0
- /package/dist/controls/{button-text → buttons/button-text}/index.d.ts +0 -0
- /package/dist/controls/{button-text → buttons/button-text}/index.js +0 -0
- /package/dist/controls/{card-image → interactives/card-image}/index.d.ts +0 -0
- /package/dist/controls/{card-image → interactives/card-image}/index.js +0 -0
- /package/dist/controls/{card-text → interactives/card-text}/index.d.ts +0 -0
- /package/dist/controls/{card-text → interactives/card-text}/index.js +0 -0
- /package/dist/controls/{checkbox → interactives/checkbox}/index.d.ts +0 -0
- /package/dist/controls/{checkbox → interactives/checkbox}/index.js +0 -0
- /package/dist/controls/{dropdown → interactives/dropdown}/index.d.ts +0 -0
- /package/dist/controls/{dropdown → interactives/dropdown}/index.js +0 -0
- /package/dist/controls/{input → interactives/input}/index.d.ts +0 -0
- /package/dist/controls/{input → interactives/input}/index.js +0 -0
- /package/dist/controls/{input → interactives/input}/input.utils.d.ts +0 -0
- /package/dist/controls/{input → interactives/input}/input.utils.js +0 -0
- /package/dist/controls/{radio → interactives/radio}/index.d.ts +0 -0
- /package/dist/controls/{radio → interactives/radio}/index.js +0 -0
- /package/dist/controls/{text-area → interactives/text-area}/index.d.ts +0 -0
- /package/dist/controls/{text-area → interactives/text-area}/index.js +0 -0
- /package/dist/controls/{text-field → interactives/text-field}/index.d.ts +0 -0
- /package/dist/controls/{text-field → interactives/text-field}/index.js +0 -0
- /package/dist/controls/{box → primitives/box}/index.d.ts +0 -0
- /package/dist/controls/{box → primitives/box}/index.js +0 -0
- /package/dist/controls/{caption → primitives/caption}/index.d.ts +0 -0
- /package/dist/controls/{caption → primitives/caption}/index.js +0 -0
- /package/dist/controls/{choice → primitives/choice}/index.d.ts +0 -0
- /package/dist/controls/{choice → primitives/choice}/index.js +0 -0
- /package/dist/controls/{error-message → primitives/error-message}/index.d.ts +0 -0
- /package/dist/controls/{error-message → primitives/error-message}/index.js +0 -0
- /package/dist/controls/{hidden-input → primitives/hidden-input}/index.d.ts +0 -0
- /package/dist/controls/{hidden-input → primitives/hidden-input}/index.js +0 -0
- /package/dist/controls/{label → primitives/label}/index.d.ts +0 -0
- /package/dist/controls/{label → primitives/label}/index.js +0 -0
- /package/dist/controls/{radio-label → primitives/radio-label}/index.d.ts +0 -0
- /package/dist/controls/{radio-label → primitives/radio-label}/index.js +0 -0
- /package/dist/controls/{status → primitives/status}/index.d.ts +0 -0
- /package/dist/controls/{status → primitives/status}/index.js +0 -0
- /package/dist/controls/{hooks → utils/hooks}/index.d.ts +0 -0
- /package/dist/controls/{hooks → utils/hooks}/index.js +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-choice/index.d.ts +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-choice/index.js +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-choice/use-choice.hook.js +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/index.d.ts +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/index.js +0 -0
- /package/dist/controls/{hooks → utils/hooks}/use-control-interaction/use-control-interaction.hook.js +0 -0
package/dist/controls/index.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
1
|
+
import { Button as t } from "./buttons/button/button.component.js";
|
|
2
|
+
import { ButtonCard as x } from "./buttons/button-card/button-card.component.js";
|
|
3
|
+
import { ButtonRadio as m } from "./buttons/button-radio/button-radio.component.js";
|
|
4
|
+
import { ButtonText as a } from "./buttons/button-text/button-text.component.js";
|
|
5
|
+
import { CardImage as d } from "./interactives/card-image/card-image.component.js";
|
|
6
|
+
import { CardText as u } from "./interactives/card-text/card-text.component.js";
|
|
7
|
+
import { Checkbox as c } from "./interactives/checkbox/checkbox.component.js";
|
|
8
|
+
import { Dropdown as l } from "./interactives/dropdown/dropdown.component.js";
|
|
9
|
+
import { Input as I } from "./interactives/input/input.component.js";
|
|
10
|
+
import { Radio as T } from "./interactives/radio/radio.component.js";
|
|
11
|
+
import { TextArea as g } from "./interactives/text-area/text-area.component.js";
|
|
12
|
+
import { TextField as R } from "./interactives/text-field/text-field.component.js";
|
|
13
|
+
import { Box as L } from "./primitives/box/box.component.js";
|
|
14
|
+
import { Caption as A } from "./primitives/caption/caption.component.js";
|
|
15
|
+
import { Choice as E } from "./primitives/choice/choice.component.js";
|
|
16
|
+
import { ErrorMessage as M } from "./primitives/error-message/error-message.component.js";
|
|
17
|
+
import { HiddenInput as S } from "./primitives/hidden-input/hidden-input.component.js";
|
|
18
|
+
import { Label as q } from "./primitives/label/label.component.js";
|
|
19
|
+
import { RadioLabel as y } from "./primitives/radio-label/radio-label.component.js";
|
|
20
|
+
import { Status as G } from "./primitives/status/status.component.js";
|
|
21
|
+
import { clickHasNode as K, containsHtml as O, getChoiceId as P } from "./utils/functions/functions.util.js";
|
|
22
|
+
import { useChoice as U } from "./utils/hooks/use-choice/use-choice.hook.js";
|
|
23
|
+
import { useControlInteraction as W } from "./utils/hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
24
24
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
25
|
+
L as Box,
|
|
26
|
+
t as Button,
|
|
27
|
+
x as ButtonCard,
|
|
28
|
+
m as ButtonRadio,
|
|
29
|
+
a as ButtonText,
|
|
30
|
+
A as Caption,
|
|
31
|
+
d as CardImage,
|
|
32
|
+
u as CardText,
|
|
33
|
+
c as Checkbox,
|
|
34
|
+
E as Choice,
|
|
35
|
+
l as Dropdown,
|
|
36
|
+
M as ErrorMessage,
|
|
37
|
+
S as HiddenInput,
|
|
38
|
+
I as Input,
|
|
39
|
+
q as Label,
|
|
40
|
+
T as Radio,
|
|
41
|
+
y as RadioLabel,
|
|
42
|
+
G as Status,
|
|
43
|
+
g as TextArea,
|
|
44
|
+
R as TextField,
|
|
45
|
+
K as clickHasNode,
|
|
46
|
+
O as containsHtml,
|
|
47
|
+
P as getChoiceId,
|
|
48
|
+
U as useChoice,
|
|
49
|
+
W as useControlInteraction
|
|
50
50
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChoiceProps } from '
|
|
2
|
-
import { ChoiceValue, Interactive, RadioChoice } from '
|
|
3
|
-
import { Base, FontSize } from '
|
|
1
|
+
import { ChoiceProps } from '../../primitives';
|
|
2
|
+
import { ChoiceValue, Interactive, RadioChoice } from '../../utils';
|
|
3
|
+
import { Base, FontSize } from '../../../utils/types';
|
|
4
4
|
export interface CardImageProps extends Base, Interactive<ChoiceValue> {
|
|
5
5
|
sprite: string;
|
|
6
6
|
choices: RadioChoice[];
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as o, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import b from "clsx";
|
|
3
|
-
import { Box as j } from "
|
|
4
|
-
import { Caption as z } from "
|
|
5
|
-
import { Choice as $ } from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { Box as j } from "../../primitives/box/box.component.js";
|
|
4
|
+
import { Caption as z } from "../../primitives/caption/caption.component.js";
|
|
5
|
+
import { Choice as $ } from "../../primitives/choice/choice.component.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { baseProps as C } from "../../../utils/functions/functions.util.js";
|
|
8
|
+
import { HiddenInput as F } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
|
+
import { RadioLabel as H } from "../../primitives/radio-label/radio-label.component.js";
|
|
10
|
+
import "lucide-react";
|
|
11
|
+
import { getChoiceId as L } from "../../utils/functions/functions.util.js";
|
|
12
|
+
import { useChoice as P } from "../../utils/hooks/use-choice/use-choice.hook.js";
|
|
9
13
|
import "usehooks-ts";
|
|
10
|
-
import
|
|
11
|
-
import { baseProps as C } from "../../utils/functions/functions.util.js";
|
|
12
|
-
import '../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1", q = "_Content_nc2yn_13", w = "_Top_nc2yn_27", A = "_Wrap_nc2yn_32", D = "_Bottom_nc2yn_43", n = {
|
|
14
|
+
import '../../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1", q = "_Content_nc2yn_13", w = "_Top_nc2yn_27", A = "_Wrap_nc2yn_32", D = "_Bottom_nc2yn_43", n = {
|
|
13
15
|
CardImage: R,
|
|
14
16
|
Content: q,
|
|
15
17
|
Top: w,
|
|
16
18
|
Wrap: A,
|
|
17
19
|
Bottom: D
|
|
18
|
-
},
|
|
20
|
+
}, oo = ({
|
|
19
21
|
// Interactive props
|
|
20
22
|
id: a,
|
|
21
|
-
value:
|
|
23
|
+
value: e,
|
|
22
24
|
disabled: s = !1,
|
|
23
25
|
state: _ = "idle",
|
|
24
26
|
onChange: g,
|
|
@@ -32,20 +34,20 @@ import '../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1", q
|
|
|
32
34
|
// Base props
|
|
33
35
|
...i
|
|
34
36
|
}) => {
|
|
35
|
-
const { type:
|
|
37
|
+
const { type: p, onChoiceChange: x } = P(e, a, g);
|
|
36
38
|
return /* @__PURE__ */ o(
|
|
37
39
|
"div",
|
|
38
40
|
{
|
|
39
41
|
"data-testid": C(i, "data-testid", "card-image"),
|
|
40
42
|
className: b(n.CardImage, C(i, "className")),
|
|
41
43
|
children: I.map((t, B, N) => {
|
|
42
|
-
const
|
|
43
|
-
return /* @__PURE__ */ o(H, { id:
|
|
44
|
+
const m = L(a, t.value, B);
|
|
45
|
+
return /* @__PURE__ */ o(H, { id: m, value: e, state: _, choice: t, choices: N, children: ({ focused: l, hovered: T, checked: r, state: d }) => /* @__PURE__ */ o(j, { state: d, checked: r, focused: l, children: /* @__PURE__ */ c("div", { className: n.Content, children: [
|
|
44
46
|
/* @__PURE__ */ o(
|
|
45
47
|
F,
|
|
46
48
|
{
|
|
47
|
-
type:
|
|
48
|
-
id:
|
|
49
|
+
type: p,
|
|
50
|
+
id: m,
|
|
49
51
|
name: a,
|
|
50
52
|
value: t.value,
|
|
51
53
|
checked: r,
|
|
@@ -60,22 +62,22 @@ import '../../assets/card-image-LY9zvE8g.css';const R = "_CardImage_nc2yn_1", q
|
|
|
60
62
|
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
61
63
|
$,
|
|
62
64
|
{
|
|
63
|
-
type:
|
|
65
|
+
type: p,
|
|
64
66
|
size: y,
|
|
65
|
-
state:
|
|
67
|
+
state: d,
|
|
66
68
|
checked: r,
|
|
67
|
-
focused:
|
|
69
|
+
focused: l,
|
|
68
70
|
hovered: T,
|
|
69
71
|
disabled: s
|
|
70
72
|
}
|
|
71
73
|
) }),
|
|
72
74
|
/* @__PURE__ */ o(z, { text: t.label, size: h, checked: r })
|
|
73
75
|
] })
|
|
74
|
-
] }) }) },
|
|
76
|
+
] }) }) }, m);
|
|
75
77
|
})
|
|
76
78
|
}
|
|
77
79
|
);
|
|
78
80
|
};
|
|
79
81
|
export {
|
|
80
|
-
|
|
82
|
+
oo as CardImage
|
|
81
83
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChoiceProps } from '
|
|
2
|
-
import { ChoiceValue, Interactive, RadioChoice } from '
|
|
3
|
-
import { Base, FontSize } from '
|
|
1
|
+
import { ChoiceProps } from '../../primitives';
|
|
2
|
+
import { ChoiceValue, Interactive, RadioChoice } from '../../utils';
|
|
3
|
+
import { Base, FontSize } from '../../../utils/types';
|
|
4
4
|
export interface CardTextProps extends Base, Interactive<ChoiceValue> {
|
|
5
5
|
choices: RadioChoice[];
|
|
6
6
|
iconSize?: ChoiceProps['size'];
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as o, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import I from "clsx";
|
|
3
|
+
import { Box as j } from "../../primitives/box/box.component.js";
|
|
4
|
+
import { Caption as y } from "../../primitives/caption/caption.component.js";
|
|
5
|
+
import { Choice as z } from "../../primitives/choice/choice.component.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import { baseProps as d } from "../../../utils/functions/functions.util.js";
|
|
8
|
+
import { HiddenInput as B } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
|
+
import { RadioLabel as $ } from "../../primitives/radio-label/radio-label.component.js";
|
|
10
|
+
import "lucide-react";
|
|
11
|
+
import { getChoiceId as F } from "../../utils/functions/functions.util.js";
|
|
12
|
+
import { useChoice as H } from "../../utils/hooks/use-choice/use-choice.hook.js";
|
|
13
|
+
import "usehooks-ts";
|
|
14
|
+
import '../../../assets/card-text-sR2uSJyo.css';const P = "_CardText_1uv8w_1", R = "_Label_1uv8w_9", q = "_Choice_1uv8w_24", i = {
|
|
15
|
+
CardText: P,
|
|
16
|
+
Label: R,
|
|
17
|
+
Choice: q
|
|
18
|
+
}, Y = ({
|
|
19
|
+
// Interactive props
|
|
20
|
+
id: t,
|
|
21
|
+
value: m,
|
|
22
|
+
disabled: s = !1,
|
|
23
|
+
state: C = "idle",
|
|
24
|
+
onChange: x,
|
|
25
|
+
onBlur: h,
|
|
26
|
+
onFocus: u,
|
|
27
|
+
// CardText props
|
|
28
|
+
choices: f,
|
|
29
|
+
iconSize: _ = "md",
|
|
30
|
+
textSize: v = "body",
|
|
31
|
+
// Base props
|
|
32
|
+
...n
|
|
33
|
+
}) => {
|
|
34
|
+
const { type: l, onChoiceChange: b } = H(m, t, x);
|
|
35
|
+
return /* @__PURE__ */ o(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
"data-testid": d(n, "data-testid", "card-text"),
|
|
39
|
+
className: I(i.CardText, d(n, "className")),
|
|
40
|
+
children: f.map((e, L, T) => {
|
|
41
|
+
const a = F(t, e.value, L);
|
|
42
|
+
return /* @__PURE__ */ o($, { id: a, value: m, state: C, choice: e, choices: T, children: ({ focused: p, hovered: N, checked: r, state: c }) => /* @__PURE__ */ o(j, { state: c, checked: r, focused: p, children: /* @__PURE__ */ w("div", { className: i.Label, children: [
|
|
43
|
+
/* @__PURE__ */ o(
|
|
44
|
+
B,
|
|
45
|
+
{
|
|
46
|
+
type: l,
|
|
47
|
+
id: a,
|
|
48
|
+
name: t,
|
|
49
|
+
value: e.value,
|
|
50
|
+
checked: r,
|
|
51
|
+
disabled: s,
|
|
52
|
+
onChange: (A, g) => b(e.value, g),
|
|
53
|
+
onFocus: () => u?.(t),
|
|
54
|
+
onBlur: () => h?.(t)
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ o("div", { className: i.Choice, children: /* @__PURE__ */ o(
|
|
58
|
+
z,
|
|
59
|
+
{
|
|
60
|
+
type: l,
|
|
61
|
+
size: _,
|
|
62
|
+
state: c,
|
|
63
|
+
checked: r,
|
|
64
|
+
focused: p,
|
|
65
|
+
hovered: N,
|
|
66
|
+
disabled: s
|
|
67
|
+
}
|
|
68
|
+
) }),
|
|
69
|
+
/* @__PURE__ */ o(y, { text: e.label, size: v, checked: r })
|
|
70
|
+
] }) }) }, a);
|
|
71
|
+
})
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
Y as CardText
|
|
77
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { ChoiceProps } from '
|
|
3
|
-
import { Interactive } from '
|
|
4
|
-
import { Base, FontSize } from '
|
|
2
|
+
import { ChoiceProps } from '../../primitives';
|
|
3
|
+
import { Interactive } from '../../utils';
|
|
4
|
+
import { Base, FontSize } from '../../../utils/types';
|
|
5
5
|
export interface CheckboxProps extends PropsWithChildren<Base>, Interactive<boolean> {
|
|
6
6
|
iconSize?: ChoiceProps['size'];
|
|
7
7
|
textSize?: Extract<FontSize, 'body' | 'body-small'>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as M } from "react";
|
|
3
3
|
import { useHover as N } from "usehooks-ts";
|
|
4
|
-
import
|
|
5
|
-
import { FadeSlide as S } from "
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
4
|
+
import p from "clsx";
|
|
5
|
+
import { FadeSlide as S } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
6
|
+
import "../../primitives/box/box.component.js";
|
|
7
|
+
import { baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
8
|
+
import { Choice as v } from "../../primitives/choice/choice.component.js";
|
|
9
|
+
import { ErrorMessage as F } from "../../primitives/error-message/error-message.component.js";
|
|
10
|
+
import { HiddenInput as L } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
11
|
+
import "lucide-react";
|
|
12
|
+
import { useControlInteraction as $ } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
13
|
+
import { Converter as j } from "../../../utils/converter/converter.util.js";
|
|
14
|
+
import '../../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "_Label_19a0f_6", P = "_Choice_19a0f_19", D = "_Content_19a0f_25", R = "_Body_19a0f_44", T = "_BodySmall_19a0f_49", q = "_ErrorMessage_19a0f_54", o = {
|
|
13
15
|
Checkbox: H,
|
|
14
16
|
Label: I,
|
|
15
17
|
Choice: P,
|
|
@@ -17,13 +19,13 @@ import '../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "
|
|
|
17
19
|
Body: R,
|
|
18
20
|
BodySmall: T,
|
|
19
21
|
ErrorMessage: q
|
|
20
|
-
},
|
|
22
|
+
}, Z = ({
|
|
21
23
|
// Interactive props
|
|
22
24
|
id: t,
|
|
23
25
|
value: r = !1,
|
|
24
26
|
disabled: s = !1,
|
|
25
27
|
state: c = "idle",
|
|
26
|
-
onChange:
|
|
28
|
+
onChange: C,
|
|
27
29
|
onFocus: b,
|
|
28
30
|
onBlur: x,
|
|
29
31
|
// Checkbox props
|
|
@@ -38,11 +40,11 @@ import '../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "
|
|
|
38
40
|
const i = M(null), B = N(i), { focused: d, emitChange: h, handleFocus: u, handleBlur: g } = $({
|
|
39
41
|
id: t,
|
|
40
42
|
disabled: s,
|
|
41
|
-
onChange:
|
|
43
|
+
onChange: C,
|
|
42
44
|
onFocus: b,
|
|
43
45
|
onBlur: x
|
|
44
46
|
});
|
|
45
|
-
return /* @__PURE__ */ f("div", { "data-testid":
|
|
47
|
+
return /* @__PURE__ */ f("div", { "data-testid": _(m, "data-testid", "checkbox"), className: p(o.Checkbox, _(m, "className")), children: [
|
|
46
48
|
/* @__PURE__ */ f(
|
|
47
49
|
"label",
|
|
48
50
|
{
|
|
@@ -57,7 +59,7 @@ import '../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "
|
|
|
57
59
|
onBlur: g,
|
|
58
60
|
children: [
|
|
59
61
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
62
|
+
L,
|
|
61
63
|
{
|
|
62
64
|
type: "checkbox",
|
|
63
65
|
id: t,
|
|
@@ -85,7 +87,7 @@ import '../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "
|
|
|
85
87
|
/* @__PURE__ */ e(
|
|
86
88
|
"div",
|
|
87
89
|
{
|
|
88
|
-
className:
|
|
90
|
+
className: p(o.Content, {
|
|
89
91
|
[o.Body]: n === "body",
|
|
90
92
|
[o.BodySmall]: n === "body-small"
|
|
91
93
|
}),
|
|
@@ -95,9 +97,9 @@ import '../../assets/checkbox-BzL5bg8o.css';const H = "_Checkbox_19a0f_1", I = "
|
|
|
95
97
|
]
|
|
96
98
|
}
|
|
97
99
|
),
|
|
98
|
-
/* @__PURE__ */ e(S, { name: "text-message", condition: c === "error" && !!l, children: /* @__PURE__ */ e(
|
|
100
|
+
/* @__PURE__ */ e(S, { name: "text-message", condition: c === "error" && !!l, children: /* @__PURE__ */ e(F, { text: l, className: o.ErrorMessage }) })
|
|
99
101
|
] });
|
|
100
102
|
};
|
|
101
103
|
export {
|
|
102
|
-
|
|
104
|
+
Z as Checkbox
|
|
103
105
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { QuestionChoice } from '
|
|
2
|
-
import { Base } from '
|
|
1
|
+
import { QuestionChoice } from '../../utils';
|
|
2
|
+
import { Base } from '../../../utils/types';
|
|
3
3
|
export interface DropdownProps extends Base {
|
|
4
4
|
choices: QuestionChoice[];
|
|
5
5
|
value: QuestionChoice[];
|
|
@@ -3,15 +3,15 @@ import { useRef as u, useState as f, useEffect as y, useMemo as K } from "react"
|
|
|
3
3
|
import { useBoolean as M, useResizeObserver as E, useOnClickOutside as P } from "usehooks-ts";
|
|
4
4
|
import { ChevronDown as T, Search as q } from "lucide-react";
|
|
5
5
|
import k from "clsx";
|
|
6
|
-
import { Button as J } from "
|
|
7
|
-
import { Box as R } from "
|
|
8
|
-
import { Caption as x } from "
|
|
9
|
-
import { Choice as Q } from "
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import '
|
|
6
|
+
import { Button as J } from "../../buttons/button/button.component.js";
|
|
7
|
+
import { Box as R } from "../../primitives/box/box.component.js";
|
|
8
|
+
import { Caption as x } from "../../primitives/caption/caption.component.js";
|
|
9
|
+
import { Choice as Q } from "../../primitives/choice/choice.component.js";
|
|
10
|
+
import { baseProps as H } from "../../../utils/functions/functions.util.js";
|
|
11
|
+
import { Label as U } from "../../primitives/label/label.component.js";
|
|
12
|
+
import { clickHasNode as X } from "../../utils/functions/functions.util.js";
|
|
13
|
+
import { Converter as Y } from "../../../utils/converter/converter.util.js";
|
|
14
|
+
import '../../../assets/dropdown-DLhCAHEx.css';const Z = "_Dropdown_1kidn_1", ee = "_Border_1kidn_17", oe = "_Content_1kidn_28", se = "_Chevron_1kidn_39", ie = "_ChevronWrap_1kidn_53", ne = "_Box_1kidn_69", te = "_BoxVisible_1kidn_75", re = "_BoxHidden_1kidn_79", ce = "_Search_1kidn_83", le = "_SearchVisible_1kidn_89", ae = "_SearchHidden_1kidn_93", de = "_Close_1kidn_97", he = "_Input_1kidn_106", _e = "_Glass_1kidn_120", me = "_Choices_1kidn_131", Ce = "_Choice_1kidn_131", pe = "_ChoiceNoResult_1kidn_151", o = {
|
|
15
15
|
Dropdown: Z,
|
|
16
16
|
Border: ee,
|
|
17
17
|
Content: oe,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CardImage as e } from "./card-image/card-image.component.js";
|
|
2
|
+
import { CardText as x } from "./card-text/card-text.component.js";
|
|
3
|
+
import { Checkbox as m } from "./checkbox/checkbox.component.js";
|
|
4
|
+
import { Dropdown as a } from "./dropdown/dropdown.component.js";
|
|
5
|
+
import { Input as C } from "./input/input.component.js";
|
|
6
|
+
import { Radio as i } from "./radio/radio.component.js";
|
|
7
|
+
import { TextArea as I } from "./text-area/text-area.component.js";
|
|
8
|
+
import { TextField as c } from "./text-field/text-field.component.js";
|
|
9
|
+
export {
|
|
10
|
+
e as CardImage,
|
|
11
|
+
x as CardText,
|
|
12
|
+
m as Checkbox,
|
|
13
|
+
a as Dropdown,
|
|
14
|
+
C as Input,
|
|
15
|
+
i as Radio,
|
|
16
|
+
I as TextArea,
|
|
17
|
+
c as TextField
|
|
18
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Interactive } from '
|
|
2
|
-
import { Base } from '
|
|
1
|
+
import { Interactive } from '../../utils';
|
|
2
|
+
import { Base } from '../../../utils/types';
|
|
3
3
|
export interface InputProps extends Base, Interactive<string> {
|
|
4
4
|
mask?: string;
|
|
5
5
|
maxLength?: number;
|
|
@@ -2,9 +2,9 @@ import { jsx as M } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as d, useState as O, useLayoutEffect as Q, useCallback as R, useEffect as W } from "react";
|
|
3
3
|
import K from "clsx";
|
|
4
4
|
import { compareStrings as X, isDigit as Y, getFirstNotEnteredCharIndex as v, replaceCharByIndex as b, getNextChar as T, isSeparator as P, getPreviousChar as Z, applyMask as k } from "./input.utils.js";
|
|
5
|
-
import { useControlInteraction as tt } from "
|
|
6
|
-
import { baseProps as h } from "
|
|
7
|
-
import '
|
|
5
|
+
import { useControlInteraction as tt } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
6
|
+
import { baseProps as h } from "../../../utils/functions/functions.util.js";
|
|
7
|
+
import '../../../assets/input-D66hMzHc.css';const et = "_Input_gfvsr_1", nt = "_Placeholder_gfvsr_45", w = {
|
|
8
8
|
Input: et,
|
|
9
9
|
Placeholder: nt
|
|
10
10
|
}, it = ({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ChoiceProps } from '
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Base } from '../../utils/types';
|
|
1
|
+
import { ChoiceProps, CaptionProps } from '../../primitives';
|
|
2
|
+
import { Interactive, RadioChoice } from '../../utils';
|
|
3
|
+
import { Base } from '../../../utils/types';
|
|
5
4
|
export interface RadioProps extends Base, Interactive<string> {
|
|
6
5
|
orientation?: 'horizontal' | 'vertical';
|
|
7
6
|
choices: RadioChoice[];
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { FadeSlide as k } from "
|
|
4
|
-
import
|
|
5
|
-
import { Caption as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
2
|
+
import p from "clsx";
|
|
3
|
+
import { FadeSlide as k } from "../../../animations/fade-slide/fade-slide.component.js";
|
|
4
|
+
import "../../primitives/box/box.component.js";
|
|
5
|
+
import { Caption as I } from "../../primitives/caption/caption.component.js";
|
|
6
|
+
import { Choice as V } from "../../primitives/choice/choice.component.js";
|
|
7
|
+
import { ErrorMessage as y } from "../../primitives/error-message/error-message.component.js";
|
|
8
|
+
import { HiddenInput as F } from "../../primitives/hidden-input/hidden-input.component.js";
|
|
9
|
+
import "react";
|
|
10
|
+
import { baseProps as _ } from "../../../utils/functions/functions.util.js";
|
|
11
|
+
import { RadioLabel as j } from "../../primitives/radio-label/radio-label.component.js";
|
|
12
|
+
import "lucide-react";
|
|
13
|
+
import { getChoiceId as B } from "../../utils/functions/functions.util.js";
|
|
14
|
+
import { useControlInteraction as $ } from "../../utils/hooks/use-control-interaction/use-control-interaction.hook.js";
|
|
15
|
+
import '../../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Content_rt0wk_6", q = "_Horizontal_rt0wk_10", A = "_Vertical_rt0wk_15", D = "_Label_rt0wk_20", G = "_ErrorMessage_rt0wk_33", o = {
|
|
13
16
|
Radio: P,
|
|
14
17
|
Content: S,
|
|
15
18
|
Horizontal: q,
|
|
16
19
|
Vertical: A,
|
|
17
20
|
Label: D,
|
|
18
21
|
ErrorMessage: G
|
|
19
|
-
},
|
|
22
|
+
}, ir = ({
|
|
20
23
|
// Interactive props
|
|
21
24
|
id: e,
|
|
22
25
|
value: f = "",
|
|
@@ -34,7 +37,7 @@ import '../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Conte
|
|
|
34
37
|
// Base props
|
|
35
38
|
...d
|
|
36
39
|
}) => {
|
|
37
|
-
const { emitChange: w, handleFocus: x, handleBlur: E } =
|
|
40
|
+
const { emitChange: w, handleFocus: x, handleBlur: E } = $({
|
|
38
41
|
id: e,
|
|
39
42
|
disabled: a,
|
|
40
43
|
onChange: u,
|
|
@@ -44,20 +47,20 @@ import '../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Conte
|
|
|
44
47
|
return /* @__PURE__ */ c(
|
|
45
48
|
"div",
|
|
46
49
|
{
|
|
47
|
-
"data-testid":
|
|
48
|
-
className:
|
|
50
|
+
"data-testid": _(d, "data-testid", "radio"),
|
|
51
|
+
className: p(o.Radio, _(d, "className")),
|
|
49
52
|
children: [
|
|
50
53
|
/* @__PURE__ */ r(
|
|
51
54
|
"div",
|
|
52
55
|
{
|
|
53
|
-
className:
|
|
56
|
+
className: p(o.Content, {
|
|
54
57
|
[o.Horizontal]: l === "horizontal",
|
|
55
58
|
[o.Vertical]: l === "vertical"
|
|
56
59
|
}),
|
|
57
60
|
children: h.map((t, M, R) => {
|
|
58
|
-
const i =
|
|
61
|
+
const i = B(e, t.value, M);
|
|
59
62
|
return /* @__PURE__ */ r(
|
|
60
|
-
|
|
63
|
+
j,
|
|
61
64
|
{
|
|
62
65
|
id: i,
|
|
63
66
|
value: f,
|
|
@@ -66,7 +69,7 @@ import '../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Conte
|
|
|
66
69
|
choices: R,
|
|
67
70
|
children: ({ focused: b, hovered: H, checked: n, state: L }) => /* @__PURE__ */ c("div", { className: o.Label, children: [
|
|
68
71
|
/* @__PURE__ */ r(
|
|
69
|
-
|
|
72
|
+
V,
|
|
70
73
|
{
|
|
71
74
|
type: "radio",
|
|
72
75
|
size: v,
|
|
@@ -91,7 +94,7 @@ import '../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Conte
|
|
|
91
94
|
onBlur: E
|
|
92
95
|
}
|
|
93
96
|
),
|
|
94
|
-
/* @__PURE__ */ r(
|
|
97
|
+
/* @__PURE__ */ r(I, { text: t.label, size: z, checked: n })
|
|
95
98
|
] })
|
|
96
99
|
},
|
|
97
100
|
i
|
|
@@ -105,5 +108,5 @@ import '../../assets/radio-VoXwCoAp.css';const P = "_Radio_rt0wk_1", S = "_Conte
|
|
|
105
108
|
);
|
|
106
109
|
};
|
|
107
110
|
export {
|
|
108
|
-
|
|
111
|
+
ir as Radio
|
|
109
112
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Interactive } from '
|
|
2
|
-
import { Base } from '
|
|
1
|
+
import { Interactive } from '../../utils';
|
|
2
|
+
import { Base } from '../../../utils/types';
|
|
3
3
|
export interface TextAreaProps extends Base, Interactive<string> {
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
rows?: number;
|