@clubmed/trident-ui 1.0.0-alpha.48 → 1.0.0-alpha.49

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/contexts/Device.js +1 -0
  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/hooks/useKeyboardControls.js +16 -15
  112. package/molecules/Forms/Checkboxes/index.d.ts +2 -0
  113. package/molecules/Forms/Checkboxes/index.js +6 -0
  114. package/molecules/Forms/Password/index.d.ts +2 -0
  115. package/molecules/Forms/Password/index.js +6 -0
  116. package/molecules/Forms/{Radio.d.ts → Radios/Radio.d.ts} +1 -1
  117. package/molecules/Forms/{Radio.js → Radios/Radio.js} +3 -3
  118. package/molecules/Forms/{RadioGroup.d.ts → Radios/RadioGroup.d.ts} +1 -1
  119. package/molecules/Forms/{RadioGroup.js → Radios/RadioGroup.js} +2 -2
  120. package/molecules/Forms/Radios/index.d.ts +2 -0
  121. package/molecules/Forms/Radios/index.js +6 -0
  122. package/molecules/Forms/{Switch/Switch.d.ts → Switch.d.ts} +1 -1
  123. package/molecules/Forms/{Switch/Switch.js → Switch.js} +3 -3
  124. package/molecules/Loader.js +1 -0
  125. package/molecules/Tabs/{Header.js → TabsHeader.js} +10 -9
  126. package/molecules/Tabs/{Heading.js → TabsHeading.js} +1 -0
  127. package/molecules/Tabs/{Panel.js → TabsPanel.js} +9 -8
  128. package/molecules/Tabs/context/TabControl.js +20 -19
  129. package/molecules/Tabs/index.d.ts +5 -0
  130. package/molecules/Tabs/index.js +12 -0
  131. package/package.json +29 -7
  132. package/hooks/__mocks__/useSafeBoop.d.ts +0 -4
  133. package/hooks/__mocks__/useSafeBoop.js +0 -10
  134. /package/molecules/Forms/{Checkbox → Checkboxes}/Checkbox.d.ts +0 -0
  135. /package/molecules/Forms/{Checkbox → Checkboxes}/Checkbox.js +0 -0
  136. /package/molecules/Tabs/{Body.d.ts → TabsBody.d.ts} +0 -0
  137. /package/molecules/Tabs/{Body.js → TabsBody.js} +0 -0
  138. /package/molecules/Tabs/{Header.d.ts → TabsHeader.d.ts} +0 -0
  139. /package/molecules/Tabs/{Heading.d.ts → TabsHeading.d.ts} +0 -0
  140. /package/molecules/Tabs/{Panel.d.ts → TabsPanel.d.ts} +0 -0
@@ -1,11 +1,11 @@
1
1
  @font-face {
2
2
  font-family: "tui-utilities";
3
- src: url('tui-utilities.eot?t=1714985553575'); /* IE9*/
4
- src: url('tui-utilities.eot?t=1714985553575#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
- url("tui-utilities.woff2?t=1714985553575") format("woff2"),
6
- url("tui-utilities.woff?t=1714985553575") format("woff"),
7
- url('tui-utilities.ttf?t=1714985553575') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
8
- url('tui-utilities.svg?t=1714985553575#tui-utilities') format('svg'); /* iOS 4.1- */
3
+ src: url('tui-utilities.eot?t=1715762298915'); /* IE9*/
4
+ src: url('tui-utilities.eot?t=1715762298915#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+ url("tui-utilities.woff2?t=1715762298915") format("woff2"),
6
+ url("tui-utilities.woff?t=1715762298915") format("woff"),
7
+ url('tui-utilities.ttf?t=1715762298915') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
8
+ url('tui-utilities.svg?t=1715762298915#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=1714985553575'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1714985553575#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1714985553575") format("woff2"),
5
- url("tui-utilities.woff?t=1714985553575") format("woff"),
6
- url('tui-utilities.ttf?t=1714985553575') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1714985553575#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1715762298915'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1715762298915#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1715762298915") format("woff2"),
5
+ url("tui-utilities.woff?t=1715762298915") format("woff"),
6
+ url('tui-utilities.ttf?t=1715762298915') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1715762298915#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=1714985553575'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1714985553575#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1714985553575") format("woff2"),
5
- url("tui-utilities.woff?t=1714985553575") format("woff"),
6
- url('tui-utilities.ttf?t=1714985553575') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1714985553575#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1715762298915'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1715762298915#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1715762298915") format("woff2"),
5
+ url("tui-utilities.woff?t=1715762298915") format("woff"),
6
+ url('tui-utilities.ttf?t=1715762298915') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1715762298915#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=1714985553575'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1714985553575#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1714985553575") format("woff2"),
5
- url("tui-utilities.woff?t=1714985553575") format("woff"),
6
- url('tui-utilities.ttf?t=1714985553575') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1714985553575#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1715762298915'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1715762298915#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1715762298915") format("woff2"),
5
+ url("tui-utilities.woff?t=1715762298915") format("woff"),
6
+ url('tui-utilities.ttf?t=1715762298915') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1715762298915#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=1714985553575'); /* IE9*/
3
- src: url('tui-utilities.eot?t=1714985553575#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
- url("tui-utilities.woff2?t=1714985553575") format("woff2"),
5
- url("tui-utilities.woff?t=1714985553575") format("woff"),
6
- url('tui-utilities.ttf?t=1714985553575') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
- url('tui-utilities.svg?t=1714985553575#tui-utilities') format('svg'); /* iOS 4.1- */
2
+ src: url('tui-utilities.eot?t=1715762298915'); /* IE9*/
3
+ src: url('tui-utilities.eot?t=1715762298915#iefix') format('embedded-opentype'), /* IE6-IE8 */
4
+ url("tui-utilities.woff2?t=1715762298915") format("woff2"),
5
+ url("tui-utilities.woff?t=1715762298915") format("woff"),
6
+ url('tui-utilities.ttf?t=1715762298915') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7
+ url('tui-utilities.svg?t=1715762298915#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,28 +1,29 @@
1
- import { CODE as o, KEY as f } from "./keyboard.constants.js";
2
- const D = (u) => u.key === f.ENTER || u.key === f.SPACE || u.key === f.SPACEBAR || u.code === o.ENTER || u.code === o.SPACE, e = () => {
1
+ "use client";
2
+ import { CODE as o, KEY as t } from "./keyboard.constants.js";
3
+ const D = (e) => e.key === t.ENTER || e.key === t.SPACE || e.key === t.SPACEBAR || e.code === o.ENTER || e.code === o.SPACE, u = () => {
3
4
  }, n = ({
4
- up: u = e,
5
- down: t = e,
6
- left: c = e,
7
- right: d = e,
8
- start: E = e,
9
- end: R = e,
10
- activate: i = e
5
+ up: e = u,
6
+ down: c = u,
7
+ left: f = u,
8
+ right: d = u,
9
+ start: i = u,
10
+ end: E = u,
11
+ activate: R = u
11
12
  }) => (r) => {
12
13
  if (D(r))
13
- return i();
14
+ return R();
14
15
  if (r.code === o.HOME)
15
- return r.preventDefault(), E();
16
+ return r.preventDefault(), i();
16
17
  if (r.code === o.END)
17
- return r.preventDefault(), R();
18
+ return r.preventDefault(), E();
18
19
  if (r.code === o.ARROW_UP)
19
- return r.preventDefault(), u();
20
+ return r.preventDefault(), e();
20
21
  if (r.code === o.ARROW_DOWN)
21
- return r.preventDefault(), t();
22
+ return r.preventDefault(), c();
22
23
  if (r.code === o.ARROW_RIGHT)
23
24
  return r.preventDefault(), d();
24
25
  if (r.code === o.ARROW_LEFT)
25
- return r.preventDefault(), c();
26
+ return r.preventDefault(), f();
26
27
  };
27
28
  export {
28
29
  n as useKeyboardControls
@@ -0,0 +1,2 @@
1
+ export * from './Checkbox.js';
2
+ export * from './Checkboxes.js';
@@ -0,0 +1,6 @@
1
+ import { Checkbox as r } from "./Checkbox.js";
2
+ import { Checkboxes as b } from "./Checkboxes.js";
3
+ export {
4
+ r as Checkbox,
5
+ b as Checkboxes
6
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Password.js';
2
+ export * from './ValidationMessage.js';
@@ -0,0 +1,6 @@
1
+ import { Password as a } from "./Password.js";
2
+ import { ValidationMessage as s } from "./ValidationMessage.js";
3
+ export {
4
+ a as Password,
5
+ s as ValidationMessage
6
+ };
@@ -1,5 +1,5 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import './controls.css';
2
+ import '../controls.css';
3
3
  export interface RadioProps<Value = string> extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
4
4
  /**
5
5
  * The data-testid to apply to the button.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { c as y } from "../../index-Cu0xwYjD.js";
3
- import { useValue as w } from "../../hooks/useValue.js";
4
- import "../../controls-l0sNRNKZ.js";
2
+ import { c as y } from "../../../index-Cu0xwYjD.js";
3
+ import { useValue as w } from "../../../hooks/useValue.js";
4
+ import "../../../controls-l0sNRNKZ.js";
5
5
  let k = 0;
6
6
  function R({
7
7
  id: o = "radio-" + k++,
@@ -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 RadioGroupProps<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 RadioGroup<Value = string>({ id, name, children, value: initialValue, defaultValue, onChange, disabled, readOnly, tabIndex, ...rest }: RadioGroupProps<Value>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
2
  import { Children as v, isValidElement as x, cloneElement as V } from "react";
3
- import { useValue as C } from "../../hooks/useValue.js";
4
- import { c as E } from "../../index-Cu0xwYjD.js";
3
+ import { useValue as C } from "../../../hooks/useValue.js";
4
+ import { c as E } from "../../../index-Cu0xwYjD.js";
5
5
  let N = 0;
6
6
  function I({
7
7
  id: o = "radio-group-" + N++,
@@ -0,0 +1,2 @@
1
+ export * from './RadioGroup.js';
2
+ export * from './Radio.js';
@@ -0,0 +1,6 @@
1
+ import { RadioGroup as p } from "./RadioGroup.js";
2
+ import { Radio as d } from "./Radio.js";
3
+ export {
4
+ d as Radio,
5
+ p as RadioGroup
6
+ };
@@ -1,4 +1,4 @@
1
- import { FormControlProps } from '../FormControl';
1
+ import { FormControlProps } from './FormControl.js';
2
2
  export interface SwitchProps extends FormControlProps<boolean> {
3
3
  width?: number;
4
4
  }
@@ -1,7 +1,7 @@
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";
4
- import "../../../controls-l0sNRNKZ.js";
2
+ import { c as m } from "../../index-Cu0xwYjD.js";
3
+ import { useValue as x } from "../../hooks/useValue.js";
4
+ import "../../controls-l0sNRNKZ.js";
5
5
  let f = 0;
6
6
  function d({
7
7
  id: a = `switch-${++f}`,
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as l, jsxs as a } from "react/jsx-runtime";
2
3
  import { c as n, b as r } from "../react-spring_web.modern-BPtZcx1z.js";
3
4
  import { Backdrop as o } from "./Backdrop.js";
@@ -1,5 +1,6 @@
1
- import { jsx as l, jsxs as w } from "react/jsx-runtime";
2
- import { c as r } from "../../index-Cu0xwYjD.js";
1
+ "use client";
2
+ import { jsx as r, jsxs as w } from "react/jsx-runtime";
3
+ import { c as l } from "../../index-Cu0xwYjD.js";
3
4
  import { useRef as f, useEffect as v } from "react";
4
5
  import { a as b, b as h } from "../../react-spring_web.modern-BPtZcx1z.js";
5
6
  import { useActiveTabControl as L } from "./hooks/tabControl.js";
@@ -22,31 +23,31 @@ const k = ({
22
23
  });
23
24
  }, [c, e, o]);
24
25
  const x = { "--active-tab": m };
25
- return /* @__PURE__ */ l(
26
+ return /* @__PURE__ */ r(
26
27
  h.div,
27
28
  {
28
29
  ref: t,
29
30
  "data-name": "TabsHeader",
30
- className: r(
31
+ className: l(
31
32
  "scrollbar-hide relative flex max-w-full overflow-x-scroll py-20",
32
33
  n
33
34
  ),
34
35
  scrollLeft: c,
35
- children: /* @__PURE__ */ w("div", { role: "tablist", className: r("flex flex-row"), style: x, children: [
36
- /* @__PURE__ */ l(
36
+ children: /* @__PURE__ */ w("div", { role: "tablist", className: l("flex flex-row"), style: x, children: [
37
+ /* @__PURE__ */ r(
37
38
  "div",
38
39
  {
39
40
  ref: a,
40
- className: r("shrink-0", {
41
+ className: l("shrink-0", {
41
42
  "w-16 lg:w-[max(calc((100vw-1212px)/2),116px)] xl:w-[max(calc((100vw-1212px)/2),156px)]": !s
42
43
  })
43
44
  }
44
45
  ),
45
46
  i,
46
- /* @__PURE__ */ l(
47
+ /* @__PURE__ */ r(
47
48
  "div",
48
49
  {
49
- className: r("shrink-0", {
50
+ className: l("shrink-0", {
50
51
  "w-16 lg:w-[max(calc((100vw-1212px)/2),116px)] xl:w-[max(calc((100vw-1212px)/2),156px)]": !s
51
52
  })
52
53
  }
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as a, jsxs as N } from "react/jsx-runtime";
2
3
  import { c } from "../../index-Cu0xwYjD.js";
3
4
  import { useRef as d, useEffect as L } from "react";
@@ -1,6 +1,7 @@
1
+ "use client";
1
2
  import { jsx as p } from "react/jsx-runtime";
2
3
  import { c as d } from "../../index-Cu0xwYjD.js";
3
- import { useRef as f, useEffect as l } from "react";
4
+ import { useRef as l, useEffect as f } from "react";
4
5
  import { a as b, b as u } from "../../react-spring_web.modern-BPtZcx1z.js";
5
6
  import { useActiveTab as y } from "./hooks/tabControl.js";
6
7
  const r = {
@@ -12,32 +13,32 @@ const r = {
12
13
  pointerEvents: "auto",
13
14
  display: "block"
14
15
  }, R = ({
15
- value: a,
16
+ value: e,
16
17
  className: i,
17
18
  onSelect: s,
18
19
  children: c
19
20
  }) => {
20
- const o = f(!1), t = y() === a, [m, e] = b(() => ({
21
+ const o = l(!1), t = y() === e, [m, a] = b(() => ({
21
22
  from: t ? n : r
22
23
  }));
23
- return l(() => {
24
+ return f(() => {
24
25
  if (!o.current) {
25
26
  o.current = !0;
26
27
  return;
27
28
  }
28
- e.start({
29
+ a.start({
29
30
  to: {
30
31
  ...t ? n : r,
31
32
  display: "block"
32
33
  },
33
34
  onRest: () => {
34
- e.start({
35
+ a.start({
35
36
  to: { display: t ? "block" : "none" },
36
37
  immediate: !0
37
38
  });
38
39
  }
39
- }), t && (s == null || s({ value: a }));
40
- }, [t, e, a, s]), /* @__PURE__ */ p(
40
+ }), t && (s == null || s({ value: e }));
41
+ }, [t, a, e, s]), /* @__PURE__ */ p(
41
42
  u.div,
42
43
  {
43
44
  "data-name": "Tab",
@@ -1,37 +1,38 @@
1
+ "use client";
1
2
  import { jsx as l } from "react/jsx-runtime";
2
3
  import { createContext as c, useReducer as v, useMemo as u, useCallback as x } from "react";
3
4
  const C = (e) => {
4
- const r = Math.max(Math.min(e.min, e.max), 0), t = Math.max(Math.min(e.max, 1 / 0), r);
5
+ const t = Math.max(Math.min(e.min, e.max), 0), r = Math.max(Math.min(e.max, 1 / 0), t);
5
6
  return {
6
- min: r,
7
- max: t,
8
- clamp: (n) => Math.max(Math.min(n, t), r)
7
+ min: t,
8
+ max: r,
9
+ clamp: (n) => Math.max(Math.min(n, r), t)
9
10
  };
10
11
  }, g = (e) => {
11
- const { clamp: r } = C(e);
12
- return r(e.value);
12
+ const { clamp: t } = C(e);
13
+ return t(e.value);
13
14
  }, P = (e) => {
14
- const { min: r, max: t, clamp: n } = C(e);
15
+ const { min: t, max: r, clamp: n } = C(e);
15
16
  return (a, o) => {
16
17
  switch (o.type) {
17
18
  case "update":
18
19
  return n(o.payload);
19
20
  case "next":
20
- return a + 1 <= t ? a + 1 : r;
21
+ return a + 1 <= r ? a + 1 : t;
21
22
  case "previous":
22
- return a - 1 >= r ? a - 1 : t;
23
+ return a - 1 >= t ? a - 1 : r;
23
24
  case "start":
24
- return r;
25
- case "end":
26
25
  return t;
26
+ case "end":
27
+ return r;
27
28
  }
28
29
  };
29
- }, R = (e, r) => {
30
- switch (r.type) {
30
+ }, R = (e, t) => {
31
+ switch (t.type) {
31
32
  case "register":
32
- return new Map(e.set(r.payload.value, r.payload.ref));
33
+ return new Map(e.set(t.payload.value, t.payload.ref));
33
34
  case "unregister":
34
- return e.delete(r.payload.value) ? new Map(e) : e;
35
+ return e.delete(t.payload.value) ? new Map(e) : e;
35
36
  }
36
37
  }, h = c({ value: 0 });
37
38
  h.displayName = "ActiveTabContext";
@@ -53,13 +54,13 @@ const b = c({
53
54
  b.displayName = "TabControlContext";
54
55
  const A = ({
55
56
  min: e = 0,
56
- max: r,
57
- selected: t = e,
57
+ max: t,
58
+ selected: r = e,
58
59
  children: n
59
60
  }) => {
60
61
  const [a, o] = v(
61
- P({ min: e, max: r }),
62
- { value: t, min: e, max: r },
62
+ P({ min: e, max: t }),
63
+ { value: r, min: e, max: t },
63
64
  g
64
65
  ), [i, d] = v(R, /* @__PURE__ */ new Map()), M = u(() => ({ value: a }), [a]), f = u(() => ({ refs: i }), [i]), p = x(
65
66
  (s, w) => {
@@ -0,0 +1,5 @@
1
+ export * from './Tabs.js';
2
+ export * from './TabsBody.js';
3
+ export * from './TabsHeader.js';
4
+ export * from './TabsHeading.js';
5
+ export * from './TabsPanel.js';
@@ -0,0 +1,12 @@
1
+ import { Tabs as e } from "./Tabs.js";
2
+ import { TabsBody as b } from "./TabsBody.js";
3
+ import { TabsHeader as m } from "./TabsHeader.js";
4
+ import { TabsHeading as s } from "./TabsHeading.js";
5
+ import { TabsPanel as x } from "./TabsPanel.js";
6
+ export {
7
+ e as Tabs,
8
+ b as TabsBody,
9
+ m as TabsHeader,
10
+ s as TabsHeading,
11
+ x as TabsPanel
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubmed/trident-ui",
3
- "version": "1.0.0-alpha.48",
3
+ "version": "1.0.0-alpha.49",
4
4
  "type": "module",
5
5
  "description": "Shared ClubMed React UI components",
6
6
  "keywords": [
@@ -31,6 +31,11 @@
31
31
  "import": "./atoms/Icons/index.js",
32
32
  "default": "./atoms/Icons/index.js"
33
33
  },
34
+ "./atoms/Icons/fonts": {
35
+ "types": "./atoms/Icons/fonts/index.d.ts",
36
+ "import": "./atoms/Icons/fonts/index.js",
37
+ "default": "./atoms/Icons/fonts/index.js"
38
+ },
34
39
  "./atoms/Icons/svg": {
35
40
  "types": "./atoms/Icons/svg/index.d.ts",
36
41
  "import": "./atoms/Icons/svg/index.js",
@@ -41,10 +46,25 @@
41
46
  "import": "./atoms/Icons/svg-use/index.js",
42
47
  "default": "./atoms/Icons/svg-use/index.js"
43
48
  },
44
- "./atoms/Icons/fonts": {
45
- "types": "./atoms/Icons/fonts/index.d.ts",
46
- "import": "./atoms/Icons/fonts/index.js",
47
- "default": "./atoms/Icons/fonts/index.js"
49
+ "./molecules/Tabs": {
50
+ "types": "./molecules/Tabs/index.d.ts",
51
+ "import": "./molecules/Tabs/index.js",
52
+ "default": "./molecules/Tabs/index.js"
53
+ },
54
+ "./molecules/Forms/Checkboxes": {
55
+ "types": "./molecules/Forms/Checkboxes/index.d.ts",
56
+ "import": "./molecules/Forms/Checkboxes/index.js",
57
+ "default": "./molecules/Forms/Checkboxes/index.js"
58
+ },
59
+ "./molecules/Forms/Radios": {
60
+ "types": "./molecules/Forms/Radios/index.d.ts",
61
+ "import": "./molecules/Forms/Radios/index.js",
62
+ "default": "./molecules/Forms/Radios/index.js"
63
+ },
64
+ "./molecules/Forms/Password": {
65
+ "types": "./molecules/Forms/Password/index.d.ts",
66
+ "import": "./molecules/Forms/Password/index.js",
67
+ "default": "./molecules/Forms/Password/index.js"
48
68
  },
49
69
  "./fonts/*": "./fonts/*",
50
70
  "./atoms/*": {
@@ -77,7 +97,7 @@
77
97
  "predev": "npm run build:icons",
78
98
  "dev": "storybook dev -p 6006",
79
99
  "prebuild": "npm run build:icons",
80
- "build": "vite build && npm run build:icons font",
100
+ "build": "vite build && npm run build:icons font && npm run build:exports",
81
101
  "build:storybook": "npm run build:icons && storybook build",
82
102
  "lint": "eslint . --report-unused-disable-directives",
83
103
  "lint:fix": "eslint . --fix",
@@ -86,7 +106,8 @@
86
106
  "test:dev": "vitest watch",
87
107
  "test:update": "vitest -u",
88
108
  "prepare": "husky",
89
- "build:icons": "NODE_NO_WARNINGS=1 node --loader ts-node/esm ./tools/icons/index.ts"
109
+ "build:icons": "NODE_NO_WARNINGS=1 node --loader ts-node/esm ./tools/icons/index.ts",
110
+ "build:exports": "NODE_NO_WARNINGS=1 node --loader ts-node/esm tools/exports-builder/index.ts"
90
111
  },
91
112
  "peerDependencies": {
92
113
  "react": ">=17.0.2",
@@ -149,6 +170,7 @@
149
170
  "react": "^18.2.0",
150
171
  "react-dom": "^18.2.0",
151
172
  "react-syntax-highlighter": "^15.5.0",
173
+ "rollup-preserve-directives": "^1.1.1",
152
174
  "storybook": "8.0.8",
153
175
  "svgtofont": "^4.2.0",
154
176
  "tailwindcss": "^3.3.5",
@@ -1,4 +0,0 @@
1
- export declare const useSafeBoop: () => (import("@vitest/spy").Mock<any, any> | {
2
- '--mocked-transform': string;
3
- transform: string;
4
- })[];
@@ -1,10 +0,0 @@
1
- const r = () => [
2
- {
3
- "--mocked-transform": "scale3D(1, 1, 1)",
4
- transform: "var(--mocked-transform)"
5
- },
6
- vi.fn()
7
- ];
8
- export {
9
- r as useSafeBoop
10
- };
File without changes
File without changes
File without changes
File without changes