@clubmed/trident-ui 1.0.0-beta.6 → 1.0.0-beta.8

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