@clubmed/trident-ui 1.0.0-beta.2 → 1.0.0-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +155 -0
- package/atoms/Icons/Iconics.d.ts +1 -1
- package/atoms/Icons/fonts/Utilities.js +0 -6
- package/atoms/Icons/svg/SvgIcon.js +12 -12
- package/atoms/Icons/svg/Utilities.js +0 -8
- package/atoms/Icons/svg-use/SvgUseIcon.js +12 -12
- package/atoms/Icons/svg-use/Utilities.js +58 -68
- 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 +36 -38
- package/fonts/Utilities/tui-utilities.eot +0 -0
- package/fonts/Utilities/tui-utilities.less +36 -38
- package/fonts/Utilities/tui-utilities.module.less +36 -38
- package/fonts/Utilities/tui-utilities.scss +66 -70
- package/fonts/Utilities/tui-utilities.styl +36 -38
- package/fonts/Utilities/tui-utilities.svg +30 -36
- package/fonts/Utilities/tui-utilities.symbol.svg +0 -4
- 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/hooks/useKeyboardControls.d.ts +1 -1
- package/hooks/useKeyboardControls.js +31 -27
- package/molecules/Backdrop.js +13 -12
- package/molecules/Breadcrumb.d.ts +9 -5
- package/molecules/Breadcrumb.js +20 -15
- package/molecules/Buttons/ButtonAnchor.d.ts +2 -1
- package/molecules/Buttons/ButtonAnchor.js +17 -16
- package/molecules/Forms/Checkboxes/Checkbox.d.ts +3 -12
- package/molecules/Forms/Checkboxes/Checkbox.js +90 -60
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js +33 -34
- package/molecules/Forms/DateField.d.ts +1 -17
- package/molecules/Forms/DateField.js +99 -97
- package/molecules/Forms/Filter.d.ts +1 -1
- package/molecules/Forms/Filter.js +38 -38
- package/molecules/Forms/FormControl.d.ts +3 -2
- package/molecules/Forms/FormControl.js +30 -23
- package/molecules/Forms/FormLabel.d.ts +4 -17
- package/molecules/Forms/FormLabel.js +24 -19
- package/molecules/Forms/NumberField.d.ts +4 -4
- package/molecules/Forms/NumberField.js +75 -72
- package/molecules/Forms/Password/Password.d.ts +1 -0
- package/molecules/Forms/Password/Password.js +77 -52
- package/molecules/Forms/Password/ValidationMessage.js +1 -1
- package/molecules/Forms/Radios/Radio.d.ts +1 -1
- package/molecules/Forms/Radios/Radio.js +31 -31
- package/molecules/Forms/Radios/RadioGroup.d.ts +1 -1
- package/molecules/Forms/Radios/RadioGroup.js +28 -29
- package/molecules/Forms/Range.d.ts +2 -2
- package/molecules/Forms/Range.js +181 -183
- package/molecules/Forms/Select.d.ts +10 -0
- package/molecules/Forms/Select.js +102 -0
- package/molecules/Forms/Switch.d.ts +1 -1
- package/molecules/Forms/Switch.js +28 -28
- package/molecules/Forms/TextField.d.ts +0 -4
- package/molecules/Forms/TextField.js +52 -52
- package/molecules/Link.d.ts +5 -1
- package/molecules/Link.js +17 -16
- package/molecules/Popin.d.ts +12 -4
- package/molecules/Popin.js +38 -34
- package/molecules/Tabs/TabsHeading.js +73 -74
- package/molecules/Tabs/context/TabControl.js +21 -21
- package/package.json +1 -1
- package/styles/globals.css +8 -0
- package/EyeClosed-vWGtzMgE.js +0 -5
- package/EyeOpened-CsQwqVMl.js +0 -5
- package/assets/icons/Utilities/EyeClosed.svg +0 -12
- package/assets/icons/Utilities/EyeOpened.svg +0 -11
package/molecules/Breadcrumb.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { jsx as e, jsxs as
|
2
|
-
import { c as
|
3
|
-
import { Icon as
|
1
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
2
|
+
import { c as w } from "../index-Cu0xwYjD.js";
|
3
|
+
import { Icon as B } from "../atoms/Icons/Icon.js";
|
4
4
|
import "../atoms/Icons/contexts/IconsContext.js";
|
5
|
-
const
|
5
|
+
const E = {
|
6
6
|
light: {
|
7
7
|
thStart: "text-middleGrey",
|
8
8
|
thEnd: "text-black font-bold"
|
@@ -11,21 +11,26 @@ const k = {
|
|
11
11
|
thStart: "text-white",
|
12
12
|
thEnd: "text-white font-bold"
|
13
13
|
}
|
14
|
-
},
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
}, L = ({
|
15
|
+
className: o,
|
16
|
+
items: n,
|
17
|
+
theme: l = "light",
|
18
|
+
component: i = "a"
|
19
|
+
}) => {
|
20
|
+
const [m, h, , ...r] = n, d = r.length ? r[r.length - 1] : n[n.length - 1], x = { label: "...", href: "" }, s = r.length ? [m, h, x, d] : n, { thStart: p, thEnd: f } = E[l], g = i;
|
21
|
+
return /* @__PURE__ */ e("nav", { "data-name": "Breadcrumb", "aria-label": "Breadcrumb", className: o, children: /* @__PURE__ */ e("ul", { className: "flex items-center", children: s.map(({ label: a, href: c }, b) => {
|
22
|
+
const t = b === s.length - 1, u = c && !t;
|
23
|
+
return /* @__PURE__ */ k(
|
19
24
|
"li",
|
20
25
|
{
|
21
|
-
className:
|
22
|
-
[
|
23
|
-
[
|
26
|
+
className: w("text-b4 flex items-center", {
|
27
|
+
[p]: !t,
|
28
|
+
[f]: t
|
24
29
|
}),
|
25
30
|
...t && { "aria-current": "page" },
|
26
31
|
children: [
|
27
|
-
/* @__PURE__ */ e("span", { children:
|
28
|
-
!t && /* @__PURE__ */ e(
|
32
|
+
/* @__PURE__ */ e("span", { children: u ? /* @__PURE__ */ e(g, { href: c, children: a }) : a }),
|
33
|
+
!t && /* @__PURE__ */ e(B, { name: "Diamond", width: "14px", className: "mx-4" })
|
29
34
|
]
|
30
35
|
},
|
31
36
|
a
|
@@ -33,5 +38,5 @@ const k = {
|
|
33
38
|
}) }) });
|
34
39
|
};
|
35
40
|
export {
|
36
|
-
|
41
|
+
L as Breadcrumb
|
37
42
|
};
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import type { AnchorHTMLAttributes, FunctionComponent } from 'react';
|
1
|
+
import type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
|
2
2
|
import './button.css';
|
3
3
|
import { type CommonButtonProps } from './Button';
|
4
4
|
interface ButtonAnchorProps extends CommonButtonProps, AnchorHTMLAttributes<HTMLAnchorElement> {
|
5
|
+
component?: FunctionComponent<PropsWithChildren<any>> | string;
|
5
6
|
}
|
6
7
|
export declare const ButtonAnchor: FunctionComponent<ButtonAnchorProps>;
|
7
8
|
export {};
|
@@ -1,37 +1,38 @@
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
2
|
-
import { c as
|
2
|
+
import { c as C } from "../../index-Cu0xwYjD.js";
|
3
3
|
import "../../button-l0sNRNKZ.js";
|
4
4
|
import { variants as y, rootClassName as B } from "./Button.helpers.js";
|
5
5
|
import { themes as w } from "./Button.themes.js";
|
6
6
|
import { ButtonContent as A } from "./ButtonContent.js";
|
7
|
-
const
|
8
|
-
theme:
|
7
|
+
const z = ({
|
8
|
+
theme: m = "yellow",
|
9
|
+
component: r = "a",
|
9
10
|
backgroundOverride: e,
|
10
11
|
variant: t = "text",
|
11
|
-
className:
|
12
|
+
className: n,
|
12
13
|
label: o,
|
13
|
-
children:
|
14
|
-
title:
|
15
|
-
icon:
|
14
|
+
children: a,
|
15
|
+
title: c,
|
16
|
+
icon: p,
|
16
17
|
dataTestId: i,
|
17
18
|
href: l,
|
18
|
-
groupName:
|
19
|
-
...
|
19
|
+
groupName: f = "",
|
20
|
+
...h
|
20
21
|
}) => {
|
21
|
-
const
|
22
|
+
const u = t === "text", d = y[t], x = w(m, e, f);
|
22
23
|
return /* @__PURE__ */ s(
|
23
|
-
|
24
|
+
r,
|
24
25
|
{
|
25
26
|
"data-name": "ButtonAnchor",
|
26
27
|
"data-testid": i,
|
27
|
-
className:
|
28
|
-
title:
|
28
|
+
className: C(B, x, d, t, n),
|
29
|
+
title: c || o,
|
29
30
|
href: l,
|
30
|
-
...
|
31
|
-
children: /* @__PURE__ */ s(A, { showLabel:
|
31
|
+
...h,
|
32
|
+
children: /* @__PURE__ */ s(A, { showLabel: u, label: o, icon: p, children: a })
|
32
33
|
}
|
33
34
|
);
|
34
35
|
};
|
35
36
|
export {
|
36
|
-
|
37
|
+
z as ButtonAnchor
|
37
38
|
};
|
@@ -1,15 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export interface CheckboxProps<Value = string> extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
4
|
-
/**
|
5
|
-
* The data-testid to apply to the button.
|
6
|
-
* This is used for testing purposes.
|
7
|
-
* */
|
8
|
-
dataTestId?: string;
|
9
|
-
/**
|
10
|
-
* The width of the checkbox.
|
11
|
-
* */
|
1
|
+
import { FormControlProps } from '../FormControl';
|
2
|
+
export interface CheckboxProps<Value = string> extends FormControlProps<Value> {
|
12
3
|
size?: number;
|
13
4
|
onChange?: (name: string, value: Value | null) => void;
|
14
5
|
}
|
15
|
-
export declare function Checkbox<Value = string>(
|
6
|
+
export declare function Checkbox<Value = string>(props: CheckboxProps<Value>): import("react/jsx-runtime").JSX.Element;
|
@@ -1,72 +1,102 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c
|
3
|
-
import {
|
1
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { c } from "../../../index-Cu0xwYjD.js";
|
3
|
+
import { useId as D } from "react";
|
4
|
+
import { Icon as u } from "../../../atoms/Icons/Icon.js";
|
4
5
|
import "../../../atoms/Icons/contexts/IconsContext.js";
|
5
|
-
import { useValue as
|
6
|
+
import { useValue as S } from "../../../hooks/useValue.js";
|
6
7
|
import "../../../controls-l0sNRNKZ.js";
|
7
|
-
|
8
|
-
function
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
8
|
+
import { useInternalStatus as V } from "../../../hooks/useInternalStatus.js";
|
9
|
+
function B(x) {
|
10
|
+
const f = D(), {
|
11
|
+
id: s = f,
|
12
|
+
name: n = s,
|
13
|
+
className: b,
|
14
|
+
dataTestId: k,
|
15
|
+
disabled: r = !1,
|
16
|
+
checked: v = !1,
|
17
|
+
value: l,
|
18
|
+
size: i = 24,
|
19
|
+
tabIndex: N = 0,
|
20
|
+
validationStatus: g = "default",
|
21
|
+
errorMessage: d,
|
22
|
+
children: y,
|
23
|
+
onChange: o,
|
24
|
+
...I
|
25
|
+
} = x, { value: m, setValue: C } = S({
|
26
|
+
name: n,
|
27
|
+
initialValue: v,
|
28
|
+
onChange(w, h) {
|
29
|
+
o == null || o(w, h ? l !== void 0 ? l : h : null);
|
27
30
|
}
|
28
|
-
})
|
29
|
-
|
30
|
-
|
31
|
+
}), e = V({
|
32
|
+
isDisabled: r,
|
33
|
+
validationStatus: g
|
34
|
+
}), p = e === "error" && d;
|
35
|
+
return /* @__PURE__ */ t(
|
36
|
+
"div",
|
31
37
|
{
|
32
|
-
className: b
|
33
|
-
"
|
38
|
+
className: c(b, "flex flex-col space-y-2", {
|
39
|
+
"mb-24": !p
|
34
40
|
}),
|
41
|
+
"data-testid": `checkbox-container-${s}`,
|
35
42
|
children: [
|
36
|
-
/* @__PURE__ */
|
37
|
-
|
38
|
-
|
39
|
-
{
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
43
|
+
/* @__PURE__ */ t(
|
44
|
+
"label",
|
45
|
+
{
|
46
|
+
className: c("cursor-pointer relative flex text-b3 items-center", {
|
47
|
+
"text-grey": e === "disabled",
|
48
|
+
"text-black": e !== "default"
|
49
|
+
}),
|
50
|
+
children: [
|
51
|
+
/* @__PURE__ */ t("span", { className: "relative self-start me-8", children: [
|
52
|
+
/* @__PURE__ */ a(
|
53
|
+
"input",
|
54
|
+
{
|
55
|
+
...I,
|
56
|
+
name: n,
|
57
|
+
"data-testid": k,
|
58
|
+
type: "checkbox",
|
59
|
+
tabIndex: N,
|
60
|
+
onChange: () => {
|
61
|
+
!r && C(!m);
|
62
|
+
},
|
63
|
+
checked: m,
|
64
|
+
"data-name": "Checkbox",
|
65
|
+
disabled: r,
|
66
|
+
value: l
|
67
|
+
}
|
68
|
+
),
|
69
|
+
/* @__PURE__ */ a(
|
70
|
+
"span",
|
71
|
+
{
|
72
|
+
style: { height: i, width: i },
|
73
|
+
className: c({ "!border-red": e === "error" }),
|
74
|
+
"data-testid": `check-container-${s}`,
|
75
|
+
children: /* @__PURE__ */ a(
|
76
|
+
u,
|
77
|
+
{
|
78
|
+
name: "CheckDefault",
|
79
|
+
type: "svg",
|
80
|
+
width: `${i}px`,
|
81
|
+
color: "black",
|
82
|
+
className: "absolute"
|
83
|
+
}
|
84
|
+
)
|
85
|
+
}
|
86
|
+
)
|
87
|
+
] }),
|
88
|
+
y
|
89
|
+
]
|
90
|
+
}
|
91
|
+
),
|
92
|
+
p && /* @__PURE__ */ t("span", { className: "text-red text-b4 flex items-start space-x-4 ps-20", role: "alert", children: [
|
93
|
+
/* @__PURE__ */ a(u, { name: "Error", width: "20px" }),
|
94
|
+
d
|
95
|
+
] })
|
66
96
|
]
|
67
97
|
}
|
68
98
|
);
|
69
99
|
}
|
70
100
|
export {
|
71
|
-
|
101
|
+
B as Checkbox
|
72
102
|
};
|
@@ -2,4 +2,4 @@ import { HTMLAttributes } from 'react';
|
|
2
2
|
import { FormControlProps } from '../FormControl.js';
|
3
3
|
export interface CheckboxesProps<Value = string> extends Pick<FormControlProps<Value[]>, 'id' | 'name' | 'value' | 'onChange' | 'disabled' | 'readOnly' | 'tabIndex' | 'description' | 'validationStatus' | 'errorMessage'>, Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
4
4
|
}
|
5
|
-
export declare function Checkboxes<Value = string>(
|
5
|
+
export declare function Checkboxes<Value = string>(props: CheckboxesProps<Value>): import("react/jsx-runtime").JSX.Element;
|
@@ -1,43 +1,42 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { Children as
|
3
|
-
import { useValue as
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
2
|
+
import { useId as N, Children as v, isValidElement as g, cloneElement as h } from "react";
|
3
|
+
import { useValue as k } from "../../../hooks/useValue.js";
|
4
4
|
import { c as E } from "../../../index-Cu0xwYjD.js";
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
}
|
18
|
-
|
19
|
-
|
20
|
-
initialValue: u,
|
5
|
+
function q(m) {
|
6
|
+
const i = N(), {
|
7
|
+
id: r = i,
|
8
|
+
name: n = r,
|
9
|
+
children: u,
|
10
|
+
value: c,
|
11
|
+
defaultValue: p,
|
12
|
+
onChange: d,
|
13
|
+
disabled: f,
|
14
|
+
readOnly: V,
|
15
|
+
tabIndex: b = 0,
|
16
|
+
...s
|
17
|
+
} = m, { value: a, setValue: o } = k({
|
18
|
+
name: n,
|
19
|
+
initialValue: c,
|
21
20
|
formatter(e) {
|
22
21
|
return e !== void 0 ? [].concat(e) : e;
|
23
22
|
},
|
24
|
-
defaultValue:
|
25
|
-
onChange:
|
23
|
+
defaultValue: p || [],
|
24
|
+
onChange: d
|
26
25
|
});
|
27
|
-
return /* @__PURE__ */
|
28
|
-
if (
|
29
|
-
const
|
30
|
-
return
|
26
|
+
return /* @__PURE__ */ I("div", { ...s, className: s.className, role: "listbox", children: v.map(u, (e, l) => {
|
27
|
+
if (g(e)) {
|
28
|
+
const t = e.props.value;
|
29
|
+
return h(e, {
|
31
30
|
...e.props,
|
32
|
-
name:
|
33
|
-
id: `${
|
34
|
-
disabled:
|
35
|
-
readOnly:
|
36
|
-
tabIndex: b +
|
37
|
-
className: E("
|
38
|
-
checked:
|
39
|
-
onChange(
|
40
|
-
|
31
|
+
name: n,
|
32
|
+
id: `${r}-${l}`,
|
33
|
+
disabled: f,
|
34
|
+
readOnly: V,
|
35
|
+
tabIndex: b + l + 1,
|
36
|
+
className: E(e.props.className || "mt-8 first:mt-0"),
|
37
|
+
checked: a.includes(t),
|
38
|
+
onChange($, x) {
|
39
|
+
o(x === null ? a.filter((C) => C !== t) : a.concat(t));
|
41
40
|
}
|
42
41
|
});
|
43
42
|
}
|
@@ -1,31 +1,15 @@
|
|
1
|
-
import { FunctionComponent } from 'react';
|
2
1
|
import { IconicNames, IconicTypes } from '../../atoms/Icons';
|
3
2
|
import { FormControlProps } from './FormControl.js';
|
4
3
|
interface DateFieldProps extends Omit<FormControlProps<Date | null>, 'max' | 'min'> {
|
5
|
-
/**
|
6
|
-
* Description text
|
7
|
-
*/
|
8
4
|
description?: string;
|
9
5
|
/**
|
10
6
|
* Open datepicker text
|
11
7
|
*/
|
12
8
|
openDatepicker?: string;
|
13
|
-
/**
|
14
|
-
* Id of the input
|
15
|
-
*/
|
16
9
|
id?: string;
|
17
|
-
/**
|
18
|
-
* Icon name
|
19
|
-
*/
|
20
10
|
icon?: IconicNames;
|
21
11
|
iconType?: IconicTypes;
|
22
|
-
/**
|
23
|
-
* Error message
|
24
|
-
*/
|
25
12
|
errorMessage?: string;
|
26
|
-
/**
|
27
|
-
* Data test id
|
28
|
-
*/
|
29
13
|
dataTestId?: string;
|
30
14
|
/**
|
31
15
|
* Minimum Date allowed
|
@@ -36,5 +20,5 @@ interface DateFieldProps extends Omit<FormControlProps<Date | null>, 'max' | 'mi
|
|
36
20
|
*/
|
37
21
|
max?: Date | undefined;
|
38
22
|
}
|
39
|
-
export declare const DateField:
|
23
|
+
export declare const DateField: (props: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
|
40
24
|
export {};
|