@clubmed/trident-ui 1.0.0-alpha.51 → 1.0.0-beta.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. package/CHANGELOG.md +310 -0
  2. package/atoms/Icons/Iconics.d.ts +1 -1
  3. package/atoms/Icons/fonts/Utilities.js +0 -6
  4. package/atoms/Icons/svg/Utilities.js +0 -8
  5. package/atoms/Icons/svg-use/Utilities.js +58 -68
  6. package/fonts/Actions/tui-actions.css +6 -6
  7. package/fonts/Actions/tui-actions.eot +0 -0
  8. package/fonts/Actions/tui-actions.less +6 -6
  9. package/fonts/Actions/tui-actions.module.less +6 -6
  10. package/fonts/Actions/tui-actions.scss +6 -6
  11. package/fonts/Actions/tui-actions.styl +6 -6
  12. package/fonts/Actions/tui-actions.ttf +0 -0
  13. package/fonts/Actions/tui-actions.woff +0 -0
  14. package/fonts/Actions/tui-actions.woff2 +0 -0
  15. package/fonts/Activities/tui-activities.css +6 -6
  16. package/fonts/Activities/tui-activities.eot +0 -0
  17. package/fonts/Activities/tui-activities.less +6 -6
  18. package/fonts/Activities/tui-activities.module.less +6 -6
  19. package/fonts/Activities/tui-activities.scss +6 -6
  20. package/fonts/Activities/tui-activities.styl +6 -6
  21. package/fonts/Activities/tui-activities.ttf +0 -0
  22. package/fonts/Activities/tui-activities.woff +0 -0
  23. package/fonts/Activities/tui-activities.woff2 +0 -0
  24. package/fonts/Brand/tui-brand.css +6 -6
  25. package/fonts/Brand/tui-brand.eot +0 -0
  26. package/fonts/Brand/tui-brand.less +6 -6
  27. package/fonts/Brand/tui-brand.module.less +6 -6
  28. package/fonts/Brand/tui-brand.scss +6 -6
  29. package/fonts/Brand/tui-brand.styl +6 -6
  30. package/fonts/Brand/tui-brand.ttf +0 -0
  31. package/fonts/Brand/tui-brand.woff +0 -0
  32. package/fonts/Brand/tui-brand.woff2 +0 -0
  33. package/fonts/Covid/tui-covid.css +6 -6
  34. package/fonts/Covid/tui-covid.eot +0 -0
  35. package/fonts/Covid/tui-covid.less +6 -6
  36. package/fonts/Covid/tui-covid.module.less +6 -6
  37. package/fonts/Covid/tui-covid.scss +6 -6
  38. package/fonts/Covid/tui-covid.styl +6 -6
  39. package/fonts/Covid/tui-covid.ttf +0 -0
  40. package/fonts/Covid/tui-covid.woff +0 -0
  41. package/fonts/Covid/tui-covid.woff2 +0 -0
  42. package/fonts/Food/tui-food.css +6 -6
  43. package/fonts/Food/tui-food.eot +0 -0
  44. package/fonts/Food/tui-food.less +6 -6
  45. package/fonts/Food/tui-food.module.less +6 -6
  46. package/fonts/Food/tui-food.scss +6 -6
  47. package/fonts/Food/tui-food.styl +6 -6
  48. package/fonts/Food/tui-food.ttf +0 -0
  49. package/fonts/Food/tui-food.woff +0 -0
  50. package/fonts/Food/tui-food.woff2 +0 -0
  51. package/fonts/HappyToCare/tui-happy-to-care.css +6 -6
  52. package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
  53. package/fonts/HappyToCare/tui-happy-to-care.less +6 -6
  54. package/fonts/HappyToCare/tui-happy-to-care.module.less +6 -6
  55. package/fonts/HappyToCare/tui-happy-to-care.scss +6 -6
  56. package/fonts/HappyToCare/tui-happy-to-care.styl +6 -6
  57. package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
  58. package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
  59. package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
  60. package/fonts/Places/tui-places.css +6 -6
  61. package/fonts/Places/tui-places.eot +0 -0
  62. package/fonts/Places/tui-places.less +6 -6
  63. package/fonts/Places/tui-places.module.less +6 -6
  64. package/fonts/Places/tui-places.scss +6 -6
  65. package/fonts/Places/tui-places.styl +6 -6
  66. package/fonts/Places/tui-places.ttf +0 -0
  67. package/fonts/Places/tui-places.woff +0 -0
  68. package/fonts/Places/tui-places.woff2 +0 -0
  69. package/fonts/Room/tui-room.css +6 -6
  70. package/fonts/Room/tui-room.eot +0 -0
  71. package/fonts/Room/tui-room.less +6 -6
  72. package/fonts/Room/tui-room.module.less +6 -6
  73. package/fonts/Room/tui-room.scss +6 -6
  74. package/fonts/Room/tui-room.styl +6 -6
  75. package/fonts/Room/tui-room.ttf +0 -0
  76. package/fonts/Room/tui-room.woff +0 -0
  77. package/fonts/Room/tui-room.woff2 +0 -0
  78. package/fonts/Services/tui-services.css +6 -6
  79. package/fonts/Services/tui-services.eot +0 -0
  80. package/fonts/Services/tui-services.less +6 -6
  81. package/fonts/Services/tui-services.module.less +6 -6
  82. package/fonts/Services/tui-services.scss +6 -6
  83. package/fonts/Services/tui-services.styl +6 -6
  84. package/fonts/Services/tui-services.ttf +0 -0
  85. package/fonts/Services/tui-services.woff +0 -0
  86. package/fonts/Services/tui-services.woff2 +0 -0
  87. package/fonts/Socials/tui-socials.css +6 -6
  88. package/fonts/Socials/tui-socials.eot +0 -0
  89. package/fonts/Socials/tui-socials.less +6 -6
  90. package/fonts/Socials/tui-socials.module.less +6 -6
  91. package/fonts/Socials/tui-socials.scss +6 -6
  92. package/fonts/Socials/tui-socials.styl +6 -6
  93. package/fonts/Socials/tui-socials.ttf +0 -0
  94. package/fonts/Socials/tui-socials.woff +0 -0
  95. package/fonts/Socials/tui-socials.woff2 +0 -0
  96. package/fonts/Transports/tui-transports.css +6 -6
  97. package/fonts/Transports/tui-transports.eot +0 -0
  98. package/fonts/Transports/tui-transports.less +6 -6
  99. package/fonts/Transports/tui-transports.module.less +6 -6
  100. package/fonts/Transports/tui-transports.scss +6 -6
  101. package/fonts/Transports/tui-transports.styl +6 -6
  102. package/fonts/Transports/tui-transports.ttf +0 -0
  103. package/fonts/Transports/tui-transports.woff +0 -0
  104. package/fonts/Transports/tui-transports.woff2 +0 -0
  105. package/fonts/Utilities/tui-utilities.css +36 -38
  106. package/fonts/Utilities/tui-utilities.eot +0 -0
  107. package/fonts/Utilities/tui-utilities.less +36 -38
  108. package/fonts/Utilities/tui-utilities.module.less +36 -38
  109. package/fonts/Utilities/tui-utilities.scss +66 -70
  110. package/fonts/Utilities/tui-utilities.styl +36 -38
  111. package/fonts/Utilities/tui-utilities.svg +30 -36
  112. package/fonts/Utilities/tui-utilities.symbol.svg +0 -4
  113. package/fonts/Utilities/tui-utilities.ttf +0 -0
  114. package/fonts/Utilities/tui-utilities.woff +0 -0
  115. package/fonts/Utilities/tui-utilities.woff2 +0 -0
  116. package/molecules/Backdrop.js +13 -12
  117. package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
  118. package/molecules/Forms/Checkboxes/Checkbox.js +36 -36
  119. package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
  120. package/molecules/Forms/Checkboxes/Checkboxes.js +30 -31
  121. package/molecules/Forms/DateField.d.ts +1 -17
  122. package/molecules/Forms/DateField.js +99 -97
  123. package/molecules/Forms/Filter.d.ts +1 -1
  124. package/molecules/Forms/Filter.js +38 -38
  125. package/molecules/Forms/FormControl.d.ts +3 -2
  126. package/molecules/Forms/FormControl.js +22 -21
  127. package/molecules/Forms/FormLabel.d.ts +4 -17
  128. package/molecules/Forms/FormLabel.js +24 -19
  129. package/molecules/Forms/NumberField.d.ts +4 -4
  130. package/molecules/Forms/NumberField.js +75 -72
  131. package/molecules/Forms/Password/Password.d.ts +1 -0
  132. package/molecules/Forms/Password/Password.js +77 -52
  133. package/molecules/Forms/Password/ValidationMessage.js +1 -1
  134. package/molecules/Forms/Radios/Radio.d.ts +1 -1
  135. package/molecules/Forms/Radios/Radio.js +31 -31
  136. package/molecules/Forms/Radios/RadioGroup.d.ts +1 -1
  137. package/molecules/Forms/Radios/RadioGroup.js +28 -29
  138. package/molecules/Forms/Range.d.ts +2 -2
  139. package/molecules/Forms/Range.js +181 -183
  140. package/molecules/Forms/Select.d.ts +10 -0
  141. package/molecules/Forms/Select.js +102 -0
  142. package/molecules/Forms/Switch.d.ts +1 -1
  143. package/molecules/Forms/Switch.js +28 -28
  144. package/molecules/Forms/TextField.d.ts +0 -4
  145. package/molecules/Forms/TextField.js +52 -52
  146. package/package.json +1 -1
  147. package/styles/globals.css +4 -0
  148. package/EyeClosed-vWGtzMgE.js +0 -5
  149. package/EyeOpened-CsQwqVMl.js +0 -5
  150. package/assets/icons/Utilities/EyeClosed.svg +0 -12
  151. package/assets/icons/Utilities/EyeOpened.svg +0 -11
@@ -1,72 +1,72 @@
1
- import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import { c as b } from "../../../index-Cu0xwYjD.js";
3
- import { Icon as y } from "../../../atoms/Icons/Icon.js";
1
+ import { jsxs as n, 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 v } from "../../../hooks/useValue.js";
6
+ import { useValue as y } from "../../../hooks/useValue.js";
6
7
  import "../../../controls-l0sNRNKZ.js";
7
- let N = 0;
8
- function I({
9
- id: m = "checkbox-" + N++,
10
- name: l = m,
11
- className: p,
12
- dataTestId: n,
13
- disabled: e,
14
- checked: u = !1,
15
- value: t,
16
- size: c = 24,
17
- tabIndex: h = 0,
18
- children: x,
19
- onChange: r,
20
- ...f
21
- }) {
22
- const { value: o, setValue: d } = v({
8
+ function $(c) {
9
+ const d = C(), {
10
+ id: m = d,
11
+ name: l = m,
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: o, setValue: k } = y({
23
23
  name: l,
24
24
  initialValue: u,
25
- onChange(k, s) {
26
- r == null || r(k, s ? t !== void 0 ? t : s : null);
25
+ onChange(v, r) {
26
+ s == null || s(v, r ? a !== void 0 ? a : r : null);
27
27
  }
28
28
  });
29
- return /* @__PURE__ */ i(
29
+ return /* @__PURE__ */ n(
30
30
  "label",
31
31
  {
32
- className: b(p, "cursor-pointer relative flex items-center gap-8", {
32
+ className: g(p, "cursor-pointer relative flex gap-8", {
33
33
  "text-grey": e
34
34
  }),
35
35
  children: [
36
- /* @__PURE__ */ i("span", { className: "relative", children: [
37
- /* @__PURE__ */ a(
36
+ /* @__PURE__ */ n("span", { className: "relative", children: [
37
+ /* @__PURE__ */ i(
38
38
  "input",
39
39
  {
40
- ...f,
40
+ ...b,
41
41
  name: l,
42
- "data-testid": n,
42
+ "data-testid": h,
43
43
  type: "checkbox",
44
- tabIndex: h,
44
+ tabIndex: x,
45
45
  onChange: () => {
46
- !e && d(!o);
46
+ !e && k(!o);
47
47
  },
48
48
  checked: o,
49
49
  "data-name": "Checkbox",
50
50
  disabled: e,
51
- value: t
51
+ value: a
52
52
  }
53
53
  ),
54
- /* @__PURE__ */ a("span", { style: { height: c, width: c }, children: /* @__PURE__ */ a(
55
- y,
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: `${c}px`,
59
+ width: `${t}px`,
60
60
  color: "black",
61
61
  className: "absolute"
62
62
  }
63
63
  ) })
64
64
  ] }),
65
- x
65
+ f
66
66
  ]
67
67
  }
68
68
  );
69
69
  }
70
70
  export {
71
- I as Checkbox
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>({ id, name, children, value: initialValue, defaultValue, onChange, disabled, readOnly, tabIndex, ...rest }: CheckboxesProps<Value>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Checkboxes<Value = string>(props: CheckboxesProps<Value>): import("react/jsx-runtime").JSX.Element;
@@ -1,43 +1,42 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { Children as k, isValidElement as v, cloneElement as C } from "react";
3
- import { useValue as N } from "../../../hooks/useValue.js";
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
- let $ = 0;
6
- function q({
7
- id: s = "checkboxes-" + $++,
8
- name: t = s,
9
- children: m,
10
- value: u,
11
- defaultValue: c,
12
- onChange: p,
13
- disabled: i,
14
- readOnly: f,
15
- tabIndex: b = 0,
16
- ...a
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: u,
19
+ initialValue: c,
21
20
  formatter(e) {
22
21
  return e !== void 0 ? [].concat(e) : e;
23
22
  },
24
- defaultValue: c || [],
25
- onChange: p
23
+ defaultValue: p || [],
24
+ onChange: d
26
25
  });
27
- return /* @__PURE__ */ d("div", { ...a, className: a.className, role: "listbox", children: k.map(m, (e, n) => {
28
- if (v(e)) {
29
- const r = e.props.value;
30
- return C(e, {
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: `${s}-${n}`,
34
- disabled: i,
35
- readOnly: f,
36
- tabIndex: b + n + 1,
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: o.includes(r),
39
- onChange(g, x) {
40
- l(x === null ? o.filter((V) => V !== r) : o.concat(r));
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: FunctionComponent<DateFieldProps>;
23
+ export declare const DateField: (props: DateFieldProps) => import("react/jsx-runtime").JSX.Element;
40
24
  export {};
@@ -1,112 +1,113 @@
1
- import { jsx as p, jsxs as b } from "react/jsx-runtime";
2
- import { c as M } from "../../index-Cu0xwYjD.js";
3
- import { useRef as R } from "react";
4
- import { Icon as E } from "../../atoms/Icons/Icon.js";
1
+ import { jsx as m, jsxs as x } from "react/jsx-runtime";
2
+ import { c as E } from "../../index-Cu0xwYjD.js";
3
+ import { useId as _, useRef as z } from "react";
4
+ import { Icon as I } from "../../atoms/Icons/Icon.js";
5
5
  import "../../atoms/Icons/contexts/IconsContext.js";
6
- import { useValue as P } from "../../hooks/useValue.js";
7
- import { useInternalStatus as _ } from "../../hooks/useInternalStatus.js";
6
+ import { useValue as G } from "../../hooks/useValue.js";
7
+ import { useInternalStatus as Z } from "../../hooks/useInternalStatus.js";
8
8
  import { FormControl as $ } from "./FormControl.js";
9
- function I(e) {
9
+ function T(t) {
10
10
  "@babel/helpers - typeof";
11
- return I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
12
- return typeof t;
13
- } : function(t) {
14
- return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
15
- }, I(e);
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 T(e, t) {
18
- if (t.length < e)
19
- throw new TypeError(e + " argument" + (e > 1 ? "s" : "") + " required, but only " + t.length + " present");
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 z(e) {
22
- T(1, arguments);
23
- var t = Object.prototype.toString.call(e);
24
- return e instanceof Date || I(e) === "object" && t === "[object Date]" ? new Date(e.getTime()) : typeof e == "number" || t === "[object Number]" ? new Date(e) : ((typeof e == "string" || t === "[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));
21
+ function q(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 s(e, t) {
27
- for (var i = e < 0 ? "-" : "", a = Math.abs(e).toString(); a.length < t; )
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 G(e, t) {
31
+ function A(t, e) {
32
32
  var i, a;
33
- T(1, arguments);
34
- var o = z(e);
33
+ F(1, arguments);
34
+ var o = q(t);
35
35
  if (isNaN(o.getTime()))
36
36
  throw new RangeError("Invalid time value");
37
- var c = String((i = t == null ? void 0 : t.format) !== null && i !== void 0 ? i : "extended"), l = String((a = t == null ? void 0 : t.representation) !== null && a !== void 0 ? a : "complete");
38
- if (c !== "extended" && c !== "basic")
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 (l !== "date" && l !== "time" && l !== "complete")
40
+ if (c !== "date" && c !== "time" && c !== "complete")
41
41
  throw new RangeError("representation must be 'date', 'time', or 'complete'");
42
- var u = "", d = "", r = c === "extended" ? "-" : "", h = c === "extended" ? ":" : "";
43
- if (l !== "time") {
44
- var y = s(o.getDate(), 2), x = s(o.getMonth() + 1, 2), w = s(o.getFullYear(), 4);
45
- u = "".concat(w).concat(r).concat(x).concat(r).concat(y);
42
+ var s = "", f = "", g = d === "extended" ? "-" : "", w = d === "extended" ? ":" : "";
43
+ if (c !== "time") {
44
+ var r = l(o.getDate(), 2), v = l(o.getMonth() + 1, 2), D = l(o.getFullYear(), 4);
45
+ s = "".concat(D).concat(g).concat(v).concat(g).concat(r);
46
46
  }
47
- if (l !== "date") {
48
- var m = o.getTimezoneOffset();
49
- if (m !== 0) {
50
- var v = Math.abs(m), g = s(Math.floor(v / 60), 2), n = s(v % 60, 2), D = m < 0 ? "+" : "-";
51
- d = "".concat(D).concat(g, ":").concat(n);
47
+ if (c !== "date") {
48
+ var p = o.getTimezoneOffset();
49
+ if (p !== 0) {
50
+ var h = Math.abs(p), S = l(Math.floor(h / 60), 2), b = l(h % 60, 2), N = p < 0 ? "+" : "-";
51
+ f = "".concat(N).concat(S, ":").concat(b);
52
52
  } else
53
- d = "Z";
54
- var S = s(o.getHours(), 2), N = s(o.getMinutes(), 2), j = s(o.getSeconds(), 2), k = u === "" ? "" : "T", C = [S, N, j].join(h);
55
- u = "".concat(u).concat(k).concat(C).concat(d);
53
+ f = "Z";
54
+ var y = l(o.getHours(), 2), n = l(o.getMinutes(), 2), k = l(o.getSeconds(), 2), j = s === "" ? "" : "T", C = [y, n, k].join(w);
55
+ s = "".concat(s).concat(j).concat(C).concat(f);
56
56
  }
57
- return u;
57
+ return s;
58
58
  }
59
- let V = 0;
60
- const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
61
- id: e = `field-date-${++V}`,
62
- name: t = e,
63
- label: i,
64
- description: a,
65
- openDatepicker: o,
66
- validationStatus: c = "default",
67
- icon: l = "CalendarDefault",
68
- iconType: u,
69
- errorMessage: d,
70
- disabled: r = !1,
71
- dataTestId: h = "DateField",
72
- value: y,
73
- min: x,
74
- max: w,
75
- onChange: m,
76
- ...v
77
- }) => {
78
- const g = R(null), n = _({
59
+ const M = (t) => t ? A(t, { representation: "date" }) : "", W = (t) => {
60
+ const e = _(), {
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: w,
70
+ disabled: r = !1,
71
+ required: v = !1,
72
+ dataTestId: D = "DateField",
73
+ value: p,
74
+ min: h,
75
+ max: S,
76
+ onChange: b,
77
+ ...N
78
+ } = t, y = z(null), n = Z({
79
79
  isDisabled: r,
80
- validationStatus: c
81
- }), { setValue: D, value: S } = P({
82
- name: t,
83
- formatter: F,
84
- initialValue: y,
85
- onChange: (f, O) => m == null ? void 0 : m(f, new Date(O))
86
- }), N = F(x), j = F(w), k = (f) => {
87
- D(f.target.value);
88
- }, C = () => {
89
- var f;
90
- (f = g.current) == null || f.showPicker();
80
+ validationStatus: s
81
+ }), { setValue: k, value: j } = G({
82
+ name: a,
83
+ formatter: M,
84
+ initialValue: p,
85
+ onChange: (u, V) => b == null ? void 0 : b(u, new Date(V))
86
+ }), C = M(h), O = M(S), R = (u) => {
87
+ k(u.target.value);
88
+ }, P = () => {
89
+ var u;
90
+ (u = y.current) == null || u.showPicker();
91
91
  };
92
- return /* @__PURE__ */ p(
92
+ return /* @__PURE__ */ m(
93
93
  $,
94
94
  {
95
- id: e,
96
- label: i,
97
- description: a,
95
+ id: i,
96
+ label: o,
97
+ description: d,
98
98
  dataName: "DateField",
99
- dataTestId: h,
99
+ dataTestId: D,
100
100
  disabled: r,
101
- validationStatus: c,
102
- errorMessage: d,
103
- children: /* @__PURE__ */ b("div", { className: "relative", children: [
104
- /* @__PURE__ */ p(
101
+ required: v,
102
+ validationStatus: s,
103
+ errorMessage: w,
104
+ children: /* @__PURE__ */ x("div", { className: "relative", children: [
105
+ /* @__PURE__ */ m(
105
106
  "input",
106
107
  {
107
- ...v,
108
+ ...N,
108
109
  type: "date",
109
- className: M(
110
+ className: E(
110
111
  "text-b3 rounded-pill date-field min-h-[50px] w-full border px-20 py-12 ps-[52px] font-normal outline-none",
111
112
  {
112
113
  "border-lightGrey focus:border-black active:border-black": n === "default",
@@ -117,19 +118,20 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
117
118
  "border-green": !r && n === "success"
118
119
  }
119
120
  ),
120
- id: e,
121
+ id: i,
121
122
  disabled: r,
122
- ref: g,
123
- value: S,
124
- min: N,
125
- max: j,
126
- onChange: k
123
+ required: v,
124
+ ref: y,
125
+ value: j,
126
+ min: C,
127
+ max: O,
128
+ onChange: R
127
129
  }
128
130
  ),
129
- /* @__PURE__ */ b(
131
+ /* @__PURE__ */ x(
130
132
  "div",
131
133
  {
132
- className: M(
134
+ className: E(
133
135
  "pointer-events-none absolute inset-0 flex items-center justify-between px-20 py-12",
134
136
  {
135
137
  "text-grey": r,
@@ -138,13 +140,13 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
138
140
  }
139
141
  ),
140
142
  children: [
141
- /* @__PURE__ */ b("button", { className: "pointer-events-auto leading-none", onClick: C, children: [
142
- /* @__PURE__ */ p(E, { name: l, iconType: u, width: "24px" }),
143
- /* @__PURE__ */ p("span", { className: "sr-only", children: o })
143
+ /* @__PURE__ */ x("button", { className: "pointer-events-auto leading-none", onClick: P, children: [
144
+ /* @__PURE__ */ m(I, { name: f, iconType: g, width: "24px" }),
145
+ /* @__PURE__ */ m("span", { className: "sr-only", children: c })
144
146
  ] }),
145
- /* @__PURE__ */ b("span", { className: "ms-auto flex gap-x-8", children: [
146
- n === "error" && /* @__PURE__ */ p(E, { name: "CrossDefault", width: "24px" }),
147
- n === "success" && /* @__PURE__ */ p(E, { name: "CheckDefault", width: "24px" })
147
+ /* @__PURE__ */ x("span", { className: "ms-auto flex gap-x-8", children: [
148
+ n === "error" && /* @__PURE__ */ m(I, { name: "CrossDefault", width: "24px" }),
149
+ n === "success" && /* @__PURE__ */ m(I, { name: "CheckDefault", width: "24px" })
148
150
  ] })
149
151
  ]
150
152
  }
@@ -154,5 +156,5 @@ const F = (e) => e ? G(e, { representation: "date" }) : "", K = ({
154
156
  );
155
157
  };
156
158
  export {
157
- K as DateField
159
+ W as DateField
158
160
  };
@@ -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>({ id, name, className, dataTestId, disabled, checked: initialChecked, value, tabIndex, onChange, hasDropdown, children, ...rest }: FilterProps<Value>): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Filter<Value = string>(props: FilterProps<Value>): import("react/jsx-runtime").JSX.Element;
@@ -1,56 +1,56 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { c } from "../../index-Cu0xwYjD.js";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { c as r } from "../../index-Cu0xwYjD.js";
3
+ import { useId as D } from "react";
3
4
  import "../../controls-l0sNRNKZ.js";
4
- import { Icon as m } from "../../atoms/Icons/Icon.js";
5
+ import { Icon as c } from "../../atoms/Icons/Icon.js";
5
6
  import "../../atoms/Icons/contexts/IconsContext.js";
6
- import { useValue as D } from "../../hooks/useValue.js";
7
- let N = 0;
8
- function I({
9
- id: n = "filter-" + N++,
10
- name: a = n,
11
- className: p,
12
- dataTestId: u,
13
- disabled: r,
14
- checked: f = !1,
15
- value: e,
16
- tabIndex: d = 0,
17
- onChange: l,
18
- hasDropdown: x,
19
- children: b,
20
- ...h
21
- }) {
22
- const { value: i, setValue: k } = D({
23
- name: a,
7
+ import { useValue as N } from "../../hooks/useValue.js";
8
+ function T(m) {
9
+ const d = D(), {
10
+ id: p = d,
11
+ name: l = p,
12
+ className: u,
13
+ dataTestId: h,
14
+ disabled: o,
15
+ checked: f = !1,
16
+ value: a,
17
+ tabIndex: b = 0,
18
+ onChange: t,
19
+ hasDropdown: x,
20
+ children: k,
21
+ ...w
22
+ } = m, { value: n, setValue: I } = N({
23
+ name: l,
24
24
  initialValue: f,
25
- onChange(w, o) {
26
- l == null || l(w, o ? e !== void 0 ? e : o : null);
25
+ onChange(v, s) {
26
+ t == null || t(v, s ? a !== void 0 ? a : s : null);
27
27
  }
28
28
  });
29
- return /* @__PURE__ */ s("label", { className: c(p, "relative"), children: [
30
- /* @__PURE__ */ t(
29
+ return /* @__PURE__ */ i("label", { className: r(u, "relative"), children: [
30
+ /* @__PURE__ */ e(
31
31
  "input",
32
32
  {
33
- ...h,
34
- name: a,
35
- "data-testid": u,
33
+ ...w,
34
+ name: l,
35
+ "data-testid": h,
36
36
  type: "checkbox",
37
- tabIndex: d,
37
+ tabIndex: b,
38
38
  onChange: () => {
39
- !r && k(!i);
39
+ !o && I(!n);
40
40
  },
41
- checked: i,
41
+ checked: n,
42
42
  "data-name": "Filter",
43
- disabled: r,
44
- value: e
43
+ disabled: o,
44
+ value: a
45
45
  }
46
46
  ),
47
- /* @__PURE__ */ s("span", { children: [
48
- /* @__PURE__ */ t("span", { className: c("text-b3 font-semibold"), children: b }),
49
- /* @__PURE__ */ t(m, { width: null, name: "CheckDefault", color: "black" }),
50
- x && /* @__PURE__ */ t(m, { name: "ArrowDefaultDown", className: "ml-8", width: "24px", color: "black" })
47
+ /* @__PURE__ */ i("span", { children: [
48
+ /* @__PURE__ */ e("span", { className: r("text-b3 font-semibold"), children: k }),
49
+ /* @__PURE__ */ e(c, { width: null, name: "CheckDefault", color: "black" }),
50
+ x && /* @__PURE__ */ e(c, { name: "ArrowDefaultDown", className: "ml-8", width: "24px", color: "black" })
51
51
  ] })
52
52
  ] });
53
53
  }
54
54
  export {
55
- I as Filter
55
+ T as Filter
56
56
  };
@@ -1,12 +1,13 @@
1
- import { HTMLAttributes, InputHTMLAttributes, PropsWithChildren } from 'react';
1
+ import { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
2
  import { ValidationStatus } from '../../hooks/useInternalStatus';
3
3
  import { FormLabelProps } from './FormLabel';
4
4
  export type FormControlProps<Value = unknown, Attributes extends HTMLAttributes<HTMLElement> = InputHTMLAttributes<HTMLInputElement>> = {
5
5
  value?: Value;
6
+ label?: ReactNode;
6
7
  validationStatus?: ValidationStatus;
7
8
  onChange?: (name: string, value: Value) => void;
8
9
  dataTestId?: string;
9
10
  dataName?: string;
10
11
  errorMessage?: string;
11
12
  } & Omit<Attributes & Partial<FormLabelProps>, 'onChange' | 'value'>;
12
- export declare const FormControl: <Value = string>({ id, label, description, disabled, className, validationStatus, children, errorMessage, dataTestId, dataName, layout, }: PropsWithChildren<FormControlProps<Value, InputHTMLAttributes<HTMLInputElement>>>) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const FormControl: <Value = string>({ id, label, description, disabled, required, className, validationStatus, children, errorMessage, dataTestId, dataName, layout, }: FormControlProps<Value, InputHTMLAttributes<HTMLInputElement>>) => import("react/jsx-runtime").JSX.Element;