trepur_components 2.3.33 → 2.3.35

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.
@@ -3,7 +3,7 @@ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
6
- component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
6
+ component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>> & {
7
7
  Image: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<import('../Image').ImageProps> & import('../Image').ImageProps & import('react').RefAttributes<HTMLImageElement>>;
8
8
  Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
9
9
  Title: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -1,7 +1,7 @@
1
1
  import { ImageProps } from '../Image';
2
2
  import { HTMLAttributes } from 'react';
3
3
 
4
- declare const ImageCard: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
4
+ declare const ImageCard: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLAnchorElement> & import('react').RefAttributes<HTMLAnchorElement>> & {
5
5
  Image: import('react').ForwardRefExoticComponent<HTMLAttributes<ImageProps> & ImageProps & import('react').RefAttributes<HTMLImageElement>>;
6
6
  Content: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
7
7
  Title: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
@@ -1,31 +1,29 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as m } from "react";
3
3
  import { Image as p } from "../Image/index.js";
4
- import c from "clsx";
5
- const d = m(({ className: a, children: e, ...r }, n) => /* @__PURE__ */ t(
4
+ import C from "clsx";
5
+ const d = m(({ className: a, children: e, onClick: r, ...g }, c) => /* @__PURE__ */ t("a", { ref: c, className: "", href: "", onClick: r, ...g, children: /* @__PURE__ */ t(
6
6
  "div",
7
7
  {
8
- className: c(
8
+ className: C(
9
9
  "grid max-w-96 overflow-hidden rounded-xl bg-white drop-shadow",
10
10
  a
11
11
  ),
12
- ref: n,
13
- ...r,
14
12
  children: e
15
13
  }
16
- )), s = m(({ src: a, ...e }) => /* @__PURE__ */ t("div", { className: "h-64 object-cover", children: /* @__PURE__ */ t(p, { src: a, ...e }) })), o = m(({ children: a, ...e }, r) => /* @__PURE__ */ t("div", { className: "px-2 pb-4 pt-2", ref: r, ...e, children: a })), i = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-lg", ref: e, ...a })), l = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-sm", ref: e, ...a })), g = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-md pt-2", ref: e, ...a }));
14
+ ) })), s = m(({ src: a, ...e }) => /* @__PURE__ */ t("div", { className: "h-64 object-cover", children: /* @__PURE__ */ t(p, { src: a, ...e }) })), o = m(({ children: a, ...e }, r) => /* @__PURE__ */ t("div", { className: "px-2 pb-4 pt-2", ref: r, ...e, children: a })), i = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-lg", ref: e, ...a })), l = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-sm", ref: e, ...a })), n = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-md pt-2", ref: e, ...a }));
17
15
  d.displayName = "ImageCard";
18
16
  s.displayName = "ImageCard.Image";
19
17
  i.displayName = "ImageCard.Title";
20
18
  l.displayName = "ImageCard.Subtitle";
21
19
  o.displayName = "ImageCard.Content";
22
- g.displayName = "ImageCard.Text";
20
+ n.displayName = "ImageCard.Text";
23
21
  const b = Object.assign(d, {
24
22
  Image: s,
25
23
  Content: o,
26
24
  Title: i,
27
25
  Subtitle: l,
28
- Text: g
26
+ Text: n
29
27
  });
30
28
  export {
31
29
  b as ImageCard
@@ -1,97 +1,83 @@
1
1
  import { jsx as e, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
- import { createContext as w, forwardRef as l, useState as v, useMemo as C, useContext as m, useRef as k } from "react";
2
+ import { createContext as w, forwardRef as d, useState as v, useMemo as C, useContext as c, useRef as k } from "react";
3
3
  import { HamburgerIcon as M } from "../HamburgerIcon/index.js";
4
4
  import { faChevronDown as j } from "@fortawesome/fontawesome-free-solid";
5
- import d from "clsx";
5
+ import n from "clsx";
6
6
  import { Icon as D } from "../Icon/index.js";
7
7
  import { NavItem as F } from "../NavItem/index.js";
8
- const i = w(null), N = l(({ className: t, children: r, loading: a }, o) => {
9
- const [s, n] = v(!1), c = C(
8
+ const i = w(null), g = d(({ className: t, children: r, loading: a }, o) => {
9
+ const [s, l] = v(!1), m = C(
10
10
  () => ({
11
11
  expanded: s,
12
- setExpanded: n,
12
+ setExpanded: l,
13
13
  loading: a
14
14
  }),
15
- [s, n, a]
15
+ [s, l, a]
16
16
  );
17
- return /* @__PURE__ */ e(i.Provider, { value: c, children: /* @__PURE__ */ e("div", { className: t, ref: o, children: r }) });
18
- }), f = l(
17
+ return /* @__PURE__ */ e(i.Provider, { value: m, children: /* @__PURE__ */ e("div", { className: t, ref: o, children: r }) });
18
+ }), N = d(
19
19
  ({ className: t, children: r }, a) => /* @__PURE__ */ e(
20
20
  "div",
21
21
  {
22
22
  ref: a,
23
- className: d("relative h-24 w-full bg-nav-bg px-2 py-2", t),
23
+ className: n("relative h-24 w-full bg-nav-bg px-2 py-2", t),
24
24
  children: r
25
25
  }
26
26
  )
27
- ), g = l(({ className: t, children: r }, a) => {
28
- const { loading: o, setExpanded: s, expanded: n } = m(i) || {};
29
- return /* @__PURE__ */ p("div", { ref: a, className: d("flex h-full lg:hidden", t), children: [
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: [
30
30
  !o && /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
31
31
  M,
32
32
  {
33
33
  variant: "ghost",
34
- onClick: () => s == null ? void 0 : s(!n),
34
+ onClick: () => s == null ? void 0 : s(!l),
35
35
  className: "aspect-square"
36
36
  }
37
37
  ) }),
38
38
  /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: r })
39
39
  ] });
40
- }), u = l(({ className: t, children: r }, a) => /* @__PURE__ */ e(
40
+ }), u = d(({ className: t, children: r }, a) => /* @__PURE__ */ e(
41
41
  "div",
42
42
  {
43
43
  ref: a,
44
- className: d(
45
- "hidden justify-between lg:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
44
+ className: n(
45
+ "hidden justify-between lg:flex gap-4 px-4 lg:gap-8 lg:px-20",
46
46
  t
47
47
  ),
48
48
  children: r
49
49
  }
50
- )), x = l(
50
+ )), x = d(
51
51
  ({ className: t, children: r }, a) => {
52
- const { expanded: o } = m(i) || {};
52
+ const { expanded: o } = c(i) || {};
53
53
  return o ? /* @__PURE__ */ e(
54
54
  "div",
55
55
  {
56
56
  ref: a,
57
- className: d(
58
- "h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden",
57
+ className: n(
58
+ "h-screen bg-nav-bg px-8 pb-12 pt-2 lg:hidden",
59
59
  t
60
60
  ),
61
- children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: r })
61
+ children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 lg:hidden", children: r })
62
62
  }
63
63
  ) : /* @__PURE__ */ e(H, {});
64
64
  }
65
- ), h = l(
65
+ ), h = d(
66
66
  ({ className: t, children: r }, a) => {
67
- const { loading: o } = m(i) || {};
68
- return o ? /* @__PURE__ */ e(
69
- "div",
70
- {
71
- ref: a,
72
- className: d("my-4 md:flex md:gap-4 lg:gap-6", t),
73
- children: [...Array(5)].map((s, n) => /* @__PURE__ */ e(F, { loading: !0 }, n))
74
- }
75
- ) : /* @__PURE__ */ e(
76
- "div",
77
- {
78
- ref: a,
79
- className: d("my-4 md:flex md:gap-4 lg:gap-6", t),
80
- children: r
81
- }
82
- );
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 });
83
69
  }
84
- ), b = l(({ className: t, label: r, children: a, active: o = !1 }) => {
85
- const [s, n] = v(!1), c = k(null);
70
+ ), b = d(({ className: t, label: r, children: a, active: o = !1 }) => {
71
+ const [s, l] = v(!1), m = k(null);
86
72
  return /* @__PURE__ */ p(
87
73
  "div",
88
74
  {
89
- ref: c,
90
- onMouseEnter: () => n(!0),
91
- onMouseLeave: () => n(!1),
92
- onClick: () => n(!s),
93
- className: d(
94
- "relative m-auto py-0 text-nav-text md: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",
75
+ ref: m,
76
+ onMouseEnter: () => l(!0),
77
+ onMouseLeave: () => l(!1),
78
+ onClick: () => l(!s),
79
+ className: n(
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",
95
81
  {
96
82
  "font-bold": o,
97
83
  "font-light": !o
@@ -103,34 +89,34 @@ const i = w(null), N = l(({ className: t, children: r, loading: a }, o) => {
103
89
  /* @__PURE__ */ e("p", { className: "text-lg", children: r }),
104
90
  /* @__PURE__ */ e(D, { size: "xs", icon: j })
105
91
  ] }),
106
- s && /* @__PURE__ */ e("div", { className: "rounded-md md:absolute md:-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
+ 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 }) })
107
93
  ]
108
94
  }
109
95
  );
110
- }), y = l(({ className: t, src: r, ...a }, o) => {
111
- const { loading: s } = m(i) || {};
96
+ }), y = d(({ className: t, src: r, ...a }, o) => {
97
+ const { loading: s } = c(i) || {};
112
98
  return s ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
113
99
  "img",
114
100
  {
115
- className: d("h-20 flex-none", t),
101
+ className: n("h-20 flex-none", t),
116
102
  ref: o,
117
103
  src: r,
118
104
  ...a
119
105
  }
120
106
  );
121
107
  });
122
- N.displayName = "Nav";
123
- f.displayName = "Nav.Header";
108
+ g.displayName = "Nav";
109
+ N.displayName = "Nav.Header";
124
110
  u.displayName = "Nav.DesktopHeader";
125
- g.displayName = "Nav.MobileHeader";
111
+ f.displayName = "Nav.MobileHeader";
126
112
  y.displayName = "Nav.Logo";
127
113
  h.displayName = "Nav.Section";
128
114
  x.displayName = "Nav.Body";
129
115
  b.displayName = "Nav.Folder";
130
- const q = Object.assign(N, {
131
- Header: f,
116
+ const q = Object.assign(g, {
117
+ Header: N,
132
118
  DesktopHeader: u,
133
- MobileHeader: g,
119
+ MobileHeader: f,
134
120
  Section: h,
135
121
  Logo: y,
136
122
  Body: x,
@@ -17,6 +17,10 @@ export default meta;
17
17
  type Story = StoryObj<typeof Pill>;
18
18
  export declare const Default: Story;
19
19
  export declare const Error: Story;
20
+ export declare const ErrorInverse: Story;
20
21
  export declare const Warning: Story;
22
+ export declare const WarningInverse: Story;
21
23
  export declare const Success: Story;
24
+ export declare const SuccessInverse: Story;
22
25
  export declare const Info: Story;
26
+ export declare const InfoInverse: Story;
@@ -7,6 +7,7 @@ export type PillVariant = 'warning' | 'error' | 'info' | 'success';
7
7
  export interface PillProps {
8
8
  variant?: PillVariant;
9
9
  loading?: boolean;
10
+ inverse?: boolean;
10
11
  }
11
12
  declare const Pill: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & PillProps & import('react').RefAttributes<HTMLDivElement>> & {
12
13
  Icon: import('react').ForwardRefExoticComponent<{
@@ -1,30 +1,34 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { forwardRef as t } from "react";
3
- import i from "clsx";
4
- import { Icon as c } from "../Icon/index.js";
5
- const s = t(({ children: r, variant: e = "info" }, l) => /* @__PURE__ */ o(
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as r } from "react";
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(
6
6
  "div",
7
7
  {
8
- ref: l,
9
- className: i(
10
- "inline-grid grid-flow-col items-center gap-1 rounded-full border px-2 py-0.5",
8
+ ref: f,
9
+ className: s(
10
+ "inline-grid grid-flow-col w-auto py-2 px-4 text-base font-semibold rounded-full gap-2",
11
11
  {
12
- "border-error-default bg-error-light text-error-default": e === "error",
13
- "border-info-default bg-info-light text-info-default": e === "info",
14
- "border-success-default bg-success-light text-success-default": e === "success",
15
- "border-warning-default bg-warning-light text-warning-default": e === "warning"
12
+ "border-error-default bg-error-light text-error-default": e === "error" && !l,
13
+ "border-info-default bg-info-light text-info-default": e === "info" && !l,
14
+ "border-success-default bg-success-light text-success-default": e === "success" && !l,
15
+ "border-warning-default bg-warning-light text-warning-default": e === "warning" && !l,
16
+ "border-error-light bg-error-default text-error-light": e === "error" && l,
17
+ "border-info-light bg-info-default text-info-light": e === "info" && l,
18
+ "border-success-light bg-success-default text-success-light": e === "success" && l,
19
+ "border-warning-light bg-warning-default text-warning-light": e === "warning" && l
16
20
  }
17
21
  ),
18
- children: r
22
+ children: o
19
23
  }
20
- )), n = t(({ className: r, ...e }, l) => /* @__PURE__ */ o("p", { className: i("text-xs", r), ref: l, ...e })), a = t(({ icon: r }, e) => /* @__PURE__ */ o(c, { size: "xs", ref: e, icon: r }));
21
- s.displayName = "Pill";
22
- a.displayName = "Pill.Icon";
23
- n.displayName = "Chip.Label";
24
- const u = Object.assign(s, {
25
- Icon: a,
26
- Label: n
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 }));
25
+ i.displayName = "Pill";
26
+ d.displayName = "Pill.Icon";
27
+ g.displayName = "Chip.Label";
28
+ const m = Object.assign(i, {
29
+ Icon: d,
30
+ Label: g
27
31
  });
28
32
  export {
29
- u as Pill
33
+ m as Pill
30
34
  };
@@ -3,7 +3,7 @@ import { createContext as u, forwardRef as o, useMemo as N, useContext as c } fr
3
3
  import h from "../../utils/matchMedia.js";
4
4
  import { Screens as y } from "../../utils/screens.js";
5
5
  import d from "clsx";
6
- const a = u(null), x = o(({ className: r, children: l, swapDesktop: t, swapMobile: e, ...i }, s) => {
6
+ const a = u(null), g = o(({ className: r, children: l, swapDesktop: t, swapMobile: e, ...i }, s) => {
7
7
  const f = `(min-width: ${y.md})`, m = h(f), S = N(
8
8
  () => ({
9
9
  swapDesktop: t,
@@ -21,7 +21,7 @@ const a = u(null), x = o(({ className: r, children: l, swapDesktop: t, swapMobil
21
21
  children: l
22
22
  }
23
23
  ) });
24
- }), g = o(({ className: r, children: l, ...t }, e) => {
24
+ }), x = o(({ className: r, children: l, ...t }, e) => {
25
25
  const { swapDesktop: i, swapMobile: s, isMd: p } = c(a) || {};
26
26
  return /* @__PURE__ */ n(
27
27
  "div",
@@ -64,18 +64,18 @@ const a = u(null), x = o(({ className: r, children: l, swapDesktop: t, swapMobil
64
64
  {
65
65
  ref: e,
66
66
  className: d(
67
- "items-center text-6xl font-semibold tracking-wider md:text-4xl lg:text-6xl",
67
+ "items-center font-semibold tracking-wider md:text-4xl lg:text-6xl",
68
68
  r
69
69
  ),
70
70
  ...t,
71
71
  children: l
72
72
  }
73
73
  )), v = o(({ className: r, children: l, ...t }, e) => /* @__PURE__ */ n("p", { ref: e, className: d("text-lg", r), ...t, children: l }));
74
- x.displayName = "SplitCard";
75
- g.displayName = "SplitCard.LeftContent";
74
+ g.displayName = "SplitCard";
75
+ x.displayName = "SplitCard.LeftContent";
76
76
  C.displayName = "SplitCard.RightContent";
77
- const j = Object.assign(x, {
78
- LeftContent: g,
77
+ const j = Object.assign(g, {
78
+ LeftContent: x,
79
79
  RightContent: C,
80
80
  Title: M,
81
81
  Text: v
@@ -1,43 +1,43 @@
1
- import { jsx as l, jsxs as x } from "react/jsx-runtime";
2
- import { createContext as T, forwardRef as r, useState as d, useMemo as f, useContext as c, Children as z } from "react";
3
- import a from "clsx";
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
4
  import { Button as b } from "../Button/index.js";
5
- const p = T(null), N = T(
5
+ const p = f(null), N = f(
6
6
  null
7
- ), v = r(({ className: n, children: t, activeStop: s = 1 }, e) => {
8
- const [o, u] = d(s), [i, m] = d(0), j = f(
7
+ ), h = a(({ className: n, children: t, activeStop: s = 1 }, e) => {
8
+ const [o, u] = x(s), [c, m] = x(0), d = v(
9
9
  () => ({
10
- totalStops: i ?? 0,
10
+ totalStops: c ?? 0,
11
11
  setTotalStops: m,
12
12
  currentStop: o,
13
13
  setCurrentStop: u
14
14
  }),
15
- [o, u, i, m]
15
+ [o, u, c, m]
16
16
  );
17
- return /* @__PURE__ */ l(p.Provider, { value: j, children: /* @__PURE__ */ l("div", { ref: e, className: n, children: t }) });
18
- }), S = r(({ className: n, children: t }, s) => {
19
- const { setTotalStops: e } = c(p) || {}, o = z.count(t);
20
- return e == null || e(o), /* @__PURE__ */ l("div", { ref: s, className: a("flex py-4", n), children: t });
21
- }), h = r(({ className: n, children: t }, s) => /* @__PURE__ */ l("div", { ref: s, className: a("", n), children: t })), y = r(({ className: n, stopId: t, children: s }, e) => {
22
- const { currentStop: o = 0 } = c(p) || {};
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) => {
22
+ const { currentStop: o = 0 } = i(p) || {};
23
23
  return /* @__PURE__ */ l(
24
24
  "div",
25
25
  {
26
26
  ref: e,
27
- className: a("", n, {
27
+ className: r("", n, {
28
28
  block: o === t,
29
29
  hidden: o !== t
30
30
  }),
31
31
  children: s
32
32
  }
33
33
  );
34
- }), C = r(({ className: n }, t) => {
34
+ }), w = a(({ className: n }, t) => {
35
35
  const {
36
36
  setCurrentStop: s,
37
37
  currentStop: e = 0,
38
38
  totalStops: o = 0
39
- } = c(p) || {};
40
- return /* @__PURE__ */ x("div", { ref: t, className: a("flex justify-between", n), children: [
39
+ } = i(p) || {};
40
+ return /* @__PURE__ */ T("div", { ref: t, className: r("flex justify-between", n), children: [
41
41
  /* @__PURE__ */ l(
42
42
  b,
43
43
  {
@@ -55,46 +55,51 @@ const p = T(null), N = T(
55
55
  }
56
56
  )
57
57
  ] });
58
- }), w = r(({ className: n, stopId: t = 0, children: s }, e) => {
59
- const { currentStop: o = 0, totalStops: u = 0 } = c(p) || {}, [i] = d(t), m = f(
58
+ }), g = a(({ className: n, stopId: t = 0, children: s }, e) => {
59
+ const {
60
+ currentStop: o = 0,
61
+ setCurrentStop: u,
62
+ totalStops: c = 0
63
+ } = i(p) || {}, [m] = x(t), d = v(
60
64
  () => ({
61
- stopNumber: i
65
+ stopNumber: m
62
66
  }),
63
- [i]
67
+ [m]
64
68
  );
65
- return /* @__PURE__ */ l(N.Provider, { value: m, children: /* @__PURE__ */ x("div", { ref: e, className: a(n, "w-full min-w-[120px]"), children: [
69
+ return /* @__PURE__ */ l(N.Provider, { value: d, children: /* @__PURE__ */ T("div", { ref: e, className: r(n, "w-full min-w-[120px]"), children: [
66
70
  /* @__PURE__ */ l(
67
71
  "div",
68
72
  {
69
- className: a({
70
- "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-future": t >= o && t < u,
71
- "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-complete": t < o && t < u
73
+ className: r({
74
+ "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-future": t >= o && t < c,
75
+ "mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-complete": t < o && t < c
72
76
  })
73
77
  }
74
78
  ),
75
79
  /* @__PURE__ */ l(
76
80
  "p",
77
81
  {
78
- className: a(
82
+ onClick: () => u == null ? void 0 : u(t),
83
+ className: r(
84
+ "hover:cursor-pointer z-10 mx-auto h-6 w-6 rounded-full",
79
85
  {
80
86
  "relative z-20 -mt-4 bg-tubestop-station-complete": t < o,
81
87
  "relative z-20 -mt-4 bg-tubestop-station-active": o === t,
82
88
  "relative z-20 -mt-4 bg-tubestop-station-future": t > o,
83
- "mt-1": t === u
84
- },
85
- "z-10 mx-auto h-6 w-6 rounded-full"
89
+ "mt-1": t === c
90
+ }
86
91
  )
87
92
  }
88
93
  ),
89
94
  s
90
95
  ] }) });
91
- }), g = r(({ className: n, children: t }, s) => {
92
- const { currentStop: e = 0 } = c(p) || {}, { stopNumber: o = 0 } = c(N) || {};
96
+ }), j = a(({ className: n, children: t }, s) => {
97
+ const { currentStop: e = 0 } = i(p) || {}, { stopNumber: o = 0 } = i(N) || {};
93
98
  return /* @__PURE__ */ l(
94
99
  "p",
95
100
  {
96
101
  ref: s,
97
- className: a(
102
+ className: r(
98
103
  "mt-2 text-center",
99
104
  {
100
105
  "font-medium text-tubestop-text-complete": o < e,
@@ -107,20 +112,20 @@ const p = T(null), N = T(
107
112
  }
108
113
  );
109
114
  });
110
- v.displayName = "Tubestop";
111
- S.displayName = "Tubestops.Header";
112
- w.displayName = "Tubestops.Stop";
113
- g.displayName = "Tubestops.Text";
114
- C.displayName = "Tubestops.Controls";
115
- h.displayName = "Tubestops.Body";
116
- y.displayName = "Tubestops.Content";
117
- const L = Object.assign(v, {
118
- Header: S,
119
- Stop: w,
120
- Text: g,
121
- Controls: C,
122
- Body: h,
123
- Content: y
115
+ h.displayName = "Tubestop";
116
+ y.displayName = "Tubestops.Header";
117
+ g.displayName = "Tubestops.Stop";
118
+ j.displayName = "Tubestops.Text";
119
+ 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,
126
+ Controls: w,
127
+ Body: C,
128
+ Content: S
124
129
  });
125
130
  export {
126
131
  L as Tubestops
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.33",
3
+ "version": "2.3.35",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,