@clubmed/trident-ui 1.0.0-beta.5 → 1.0.0-beta.7
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/fonts/Actions/tui-actions.css +6 -6
- package/fonts/Actions/tui-actions.eot +0 -0
- package/fonts/Actions/tui-actions.less +6 -6
- package/fonts/Actions/tui-actions.module.less +6 -6
- package/fonts/Actions/tui-actions.scss +6 -6
- package/fonts/Actions/tui-actions.styl +6 -6
- package/fonts/Actions/tui-actions.ttf +0 -0
- package/fonts/Actions/tui-actions.woff +0 -0
- package/fonts/Actions/tui-actions.woff2 +0 -0
- package/fonts/Activities/tui-activities.css +6 -6
- package/fonts/Activities/tui-activities.eot +0 -0
- package/fonts/Activities/tui-activities.less +6 -6
- package/fonts/Activities/tui-activities.module.less +6 -6
- package/fonts/Activities/tui-activities.scss +6 -6
- package/fonts/Activities/tui-activities.styl +6 -6
- package/fonts/Activities/tui-activities.ttf +0 -0
- package/fonts/Activities/tui-activities.woff +0 -0
- package/fonts/Activities/tui-activities.woff2 +0 -0
- package/fonts/Brand/tui-brand.css +6 -6
- package/fonts/Brand/tui-brand.eot +0 -0
- package/fonts/Brand/tui-brand.less +6 -6
- package/fonts/Brand/tui-brand.module.less +6 -6
- package/fonts/Brand/tui-brand.scss +6 -6
- package/fonts/Brand/tui-brand.styl +6 -6
- package/fonts/Brand/tui-brand.ttf +0 -0
- package/fonts/Brand/tui-brand.woff +0 -0
- package/fonts/Brand/tui-brand.woff2 +0 -0
- package/fonts/Covid/tui-covid.css +6 -6
- package/fonts/Covid/tui-covid.eot +0 -0
- package/fonts/Covid/tui-covid.less +6 -6
- package/fonts/Covid/tui-covid.module.less +6 -6
- package/fonts/Covid/tui-covid.scss +6 -6
- package/fonts/Covid/tui-covid.styl +6 -6
- package/fonts/Covid/tui-covid.ttf +0 -0
- package/fonts/Covid/tui-covid.woff +0 -0
- package/fonts/Covid/tui-covid.woff2 +0 -0
- package/fonts/Food/tui-food.css +6 -6
- package/fonts/Food/tui-food.eot +0 -0
- package/fonts/Food/tui-food.less +6 -6
- package/fonts/Food/tui-food.module.less +6 -6
- package/fonts/Food/tui-food.scss +6 -6
- package/fonts/Food/tui-food.styl +6 -6
- package/fonts/Food/tui-food.ttf +0 -0
- package/fonts/Food/tui-food.woff +0 -0
- package/fonts/Food/tui-food.woff2 +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.css +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.less +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.module.less +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.scss +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.styl +6 -6
- package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
- package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
- package/fonts/Places/tui-places.css +6 -6
- package/fonts/Places/tui-places.eot +0 -0
- package/fonts/Places/tui-places.less +6 -6
- package/fonts/Places/tui-places.module.less +6 -6
- package/fonts/Places/tui-places.scss +6 -6
- package/fonts/Places/tui-places.styl +6 -6
- package/fonts/Places/tui-places.ttf +0 -0
- package/fonts/Places/tui-places.woff +0 -0
- package/fonts/Places/tui-places.woff2 +0 -0
- package/fonts/Room/tui-room.css +6 -6
- package/fonts/Room/tui-room.eot +0 -0
- package/fonts/Room/tui-room.less +6 -6
- package/fonts/Room/tui-room.module.less +6 -6
- package/fonts/Room/tui-room.scss +6 -6
- package/fonts/Room/tui-room.styl +6 -6
- package/fonts/Room/tui-room.ttf +0 -0
- package/fonts/Room/tui-room.woff +0 -0
- package/fonts/Room/tui-room.woff2 +0 -0
- package/fonts/Services/tui-services.css +6 -6
- package/fonts/Services/tui-services.eot +0 -0
- package/fonts/Services/tui-services.less +6 -6
- package/fonts/Services/tui-services.module.less +6 -6
- package/fonts/Services/tui-services.scss +6 -6
- package/fonts/Services/tui-services.styl +6 -6
- package/fonts/Services/tui-services.ttf +0 -0
- package/fonts/Services/tui-services.woff +0 -0
- package/fonts/Services/tui-services.woff2 +0 -0
- package/fonts/Socials/tui-socials.css +6 -6
- package/fonts/Socials/tui-socials.eot +0 -0
- package/fonts/Socials/tui-socials.less +6 -6
- package/fonts/Socials/tui-socials.module.less +6 -6
- package/fonts/Socials/tui-socials.scss +6 -6
- package/fonts/Socials/tui-socials.styl +6 -6
- package/fonts/Socials/tui-socials.ttf +0 -0
- package/fonts/Socials/tui-socials.woff +0 -0
- package/fonts/Socials/tui-socials.woff2 +0 -0
- package/fonts/Transports/tui-transports.css +6 -6
- package/fonts/Transports/tui-transports.eot +0 -0
- package/fonts/Transports/tui-transports.less +6 -6
- package/fonts/Transports/tui-transports.module.less +6 -6
- package/fonts/Transports/tui-transports.scss +6 -6
- package/fonts/Transports/tui-transports.styl +6 -6
- package/fonts/Transports/tui-transports.ttf +0 -0
- package/fonts/Transports/tui-transports.woff +0 -0
- package/fonts/Transports/tui-transports.woff2 +0 -0
- package/fonts/Utilities/tui-utilities.css +6 -6
- package/fonts/Utilities/tui-utilities.eot +0 -0
- package/fonts/Utilities/tui-utilities.less +6 -6
- package/fonts/Utilities/tui-utilities.module.less +6 -6
- package/fonts/Utilities/tui-utilities.scss +6 -6
- package/fonts/Utilities/tui-utilities.styl +6 -6
- package/fonts/Utilities/tui-utilities.ttf +0 -0
- package/fonts/Utilities/tui-utilities.woff +0 -0
- package/fonts/Utilities/tui-utilities.woff2 +0 -0
- package/molecules/Forms/DateField.js +46 -43
- package/molecules/Forms/FormControl.d.ts +4 -3
- package/molecules/Forms/FormControl.js +22 -21
- package/molecules/Forms/FormLabel.d.ts +4 -17
- package/molecules/Forms/FormLabel.js +24 -19
- package/molecules/Forms/NumberField.d.ts +3 -3
- package/molecules/Forms/NumberField.js +39 -36
- package/molecules/Forms/Password/Password.js +35 -32
- package/molecules/Forms/Select.d.ts +10 -0
- package/molecules/Forms/Select.js +102 -0
- package/molecules/Forms/TextField.d.ts +0 -1
- package/molecules/Forms/TextField.js +47 -47
- package/package.json +1 -1
- package/styles/globals.css +4 -0
@@ -1,55 +1,58 @@
|
|
1
1
|
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
2
2
|
import { c as m } from "../../../index-Cu0xwYjD.js";
|
3
|
-
import { useId as
|
4
|
-
import { useValue as
|
5
|
-
import { FormControl as
|
3
|
+
import { useId as M, useState as P, useEffect as S } from "react";
|
4
|
+
import { useValue as T } from "../../../hooks/useValue.js";
|
5
|
+
import { FormControl as D } from "../FormControl.js";
|
6
6
|
import { Icon as n } from "../../../atoms/Icons/Icon.js";
|
7
7
|
import "../../../atoms/Icons/contexts/IconsContext.js";
|
8
|
-
import { ValidationMessage as
|
9
|
-
function
|
10
|
-
const
|
11
|
-
id: r =
|
8
|
+
import { ValidationMessage as F } from "./ValidationMessage.js";
|
9
|
+
function K(f) {
|
10
|
+
const b = M(), {
|
11
|
+
id: r = b,
|
12
12
|
name: o = r,
|
13
|
-
label:
|
14
|
-
value:
|
13
|
+
label: x,
|
14
|
+
value: g,
|
15
15
|
disabled: d = !1,
|
16
|
+
required: c = !1,
|
16
17
|
validationStatus: e = "default",
|
17
|
-
errorMessage:
|
18
|
-
validationMessages:
|
18
|
+
errorMessage: h,
|
19
|
+
validationMessages: p = [],
|
19
20
|
withoutFieldValidation: s = !1,
|
20
|
-
className:
|
21
|
-
onChange:
|
22
|
-
dataTestId:
|
23
|
-
...
|
24
|
-
} =
|
21
|
+
className: v,
|
22
|
+
onChange: w,
|
23
|
+
dataTestId: y = "Password",
|
24
|
+
...N
|
25
|
+
} = f, { value: C, setValue: V } = T({
|
25
26
|
name: o,
|
26
|
-
initialValue:
|
27
|
-
onChange:
|
28
|
-
}), [t,
|
29
|
-
|
30
|
-
const
|
27
|
+
initialValue: g,
|
28
|
+
onChange: w
|
29
|
+
}), [t, u] = P("password");
|
30
|
+
S(() => u(t), [t]);
|
31
|
+
const k = () => u(t === "password" ? "text" : "password");
|
31
32
|
return /* @__PURE__ */ i(
|
32
|
-
|
33
|
+
D,
|
33
34
|
{
|
34
35
|
id: r,
|
35
|
-
label:
|
36
|
+
label: x,
|
36
37
|
dataName: "Password",
|
37
|
-
dataTestId:
|
38
|
+
dataTestId: y,
|
38
39
|
disabled: d,
|
40
|
+
required: c,
|
39
41
|
validationStatus: s ? "default" : e,
|
40
|
-
errorMessage:
|
42
|
+
errorMessage: h,
|
41
43
|
children: [
|
42
44
|
/* @__PURE__ */ i("div", { className: "relative", children: [
|
43
45
|
/* @__PURE__ */ a(
|
44
46
|
"input",
|
45
47
|
{
|
46
|
-
...
|
48
|
+
...N,
|
47
49
|
id: r,
|
48
50
|
name: o,
|
49
51
|
type: t,
|
50
|
-
value:
|
52
|
+
value: C,
|
51
53
|
disabled: d,
|
52
|
-
|
54
|
+
required: c,
|
55
|
+
onChange: (l) => V(l.target.value),
|
53
56
|
className: m(
|
54
57
|
"text-b3 rounded-pill w-full border ps-20 py-[11px] font-normal outline-none bg-white text-black",
|
55
58
|
{
|
@@ -58,7 +61,7 @@ function J(u) {
|
|
58
61
|
"border-red": !s && e === "error",
|
59
62
|
"border-green": !s && e === "success"
|
60
63
|
},
|
61
|
-
|
64
|
+
v
|
62
65
|
),
|
63
66
|
"aria-label": o
|
64
67
|
}
|
@@ -77,7 +80,7 @@ function J(u) {
|
|
77
80
|
{
|
78
81
|
type: "button",
|
79
82
|
className: "pointer-events-auto size-24 inline-flex",
|
80
|
-
onClick:
|
83
|
+
onClick: k,
|
81
84
|
children: /* @__PURE__ */ a(n, { name: t === "password" ? "Invisible" : "Visible", width: "24px", type: "svg" })
|
82
85
|
}
|
83
86
|
)
|
@@ -85,11 +88,11 @@ function J(u) {
|
|
85
88
|
}
|
86
89
|
)
|
87
90
|
] }),
|
88
|
-
|
91
|
+
p.length > 0 && /* @__PURE__ */ a("div", { className: "flex flex-col gap-[10px] mt-8", children: p.map(({ label: l, status: I }, j) => /* @__PURE__ */ a(F, { label: l, status: I }, j)) })
|
89
92
|
]
|
90
93
|
}
|
91
94
|
);
|
92
95
|
}
|
93
96
|
export {
|
94
|
-
|
97
|
+
K as Password
|
95
98
|
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { FormControlProps } from './FormControl.js';
|
2
|
+
import { IconicTypes } from '../../atoms/Icons';
|
3
|
+
import { SelectHTMLAttributes } from 'react';
|
4
|
+
export interface SelectProps<Value> extends FormControlProps<Value, SelectHTMLAttributes<HTMLSelectElement>> {
|
5
|
+
description?: string;
|
6
|
+
iconType?: IconicTypes;
|
7
|
+
errorMessage?: string;
|
8
|
+
dataTestId?: string;
|
9
|
+
}
|
10
|
+
export declare const Select: <Value = string>(props: SelectProps<Value>) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,102 @@
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
2
|
+
import { c as l } from "../../index-Cu0xwYjD.js";
|
3
|
+
import { useValue as D } from "../../hooks/useValue.js";
|
4
|
+
import { useInternalStatus as I } from "../../hooks/useInternalStatus.js";
|
5
|
+
import { FormControl as S } from "./FormControl.js";
|
6
|
+
import { Icon as n } from "../../atoms/Icons/Icon.js";
|
7
|
+
import "../../atoms/Icons/contexts/IconsContext.js";
|
8
|
+
import { useId as j } from "react";
|
9
|
+
const B = (p) => {
|
10
|
+
const u = j(), {
|
11
|
+
id: t = u,
|
12
|
+
name: a = t,
|
13
|
+
label: m,
|
14
|
+
value: b,
|
15
|
+
description: f,
|
16
|
+
validationStatus: o = "default",
|
17
|
+
iconType: i,
|
18
|
+
errorMessage: x,
|
19
|
+
disabled: s = !1,
|
20
|
+
required: d = !1,
|
21
|
+
className: g,
|
22
|
+
dataTestId: h = t,
|
23
|
+
onChange: v,
|
24
|
+
children: y,
|
25
|
+
...w
|
26
|
+
} = p, { value: N, setValue: k } = D({ name: a, initialValue: b, onChange: v }), e = I({
|
27
|
+
isDisabled: s,
|
28
|
+
validationStatus: o
|
29
|
+
});
|
30
|
+
return /* @__PURE__ */ r(
|
31
|
+
S,
|
32
|
+
{
|
33
|
+
id: t,
|
34
|
+
label: m,
|
35
|
+
description: f,
|
36
|
+
dataName: "TextField",
|
37
|
+
dataTestId: h,
|
38
|
+
disabled: s,
|
39
|
+
required: d,
|
40
|
+
validationStatus: o,
|
41
|
+
errorMessage: x,
|
42
|
+
children: /* @__PURE__ */ c(
|
43
|
+
"div",
|
44
|
+
{
|
45
|
+
className: l("relative rounded-pill z-0", {
|
46
|
+
"bg-white": e !== "disabled",
|
47
|
+
"bg-pearl": e === "disabled"
|
48
|
+
}),
|
49
|
+
children: [
|
50
|
+
/* @__PURE__ */ r(
|
51
|
+
"select",
|
52
|
+
{
|
53
|
+
...w,
|
54
|
+
id: t,
|
55
|
+
name: a,
|
56
|
+
disabled: s,
|
57
|
+
required: d,
|
58
|
+
value: N,
|
59
|
+
onChange: (C) => k(C.target.value),
|
60
|
+
className: l(
|
61
|
+
"text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none appearance-none bg-transparent",
|
62
|
+
{
|
63
|
+
"border-lightGrey focus:border-black active:border-black pe-[52px]": e === "default",
|
64
|
+
"pe-[84px]": e === "error" || e === "success",
|
65
|
+
"text-black": e !== "disabled",
|
66
|
+
"text-grey": e === "disabled",
|
67
|
+
"border-red": e === "error",
|
68
|
+
"border-green": e === "success"
|
69
|
+
},
|
70
|
+
g
|
71
|
+
),
|
72
|
+
"aria-label": a,
|
73
|
+
children: y
|
74
|
+
}
|
75
|
+
),
|
76
|
+
/* @__PURE__ */ r(
|
77
|
+
"div",
|
78
|
+
{
|
79
|
+
className: l(
|
80
|
+
"pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12 -z-1",
|
81
|
+
{
|
82
|
+
"text-grey": e === "disabled",
|
83
|
+
"text-red": e === "error",
|
84
|
+
"text-green": e === "success"
|
85
|
+
}
|
86
|
+
),
|
87
|
+
children: /* @__PURE__ */ c("span", { className: "ms-auto flex gap-x-8", children: [
|
88
|
+
e === "error" && /* @__PURE__ */ r(n, { name: "CrossDefault", width: "24px", type: i }),
|
89
|
+
e === "success" && /* @__PURE__ */ r(n, { name: "CheckDefault", width: "24px", type: i }),
|
90
|
+
/* @__PURE__ */ r("button", { className: "pointer-events-auto inline-flex", children: /* @__PURE__ */ r(n, { name: "ArrowDefaultDown", type: "svg", width: "24px", color: "black" }) })
|
91
|
+
] })
|
92
|
+
}
|
93
|
+
)
|
94
|
+
]
|
95
|
+
}
|
96
|
+
)
|
97
|
+
}
|
98
|
+
);
|
99
|
+
};
|
100
|
+
export {
|
101
|
+
B as Select
|
102
|
+
};
|
@@ -1,74 +1,75 @@
|
|
1
|
-
import { jsx as t, jsxs as
|
2
|
-
import { c as
|
3
|
-
import { useValue as
|
4
|
-
import { useInternalStatus as
|
5
|
-
import { FormControl as
|
6
|
-
import { Icon as
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
2
|
+
import { c as m } from "../../index-Cu0xwYjD.js";
|
3
|
+
import { useValue as T } from "../../hooks/useValue.js";
|
4
|
+
import { useInternalStatus as k } from "../../hooks/useInternalStatus.js";
|
5
|
+
import { FormControl as F } from "./FormControl.js";
|
6
|
+
import { Icon as i } from "../../atoms/Icons/Icon.js";
|
7
7
|
import "../../atoms/Icons/contexts/IconsContext.js";
|
8
|
-
import { useId as
|
9
|
-
const B = (
|
10
|
-
const
|
11
|
-
id:
|
12
|
-
name:
|
8
|
+
import { useId as j } from "react";
|
9
|
+
const B = (p) => {
|
10
|
+
const u = j(), {
|
11
|
+
id: r = u,
|
12
|
+
name: a = r,
|
13
13
|
label: x,
|
14
14
|
value: b,
|
15
15
|
description: f,
|
16
|
-
validationStatus:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
className:
|
16
|
+
validationStatus: n = "default",
|
17
|
+
icon: s,
|
18
|
+
iconType: d,
|
19
|
+
errorMessage: g,
|
20
|
+
disabled: l = !1,
|
21
|
+
required: c = !1,
|
22
|
+
className: h,
|
23
23
|
dataTestId: v = "TextField",
|
24
|
-
onChange:
|
25
|
-
...
|
26
|
-
} =
|
27
|
-
isDisabled:
|
28
|
-
validationStatus:
|
24
|
+
onChange: y,
|
25
|
+
...w
|
26
|
+
} = p, { value: N, setValue: C } = T({ name: a, initialValue: b, onChange: y }), e = k({
|
27
|
+
isDisabled: l,
|
28
|
+
validationStatus: n
|
29
29
|
});
|
30
30
|
return /* @__PURE__ */ t(
|
31
|
-
|
31
|
+
F,
|
32
32
|
{
|
33
|
-
id:
|
33
|
+
id: r,
|
34
34
|
label: x,
|
35
35
|
description: f,
|
36
36
|
dataName: "TextField",
|
37
37
|
dataTestId: v,
|
38
|
-
disabled:
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
disabled: l,
|
39
|
+
required: c,
|
40
|
+
validationStatus: n,
|
41
|
+
errorMessage: g,
|
42
|
+
children: /* @__PURE__ */ o("div", { className: "relative", children: [
|
42
43
|
/* @__PURE__ */ t(
|
43
44
|
"input",
|
44
45
|
{
|
45
|
-
...
|
46
|
-
id:
|
47
|
-
name:
|
48
|
-
disabled:
|
46
|
+
...w,
|
47
|
+
id: r,
|
48
|
+
name: a,
|
49
|
+
disabled: l,
|
50
|
+
required: c,
|
49
51
|
value: N,
|
50
|
-
onChange: (
|
51
|
-
className:
|
52
|
+
onChange: (I) => C(I.target.value),
|
53
|
+
className: m(
|
52
54
|
"text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none",
|
53
55
|
{
|
54
56
|
"border-lightGrey focus:border-black active:border-black": e === "default",
|
55
|
-
"ps-[52px]":
|
56
|
-
"pe-[52px]":
|
57
|
-
"pe-[84px]": o && (e === "error" || e === "success"),
|
57
|
+
"ps-[52px]": s,
|
58
|
+
"pe-[52px]": e === "error" || e === "success",
|
58
59
|
"bg-white text-black": e !== "disabled",
|
59
60
|
"bg-pearl text-grey": e === "disabled",
|
60
61
|
"border-red": e === "error",
|
61
62
|
"border-green": e === "success"
|
62
63
|
},
|
63
|
-
|
64
|
+
h
|
64
65
|
),
|
65
|
-
"aria-label":
|
66
|
+
"aria-label": a
|
66
67
|
}
|
67
68
|
),
|
68
|
-
/* @__PURE__ */
|
69
|
+
/* @__PURE__ */ o(
|
69
70
|
"div",
|
70
71
|
{
|
71
|
-
className:
|
72
|
+
className: m(
|
72
73
|
"pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12",
|
73
74
|
{
|
74
75
|
"text-grey": e === "disabled",
|
@@ -77,11 +78,10 @@ const B = (u) => {
|
|
77
78
|
}
|
78
79
|
),
|
79
80
|
children: [
|
80
|
-
|
81
|
-
/* @__PURE__ */
|
82
|
-
e === "error" && /* @__PURE__ */ t(
|
83
|
-
e === "success" && /* @__PURE__ */ t(
|
84
|
-
o && /* @__PURE__ */ t("button", { className: "pointer-events-auto", children: /* @__PURE__ */ t(r, { name: "ArrowDefaultDown", width: "24px", color: "black", type: n }) })
|
81
|
+
s && /* @__PURE__ */ t(i, { name: s, width: "24px" }),
|
82
|
+
/* @__PURE__ */ o("span", { className: "ms-auto flex gap-x-8", children: [
|
83
|
+
e === "error" && /* @__PURE__ */ t(i, { name: "CrossDefault", width: "24px", type: d }),
|
84
|
+
e === "success" && /* @__PURE__ */ t(i, { name: "CheckDefault", width: "24px", type: d })
|
85
85
|
] })
|
86
86
|
]
|
87
87
|
}
|
package/package.json
CHANGED