@clubmed/trident-ui 1.0.0-alpha.40 → 1.0.0-alpha.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. package/CHANGELOG.md +8 -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/{Checkbox.d.ts → Checkbox/Checkbox.d.ts} +1 -1
  111. package/molecules/Forms/Checkbox/Checkbox.js +72 -0
  112. package/molecules/Forms/{Checkboxes.d.ts → Checkboxes/Checkboxes.d.ts} +1 -1
  113. package/molecules/Forms/Checkboxes/Checkboxes.js +49 -0
  114. package/package.json +1 -1
  115. package/molecules/Forms/Checkbox.js +0 -71
  116. package/molecules/Forms/Checkboxes.js +0 -49
@@ -1,10 +1,10 @@
1
1
  @font-face {font-family: "tui-utilities";
2
- src: url('tui-utilities.eot?t=1712914190180'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1712914190180#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1712914190180") format("woff2"),
5
- url("tui-utilities.woff?t=1712914190180") format("woff"),
6
- url('tui-utilities.ttf?t=1712914190180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1712914190180#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1713261344278'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1713261344278#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1713261344278") format("woff2"),
5
+ url("tui-utilities.woff?t=1713261344278") format("woff"),
6
+ url('tui-utilities.ttf?t=1713261344278') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1713261344278#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=1712914190180'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1712914190180#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1712914190180") format("woff2"),
5
- url("tui-utilities.woff?t=1712914190180") format("woff"),
6
- url('tui-utilities.ttf?t=1712914190180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1712914190180#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1713261344278'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1713261344278#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1713261344278") format("woff2"),
5
+ url("tui-utilities.woff?t=1713261344278") format("woff"),
6
+ url('tui-utilities.ttf?t=1713261344278') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1713261344278#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=1712914190180'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1712914190180#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1712914190180") format("woff2"),
5
- url("tui-utilities.woff?t=1712914190180") format("woff"),
6
- url('tui-utilities.ttf?t=1712914190180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1712914190180#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1713261344278'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1713261344278#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1713261344278") format("woff2"),
5
+ url("tui-utilities.woff?t=1713261344278") format("woff"),
6
+ url('tui-utilities.ttf?t=1713261344278') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1713261344278#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=1712914190180'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1712914190180#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1712914190180") format("woff2"),
5
- url("tui-utilities.woff?t=1712914190180") format("woff"),
6
- url('tui-utilities.ttf?t=1712914190180') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1712914190180#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1713261344278'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1713261344278#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1713261344278") format("woff2"),
5
+ url("tui-utilities.woff?t=1713261344278") format("woff"),
6
+ url('tui-utilities.ttf?t=1713261344278') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1713261344278#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,5 +1,5 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import './controls.css';
2
+ import '../controls.css';
3
3
  export interface CheckboxProps<Value = string> extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
4
4
  /**
5
5
  * The data-testid to apply to the button.
@@ -0,0 +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";
4
+ import "../../../atoms/Icons/contexts/IconsContext.js";
5
+ import { useValue as v } from "../../../hooks/useValue.js";
6
+ 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({
23
+ name: l,
24
+ initialValue: u,
25
+ onChange(k, s) {
26
+ r == null || r(k, s ? t !== void 0 ? t : s : null);
27
+ }
28
+ });
29
+ return /* @__PURE__ */ i(
30
+ "label",
31
+ {
32
+ className: b(p, "cursor-pointer relative flex items-center gap-8", {
33
+ "text-grey": e
34
+ }),
35
+ children: [
36
+ /* @__PURE__ */ i("span", { className: "relative", children: [
37
+ /* @__PURE__ */ a(
38
+ "input",
39
+ {
40
+ ...f,
41
+ name: l,
42
+ "data-testid": n,
43
+ type: "checkbox",
44
+ tabIndex: h,
45
+ onChange: () => {
46
+ !e && d(!o);
47
+ },
48
+ checked: o,
49
+ "data-name": "Checkbox",
50
+ disabled: e,
51
+ value: t
52
+ }
53
+ ),
54
+ /* @__PURE__ */ a("span", { style: { height: c, width: c }, children: /* @__PURE__ */ a(
55
+ y,
56
+ {
57
+ name: "CheckDefault",
58
+ type: "svg",
59
+ width: `${c}px`,
60
+ color: "black",
61
+ className: "absolute"
62
+ }
63
+ ) })
64
+ ] }),
65
+ x
66
+ ]
67
+ }
68
+ );
69
+ }
70
+ export {
71
+ I as Checkbox
72
+ };
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { FormControlProps } from './FormControl.js';
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
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;
@@ -0,0 +1,49 @@
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";
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({
19
+ name: t,
20
+ initialValue: u,
21
+ formatter(e) {
22
+ return e !== void 0 ? [].concat(e) : e;
23
+ },
24
+ defaultValue: c || [],
25
+ onChange: p
26
+ });
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, {
31
+ ...e.props,
32
+ name: t,
33
+ id: `${s}-${n}`,
34
+ disabled: i,
35
+ readOnly: f,
36
+ tabIndex: b + n + 1,
37
+ 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));
41
+ }
42
+ });
43
+ }
44
+ return e;
45
+ }) });
46
+ }
47
+ export {
48
+ q as Checkboxes
49
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubmed/trident-ui",
3
- "version": "1.0.0-alpha.40",
3
+ "version": "1.0.0-alpha.41",
4
4
  "type": "module",
5
5
  "description": "Shared ClubMed React UI components",
6
6
  "keywords": [
@@ -1,71 +0,0 @@
1
- import { jsxs as s, jsx as l } from "react/jsx-runtime";
2
- import { c as b } from "../../index-Cu0xwYjD.js";
3
- import { Icon as y } from "../../atoms/Icons/Icon.js";
4
- import "../../atoms/Icons/contexts/IconsContext.js";
5
- import { useValue as N } from "../../hooks/useValue.js";
6
- import "../../controls-l0sNRNKZ.js";
7
- let V = 0;
8
- function I({
9
- id: m = "checkbox-" + V++,
10
- name: r = m,
11
- className: h,
12
- dataTestId: n,
13
- disabled: t,
14
- checked: p = !1,
15
- value: a,
16
- size: e = 24,
17
- tabIndex: u = 0,
18
- children: x,
19
- onChange: c,
20
- ...f
21
- }) {
22
- const { value: o, setValue: d } = N({
23
- name: r,
24
- initialValue: p,
25
- onChange(k, i) {
26
- c == null || c(k, i ? a !== void 0 ? a : i : null);
27
- }
28
- });
29
- return /* @__PURE__ */ s(
30
- "label",
31
- {
32
- className: b(h, "relative flex items-center gap-8", {
33
- "text-grey": t
34
- }),
35
- children: [
36
- /* @__PURE__ */ s("span", { className: "relative", children: [
37
- /* @__PURE__ */ l(
38
- "input",
39
- {
40
- ...f,
41
- name: r,
42
- "data-testid": n,
43
- type: "checkbox",
44
- tabIndex: u,
45
- onChange: () => {
46
- !t && d(!o);
47
- },
48
- checked: o,
49
- "data-name": "Checkbox",
50
- disabled: t,
51
- value: a
52
- }
53
- ),
54
- /* @__PURE__ */ l("span", { style: { height: e, width: e }, children: /* @__PURE__ */ l(
55
- y,
56
- {
57
- style: { height: e, width: e },
58
- name: "CheckDefault",
59
- color: "black",
60
- className: "absolute"
61
- }
62
- ) })
63
- ] }),
64
- x
65
- ]
66
- }
67
- );
68
- }
69
- export {
70
- I as Checkbox
71
- };
@@ -1,49 +0,0 @@
1
- import { jsx as k } from "react/jsx-runtime";
2
- import { Children as v, isValidElement as C, cloneElement as N } from "react";
3
- import { useValue as E } from "../../hooks/useValue.js";
4
- import { c as m } from "../../index-Cu0xwYjD.js";
5
- let $ = 0;
6
- function q({
7
- id: s = "checkboxes-" + $++,
8
- name: t = s,
9
- children: u,
10
- value: c,
11
- defaultValue: p,
12
- onChange: i,
13
- disabled: f,
14
- readOnly: b,
15
- tabIndex: x = 0,
16
- ...a
17
- }) {
18
- const { value: o, setValue: l } = E({
19
- name: t,
20
- initialValue: c,
21
- formatter(e) {
22
- return e !== void 0 ? [].concat(e) : e;
23
- },
24
- defaultValue: p || [],
25
- onChange: i
26
- });
27
- return /* @__PURE__ */ k("div", { ...a, className: m(a.className, ""), role: "listbox", children: v.map(u, (e, n) => {
28
- if (C(e)) {
29
- const r = e.props.value;
30
- return N(e, {
31
- ...e.props,
32
- name: t,
33
- id: `${s}-${n}`,
34
- disabled: f,
35
- readOnly: b,
36
- tabIndex: x + n + 1,
37
- className: m("mb-12 last:mb-0", e.props),
38
- checked: o.includes(r),
39
- onChange(g, V) {
40
- l(V === null ? o.filter((d) => d !== r) : o.concat(r));
41
- }
42
- });
43
- }
44
- return e;
45
- }) });
46
- }
47
- export {
48
- q as Checkboxes
49
- };