@clubmed/trident-ui 1.0.0-beta.4 → 1.0.0-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +7 -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/Checkboxes/Checkbox.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkbox.js +37 -37
- package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
- package/molecules/Forms/Checkboxes/Checkboxes.js +30 -31
- package/molecules/Forms/DateField.d.ts +1 -17
- package/molecules/Forms/DateField.js +98 -99
- package/molecules/Forms/Filter.d.ts +1 -1
- package/molecules/Forms/Filter.js +38 -38
- package/molecules/Forms/NumberField.d.ts +3 -3
- package/molecules/Forms/NumberField.js +76 -76
- package/molecules/Forms/Password/Password.js +35 -36
- 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/Switch.d.ts +1 -1
- package/molecules/Forms/Switch.js +28 -28
- package/molecules/Forms/TextField.js +38 -38
- package/package.json +1 -1
@@ -1,10 +1,10 @@
|
|
1
1
|
@font-face {font-family: "tui-utilities";
|
2
|
-
src: url('tui-utilities.eot?t=
|
3
|
-
src: url('tui-utilities.eot?t=
|
4
|
-
url("tui-utilities.woff2?t=
|
5
|
-
url("tui-utilities.woff?t=
|
6
|
-
url('tui-utilities.ttf?t=
|
7
|
-
url('tui-utilities.svg?t=
|
2
|
+
src: url('tui-utilities.eot?t=1717077244183'); /* IE9*/
|
3
|
+
src: url('tui-utilities.eot?t=1717077244183#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
4
|
+
url("tui-utilities.woff2?t=1717077244183") format("woff2"),
|
5
|
+
url("tui-utilities.woff?t=1717077244183") format("woff"),
|
6
|
+
url('tui-utilities.ttf?t=1717077244183') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
7
|
+
url('tui-utilities.svg?t=1717077244183#tui-utilities') format('svg'); /* iOS 4.1- */
|
8
8
|
}
|
9
9
|
|
10
10
|
[class^="tui-utilities-"], [class*=" tui-utilities-"] {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@font-face {font-family: "tui-utilities";
|
2
|
-
src: url('tui-utilities.eot?t=
|
3
|
-
src: url('tui-utilities.eot?t=
|
4
|
-
url("tui-utilities.woff2?t=
|
5
|
-
url("tui-utilities.woff?t=
|
6
|
-
url('tui-utilities.ttf?t=
|
7
|
-
url('tui-utilities.svg?t=
|
2
|
+
src: url('tui-utilities.eot?t=1717077244183'); /* IE9*/
|
3
|
+
src: url('tui-utilities.eot?t=1717077244183#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
4
|
+
url("tui-utilities.woff2?t=1717077244183") format("woff2"),
|
5
|
+
url("tui-utilities.woff?t=1717077244183") format("woff"),
|
6
|
+
url('tui-utilities.ttf?t=1717077244183') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
7
|
+
url('tui-utilities.svg?t=1717077244183#tui-utilities') format('svg'); /* iOS 4.1- */
|
8
8
|
}
|
9
9
|
|
10
10
|
[class^="tui-utilities-"], [class*=" tui-utilities-"] {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@font-face {font-family: "tui-utilities";
|
2
|
-
src: url('tui-utilities.eot?t=
|
3
|
-
src: url('tui-utilities.eot?t=
|
4
|
-
url("tui-utilities.woff2?t=
|
5
|
-
url("tui-utilities.woff?t=
|
6
|
-
url('tui-utilities.ttf?t=
|
7
|
-
url('tui-utilities.svg?t=
|
2
|
+
src: url('tui-utilities.eot?t=1717077244183'); /* IE9*/
|
3
|
+
src: url('tui-utilities.eot?t=1717077244183#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
4
|
+
url("tui-utilities.woff2?t=1717077244183") format("woff2"),
|
5
|
+
url("tui-utilities.woff?t=1717077244183") format("woff"),
|
6
|
+
url('tui-utilities.ttf?t=1717077244183') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
7
|
+
url('tui-utilities.svg?t=1717077244183#tui-utilities') format('svg'); /* iOS 4.1- */
|
8
8
|
}
|
9
9
|
|
10
10
|
[class^="tui-utilities-"], [class*=" tui-utilities-"] {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
@font-face {font-family: "tui-utilities";
|
2
|
-
src: url('tui-utilities.eot?t=
|
3
|
-
src: url('tui-utilities.eot?t=
|
4
|
-
url("tui-utilities.woff2?t=
|
5
|
-
url("tui-utilities.woff?t=
|
6
|
-
url('tui-utilities.ttf?t=
|
7
|
-
url('tui-utilities.svg?t=
|
2
|
+
src: url('tui-utilities.eot?t=1717077244183'); /* IE9*/
|
3
|
+
src: url('tui-utilities.eot?t=1717077244183#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
4
|
+
url("tui-utilities.woff2?t=1717077244183") format("woff2"),
|
5
|
+
url("tui-utilities.woff?t=1717077244183") format("woff"),
|
6
|
+
url('tui-utilities.ttf?t=1717077244183') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
|
7
|
+
url('tui-utilities.svg?t=1717077244183#tui-utilities') format('svg'); /* iOS 4.1- */
|
8
8
|
}
|
9
9
|
|
10
10
|
[class^="tui-utilities-"], [class*=" tui-utilities-"] {
|
Binary file
|
Binary file
|
Binary file
|
@@ -12,4 +12,4 @@ export interface CheckboxProps<Value = string> extends Omit<InputHTMLAttributes<
|
|
12
12
|
size?: number;
|
13
13
|
onChange?: (name: string, value: Value | null) => void;
|
14
14
|
}
|
15
|
-
export declare function Checkbox<Value = string>(
|
15
|
+
export declare function Checkbox<Value = string>(props: CheckboxProps<Value>): import("react/jsx-runtime").JSX.Element;
|
@@ -1,72 +1,72 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { c as
|
3
|
-
import {
|
1
|
+
import { jsxs as o, jsx as i } from "react/jsx-runtime";
|
2
|
+
import { c as g } from "../../../index-Cu0xwYjD.js";
|
3
|
+
import { useId as C } from "react";
|
4
|
+
import { Icon as I } from "../../../atoms/Icons/Icon.js";
|
4
5
|
import "../../../atoms/Icons/contexts/IconsContext.js";
|
5
|
-
import { useValue as
|
6
|
+
import { useValue as y } from "../../../hooks/useValue.js";
|
6
7
|
import "../../../controls-l0sNRNKZ.js";
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
22
|
-
const { value: o, setValue: d } = v({
|
8
|
+
function $(c) {
|
9
|
+
const m = C(), {
|
10
|
+
id: d = m,
|
11
|
+
name: l = d,
|
12
|
+
className: p,
|
13
|
+
dataTestId: h,
|
14
|
+
disabled: e,
|
15
|
+
checked: u = !1,
|
16
|
+
value: a,
|
17
|
+
size: t = 24,
|
18
|
+
tabIndex: x = 0,
|
19
|
+
children: f,
|
20
|
+
onChange: s,
|
21
|
+
...b
|
22
|
+
} = c, { value: r, setValue: k } = y({
|
23
23
|
name: l,
|
24
24
|
initialValue: u,
|
25
|
-
onChange(
|
26
|
-
|
25
|
+
onChange(v, n) {
|
26
|
+
s == null || s(v, n ? a !== void 0 ? a : n : null);
|
27
27
|
}
|
28
28
|
});
|
29
|
-
return /* @__PURE__ */
|
29
|
+
return /* @__PURE__ */ o(
|
30
30
|
"label",
|
31
31
|
{
|
32
|
-
className:
|
32
|
+
className: g(p, "cursor-pointer relative flex items-center gap-8", {
|
33
33
|
"text-grey": e
|
34
34
|
}),
|
35
35
|
children: [
|
36
|
-
/* @__PURE__ */
|
37
|
-
/* @__PURE__ */
|
36
|
+
/* @__PURE__ */ o("span", { className: "relative", children: [
|
37
|
+
/* @__PURE__ */ i(
|
38
38
|
"input",
|
39
39
|
{
|
40
|
-
...
|
40
|
+
...b,
|
41
41
|
name: l,
|
42
|
-
"data-testid":
|
42
|
+
"data-testid": h,
|
43
43
|
type: "checkbox",
|
44
|
-
tabIndex:
|
44
|
+
tabIndex: x,
|
45
45
|
onChange: () => {
|
46
|
-
!e &&
|
46
|
+
!e && k(!r);
|
47
47
|
},
|
48
|
-
checked:
|
48
|
+
checked: r,
|
49
49
|
"data-name": "Checkbox",
|
50
50
|
disabled: e,
|
51
|
-
value:
|
51
|
+
value: a
|
52
52
|
}
|
53
53
|
),
|
54
|
-
/* @__PURE__ */
|
55
|
-
|
54
|
+
/* @__PURE__ */ i("span", { style: { height: t, width: t }, children: /* @__PURE__ */ i(
|
55
|
+
I,
|
56
56
|
{
|
57
57
|
name: "CheckDefault",
|
58
58
|
type: "svg",
|
59
|
-
width: `${
|
59
|
+
width: `${t}px`,
|
60
60
|
color: "black",
|
61
61
|
className: "absolute"
|
62
62
|
}
|
63
63
|
) })
|
64
64
|
] }),
|
65
|
-
|
65
|
+
f
|
66
66
|
]
|
67
67
|
}
|
68
68
|
);
|
69
69
|
}
|
70
70
|
export {
|
71
|
-
|
71
|
+
$ as Checkbox
|
72
72
|
};
|
@@ -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 v, Children as N, 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
|
-
const { value: o, setValue: l } = N({
|
5
|
+
function q(m) {
|
6
|
+
const i = v(), {
|
7
|
+
id: r = i,
|
8
|
+
name: t = r,
|
9
|
+
children: u,
|
10
|
+
value: c,
|
11
|
+
defaultValue: p,
|
12
|
+
onChange: d,
|
13
|
+
disabled: f,
|
14
|
+
readOnly: b,
|
15
|
+
tabIndex: V = 0,
|
16
|
+
...s
|
17
|
+
} = m, { value: a, setValue: o } = k({
|
19
18
|
name: t,
|
20
|
-
initialValue:
|
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: N.map(u, (e, l) => {
|
27
|
+
if (g(e)) {
|
28
|
+
const n = e.props.value;
|
29
|
+
return h(e, {
|
31
30
|
...e.props,
|
32
31
|
name: t,
|
33
|
-
id: `${
|
34
|
-
disabled:
|
35
|
-
readOnly:
|
36
|
-
tabIndex:
|
32
|
+
id: `${r}-${l}`,
|
33
|
+
disabled: f,
|
34
|
+
readOnly: b,
|
35
|
+
tabIndex: V + l + 1,
|
37
36
|
className: E("mb-12 last:mb-0", e.props),
|
38
|
-
checked:
|
39
|
-
onChange(
|
40
|
-
|
37
|
+
checked: a.includes(n),
|
38
|
+
onChange($, x) {
|
39
|
+
o(x === null ? a.filter((C) => C !== n) : a.concat(n));
|
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 {};
|
@@ -1,112 +1,111 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { c as
|
3
|
-
import { useRef as
|
4
|
-
import { Icon as
|
1
|
+
import { jsx as m, jsxs as y } from "react/jsx-runtime";
|
2
|
+
import { c as E } from "../../index-Cu0xwYjD.js";
|
3
|
+
import { useId as V, useRef as _ } from "react";
|
4
|
+
import { Icon as I } from "../../atoms/Icons/Icon.js";
|
5
5
|
import "../../atoms/Icons/contexts/IconsContext.js";
|
6
|
-
import { useValue as
|
7
|
-
import { useInternalStatus as
|
8
|
-
import { FormControl as
|
9
|
-
function
|
6
|
+
import { useValue as z } from "../../hooks/useValue.js";
|
7
|
+
import { useInternalStatus as G } from "../../hooks/useInternalStatus.js";
|
8
|
+
import { FormControl as Z } from "./FormControl.js";
|
9
|
+
function T(t) {
|
10
10
|
"@babel/helpers - typeof";
|
11
|
-
return
|
12
|
-
return typeof
|
13
|
-
} : function(
|
14
|
-
return
|
15
|
-
},
|
11
|
+
return T = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
12
|
+
return typeof e;
|
13
|
+
} : function(e) {
|
14
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
15
|
+
}, T(t);
|
16
16
|
}
|
17
|
-
function
|
18
|
-
if (
|
19
|
-
throw new TypeError(
|
17
|
+
function F(t, e) {
|
18
|
+
if (e.length < t)
|
19
|
+
throw new TypeError(t + " argument" + (t > 1 ? "s" : "") + " required, but only " + e.length + " present");
|
20
20
|
}
|
21
|
-
function
|
22
|
-
|
23
|
-
var
|
24
|
-
return
|
21
|
+
function $(t) {
|
22
|
+
F(1, arguments);
|
23
|
+
var e = Object.prototype.toString.call(t);
|
24
|
+
return t instanceof Date || T(t) === "object" && e === "[object Date]" ? new Date(t.getTime()) : typeof t == "number" || e === "[object Number]" ? new Date(t) : ((typeof t == "string" || e === "[object String]") && typeof console < "u" && (console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"), console.warn(new Error().stack)), /* @__PURE__ */ new Date(NaN));
|
25
25
|
}
|
26
|
-
function
|
27
|
-
for (var i =
|
26
|
+
function l(t, e) {
|
27
|
+
for (var i = t < 0 ? "-" : "", a = Math.abs(t).toString(); a.length < e; )
|
28
28
|
a = "0" + a;
|
29
29
|
return i + a;
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function A(t, e) {
|
32
32
|
var i, a;
|
33
|
-
|
34
|
-
var o =
|
33
|
+
F(1, arguments);
|
34
|
+
var o = $(t);
|
35
35
|
if (isNaN(o.getTime()))
|
36
36
|
throw new RangeError("Invalid time value");
|
37
|
-
var
|
38
|
-
if (
|
37
|
+
var d = String((i = e == null ? void 0 : e.format) !== null && i !== void 0 ? i : "extended"), c = String((a = e == null ? void 0 : e.representation) !== null && a !== void 0 ? a : "complete");
|
38
|
+
if (d !== "extended" && d !== "basic")
|
39
39
|
throw new RangeError("format must be 'extended' or 'basic'");
|
40
|
-
if (
|
40
|
+
if (c !== "date" && c !== "time" && c !== "complete")
|
41
41
|
throw new RangeError("representation must be 'date', 'time', or 'complete'");
|
42
|
-
var
|
43
|
-
if (
|
44
|
-
var
|
45
|
-
|
42
|
+
var s = "", f = "", g = d === "extended" ? "-" : "", x = d === "extended" ? ":" : "";
|
43
|
+
if (c !== "time") {
|
44
|
+
var r = l(o.getDate(), 2), w = l(o.getMonth() + 1, 2), D = l(o.getFullYear(), 4);
|
45
|
+
s = "".concat(D).concat(g).concat(w).concat(g).concat(r);
|
46
46
|
}
|
47
|
-
if (
|
48
|
-
var
|
49
|
-
if (
|
50
|
-
var v = Math.abs(
|
51
|
-
|
47
|
+
if (c !== "date") {
|
48
|
+
var p = o.getTimezoneOffset();
|
49
|
+
if (p !== 0) {
|
50
|
+
var v = Math.abs(p), b = l(Math.floor(v / 60), 2), S = l(v % 60, 2), h = p < 0 ? "+" : "-";
|
51
|
+
f = "".concat(h).concat(b, ":").concat(S);
|
52
52
|
} else
|
53
|
-
|
54
|
-
var
|
55
|
-
|
53
|
+
f = "Z";
|
54
|
+
var n = l(o.getHours(), 2), N = l(o.getMinutes(), 2), k = l(o.getSeconds(), 2), j = s === "" ? "" : "T", C = [n, N, k].join(x);
|
55
|
+
s = "".concat(s).concat(j).concat(C).concat(f);
|
56
56
|
}
|
57
|
-
return
|
57
|
+
return s;
|
58
58
|
}
|
59
|
-
|
60
|
-
const
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
})
|
78
|
-
const g = R(null), n = _({
|
59
|
+
const M = (t) => t ? A(t, { representation: "date" }) : "", U = (t) => {
|
60
|
+
const e = V(), {
|
61
|
+
id: i = e,
|
62
|
+
name: a = i,
|
63
|
+
label: o,
|
64
|
+
description: d,
|
65
|
+
openDatepicker: c,
|
66
|
+
validationStatus: s = "default",
|
67
|
+
icon: f = "CalendarDefault",
|
68
|
+
iconType: g,
|
69
|
+
errorMessage: x,
|
70
|
+
disabled: r = !1,
|
71
|
+
dataTestId: w = "DateField",
|
72
|
+
value: D,
|
73
|
+
min: p,
|
74
|
+
max: v,
|
75
|
+
onChange: b,
|
76
|
+
...S
|
77
|
+
} = t, h = _(null), n = G({
|
79
78
|
isDisabled: r,
|
80
|
-
validationStatus:
|
81
|
-
}), { setValue:
|
82
|
-
name:
|
83
|
-
formatter:
|
84
|
-
initialValue:
|
85
|
-
onChange: (
|
86
|
-
}),
|
87
|
-
|
88
|
-
},
|
89
|
-
var
|
90
|
-
(
|
79
|
+
validationStatus: s
|
80
|
+
}), { setValue: N, value: k } = z({
|
81
|
+
name: a,
|
82
|
+
formatter: M,
|
83
|
+
initialValue: D,
|
84
|
+
onChange: (u, P) => b == null ? void 0 : b(u, new Date(P))
|
85
|
+
}), j = M(p), C = M(v), O = (u) => {
|
86
|
+
N(u.target.value);
|
87
|
+
}, R = () => {
|
88
|
+
var u;
|
89
|
+
(u = h.current) == null || u.showPicker();
|
91
90
|
};
|
92
|
-
return /* @__PURE__ */
|
93
|
-
|
91
|
+
return /* @__PURE__ */ m(
|
92
|
+
Z,
|
94
93
|
{
|
95
|
-
id:
|
96
|
-
label:
|
97
|
-
description:
|
94
|
+
id: i,
|
95
|
+
label: o,
|
96
|
+
description: d,
|
98
97
|
dataName: "DateField",
|
99
|
-
dataTestId:
|
98
|
+
dataTestId: w,
|
100
99
|
disabled: r,
|
101
|
-
validationStatus:
|
102
|
-
errorMessage:
|
103
|
-
children: /* @__PURE__ */
|
104
|
-
/* @__PURE__ */
|
100
|
+
validationStatus: s,
|
101
|
+
errorMessage: x,
|
102
|
+
children: /* @__PURE__ */ y("div", { className: "relative", children: [
|
103
|
+
/* @__PURE__ */ m(
|
105
104
|
"input",
|
106
105
|
{
|
107
|
-
...
|
106
|
+
...S,
|
108
107
|
type: "date",
|
109
|
-
className:
|
108
|
+
className: E(
|
110
109
|
"text-b3 rounded-pill date-field min-h-[50px] w-full border px-20 py-12 ps-[52px] font-normal outline-none",
|
111
110
|
{
|
112
111
|
"border-lightGrey focus:border-black active:border-black": n === "default",
|
@@ -117,19 +116,19 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
|
|
117
116
|
"border-green": !r && n === "success"
|
118
117
|
}
|
119
118
|
),
|
120
|
-
id:
|
119
|
+
id: i,
|
121
120
|
disabled: r,
|
122
|
-
ref:
|
123
|
-
value:
|
124
|
-
min:
|
125
|
-
max:
|
126
|
-
onChange:
|
121
|
+
ref: h,
|
122
|
+
value: k,
|
123
|
+
min: j,
|
124
|
+
max: C,
|
125
|
+
onChange: O
|
127
126
|
}
|
128
127
|
),
|
129
|
-
/* @__PURE__ */
|
128
|
+
/* @__PURE__ */ y(
|
130
129
|
"div",
|
131
130
|
{
|
132
|
-
className:
|
131
|
+
className: E(
|
133
132
|
"pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12",
|
134
133
|
{
|
135
134
|
"text-grey": r,
|
@@ -138,13 +137,13 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
|
|
138
137
|
}
|
139
138
|
),
|
140
139
|
children: [
|
141
|
-
/* @__PURE__ */
|
142
|
-
/* @__PURE__ */
|
143
|
-
/* @__PURE__ */
|
140
|
+
/* @__PURE__ */ y("button", { className: "pointer-events-auto leading-none", onClick: R, children: [
|
141
|
+
/* @__PURE__ */ m(I, { name: f, iconType: g, width: "24px" }),
|
142
|
+
/* @__PURE__ */ m("span", { className: "sr-only", children: c })
|
144
143
|
] }),
|
145
|
-
/* @__PURE__ */
|
146
|
-
n === "error" && /* @__PURE__ */
|
147
|
-
n === "success" && /* @__PURE__ */
|
144
|
+
/* @__PURE__ */ y("span", { className: "ms-auto flex gap-x-8", children: [
|
145
|
+
n === "error" && /* @__PURE__ */ m(I, { name: "CrossDefault", width: "24px" }),
|
146
|
+
n === "success" && /* @__PURE__ */ m(I, { name: "CheckDefault", width: "24px" })
|
148
147
|
] })
|
149
148
|
]
|
150
149
|
}
|
@@ -154,5 +153,5 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
|
|
154
153
|
);
|
155
154
|
};
|
156
155
|
export {
|
157
|
-
|
156
|
+
U as DateField
|
158
157
|
};
|
@@ -12,4 +12,4 @@ export interface FilterProps<Value = string> extends Omit<InputHTMLAttributes<HT
|
|
12
12
|
hasDropdown?: boolean;
|
13
13
|
onChange?: (name: string, value: Value | null) => void;
|
14
14
|
}
|
15
|
-
export declare function Filter<Value = string>(
|
15
|
+
export declare function Filter<Value = string>(props: FilterProps<Value>): import("react/jsx-runtime").JSX.Element;
|