@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.
Files changed (130) hide show
  1. package/CHANGELOG.md +7 -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/Checkboxes/Checkbox.d.ts +1 -1
  111. package/molecules/Forms/Checkboxes/Checkbox.js +37 -37
  112. package/molecules/Forms/Checkboxes/Checkboxes.d.ts +1 -1
  113. package/molecules/Forms/Checkboxes/Checkboxes.js +30 -31
  114. package/molecules/Forms/DateField.d.ts +1 -17
  115. package/molecules/Forms/DateField.js +98 -99
  116. package/molecules/Forms/Filter.d.ts +1 -1
  117. package/molecules/Forms/Filter.js +38 -38
  118. package/molecules/Forms/NumberField.d.ts +3 -3
  119. package/molecules/Forms/NumberField.js +76 -76
  120. package/molecules/Forms/Password/Password.js +35 -36
  121. package/molecules/Forms/Radios/Radio.d.ts +1 -1
  122. package/molecules/Forms/Radios/Radio.js +31 -31
  123. package/molecules/Forms/Radios/RadioGroup.d.ts +1 -1
  124. package/molecules/Forms/Radios/RadioGroup.js +28 -29
  125. package/molecules/Forms/Range.d.ts +2 -2
  126. package/molecules/Forms/Range.js +181 -183
  127. package/molecules/Forms/Switch.d.ts +1 -1
  128. package/molecules/Forms/Switch.js +28 -28
  129. package/molecules/Forms/TextField.js +38 -38
  130. package/package.json +1 -1
@@ -1,30 +1,30 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { c as m } from "../../index-Cu0xwYjD.js";
3
- import { useValue as x } from "../../hooks/useValue.js";
2
+ import { c as x } from "../../index-Cu0xwYjD.js";
3
+ import { useValue as f } from "../../hooks/useValue.js";
4
4
  import "../../controls-l0sNRNKZ.js";
5
- let f = 0;
6
- function d({
7
- id: a = `switch-${++f}`,
8
- name: r = a,
9
- className: s,
10
- checked: o,
11
- disabled: c,
12
- width: t = 56,
13
- onChange: n,
14
- tabIndex: h = 0,
15
- children: p
16
- }) {
17
- const { value: i, setValue: u } = x({
18
- initialValue: o,
19
- name: r,
20
- onChange: n
5
+ import { useId as w } from "react";
6
+ function k(r) {
7
+ const s = w(), {
8
+ id: n = s,
9
+ name: a = n,
10
+ className: o,
11
+ checked: h,
12
+ disabled: t,
13
+ width: i = 56,
14
+ onChange: d,
15
+ tabIndex: m = 0,
16
+ children: p
17
+ } = r, { value: c, setValue: u } = f({
18
+ initialValue: h,
19
+ name: a,
20
+ onChange: d
21
21
  });
22
22
  return /* @__PURE__ */ l(
23
23
  "label",
24
24
  {
25
- className: m(s, "relative flex items-center gap-[10px]", {
26
- "text-grey": c,
27
- "cursor-pointer": !c
25
+ className: x(o, "relative flex items-center gap-[10px]", {
26
+ "text-grey": t,
27
+ "cursor-pointer": !t
28
28
  }),
29
29
  "data-testid": "SwitchContainer",
30
30
  children: [
@@ -33,19 +33,19 @@ function d({
33
33
  "input",
34
34
  {
35
35
  type: "checkbox",
36
- name: r,
37
- tabIndex: h,
38
- checked: i,
39
- disabled: c,
36
+ name: a,
37
+ tabIndex: m,
38
+ checked: c,
39
+ disabled: t,
40
40
  role: "switch",
41
41
  className: "absolute w-full h-full opacity-0 cursor-pointer",
42
42
  onChange: () => {
43
- !c && u(!i);
43
+ !t && u(!c);
44
44
  },
45
45
  "data-name": "Switch"
46
46
  }
47
47
  ),
48
- /* @__PURE__ */ e("span", { style: { height: t * 4 / 7, width: t }, children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: t * 3 / 7, children: /* @__PURE__ */ l("g", { children: [
48
+ /* @__PURE__ */ e("span", { style: { height: i * 4 / 7, width: i }, children: /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", width: i * 3 / 7, children: /* @__PURE__ */ l("g", { children: [
49
49
  /* @__PURE__ */ e("circle", { cx: 12, cy: 12, r: 12, fill: "hsl(var(--color-white))" }),
50
50
  /* @__PURE__ */ e("circle", { cx: 12, cy: 12, r: 4, fill: "hsl(var(--color-grey))" })
51
51
  ] }) }) })
@@ -56,5 +56,5 @@ function d({
56
56
  );
57
57
  }
58
58
  export {
59
- d as Switch
59
+ k as Switch
60
60
  };
@@ -1,66 +1,66 @@
1
1
  import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
2
  import { c as p } from "../../index-Cu0xwYjD.js";
3
- import { useValue as k } from "../../hooks/useValue.js";
4
- import { useInternalStatus as C } from "../../hooks/useInternalStatus.js";
3
+ import { useValue as C } from "../../hooks/useValue.js";
4
+ import { useInternalStatus as I } from "../../hooks/useInternalStatus.js";
5
5
  import { FormControl as T } from "./FormControl.js";
6
6
  import { Icon as r } from "../../atoms/Icons/Icon.js";
7
7
  import "../../atoms/Icons/contexts/IconsContext.js";
8
- let F = 0;
9
- const $ = (u) => {
10
- const {
11
- id: a = `text-field-${++F}`,
8
+ import { useId as F } from "react";
9
+ const B = (u) => {
10
+ const m = F(), {
11
+ id: a = m,
12
12
  name: s = a,
13
- label: m,
14
- value: x,
15
- description: b,
13
+ label: x,
14
+ value: b,
15
+ description: f,
16
16
  validationStatus: c = "default",
17
- hasDropdown: l = !1,
18
- icon: o,
19
- iconType: i,
20
- errorMessage: f,
21
- disabled: n = !1,
22
- className: h,
23
- dataTestId: g = "TextField",
24
- onChange: v,
25
- ...w
26
- } = u, { value: y, setValue: N } = k({ name: s, initialValue: x, onChange: v }), e = C({
27
- isDisabled: n,
17
+ hasDropdown: o = !1,
18
+ icon: l,
19
+ iconType: n,
20
+ errorMessage: h,
21
+ disabled: i = !1,
22
+ className: g,
23
+ dataTestId: v = "TextField",
24
+ onChange: w,
25
+ ...y
26
+ } = u, { value: N, setValue: D } = C({ name: s, initialValue: b, onChange: w }), e = I({
27
+ isDisabled: i,
28
28
  validationStatus: c
29
29
  });
30
30
  return /* @__PURE__ */ t(
31
31
  T,
32
32
  {
33
33
  id: a,
34
- label: m,
35
- description: b,
34
+ label: x,
35
+ description: f,
36
36
  dataName: "TextField",
37
- dataTestId: g,
38
- disabled: n,
37
+ dataTestId: v,
38
+ disabled: i,
39
39
  validationStatus: c,
40
- errorMessage: f,
40
+ errorMessage: h,
41
41
  children: /* @__PURE__ */ d("div", { className: "relative", children: [
42
42
  /* @__PURE__ */ t(
43
43
  "input",
44
44
  {
45
- ...w,
45
+ ...y,
46
46
  id: a,
47
47
  name: s,
48
- disabled: n,
49
- value: y,
50
- onChange: (D) => N(D.target.value),
48
+ disabled: i,
49
+ value: N,
50
+ onChange: (k) => D(k.target.value),
51
51
  className: p(
52
52
  "text-b3 rounded-pill w-full border px-20 py-12 font-normal outline-none",
53
53
  {
54
54
  "border-lightGrey focus:border-black active:border-black": e === "default",
55
- "ps-[52px]": o,
56
- "pe-[52px]": l || e === "error" || e === "success",
57
- "pe-[84px]": l && (e === "error" || e === "success"),
55
+ "ps-[52px]": l,
56
+ "pe-[52px]": o || e === "error" || e === "success",
57
+ "pe-[84px]": o && (e === "error" || e === "success"),
58
58
  "bg-white text-black": e !== "disabled",
59
59
  "bg-pearl text-grey": e === "disabled",
60
60
  "border-red": e === "error",
61
61
  "border-green": e === "success"
62
62
  },
63
- h
63
+ g
64
64
  ),
65
65
  "aria-label": s
66
66
  }
@@ -77,11 +77,11 @@ const $ = (u) => {
77
77
  }
78
78
  ),
79
79
  children: [
80
- o && /* @__PURE__ */ t(r, { name: o, width: "24px" }),
80
+ l && /* @__PURE__ */ t(r, { name: l, width: "24px" }),
81
81
  /* @__PURE__ */ d("span", { className: "ms-auto flex gap-x-8", children: [
82
- e === "error" && /* @__PURE__ */ t(r, { name: "CrossDefault", width: "24px", type: i }),
83
- e === "success" && /* @__PURE__ */ t(r, { name: "CheckDefault", width: "24px", type: i }),
84
- l && /* @__PURE__ */ t("button", { className: "pointer-events-auto", children: /* @__PURE__ */ t(r, { name: "ArrowDefaultDown", width: "24px", color: "black", type: i }) })
82
+ e === "error" && /* @__PURE__ */ t(r, { name: "CrossDefault", width: "24px", type: n }),
83
+ e === "success" && /* @__PURE__ */ t(r, { name: "CheckDefault", width: "24px", type: n }),
84
+ o && /* @__PURE__ */ t("button", { className: "pointer-events-auto", children: /* @__PURE__ */ t(r, { name: "ArrowDefaultDown", width: "24px", color: "black", type: n }) })
85
85
  ] })
86
86
  ]
87
87
  }
@@ -91,5 +91,5 @@ const $ = (u) => {
91
91
  );
92
92
  };
93
93
  export {
94
- $ as TextField
94
+ B as TextField
95
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubmed/trident-ui",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.5",
4
4
  "type": "module",
5
5
  "description": "Shared ClubMed React UI components",
6
6
  "keywords": [