@clubmed/trident-ui 1.0.1-beta.3 → 1.0.1-beta.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +16 -12
  3. package/fonts/Actions/tui-actions.css +6 -6
  4. package/fonts/Actions/tui-actions.eot +0 -0
  5. package/fonts/Actions/tui-actions.less +6 -6
  6. package/fonts/Actions/tui-actions.module.less +6 -6
  7. package/fonts/Actions/tui-actions.scss +6 -6
  8. package/fonts/Actions/tui-actions.styl +6 -6
  9. package/fonts/Actions/tui-actions.ttf +0 -0
  10. package/fonts/Actions/tui-actions.woff +0 -0
  11. package/fonts/Actions/tui-actions.woff2 +0 -0
  12. package/fonts/Activities/tui-activities.css +6 -6
  13. package/fonts/Activities/tui-activities.eot +0 -0
  14. package/fonts/Activities/tui-activities.less +6 -6
  15. package/fonts/Activities/tui-activities.module.less +6 -6
  16. package/fonts/Activities/tui-activities.scss +6 -6
  17. package/fonts/Activities/tui-activities.styl +6 -6
  18. package/fonts/Activities/tui-activities.ttf +0 -0
  19. package/fonts/Activities/tui-activities.woff +0 -0
  20. package/fonts/Activities/tui-activities.woff2 +0 -0
  21. package/fonts/Brand/tui-brand.css +6 -6
  22. package/fonts/Brand/tui-brand.eot +0 -0
  23. package/fonts/Brand/tui-brand.less +6 -6
  24. package/fonts/Brand/tui-brand.module.less +6 -6
  25. package/fonts/Brand/tui-brand.scss +6 -6
  26. package/fonts/Brand/tui-brand.styl +6 -6
  27. package/fonts/Brand/tui-brand.ttf +0 -0
  28. package/fonts/Brand/tui-brand.woff +0 -0
  29. package/fonts/Brand/tui-brand.woff2 +0 -0
  30. package/fonts/Covid/tui-covid.css +6 -6
  31. package/fonts/Covid/tui-covid.eot +0 -0
  32. package/fonts/Covid/tui-covid.less +6 -6
  33. package/fonts/Covid/tui-covid.module.less +6 -6
  34. package/fonts/Covid/tui-covid.scss +6 -6
  35. package/fonts/Covid/tui-covid.styl +6 -6
  36. package/fonts/Covid/tui-covid.ttf +0 -0
  37. package/fonts/Covid/tui-covid.woff +0 -0
  38. package/fonts/Covid/tui-covid.woff2 +0 -0
  39. package/fonts/Food/tui-food.css +6 -6
  40. package/fonts/Food/tui-food.eot +0 -0
  41. package/fonts/Food/tui-food.less +6 -6
  42. package/fonts/Food/tui-food.module.less +6 -6
  43. package/fonts/Food/tui-food.scss +6 -6
  44. package/fonts/Food/tui-food.styl +6 -6
  45. package/fonts/Food/tui-food.ttf +0 -0
  46. package/fonts/Food/tui-food.woff +0 -0
  47. package/fonts/Food/tui-food.woff2 +0 -0
  48. package/fonts/HappyToCare/tui-happy-to-care.css +6 -6
  49. package/fonts/HappyToCare/tui-happy-to-care.eot +0 -0
  50. package/fonts/HappyToCare/tui-happy-to-care.less +6 -6
  51. package/fonts/HappyToCare/tui-happy-to-care.module.less +6 -6
  52. package/fonts/HappyToCare/tui-happy-to-care.scss +6 -6
  53. package/fonts/HappyToCare/tui-happy-to-care.styl +6 -6
  54. package/fonts/HappyToCare/tui-happy-to-care.ttf +0 -0
  55. package/fonts/HappyToCare/tui-happy-to-care.woff +0 -0
  56. package/fonts/HappyToCare/tui-happy-to-care.woff2 +0 -0
  57. package/fonts/Places/tui-places.css +6 -6
  58. package/fonts/Places/tui-places.eot +0 -0
  59. package/fonts/Places/tui-places.less +6 -6
  60. package/fonts/Places/tui-places.module.less +6 -6
  61. package/fonts/Places/tui-places.scss +6 -6
  62. package/fonts/Places/tui-places.styl +6 -6
  63. package/fonts/Places/tui-places.ttf +0 -0
  64. package/fonts/Places/tui-places.woff +0 -0
  65. package/fonts/Places/tui-places.woff2 +0 -0
  66. package/fonts/Room/tui-room.css +6 -6
  67. package/fonts/Room/tui-room.eot +0 -0
  68. package/fonts/Room/tui-room.less +6 -6
  69. package/fonts/Room/tui-room.module.less +6 -6
  70. package/fonts/Room/tui-room.scss +6 -6
  71. package/fonts/Room/tui-room.styl +6 -6
  72. package/fonts/Room/tui-room.ttf +0 -0
  73. package/fonts/Room/tui-room.woff +0 -0
  74. package/fonts/Room/tui-room.woff2 +0 -0
  75. package/fonts/Services/tui-services.css +6 -6
  76. package/fonts/Services/tui-services.eot +0 -0
  77. package/fonts/Services/tui-services.less +6 -6
  78. package/fonts/Services/tui-services.module.less +6 -6
  79. package/fonts/Services/tui-services.scss +6 -6
  80. package/fonts/Services/tui-services.styl +6 -6
  81. package/fonts/Services/tui-services.ttf +0 -0
  82. package/fonts/Services/tui-services.woff +0 -0
  83. package/fonts/Services/tui-services.woff2 +0 -0
  84. package/fonts/Socials/tui-socials.css +6 -6
  85. package/fonts/Socials/tui-socials.eot +0 -0
  86. package/fonts/Socials/tui-socials.less +6 -6
  87. package/fonts/Socials/tui-socials.module.less +6 -6
  88. package/fonts/Socials/tui-socials.scss +6 -6
  89. package/fonts/Socials/tui-socials.styl +6 -6
  90. package/fonts/Socials/tui-socials.ttf +0 -0
  91. package/fonts/Socials/tui-socials.woff +0 -0
  92. package/fonts/Socials/tui-socials.woff2 +0 -0
  93. package/fonts/Transports/tui-transports.css +6 -6
  94. package/fonts/Transports/tui-transports.eot +0 -0
  95. package/fonts/Transports/tui-transports.less +6 -6
  96. package/fonts/Transports/tui-transports.module.less +6 -6
  97. package/fonts/Transports/tui-transports.scss +6 -6
  98. package/fonts/Transports/tui-transports.styl +6 -6
  99. package/fonts/Transports/tui-transports.ttf +0 -0
  100. package/fonts/Transports/tui-transports.woff +0 -0
  101. package/fonts/Transports/tui-transports.woff2 +0 -0
  102. package/fonts/Utilities/tui-utilities.css +6 -6
  103. package/fonts/Utilities/tui-utilities.eot +0 -0
  104. package/fonts/Utilities/tui-utilities.less +6 -6
  105. package/fonts/Utilities/tui-utilities.module.less +6 -6
  106. package/fonts/Utilities/tui-utilities.scss +6 -6
  107. package/fonts/Utilities/tui-utilities.styl +6 -6
  108. package/fonts/Utilities/tui-utilities.ttf +0 -0
  109. package/fonts/Utilities/tui-utilities.woff +0 -0
  110. package/fonts/Utilities/tui-utilities.woff2 +0 -0
  111. package/molecules/Forms/Checkboxes/Checkbox.js +26 -28
  112. package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
  113. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  @font-face {font-family: "tui-transports";
2
- src: url('tui-transports.eot?t=1722511312296'); /* IE9*/
3
- src: url('tui-transports.eot?t=1722511312296#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-transports.woff2?t=1722511312296") format("woff2"),
5
- url("tui-transports.woff?t=1722511312296") format("woff"),
6
- url('tui-transports.ttf?t=1722511312296') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-transports.svg?t=1722511312296#tui-transports') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-transports.eot?t=1726488124225'); /* IE9*/
3
+ src: url('tui-transports.eot?t=1726488124225#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-transports.woff2?t=1726488124225") format("woff2"),
5
+ url("tui-transports.woff?t=1726488124225") format("woff"),
6
+ url('tui-transports.ttf?t=1726488124225') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-transports.svg?t=1726488124225#tui-transports') format('svg'); /* iOS 4.1- */
8
8
  }
9
9
 
10
10
  [class^="tui-transports-"], [class*=" tui-transports-"] {
@@ -1,10 +1,10 @@
1
1
  @font-face {font-family: "tui-transports";
2
- src: url('tui-transports.eot?t=1722511312296'); /* IE9*/
3
- src: url('tui-transports.eot?t=1722511312296#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-transports.woff2?t=1722511312296") format("woff2"),
5
- url("tui-transports.woff?t=1722511312296") format("woff"),
6
- url('tui-transports.ttf?t=1722511312296') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-transports.svg?t=1722511312296#tui-transports') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-transports.eot?t=1726488124225'); /* IE9*/
3
+ src: url('tui-transports.eot?t=1726488124225#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-transports.woff2?t=1726488124225") format("woff2"),
5
+ url("tui-transports.woff?t=1726488124225") format("woff"),
6
+ url('tui-transports.ttf?t=1726488124225') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-transports.svg?t=1726488124225#tui-transports') format('svg'); /* iOS 4.1- */
8
8
  }
9
9
 
10
10
  [class^="tui-transports-"], [class*=" tui-transports-"] {
@@ -1,10 +1,10 @@
1
1
  @font-face {font-family: "tui-transports";
2
- src: url('tui-transports.eot?t=1722511312296'); /* IE9*/
3
- src: url('tui-transports.eot?t=1722511312296#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-transports.woff2?t=1722511312296") format("woff2"),
5
- url("tui-transports.woff?t=1722511312296") format("woff"),
6
- url('tui-transports.ttf?t=1722511312296') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-transports.svg?t=1722511312296#tui-transports') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-transports.eot?t=1726488124225'); /* IE9*/
3
+ src: url('tui-transports.eot?t=1726488124225#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-transports.woff2?t=1726488124225") format("woff2"),
5
+ url("tui-transports.woff?t=1726488124225") format("woff"),
6
+ url('tui-transports.ttf?t=1726488124225') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-transports.svg?t=1726488124225#tui-transports') format('svg'); /* iOS 4.1- */
8
8
  }
9
9
 
10
10
  [class^="tui-transports-"], [class*=" tui-transports-"] {
Binary file
@@ -1,11 +1,11 @@
1
1
  @font-face {
2
2
  font-family: "tui-utilities";
3
- src: url('tui-utilities.eot?t=1722511312435'); /* IE9*/
4
- src: url('tui-utilities.eot?t=1722511312435#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
- url("tui-utilities.woff2?t=1722511312435") format("woff2"),
6
- url("tui-utilities.woff?t=1722511312435") format("woff"),
7
- url('tui-utilities.ttf?t=1722511312435') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
8
- url('tui-utilities.svg?t=1722511312435#tui-utilities') format('svg'); /* iOS 4.1- */
3
+ src: url('tui-utilities.eot?t=1726488124398'); /* IE9*/
4
+ src: url('tui-utilities.eot?t=1726488124398#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+ url("tui-utilities.woff2?t=1726488124398") format("woff2"),
6
+ url("tui-utilities.woff?t=1726488124398") format("woff"),
7
+ url('tui-utilities.ttf?t=1726488124398') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
8
+ url('tui-utilities.svg?t=1726488124398#tui-utilities') format('svg'); /* iOS 4.1- */
9
9
  }
10
10
 
11
11
  [class^="tui-utilities-"], [class*=" tui-utilities-"] {
Binary file
@@ -1,10 +1,10 @@
1
1
  @font-face {font-family: "tui-utilities";
2
- src: url('tui-utilities.eot?t=1722511312435'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1722511312435#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1722511312435") format("woff2"),
5
- url("tui-utilities.woff?t=1722511312435") format("woff"),
6
- url('tui-utilities.ttf?t=1722511312435') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1722511312435#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1726488124398'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1726488124398#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1726488124398") format("woff2"),
5
+ url("tui-utilities.woff?t=1726488124398") format("woff"),
6
+ url('tui-utilities.ttf?t=1726488124398') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1726488124398#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=1722511312435'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1722511312435#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1722511312435") format("woff2"),
5
- url("tui-utilities.woff?t=1722511312435") format("woff"),
6
- url('tui-utilities.ttf?t=1722511312435') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1722511312435#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1726488124398'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1726488124398#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1726488124398") format("woff2"),
5
+ url("tui-utilities.woff?t=1726488124398") format("woff"),
6
+ url('tui-utilities.ttf?t=1726488124398') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1726488124398#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=1722511312435'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1722511312435#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1722511312435") format("woff2"),
5
- url("tui-utilities.woff?t=1722511312435") format("woff"),
6
- url('tui-utilities.ttf?t=1722511312435') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1722511312435#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1726488124398'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1726488124398#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1726488124398") format("woff2"),
5
+ url("tui-utilities.woff?t=1726488124398") format("woff"),
6
+ url('tui-utilities.ttf?t=1726488124398') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1726488124398#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=1722511312435'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1722511312435#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1722511312435") format("woff2"),
5
- url("tui-utilities.woff?t=1722511312435") format("woff"),
6
- url('tui-utilities.ttf?t=1722511312435') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1722511312435#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1726488124398'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1726488124398#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1726488124398") format("woff2"),
5
+ url("tui-utilities.woff?t=1726488124398") format("woff"),
6
+ url('tui-utilities.ttf?t=1726488124398') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1726488124398#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
@@ -1,43 +1,41 @@
1
1
  import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
2
  import { c } from "../../../index-Cu0xwYjD.js";
3
3
  import { useId as D } from "react";
4
- import { Icon as u } from "../../../atoms/Icons/Icon.js";
4
+ import { Icon as h } from "../../../atoms/Icons/Icon.js";
5
5
  import "../../../atoms/Icons/contexts/IconsContext.js";
6
6
  import { useValue as S } from "../../../hooks/useValue.js";
7
7
  import "../../../controls-l0sNRNKZ.js";
8
8
  import { useInternalStatus as V } from "../../../hooks/useInternalStatus.js";
9
- function B(x) {
10
- const f = D(), {
11
- id: s = f,
9
+ function B(u) {
10
+ const x = D(), {
11
+ id: s = x,
12
12
  name: n = s,
13
- className: b,
14
- dataTestId: k,
13
+ className: f,
14
+ dataTestId: b,
15
15
  disabled: r = !1,
16
- checked: v = !1,
16
+ checked: k = !1,
17
17
  value: l,
18
18
  size: i = 24,
19
- tabIndex: N = 0,
20
- validationStatus: g = "default",
19
+ tabIndex: v = 0,
20
+ validationStatus: N = "default",
21
21
  errorMessage: d,
22
- children: y,
22
+ children: g,
23
23
  onChange: o,
24
- ...I
25
- } = x, { value: m, setValue: C } = S({
24
+ ...y
25
+ } = u, { value: m, setValue: I } = S({
26
26
  name: n,
27
- initialValue: v,
28
- onChange(w, h) {
29
- o == null || o(w, h ? l !== void 0 ? l : h : null);
27
+ initialValue: k,
28
+ onChange(w, p) {
29
+ o == null || o(w, p ? l !== void 0 ? l : p : null);
30
30
  }
31
31
  }), e = V({
32
32
  isDisabled: r,
33
- validationStatus: g
34
- }), p = e === "error" && d;
33
+ validationStatus: N
34
+ }), C = e === "error" && d;
35
35
  return /* @__PURE__ */ t(
36
36
  "div",
37
37
  {
38
- className: c(b, "flex flex-col space-y-2", {
39
- "mb-24": !p
40
- }),
38
+ className: c("flex flex-col space-y-2", f),
41
39
  "data-testid": `checkbox-container-${s}`,
42
40
  children: [
43
41
  /* @__PURE__ */ t(
@@ -52,13 +50,13 @@ function B(x) {
52
50
  /* @__PURE__ */ a(
53
51
  "input",
54
52
  {
55
- ...I,
53
+ ...y,
56
54
  name: n,
57
- "data-testid": k,
55
+ "data-testid": b,
58
56
  type: "checkbox",
59
- tabIndex: N,
57
+ tabIndex: v,
60
58
  onChange: () => {
61
- !r && C(!m);
59
+ !r && I(!m);
62
60
  },
63
61
  checked: m,
64
62
  "data-name": "Checkbox",
@@ -73,7 +71,7 @@ function B(x) {
73
71
  className: c({ "!border-red": e === "error" }),
74
72
  "data-testid": `check-container-${s}`,
75
73
  children: /* @__PURE__ */ a(
76
- u,
74
+ h,
77
75
  {
78
76
  name: "CheckDefault",
79
77
  type: "svg",
@@ -85,12 +83,12 @@ function B(x) {
85
83
  }
86
84
  )
87
85
  ] }),
88
- y
86
+ g
89
87
  ]
90
88
  }
91
89
  ),
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" }),
90
+ C && /* @__PURE__ */ t("span", { className: "text-red text-b4 flex items-start space-x-4 ps-20", role: "alert", children: [
91
+ /* @__PURE__ */ a(h, { name: "Error", width: "20px" }),
94
92
  d
95
93
  ] })
96
94
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../../lib/molecules/Forms/Checkboxes/Checkbox.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useId } from 'react';\nimport { Icon } from '@/atoms/Icons/index.js';\nimport { useValue } from '@/hooks/useValue.js';\nimport '../controls.css';\nimport { FormControlProps } from '@/molecules/Forms/FormControl';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\n\nexport interface CheckboxProps<Value = string> extends FormControlProps<Value> {\n size?: number;\n onChange?: (name: string, value: Value | null) => void;\n}\n\nexport function Checkbox<Value = string>(props: CheckboxProps<Value>) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n className,\n dataTestId,\n disabled = false,\n checked: initialChecked = false,\n value,\n size = 24,\n tabIndex = 0,\n validationStatus = 'default',\n errorMessage,\n children,\n onChange,\n ...rest\n } = props;\n\n const { value: checked, setValue } = useValue<boolean>({\n name,\n initialValue: initialChecked,\n onChange(name, checked) {\n onChange?.(name, checked ? ((value !== undefined ? value : checked) as Value) : null);\n },\n });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n const shouldDisplayErrorMessage = internalStatus === 'error' && errorMessage;\n\n return (\n <div\n className={classnames(className, 'flex flex-col space-y-2', {\n 'mb-24': !shouldDisplayErrorMessage,\n })}\n data-testid={`checkbox-container-${id}`}\n >\n <label\n className={classnames('cursor-pointer relative flex text-b3 items-center', {\n 'text-grey': internalStatus === 'disabled',\n 'text-black': internalStatus !== 'default',\n })}\n >\n <span className=\"relative self-start me-8\">\n <input\n {...rest}\n name={name}\n data-testid={dataTestId}\n type=\"checkbox\"\n tabIndex={tabIndex}\n onChange={() => {\n !disabled && setValue(!checked);\n }}\n checked={checked}\n data-name=\"Checkbox\"\n disabled={disabled}\n value={value as any}\n />\n\n <span\n style={{ height: size, width: size }}\n className={classnames({ '!border-red': internalStatus === 'error' })}\n data-testid={`check-container-${id}`}\n >\n <Icon\n name=\"CheckDefault\"\n type=\"svg\"\n width={`${size}px`}\n color=\"black\"\n className=\"absolute\"\n />\n </span>\n </span>\n\n {children}\n </label>\n\n {shouldDisplayErrorMessage && (\n <span className=\"text-red text-b4 flex items-start space-x-4 ps-20\" role=\"alert\">\n <Icon name=\"Error\" width=\"20px\" />\n {errorMessage}\n </span>\n )}\n </div>\n );\n}\n"],"names":["Checkbox","props","internalId","useId","id","name","className","dataTestId","disabled","initialChecked","value","size","tabIndex","validationStatus","errorMessage","children","onChange","rest","checked","setValue","useValue","internalStatus","useInternalStatus","shouldDisplayErrorMessage","jsxs","classnames","jsx","Icon"],"mappings":";;;;;;;;AAaO,SAASA,EAAyBC,GAA6B;AACpE,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,WAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAASC,IAAiB;AAAA,IAC1B,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,kBAAAC,IAAmB;AAAA,IACnB,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC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B,SAAS;AAAA,oBACnE,eAAa,mBAAmBjB,CAAE;AAAA,oBAElC,UAAA,gBAAAsB;AAAA,sBAACC;AAAA,sBAAA;AAAA,wBACC,MAAK;AAAA,wBACL,MAAK;AAAA,wBACL,OAAO,GAAGhB,CAAI;AAAA,wBACd,OAAM;AAAA,wBACN,WAAU;AAAA,sBAAA;AAAA,oBACZ;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA,GACF;AAAA,cAECI;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,QAECQ,KACE,gBAAAC,EAAA,QAAA,EAAK,WAAU,qDAAoD,MAAK,SACvE,UAAA;AAAA,UAAA,gBAAAE,EAACC,GAAK,EAAA,MAAK,SAAQ,OAAM,QAAO;AAAA,UAC/Bb;AAAA,QAAA,GACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../../lib/molecules/Forms/Checkboxes/Checkbox.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { useId } from 'react';\nimport { Icon } from '@/atoms/Icons/index.js';\nimport { useValue } from '@/hooks/useValue.js';\nimport '../controls.css';\nimport { FormControlProps } from '@/molecules/Forms/FormControl';\nimport { useInternalStatus } from '@/hooks/useInternalStatus';\n\nexport interface CheckboxProps<Value = string> extends FormControlProps<Value> {\n size?: number;\n onChange?: (name: string, value: Value | null) => void;\n}\n\nexport function Checkbox<Value = string>(props: CheckboxProps<Value>) {\n const internalId = useId();\n\n const {\n id = internalId,\n name = id,\n className,\n dataTestId,\n disabled = false,\n checked: initialChecked = false,\n value,\n size = 24,\n tabIndex = 0,\n validationStatus = 'default',\n errorMessage,\n children,\n onChange,\n ...rest\n } = props;\n\n const { value: checked, setValue } = useValue<boolean>({\n name,\n initialValue: initialChecked,\n onChange(name, checked) {\n onChange?.(name, checked ? ((value !== undefined ? value : checked) as Value) : null);\n },\n });\n const internalStatus = useInternalStatus({\n isDisabled: disabled,\n validationStatus,\n });\n\n const shouldDisplayErrorMessage = internalStatus === 'error' && errorMessage;\n\n return (\n <div\n className={classnames('flex flex-col space-y-2', className)}\n data-testid={`checkbox-container-${id}`}\n >\n <label\n className={classnames('cursor-pointer relative flex text-b3 items-center', {\n 'text-grey': internalStatus === 'disabled',\n 'text-black': internalStatus !== 'default',\n })}\n >\n <span className=\"relative self-start me-8\">\n <input\n {...rest}\n name={name}\n data-testid={dataTestId}\n type=\"checkbox\"\n tabIndex={tabIndex}\n onChange={() => {\n !disabled && setValue(!checked);\n }}\n checked={checked}\n data-name=\"Checkbox\"\n disabled={disabled}\n value={value as any}\n />\n\n <span\n style={{ height: size, width: size }}\n className={classnames({ '!border-red': internalStatus === 'error' })}\n data-testid={`check-container-${id}`}\n >\n <Icon\n name=\"CheckDefault\"\n type=\"svg\"\n width={`${size}px`}\n color=\"black\"\n className=\"absolute\"\n />\n </span>\n </span>\n\n {children}\n </label>\n\n {shouldDisplayErrorMessage && (\n <span className=\"text-red text-b4 flex items-start space-x-4 ps-20\" role=\"alert\">\n <Icon name=\"Error\" width=\"20px\" />\n {errorMessage}\n </span>\n )}\n </div>\n );\n}\n"],"names":["Checkbox","props","internalId","useId","id","name","className","dataTestId","disabled","initialChecked","value","size","tabIndex","validationStatus","errorMessage","children","onChange","rest","checked","setValue","useValue","internalStatus","useInternalStatus","shouldDisplayErrorMessage","jsxs","classnames","jsx","Icon"],"mappings":";;;;;;;;AAaO,SAASA,EAAyBC,GAA6B;AACpE,QAAMC,IAAaC,KAEb;AAAA,IACJ,IAAAC,IAAKF;AAAA,IACL,MAAAG,IAAOD;AAAA,IACP,WAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC,IAAW;AAAA,IACX,SAASC,IAAiB;AAAA,IAC1B,OAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,UAAAC,IAAW;AAAA,IACX,kBAAAC,IAAmB;AAAA,IACnB,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC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E;AAAA,oBAElC,UAAA,gBAAAsB;AAAA,sBAACC;AAAA,sBAAA;AAAA,wBACC,MAAK;AAAA,wBACL,MAAK;AAAA,wBACL,OAAO,GAAGhB,CAAI;AAAA,wBACd,OAAM;AAAA,wBACN,WAAU;AAAA,sBAAA;AAAA,oBACZ;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA,GACF;AAAA,cAECI;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,QAECQ,KACE,gBAAAC,EAAA,QAAA,EAAK,WAAU,qDAAoD,MAAK,SACvE,UAAA;AAAA,UAAA,gBAAAE,EAACC,GAAK,EAAA,MAAK,SAAQ,OAAM,QAAO;AAAA,UAC/Bb;AAAA,QAAA,GACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubmed/trident-ui",
3
- "version": "1.0.1-beta.3",
3
+ "version": "1.0.1-beta.5",
4
4
  "type": "module",
5
5
  "description": "Shared ClubMed React UI components",
6
6
  "keywords": [