trepur_components 2.3.47 → 2.3.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/lib/assets/trepurComponentsLogo.svg +32 -0
  2. package/lib/components/Accordion/Accordion.stories.d.ts +1 -1
  3. package/lib/components/AlertBar/AlertBar.stories.d.ts +1 -1
  4. package/lib/components/AlertBar/index.js +6 -6
  5. package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
  6. package/lib/components/Breadcrumbs/index.d.ts +1 -1
  7. package/lib/components/Breadcrumbs/index.js +4 -4
  8. package/lib/components/Button/Button.stories.d.ts +1 -1
  9. package/lib/components/Button/index.js +16 -15
  10. package/lib/components/Calendar/Calendar.stories.d.ts +1 -1
  11. package/lib/components/Calendar/index.js +1 -1
  12. package/lib/components/Card/Card.stories.d.ts +1 -1
  13. package/lib/components/Card/index.js +18 -23
  14. package/lib/components/Carousel/Carousel.stories.d.ts +1 -1
  15. package/lib/components/Carousel/index.d.ts +1 -1
  16. package/lib/components/Carousel/index.js +44 -44
  17. package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +1 -1
  18. package/lib/components/CarouselThumbnail/index.d.ts +1 -1
  19. package/lib/components/CarouselThumbnail/index.js +33 -32
  20. package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -1
  21. package/lib/components/Collapsible/Collapsible.stories.d.ts +1 -1
  22. package/lib/components/Collapsible/index.d.ts +2 -2
  23. package/lib/components/Collapsible/index.js +40 -42
  24. package/lib/components/Counter/Counter.stories.d.ts +1 -1
  25. package/lib/components/Counter/index.js +6 -6
  26. package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +1 -1
  27. package/lib/components/DetailUpdater/index.d.ts +0 -1
  28. package/lib/components/Dropdown/Dropdown.stories.d.ts +1 -1
  29. package/lib/components/Dropdown/index.d.ts +1 -1
  30. package/lib/components/Dropdown/index.js +34 -32
  31. package/lib/components/FileUploader/FileUploader.stories.d.ts +1 -1
  32. package/lib/components/Footer/Footer.stories.d.ts +1 -1
  33. package/lib/components/FooterNav/FooterNav.stories.d.ts +3 -3
  34. package/lib/components/FooterNav/index.d.ts +3 -3
  35. package/lib/components/FooterNav/index.js +6 -5
  36. package/lib/components/Form/Form.stories.d.ts +1 -1
  37. package/lib/components/Form/index.d.ts +1 -1
  38. package/lib/components/Gallery/Gallery.stories.d.ts +1 -1
  39. package/lib/components/Gallery/index.d.ts +1 -1
  40. package/lib/components/Greeting/Greeting.stories.d.ts +1 -1
  41. package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +1 -1
  42. package/lib/components/Icon/Icon.stories.d.ts +1 -1
  43. package/lib/components/Icon/index.d.ts +1 -1
  44. package/lib/components/Image/Image.stories.d.ts +1 -1
  45. package/lib/components/ImageCard/ImageCard.stories.d.ts +1 -1
  46. package/lib/components/ImageCard/index.d.ts +1 -1
  47. package/lib/components/ImageCard/index.js +10 -9
  48. package/lib/components/Input/Input.stories.d.ts +3 -3
  49. package/lib/components/Input/index.d.ts +2 -2
  50. package/lib/components/Input/index.js +22 -21
  51. package/lib/components/Link/Link.stories.d.ts +1 -2
  52. package/lib/components/Link/index.js +18 -17
  53. package/lib/components/Map/Map.stories.d.ts +1 -1
  54. package/lib/components/Map/index.js +2 -2
  55. package/lib/components/Map/utils.d.ts +1 -1
  56. package/lib/components/Map/utils.js +3 -6
  57. package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -1
  58. package/lib/components/Nav/Nav.stories.d.ts +2 -2
  59. package/lib/components/Nav/index.d.ts +2 -2
  60. package/lib/components/Nav/index.js +49 -49
  61. package/lib/components/NavItem/NavItem.stories.d.ts +5 -5
  62. package/lib/components/NavItem/index.d.ts +4 -4
  63. package/lib/components/Pill/Pill.stories.d.ts +1 -1
  64. package/lib/components/Pill/index.js +6 -6
  65. package/lib/components/Search/Search.stories.d.ts +1 -1
  66. package/lib/components/Select/Select.stories.d.ts +1 -1
  67. package/lib/components/Showcase/Showcase.stories.d.ts +1 -1
  68. package/lib/components/Showcase/index.d.ts +1 -1
  69. package/lib/components/SideNav/SideNav.stories.d.ts +1 -1
  70. package/lib/components/SocialButton/SocialButton.stories.d.ts +1 -1
  71. package/lib/components/SplitCard/SplitCard.stories.d.ts +1 -1
  72. package/lib/components/SplitCard/index.js +3 -3
  73. package/lib/components/Stars/Stars.stories.d.ts +1 -1
  74. package/lib/components/Testimonial/Testimonial.stories.d.ts +1 -1
  75. package/lib/components/Testimonial/index.d.ts +1 -1
  76. package/lib/components/TextArea/TextArea.stories.d.ts +2 -2
  77. package/lib/components/TextArea/index.d.ts +1 -1
  78. package/lib/components/TextArea/index.js +3 -3
  79. package/lib/components/Timeline/Timeline.stories.d.ts +1 -1
  80. package/lib/components/Timeline/index.js +14 -14
  81. package/lib/components/Tubestops/Tubestops.stories.d.ts +1 -1
  82. package/lib/components/Tubestops/index.js +58 -61
  83. package/lib/components/Video/Video.stories.d.ts +1 -1
  84. package/lib/components/Video/index.d.ts +1 -1
  85. package/lib/components/index.d.ts +37 -37
  86. package/lib/documentation/assets/index.d.ts +1 -1
  87. package/lib/documentation/typography/Fonts/Fonts.stories.d.ts +1 -1
  88. package/lib/node_modules/keen-slider/react.js +261 -294
  89. package/lib/style.css +1 -1
  90. package/lib/utils/matchMedia.js +1 -2
  91. package/lib/utils/screens.js +3 -7
  92. package/package.json +2 -2
  93. package/lib/components/Calendar/style.css.js +0 -1
  94. package/lib/components/Map/map.css.js +0 -1
  95. package/lib/node_modules/@maptiler/sdk/dist/maptiler-sdk.css.js +0 -1
  96. package/lib/node_modules/keen-slider/keen-slider.min.css.js +0 -1
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
- import { createContext as w, forwardRef as d, useState as v, useMemo as C, useContext as c, useRef as k } from "react";
3
- import { HamburgerIcon as M } from "../HamburgerIcon/index.js";
4
- import { faChevronDown as j } from "@fortawesome/fontawesome-free-solid";
1
+ import { jsx as e, jsxs as p, Fragment as w } from "react/jsx-runtime";
2
+ import { forwardRef as d, useState as v, useMemo as C, createContext as k, useRef as M, useContext as m } from "react";
3
+ import { HamburgerIcon as j } from "../HamburgerIcon/index.js";
4
+ import { faChevronDown as D } from "@fortawesome/fontawesome-free-solid";
5
5
  import n from "clsx";
6
- import { Icon as D } from "../Icon/index.js";
7
- import { NavItem as F } from "../NavItem/index.js";
8
- const i = w(null), g = d(({ className: t, children: r, loading: a }, o) => {
9
- const [s, l] = v(!1), m = C(
6
+ import { Icon as F } from "../Icon/index.js";
7
+ import { NavItem as L } from "../NavItem/index.js";
8
+ const c = k(null), g = d(({ className: r, children: t, loading: a }, o) => {
9
+ const [s, l] = v(!1), i = C(
10
10
  () => ({
11
11
  expanded: s,
12
12
  setExpanded: l,
@@ -14,115 +14,115 @@ const i = w(null), g = d(({ className: t, children: r, loading: a }, o) => {
14
14
  }),
15
15
  [s, l, a]
16
16
  );
17
- return /* @__PURE__ */ e(i.Provider, { value: m, children: /* @__PURE__ */ e("div", { className: t, ref: o, children: r }) });
18
- }), N = d(
19
- ({ className: t, children: r }, a) => /* @__PURE__ */ e(
17
+ return /* @__PURE__ */ e(c.Provider, { value: i, children: /* @__PURE__ */ e("div", { className: r, ref: o, children: t }) });
18
+ }), f = d(
19
+ ({ className: r, children: t }, a) => /* @__PURE__ */ e(
20
20
  "div",
21
21
  {
22
22
  ref: a,
23
- className: n("relative h-24 w-full bg-nav-bg px-2 py-2", t),
24
- children: r
23
+ className: n("relative h-24 w-full bg-nav-bg px-2 py-2", r),
24
+ children: t
25
25
  }
26
26
  )
27
- ), f = d(({ className: t, children: r }, a) => {
28
- const { loading: o, setExpanded: s, expanded: l } = c(i) || {};
29
- return /* @__PURE__ */ p("div", { ref: a, className: n("flex h-full lg:hidden", t), children: [
27
+ ), N = d(({ className: r, children: t }, a) => {
28
+ const { loading: o, setExpanded: s, expanded: l } = m(c) || {};
29
+ return /* @__PURE__ */ p("div", { ref: a, className: n("flex h-full lg:hidden", r), children: [
30
30
  !o && /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
31
- M,
31
+ j,
32
32
  {
33
33
  variant: "ghost",
34
34
  onClick: () => s == null ? void 0 : s(!l),
35
35
  className: "aspect-square"
36
36
  }
37
37
  ) }),
38
- /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: r })
38
+ /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: t })
39
39
  ] });
40
- }), u = d(({ className: t, children: r }, a) => /* @__PURE__ */ e(
40
+ }), u = d(({ className: r, children: t }, a) => /* @__PURE__ */ e(
41
41
  "div",
42
42
  {
43
43
  ref: a,
44
44
  className: n(
45
45
  "hidden justify-between lg:flex gap-4 px-4 lg:gap-8 lg:px-20",
46
- t
46
+ r
47
47
  ),
48
- children: r
48
+ children: t
49
49
  }
50
50
  )), x = d(
51
- ({ className: t, children: r }, a) => {
52
- const { expanded: o } = c(i) || {};
51
+ ({ className: r, children: t }, a) => {
52
+ const { expanded: o } = m(c) || {};
53
53
  return o ? /* @__PURE__ */ e(
54
54
  "div",
55
55
  {
56
56
  ref: a,
57
57
  className: n(
58
58
  "h-screen bg-nav-bg px-8 pb-12 pt-2 lg:hidden",
59
- t
59
+ r
60
60
  ),
61
- children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 lg:hidden", children: r })
61
+ children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 lg:hidden", children: t })
62
62
  }
63
- ) : /* @__PURE__ */ e(H, {});
63
+ ) : /* @__PURE__ */ e(w, {});
64
64
  }
65
65
  ), h = d(
66
- ({ className: t, children: r }, a) => {
67
- const { loading: o } = c(i) || {};
68
- return o ? /* @__PURE__ */ e("div", { ref: a, className: n("my-4 lg:flex lg:gap-6", t), children: [...Array(5)].map((s, l) => /* @__PURE__ */ e(F, { loading: !0 }, l)) }) : /* @__PURE__ */ e("div", { ref: a, className: n("my-4 lg:flex lg:gap-6", t), children: r });
66
+ ({ className: r, children: t }, a) => {
67
+ const { loading: o } = m(c) || {};
68
+ return o ? /* @__PURE__ */ e("div", { ref: a, className: n("my-4 lg:flex lg:gap-6", r), children: [...Array(5)].map((s, l) => /* @__PURE__ */ e(L, { loading: !0 }, l)) }) : /* @__PURE__ */ e("div", { ref: a, className: n("my-4 lg:flex lg:gap-6", r), children: t });
69
69
  }
70
- ), b = d(({ className: t, label: r, children: a, active: o = !1 }) => {
71
- const [s, l] = v(!1), m = k(null);
70
+ ), b = d(({ className: r, label: t, children: a, active: o = !1 }, s) => {
71
+ const [l, i] = v(!1), H = M(null);
72
72
  return /* @__PURE__ */ p(
73
73
  "div",
74
74
  {
75
- ref: m,
76
- onMouseEnter: () => l(!0),
77
- onMouseLeave: () => l(!1),
78
- onClick: () => l(!s),
75
+ ref: H ?? s,
76
+ onMouseEnter: () => i(!0),
77
+ onMouseLeave: () => i(!1),
78
+ onClick: () => i(!l),
79
79
  className: n(
80
80
  "relative m-auto py-0 text-nav-text lg:after:block after:scale-x-0 after:border-b-2 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
81
81
  {
82
82
  "font-bold": o,
83
83
  "font-light": !o
84
84
  },
85
- t
85
+ r
86
86
  ),
87
87
  children: [
88
88
  /* @__PURE__ */ p("div", { className: "flex justify-center items-center gap-1", children: [
89
- /* @__PURE__ */ e("p", { className: "text-lg", children: r }),
90
- /* @__PURE__ */ e(D, { size: "xs", icon: j })
89
+ /* @__PURE__ */ e("p", { className: "text-lg", children: t }),
90
+ /* @__PURE__ */ e(F, { size: "xs", icon: D })
91
91
  ] }),
92
- s && /* @__PURE__ */ e("div", { className: "rounded-md lg:absolute lg:-left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "rounded-md grid grid-cols-1 gap-y-2 bg-nav-bg px-1 py-2 w-full", children: a }) })
92
+ l && /* @__PURE__ */ e("div", { className: "rounded-md lg:absolute lg:-left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "rounded-md grid grid-cols-1 gap-y-2 bg-nav-bg px-1 py-2 w-full", children: a }) })
93
93
  ]
94
94
  }
95
95
  );
96
- }), y = d(({ className: t, src: r, alt: a, ...o }, s) => {
97
- const { loading: l } = c(i) || {};
96
+ }), y = d(({ className: r, src: t, alt: a, ...o }, s) => {
97
+ const { loading: l } = m(c) || {};
98
98
  return l ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
99
99
  "img",
100
100
  {
101
- className: n("h-20 flex-none", t),
101
+ className: n("h-20 flex-none", r),
102
102
  ref: s,
103
- src: r,
103
+ src: t,
104
104
  alt: a,
105
105
  ...o
106
106
  }
107
107
  );
108
108
  });
109
109
  g.displayName = "Nav";
110
- N.displayName = "Nav.Header";
110
+ f.displayName = "Nav.Header";
111
111
  u.displayName = "Nav.DesktopHeader";
112
- f.displayName = "Nav.MobileHeader";
112
+ N.displayName = "Nav.MobileHeader";
113
113
  y.displayName = "Nav.Logo";
114
114
  h.displayName = "Nav.Section";
115
115
  x.displayName = "Nav.Body";
116
116
  b.displayName = "Nav.Folder";
117
- const q = Object.assign(g, {
118
- Header: N,
117
+ const A = Object.assign(g, {
118
+ Header: f,
119
119
  DesktopHeader: u,
120
- MobileHeader: f,
120
+ MobileHeader: N,
121
121
  Section: h,
122
122
  Logo: y,
123
123
  Body: x,
124
124
  Folder: b
125
125
  });
126
126
  export {
127
- q as Nav
127
+ A as Nav
128
128
  };
@@ -1,13 +1,13 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { NavItem } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLAnchorElement> & {
7
- href?: string | undefined;
8
- active?: boolean | undefined;
9
- loading?: boolean | undefined;
10
- isInFolder?: boolean | undefined;
7
+ href?: string;
8
+ active?: boolean;
9
+ loading?: boolean;
10
+ isInFolder?: boolean;
11
11
  } & import('react').RefAttributes<HTMLAnchorElement>> & {
12
12
  Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
13
13
  };
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
 
3
3
  declare const NavItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLAnchorElement> & {
4
- href?: string | undefined;
5
- active?: boolean | undefined;
6
- loading?: boolean | undefined;
7
- isInFolder?: boolean | undefined;
4
+ href?: string;
5
+ active?: boolean;
6
+ loading?: boolean;
7
+ isInFolder?: boolean;
8
8
  } & import('react').RefAttributes<HTMLAnchorElement>> & {
9
9
  Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
10
10
  };
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { Pill } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as r } from "react";
3
3
  import s from "clsx";
4
- import { Icon as a } from "../Icon/index.js";
5
- const i = r(({ children: o, variant: e = "info", inverse: l = !1 }, f) => /* @__PURE__ */ t(
4
+ import { Icon as c } from "../Icon/index.js";
5
+ const i = r(({ children: o, variant: e = "info", inverse: l = !1 }, a) => /* @__PURE__ */ t(
6
6
  "div",
7
7
  {
8
- ref: f,
8
+ ref: a,
9
9
  className: s(
10
10
  "inline-grid grid-flow-col w-auto py-2 px-4 text-base font-semibold rounded-full gap-2",
11
11
  {
@@ -21,12 +21,12 @@ const i = r(({ children: o, variant: e = "info", inverse: l = !1 }, f) => /* @__
21
21
  ),
22
22
  children: o
23
23
  }
24
- )), g = r(({ className: o, ...e }, l) => /* @__PURE__ */ t("p", { className: s("text-base my-auto", o), ref: l, ...e })), d = r(({ icon: o }, e) => /* @__PURE__ */ t(a, { className: "my-auto", size: "md", ref: e, icon: o }));
24
+ )), g = r(({ className: o, ...e }, l) => /* @__PURE__ */ t("p", { className: s("text-base my-auto", o), ref: l, ...e })), f = r(({ icon: o }, e) => /* @__PURE__ */ t(c, { className: "my-auto", size: "sm", ref: e, icon: o }));
25
25
  i.displayName = "Pill";
26
- d.displayName = "Pill.Icon";
26
+ f.displayName = "Pill.Icon";
27
27
  g.displayName = "Chip.Label";
28
28
  const m = Object.assign(i, {
29
- Icon: d,
29
+ Icon: f,
30
30
  Label: g
31
31
  });
32
32
  export {
@@ -1,5 +1,5 @@
1
- import { Search } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Search } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { Select } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { Showcase } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Showcase } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { Colours } from '../../utils/controls';
2
1
  import { IconProps } from '../Icon';
2
+ import { Colours } from '../../utils/controls';
3
3
 
4
4
  export interface Props {
5
5
  id: string;
@@ -1,5 +1,5 @@
1
- import { SideNav } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { SideNav } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { SocialButton } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { SocialButton } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { SplitCard } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, jsxs as N } from "react/jsx-runtime";
2
- import { createContext as S, forwardRef as n, useMemo as v, useContext as u } from "react";
2
+ import { forwardRef as n, useMemo as S, createContext as v, useContext as u } from "react";
3
3
  import w from "../../utils/matchMedia.js";
4
4
  import { Screens as y } from "../../utils/screens.js";
5
5
  import o from "clsx";
6
- const p = S(null), g = n(
6
+ const p = v(null), g = n(
7
7
  ({ className: r, children: a, swapDesktop: t, swapMobile: l, loading: s, ...i }, d) => {
8
- const C = `(min-width: ${y.md})`, c = w(C), h = v(
8
+ const C = `(min-width: ${y.md})`, c = w(C), h = S(
9
9
  () => ({
10
10
  swapDesktop: t,
11
11
  swapMobile: l,
@@ -1,5 +1,5 @@
1
- import { Stars } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Stars } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { Testimonial } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Testimonial } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { ImageProps } from '../Image';
2
1
  import { HTMLAttributes } from 'react';
2
+ import { ImageProps } from '../Image';
3
3
 
4
4
  declare const Testimonial: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
5
5
  Image: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLImageElement> & ImageProps & import('react').RefAttributes<HTMLImageElement>>;
@@ -1,12 +1,12 @@
1
- import { TextArea } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { TextArea } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
6
6
  component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('.').TextAreaContextProps & import('react').RefAttributes<HTMLDivElement>> & {
7
7
  Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
8
8
  Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
9
- required?: boolean | undefined;
9
+ required?: boolean;
10
10
  } & import('react').RefAttributes<HTMLDivElement>>;
11
11
  Box: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
12
12
  Validation: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -25,7 +25,7 @@ export interface TextAreaContextProps {
25
25
  declare const TextArea: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & TextAreaContextProps & import('react').RefAttributes<HTMLDivElement>> & {
26
26
  Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
27
27
  Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
28
- required?: boolean | undefined;
28
+ required?: boolean;
29
29
  } & import('react').RefAttributes<HTMLDivElement>>;
30
30
  Box: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
31
31
  Validation: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as r, jsxs as f } from "react/jsx-runtime";
2
- import { createContext as A, forwardRef as o, useMemo as T, useRef as N, useContext as d } from "react";
3
- const s = A(null), x = o(({ children: e, errors: a, placeholder: t, ...l }, n) => {
4
- const p = T(
2
+ import { forwardRef as o, useMemo as A, createContext as T, useContext as d, useRef as N } from "react";
3
+ const s = T(null), x = o(({ children: e, errors: a, placeholder: t, ...l }, n) => {
4
+ const p = A(
5
5
  () => ({
6
6
  errors: a,
7
7
  placeholder: t,
@@ -1,5 +1,5 @@
1
- import { Timeline } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Timeline } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,30 +1,30 @@
1
1
  import { jsx as n, jsxs as c } from "react/jsx-runtime";
2
2
  import { forwardRef as t } from "react";
3
- import l from "clsx";
4
- const o = t(({ id: e, className: m, children: i }, d) => /* @__PURE__ */ n("div", { ref: d, id: e, className: m, children: i })), r = t(
3
+ import o from "clsx";
4
+ const r = t(({ id: e, className: m, children: i }, l) => /* @__PURE__ */ n("div", { ref: l, id: e, className: m, children: i })), s = t(
5
5
  ({ id: e, children: m }, i) => /* @__PURE__ */ n("div", { ref: i, id: e, className: "flex", children: m })
6
- ), s = t(({ className: e, index: m, length: i }) => /* @__PURE__ */ c("div", { className: "hidden sm:block", children: [
6
+ ), a = t(({ className: e, index: m, length: i }, l) => /* @__PURE__ */ c("div", { ref: l, className: "hidden sm:block", children: [
7
7
  /* @__PURE__ */ n(
8
8
  "p",
9
9
  {
10
- className: l("z-10 m-auto mt-12 h-4 w-4 rounded-full", e)
10
+ className: o("z-10 m-auto mt-12 h-4 w-4 rounded-full", e)
11
11
  }
12
12
  ),
13
13
  /* @__PURE__ */ n(
14
14
  "div",
15
15
  {
16
- className: m !== i - 1 ? l("m-auto h-full w-1", e) : "border-r-2 border-transparent"
16
+ className: m !== i - 1 ? o("m-auto h-full w-1", e) : "border-r-2 border-transparent"
17
17
  }
18
18
  )
19
- ] })), a = t(({ children: e }) => /* @__PURE__ */ n("div", { className: "my-2 w-full sm:ml-8", children: e }));
20
- o.displayName = "Timeline";
21
- r.displayName = "Timeline.Item";
22
- s.displayName = "Timeline.Dot";
23
- a.displayName = "Timeline.Content";
24
- const T = Object.assign(o, {
25
- Item: r,
26
- Dot: s,
27
- Content: a
19
+ ] })), d = t(({ children: e }, m) => /* @__PURE__ */ n("div", { ref: m, className: "my-2 w-full sm:ml-8", children: e }));
20
+ r.displayName = "Timeline";
21
+ s.displayName = "Timeline.Item";
22
+ a.displayName = "Timeline.Dot";
23
+ d.displayName = "Timeline.Content";
24
+ const T = Object.assign(r, {
25
+ Item: s,
26
+ Dot: a,
27
+ Content: d
28
28
  });
29
29
  export {
30
30
  T as Timeline
@@ -1,5 +1,5 @@
1
- import { Tubestops } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Tubestops } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,86 +1,83 @@
1
- import { jsx as l, jsxs as T } from "react/jsx-runtime";
2
- import { createContext as f, forwardRef as a, useState as x, useMemo as v, useContext as i, Children as k } from "react";
3
- import r from "clsx";
4
- import { Button as b } from "../Button/index.js";
5
- const p = f(null), N = f(
1
+ import { jsx as r, jsxs as T } from "react/jsx-runtime";
2
+ import { forwardRef as a, useState as f, Children as z, useMemo as v, createContext as N, useContext as i } from "react";
3
+ import l from "clsx";
4
+ import { Button as d } from "../Button/index.js";
5
+ const p = N(null), h = N(
6
6
  null
7
- ), h = a(({ className: n, children: t, activeStop: s = 1 }, e) => {
8
- const [o, u] = x(s), [c, m] = x(0), d = v(
7
+ ), y = a(({ className: n, children: t, activeStop: e = 1 }, s) => {
8
+ var b, x;
9
+ const [o, u] = f(e), c = (x = (b = z.toArray(t)[0]) == null ? void 0 : b.props) == null ? void 0 : x.children.length, m = v(
9
10
  () => ({
10
- totalStops: c ?? 0,
11
- setTotalStops: m,
11
+ totalStops: c,
12
12
  currentStop: o,
13
13
  setCurrentStop: u
14
14
  }),
15
- [o, u, c, m]
15
+ [o, u]
16
16
  );
17
- return /* @__PURE__ */ l(p.Provider, { value: d, children: /* @__PURE__ */ l("div", { ref: e, className: n, children: t }) });
18
- }), y = a(({ className: n, children: t }, s) => {
19
- const { setTotalStops: e } = i(p) || {}, o = k.count(t);
20
- return e == null || e(o), /* @__PURE__ */ l("div", { ref: s, className: r("flex py-4", n), children: t });
21
- }), C = a(({ className: n, children: t }, s) => /* @__PURE__ */ l("div", { ref: s, className: r("", n), children: t })), S = a(({ className: n, stopId: t, children: s }, e) => {
17
+ return /* @__PURE__ */ r(p.Provider, { value: m, children: /* @__PURE__ */ r("div", { ref: s, className: n, children: t }) });
18
+ }), C = a(({ className: n, children: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: l("flex py-4", n), children: t })), S = a(({ className: n, children: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: l("", n), children: t })), g = a(({ className: n, stopId: t, children: e }, s) => {
22
19
  const { currentStop: o = 0 } = i(p) || {};
23
- return /* @__PURE__ */ l(
20
+ return /* @__PURE__ */ r(
24
21
  "div",
25
22
  {
26
- ref: e,
27
- className: r("", n, {
23
+ ref: s,
24
+ className: l("", n, {
28
25
  block: o === t,
29
26
  hidden: o !== t
30
27
  }),
31
- children: s
28
+ children: e
32
29
  }
33
30
  );
34
31
  }), w = a(({ className: n }, t) => {
35
32
  const {
36
- setCurrentStop: s,
37
- currentStop: e = 0,
33
+ setCurrentStop: e,
34
+ currentStop: s = 0,
38
35
  totalStops: o = 0
39
36
  } = i(p) || {};
40
- return /* @__PURE__ */ T("div", { ref: t, className: r("flex justify-between", n), children: [
41
- /* @__PURE__ */ l(
42
- b,
37
+ return /* @__PURE__ */ T("div", { ref: t, className: l("flex justify-between", n), children: [
38
+ /* @__PURE__ */ r(
39
+ d,
43
40
  {
44
- disabled: e === 1,
45
- onClick: () => e > 1 && (s == null ? void 0 : s(e - 1)),
46
- children: /* @__PURE__ */ l(b.Label, { children: "Previous" })
41
+ disabled: s === 1,
42
+ onClick: () => s > 1 && (e == null ? void 0 : e(s - 1)),
43
+ children: /* @__PURE__ */ r(d.Label, { children: "Previous" })
47
44
  }
48
45
  ),
49
- /* @__PURE__ */ l(
50
- b,
46
+ /* @__PURE__ */ r(
47
+ d,
51
48
  {
52
- disabled: e === o,
53
- onClick: () => e < o && (s == null ? void 0 : s(e + 1)),
54
- children: /* @__PURE__ */ l(b.Label, { children: "Next" })
49
+ disabled: s === o,
50
+ onClick: () => s < o && (e == null ? void 0 : e(s + 1)),
51
+ children: /* @__PURE__ */ r(d.Label, { children: "Next" })
55
52
  }
56
53
  )
57
54
  ] });
58
- }), g = a(({ className: n, stopId: t = 0, children: s }, e) => {
55
+ }), j = a(({ className: n, stopId: t = 0, children: e }, s) => {
59
56
  const {
60
57
  currentStop: o = 0,
61
58
  setCurrentStop: u,
62
59
  totalStops: c = 0
63
- } = i(p) || {}, [m] = x(t), d = v(
60
+ } = i(p) || {}, [m] = f(t), b = v(
64
61
  () => ({
65
62
  stopNumber: m
66
63
  }),
67
64
  [m]
68
65
  );
69
- return /* @__PURE__ */ l(N.Provider, { value: d, children: /* @__PURE__ */ T("div", { ref: e, className: r(n, "w-full min-w-[120px]"), children: [
70
- /* @__PURE__ */ l(
66
+ return /* @__PURE__ */ r(h.Provider, { value: b, children: /* @__PURE__ */ T("div", { ref: s, className: l(n, "w-full min-w-[120px]"), children: [
67
+ /* @__PURE__ */ r(
71
68
  "div",
72
69
  {
73
- className: r({
70
+ className: l({
74
71
  "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-future": t >= o && t < c,
75
72
  "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-complete": t < o && t < c
76
73
  })
77
74
  }
78
75
  ),
79
- /* @__PURE__ */ l(
76
+ /* @__PURE__ */ r(
80
77
  "p",
81
78
  {
82
79
  onClick: () => u == null ? void 0 : u(t),
83
- className: r(
80
+ className: l(
84
81
  "hover:cursor-pointer z-10 mx-auto h-6 w-6 rounded-full",
85
82
  {
86
83
  "relative z-20 -mt-4 bg-tubestop-station-complete": t < o,
@@ -91,20 +88,20 @@ const p = f(null), N = f(
91
88
  )
92
89
  }
93
90
  ),
94
- s
91
+ e
95
92
  ] }) });
96
- }), j = a(({ className: n, children: t }, s) => {
97
- const { currentStop: e = 0 } = i(p) || {}, { stopNumber: o = 0 } = i(N) || {};
98
- return /* @__PURE__ */ l(
93
+ }), k = a(({ className: n, children: t }, e) => {
94
+ const { currentStop: s = 0 } = i(p) || {}, { stopNumber: o = 0 } = i(h) || {};
95
+ return /* @__PURE__ */ r(
99
96
  "p",
100
97
  {
101
- ref: s,
102
- className: r(
98
+ ref: e,
99
+ className: l(
103
100
  "mt-2 text-center",
104
101
  {
105
- "font-medium text-tubestop-text-complete": o < e,
106
- "font-bold text-tubestop-text-active": e === o,
107
- "font-medium text-tubestop-text-future": o > e
102
+ "font-medium text-tubestop-text-complete": o < s,
103
+ "font-bold text-tubestop-text-active": s === o,
104
+ "font-medium text-tubestop-text-future": o > s
108
105
  },
109
106
  n
110
107
  ),
@@ -112,21 +109,21 @@ const p = f(null), N = f(
112
109
  }
113
110
  );
114
111
  });
115
- h.displayName = "Tubestop";
116
- y.displayName = "Tubestops.Header";
117
- g.displayName = "Tubestops.Stop";
118
- j.displayName = "Tubestops.Text";
112
+ y.displayName = "Tubestop";
113
+ C.displayName = "Tubestops.Header";
114
+ j.displayName = "Tubestops.Stop";
115
+ k.displayName = "Tubestops.Text";
119
116
  w.displayName = "Tubestops.Controls";
120
- C.displayName = "Tubestops.Body";
121
- S.displayName = "Tubestops.Content";
122
- const L = Object.assign(h, {
123
- Header: y,
124
- Stop: g,
125
- Text: j,
117
+ S.displayName = "Tubestops.Body";
118
+ g.displayName = "Tubestops.Content";
119
+ const A = Object.assign(y, {
120
+ Header: C,
121
+ Stop: j,
122
+ Text: k,
126
123
  Controls: w,
127
- Body: C,
128
- Content: S
124
+ Body: S,
125
+ Content: g
129
126
  });
130
127
  export {
131
- L as Tubestops
128
+ A as Tubestops
132
129
  };