@clubmed/trident-ui 1.0.0-alpha.39 → 1.0.0-alpha.41
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +21 -0
- package/EyeClosed-vWGtzMgE.js +5 -0
- package/EyeOpened-CsQwqVMl.js +5 -0
- package/assets/icons/Utilities/EyeClosed.svg +12 -0
- package/assets/icons/Utilities/EyeOpened.svg +11 -0
- package/atoms/Icons/Iconics.d.ts +1 -1
- package/atoms/Icons/fonts/Utilities.js +6 -0
- package/atoms/Icons/svg/Utilities.js +8 -0
- package/atoms/Icons/svg-use/Utilities.js +68 -58
- 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 +38 -36
- package/fonts/Utilities/tui-utilities.eot +0 -0
- package/fonts/Utilities/tui-utilities.less +38 -36
- package/fonts/Utilities/tui-utilities.module.less +38 -36
- package/fonts/Utilities/tui-utilities.scss +70 -66
- package/fonts/Utilities/tui-utilities.styl +38 -36
- package/fonts/Utilities/tui-utilities.svg +36 -30
- package/fonts/Utilities/tui-utilities.symbol.svg +4 -0
- 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/{Checkbox.d.ts → Checkbox/Checkbox.d.ts} +1 -1
- package/molecules/Forms/Checkbox/Checkbox.js +72 -0
- package/molecules/Forms/{Checkboxes.d.ts → Checkboxes/Checkboxes.d.ts} +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js +49 -0
- package/molecules/Forms/FormControl.js +17 -17
- package/molecules/Forms/Password/Password.d.ts +14 -0
- package/molecules/Forms/Password/Password.js +72 -0
- package/molecules/Forms/Password/ValidationMessage.d.ts +6 -0
- package/molecules/Forms/Password/ValidationMessage.js +28 -0
- package/package.json +1 -1
- package/molecules/Forms/Checkbox.js +0 -71
- package/molecules/Forms/Checkboxes.js +0 -49
@@ -1,37 +1,37 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useInternalStatus as f } from "../../hooks/useInternalStatus.js";
|
3
3
|
import { FormLabel as u } from "./FormLabel.js";
|
4
4
|
import { Icon as h } from "../../atoms/Icons/Icon.js";
|
5
5
|
import "../../atoms/Icons/contexts/IconsContext.js";
|
6
6
|
import { c as b } from "../../index-Cu0xwYjD.js";
|
7
|
-
const
|
7
|
+
const v = ({
|
8
8
|
id: t,
|
9
9
|
label: r,
|
10
|
-
description:
|
10
|
+
description: s,
|
11
11
|
disabled: m,
|
12
12
|
className: n,
|
13
13
|
validationStatus: i = "default",
|
14
|
-
children:
|
14
|
+
children: l,
|
15
15
|
errorMessage: a,
|
16
|
-
dataTestId:
|
17
|
-
dataName:
|
18
|
-
layout:
|
16
|
+
dataTestId: p,
|
17
|
+
dataName: c,
|
18
|
+
layout: x
|
19
19
|
}) => {
|
20
|
-
const
|
20
|
+
const d = f({
|
21
21
|
isDisabled: !!m,
|
22
22
|
validationStatus: i
|
23
23
|
});
|
24
|
-
return /* @__PURE__ */
|
24
|
+
return /* @__PURE__ */ e(
|
25
25
|
"div",
|
26
26
|
{
|
27
|
-
className: b(
|
28
|
-
"data-name":
|
29
|
-
"data-testid":
|
27
|
+
className: b("flex flex-col gap-4", n),
|
28
|
+
"data-name": c,
|
29
|
+
"data-testid": p,
|
30
30
|
children: [
|
31
|
-
r && t && /* @__PURE__ */
|
32
|
-
|
33
|
-
|
34
|
-
/* @__PURE__ */
|
31
|
+
r && t && /* @__PURE__ */ o(u, { description: s, id: t, layout: x, children: r }),
|
32
|
+
l,
|
33
|
+
d === "error" && a && /* @__PURE__ */ e("span", { className: "text-red text-b4 flex items-start gap-x-4 px-20", children: [
|
34
|
+
/* @__PURE__ */ o(h, { name: "Error", width: "20px" }),
|
35
35
|
a
|
36
36
|
] })
|
37
37
|
]
|
@@ -39,5 +39,5 @@ const w = ({
|
|
39
39
|
);
|
40
40
|
};
|
41
41
|
export {
|
42
|
-
|
42
|
+
v as FormControl
|
43
43
|
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FormControlProps } from '../FormControl';
|
2
|
+
import { ValidationStatus } from '../../../hooks/useInternalStatus';
|
3
|
+
import { ValidationMessage } from './ValidationMessage';
|
4
|
+
export interface PasswordProps<Value> extends FormControlProps<Value> {
|
5
|
+
id?: string;
|
6
|
+
name?: string;
|
7
|
+
label?: string;
|
8
|
+
placeholder?: string;
|
9
|
+
status?: ValidationStatus;
|
10
|
+
validationMessages?: ValidationMessage[];
|
11
|
+
onChange?: (name: string, value: Value) => void;
|
12
|
+
dataTestId?: string;
|
13
|
+
}
|
14
|
+
export declare function Password<Value = string>(props: PasswordProps<Value>): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { c as y } from "../../../index-Cu0xwYjD.js";
|
3
|
+
import { useState as N, useEffect as C } from "react";
|
4
|
+
import { useValue as k } from "../../../hooks/useValue.js";
|
5
|
+
import { FormControl as V } from "../FormControl.js";
|
6
|
+
import { Icon as E } from "../../../atoms/Icons/Icon.js";
|
7
|
+
import "../../../atoms/Icons/contexts/IconsContext.js";
|
8
|
+
import { ValidationMessage as P } from "./ValidationMessage.js";
|
9
|
+
let T = 0;
|
10
|
+
function $(d) {
|
11
|
+
const {
|
12
|
+
id: s = `password-${++T}`,
|
13
|
+
name: t = s,
|
14
|
+
label: p,
|
15
|
+
value: m,
|
16
|
+
disabled: l = !1,
|
17
|
+
validationMessages: r = [],
|
18
|
+
className: c,
|
19
|
+
onChange: u,
|
20
|
+
dataTestId: b = "Password",
|
21
|
+
...f
|
22
|
+
} = d, { value: g, setValue: x } = k({
|
23
|
+
name: t,
|
24
|
+
initialValue: m,
|
25
|
+
onChange: u
|
26
|
+
}), [e, i] = N("password");
|
27
|
+
C(() => i(e), [e]);
|
28
|
+
const w = () => i(e === "password" ? "text" : "password");
|
29
|
+
return /* @__PURE__ */ n(
|
30
|
+
V,
|
31
|
+
{
|
32
|
+
id: s,
|
33
|
+
label: p,
|
34
|
+
dataName: "Password",
|
35
|
+
dataTestId: b,
|
36
|
+
disabled: l,
|
37
|
+
children: [
|
38
|
+
/* @__PURE__ */ n("div", { className: "relative", children: [
|
39
|
+
/* @__PURE__ */ a(
|
40
|
+
"input",
|
41
|
+
{
|
42
|
+
...f,
|
43
|
+
id: s,
|
44
|
+
name: t,
|
45
|
+
type: e,
|
46
|
+
value: g,
|
47
|
+
disabled: l,
|
48
|
+
onChange: (o) => x(o.target.value),
|
49
|
+
className: y(
|
50
|
+
"text-b3 rounded-pill w-full border ps-20 py-[11px] font-normal outline-none bg-white text-black pe-[52px] border-lightGrey focus:border-black active:border-black",
|
51
|
+
c
|
52
|
+
),
|
53
|
+
"aria-label": t
|
54
|
+
}
|
55
|
+
),
|
56
|
+
/* @__PURE__ */ a(
|
57
|
+
"button",
|
58
|
+
{
|
59
|
+
className: "pointer-events-auto ms-auto absolute right-20 top-12 size-24",
|
60
|
+
onClick: w,
|
61
|
+
children: /* @__PURE__ */ a(E, { name: e === "password" ? "EyeClosed" : "EyeOpened", width: "24px", type: "svg" })
|
62
|
+
}
|
63
|
+
)
|
64
|
+
] }),
|
65
|
+
r && /* @__PURE__ */ a("div", { className: "flex flex-col gap-[10px] mt-8", children: r.map(({ label: o, status: h }, v) => /* @__PURE__ */ a(P, { label: o, status: h }, v)) })
|
66
|
+
]
|
67
|
+
}
|
68
|
+
);
|
69
|
+
}
|
70
|
+
export {
|
71
|
+
$ as Password
|
72
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { ValidationStatus } from '../../../hooks/useInternalStatus';
|
2
|
+
export interface ValidationMessage {
|
3
|
+
label: string;
|
4
|
+
status: ValidationStatus;
|
5
|
+
}
|
6
|
+
export declare function ValidationMessage({ label, status }: ValidationMessage): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { c as s } from "../../../index-Cu0xwYjD.js";
|
3
|
+
import { Icon as t } from "../../../atoms/Icons/Icon.js";
|
4
|
+
import "../../../atoms/Icons/contexts/IconsContext.js";
|
5
|
+
const a = {
|
6
|
+
default: {
|
7
|
+
iconName: "Edit",
|
8
|
+
iconColor: "middleGrey"
|
9
|
+
},
|
10
|
+
error: {
|
11
|
+
iconName: "Error",
|
12
|
+
iconColor: "red"
|
13
|
+
},
|
14
|
+
success: {
|
15
|
+
iconName: "CheckDefault",
|
16
|
+
iconColor: "green"
|
17
|
+
}
|
18
|
+
};
|
19
|
+
function x({ label: r, status: c }) {
|
20
|
+
const { iconName: i, iconColor: o } = a[c];
|
21
|
+
return /* @__PURE__ */ n("div", { className: "flex gap-[6px] px-20 items-center", children: [
|
22
|
+
/* @__PURE__ */ e(t, { name: i, width: "30px", color: o }),
|
23
|
+
/* @__PURE__ */ e("span", { className: s("text-b4", `text-${o}`), children: r })
|
24
|
+
] });
|
25
|
+
}
|
26
|
+
export {
|
27
|
+
x as ValidationMessage
|
28
|
+
};
|
package/package.json
CHANGED
@@ -1,71 +0,0 @@
|
|
1
|
-
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
2
|
-
import { c as b } from "../../index-Cu0xwYjD.js";
|
3
|
-
import { Icon as y } from "../../atoms/Icons/Icon.js";
|
4
|
-
import "../../atoms/Icons/contexts/IconsContext.js";
|
5
|
-
import { useValue as N } from "../../hooks/useValue.js";
|
6
|
-
import "../../controls-l0sNRNKZ.js";
|
7
|
-
let V = 0;
|
8
|
-
function I({
|
9
|
-
id: m = "checkbox-" + V++,
|
10
|
-
name: r = m,
|
11
|
-
className: h,
|
12
|
-
dataTestId: n,
|
13
|
-
disabled: t,
|
14
|
-
checked: p = !1,
|
15
|
-
value: a,
|
16
|
-
size: e = 24,
|
17
|
-
tabIndex: u = 0,
|
18
|
-
children: x,
|
19
|
-
onChange: c,
|
20
|
-
...f
|
21
|
-
}) {
|
22
|
-
const { value: o, setValue: d } = N({
|
23
|
-
name: r,
|
24
|
-
initialValue: p,
|
25
|
-
onChange(k, i) {
|
26
|
-
c == null || c(k, i ? a !== void 0 ? a : i : null);
|
27
|
-
}
|
28
|
-
});
|
29
|
-
return /* @__PURE__ */ s(
|
30
|
-
"label",
|
31
|
-
{
|
32
|
-
className: b(h, "relative flex items-center gap-8", {
|
33
|
-
"text-grey": t
|
34
|
-
}),
|
35
|
-
children: [
|
36
|
-
/* @__PURE__ */ s("span", { className: "relative", children: [
|
37
|
-
/* @__PURE__ */ l(
|
38
|
-
"input",
|
39
|
-
{
|
40
|
-
...f,
|
41
|
-
name: r,
|
42
|
-
"data-testid": n,
|
43
|
-
type: "checkbox",
|
44
|
-
tabIndex: u,
|
45
|
-
onChange: () => {
|
46
|
-
!t && d(!o);
|
47
|
-
},
|
48
|
-
checked: o,
|
49
|
-
"data-name": "Checkbox",
|
50
|
-
disabled: t,
|
51
|
-
value: a
|
52
|
-
}
|
53
|
-
),
|
54
|
-
/* @__PURE__ */ l("span", { style: { height: e, width: e }, children: /* @__PURE__ */ l(
|
55
|
-
y,
|
56
|
-
{
|
57
|
-
style: { height: e, width: e },
|
58
|
-
name: "CheckDefault",
|
59
|
-
color: "black",
|
60
|
-
className: "absolute"
|
61
|
-
}
|
62
|
-
) })
|
63
|
-
] }),
|
64
|
-
x
|
65
|
-
]
|
66
|
-
}
|
67
|
-
);
|
68
|
-
}
|
69
|
-
export {
|
70
|
-
I as Checkbox
|
71
|
-
};
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { jsx as k } from "react/jsx-runtime";
|
2
|
-
import { Children as v, isValidElement as C, cloneElement as N } from "react";
|
3
|
-
import { useValue as E } from "../../hooks/useValue.js";
|
4
|
-
import { c as m } from "../../index-Cu0xwYjD.js";
|
5
|
-
let $ = 0;
|
6
|
-
function q({
|
7
|
-
id: s = "checkboxes-" + $++,
|
8
|
-
name: t = s,
|
9
|
-
children: u,
|
10
|
-
value: c,
|
11
|
-
defaultValue: p,
|
12
|
-
onChange: i,
|
13
|
-
disabled: f,
|
14
|
-
readOnly: b,
|
15
|
-
tabIndex: x = 0,
|
16
|
-
...a
|
17
|
-
}) {
|
18
|
-
const { value: o, setValue: l } = E({
|
19
|
-
name: t,
|
20
|
-
initialValue: c,
|
21
|
-
formatter(e) {
|
22
|
-
return e !== void 0 ? [].concat(e) : e;
|
23
|
-
},
|
24
|
-
defaultValue: p || [],
|
25
|
-
onChange: i
|
26
|
-
});
|
27
|
-
return /* @__PURE__ */ k("div", { ...a, className: m(a.className, ""), role: "listbox", children: v.map(u, (e, n) => {
|
28
|
-
if (C(e)) {
|
29
|
-
const r = e.props.value;
|
30
|
-
return N(e, {
|
31
|
-
...e.props,
|
32
|
-
name: t,
|
33
|
-
id: `${s}-${n}`,
|
34
|
-
disabled: f,
|
35
|
-
readOnly: b,
|
36
|
-
tabIndex: x + n + 1,
|
37
|
-
className: m("mb-12 last:mb-0", e.props),
|
38
|
-
checked: o.includes(r),
|
39
|
-
onChange(g, V) {
|
40
|
-
l(V === null ? o.filter((d) => d !== r) : o.concat(r));
|
41
|
-
}
|
42
|
-
});
|
43
|
-
}
|
44
|
-
return e;
|
45
|
-
}) });
|
46
|
-
}
|
47
|
-
export {
|
48
|
-
q as Checkboxes
|
49
|
-
};
|