trepur_components 2.3.34 → 2.3.36
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.
- package/lib/components/ImageCard/ImageCard.stories.d.ts +4 -1
- package/lib/components/ImageCard/index.d.ts +4 -1
- package/lib/components/ImageCard/index.js +23 -19
- package/lib/components/Pill/Pill.stories.d.ts +4 -0
- package/lib/components/Pill/index.d.ts +1 -0
- package/lib/components/Pill/index.js +25 -21
- package/lib/components/SplitCard/SplitCard.stories.d.ts +1 -0
- package/lib/components/SplitCard/index.d.ts +1 -0
- package/lib/components/SplitCard/index.js +62 -55
- package/lib/components/Tubestops/index.js +52 -47
- package/package.json +2 -1
|
@@ -3,8 +3,11 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<
|
|
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
|
+
Images: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
9
|
+
asCarousel?: boolean | undefined;
|
|
10
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
11
|
Content: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
12
|
Title: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
10
13
|
Subtitle: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ImageProps } from '../Image';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
|
|
4
|
-
declare const ImageCard: import('react').ForwardRefExoticComponent<HTMLAttributes<
|
|
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
|
+
Images: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
asCarousel?: boolean | undefined;
|
|
8
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
9
|
Content: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
10
|
Title: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
8
11
|
Subtitle: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Image as
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { Image as C } from "../Image/index.js";
|
|
4
|
+
import N from "clsx";
|
|
5
|
+
import { Carousel as s } from "../Carousel/index.js";
|
|
6
|
+
const d = r(({ className: e, children: a, onClick: t, ...p }, I) => /* @__PURE__ */ m("a", { ref: I, className: "inline-block", href: "", onClick: t, ...p, children: /* @__PURE__ */ m(
|
|
6
7
|
"div",
|
|
7
8
|
{
|
|
8
|
-
className:
|
|
9
|
+
className: N(
|
|
9
10
|
"grid max-w-96 overflow-hidden rounded-xl bg-white drop-shadow",
|
|
10
|
-
|
|
11
|
+
e
|
|
11
12
|
),
|
|
12
|
-
|
|
13
|
-
...r,
|
|
14
|
-
children: e
|
|
13
|
+
children: a
|
|
15
14
|
}
|
|
16
|
-
)),
|
|
15
|
+
) })), l = r(({ children: e, asCarousel: a = !1, ...t }) => a ? /* @__PURE__ */ m(s, { perView: 1, spacing: 0, className: "h-64", loop: !0, ...t, children: /* @__PURE__ */ m(s.Content, { children: /* @__PURE__ */ m(s.Slides, { children: e }) }) }) : /* @__PURE__ */ m("div", { children: e[0] })), i = r(({ src: e, ...a }) => (
|
|
16
|
+
// <div className="keen-slider__slide h-64">
|
|
17
|
+
/* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(C, { className: "object-cover", src: e, ...a }) })
|
|
18
|
+
)), o = r(({ children: e, ...a }, t) => /* @__PURE__ */ m("div", { className: "px-2 pb-4 pt-2", ref: t, ...a, children: e })), n = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-lg", ref: a, ...e })), c = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "text-sm", ref: a, ...e })), g = r(({ ...e }, a) => /* @__PURE__ */ m("p", { className: "line-clamp-4 pt-4", ref: a, ...e }));
|
|
17
19
|
d.displayName = "ImageCard";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
i.displayName = "ImageCard.Image";
|
|
21
|
+
l.displayName = "ImageCard.Images";
|
|
22
|
+
n.displayName = "ImageCard.Title";
|
|
23
|
+
c.displayName = "ImageCard.Subtitle";
|
|
21
24
|
o.displayName = "ImageCard.Content";
|
|
22
25
|
g.displayName = "ImageCard.Text";
|
|
23
|
-
const
|
|
24
|
-
Image:
|
|
26
|
+
const y = Object.assign(d, {
|
|
27
|
+
Image: i,
|
|
28
|
+
Images: l,
|
|
25
29
|
Content: o,
|
|
26
|
-
Title:
|
|
27
|
-
Subtitle:
|
|
30
|
+
Title: n,
|
|
31
|
+
Subtitle: c,
|
|
28
32
|
Text: g
|
|
29
33
|
});
|
|
30
34
|
export {
|
|
31
|
-
|
|
35
|
+
y as ImageCard
|
|
32
36
|
};
|
|
@@ -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
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { Icon as
|
|
5
|
-
const
|
|
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:
|
|
9
|
-
className:
|
|
10
|
-
"inline-grid grid-flow-col
|
|
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:
|
|
22
|
+
children: o
|
|
19
23
|
}
|
|
20
|
-
)),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
Icon:
|
|
26
|
-
Label:
|
|
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
|
-
|
|
33
|
+
m as Pill
|
|
30
34
|
};
|
|
@@ -4,6 +4,7 @@ export interface SplitCardContextProps {
|
|
|
4
4
|
swapDesktop?: boolean;
|
|
5
5
|
swapMobile?: boolean;
|
|
6
6
|
isMd?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const SplitCard: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & SplitCardContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
9
10
|
LeftContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,85 +1,92 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import
|
|
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";
|
|
3
|
+
import w from "../../utils/matchMedia.js";
|
|
4
4
|
import { Screens as y } from "../../utils/screens.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
()
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
5
|
+
import o from "clsx";
|
|
6
|
+
const p = S(null), g = n(
|
|
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(
|
|
9
|
+
() => ({
|
|
10
|
+
swapDesktop: t,
|
|
11
|
+
swapMobile: l,
|
|
12
|
+
isMd: c,
|
|
13
|
+
loading: s
|
|
14
|
+
}),
|
|
15
|
+
[t, l, c, s]
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ e(p.Provider, { value: h, children: /* @__PURE__ */ e(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
ref: d,
|
|
21
|
+
...i,
|
|
22
|
+
className: o("grid grid-cols-1 md:grid-cols-2", r),
|
|
23
|
+
children: a
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
}
|
|
27
|
+
), f = n(({ className: r, children: a, ...t }, l) => {
|
|
28
|
+
const { swapDesktop: s, swapMobile: i, isMd: d, loading: m } = u(p) || {};
|
|
29
|
+
return m ? /* @__PURE__ */ e("div", { className: "pl-20 px-12 py-12 h-full w-full flex", children: /* @__PURE__ */ e("div", { className: "m-auto h-80 border-4 rounded border-gray-300 animate-pulse gap-4 grid w-full" }) }) : /* @__PURE__ */ e(
|
|
27
30
|
"div",
|
|
28
31
|
{
|
|
29
|
-
ref:
|
|
32
|
+
ref: l,
|
|
30
33
|
...t,
|
|
31
|
-
className:
|
|
34
|
+
className: o(
|
|
32
35
|
"mx-auto flex items-center px-4 py-2 text-center md:p-8 lg:py-12",
|
|
33
36
|
{
|
|
34
|
-
"md:order-last lg:pl-12 lg:pr-20":
|
|
35
|
-
"lg:pl-20 lg:pr-12": !
|
|
36
|
-
"order-last": !
|
|
37
|
+
"md:order-last lg:pl-12 lg:pr-20": s,
|
|
38
|
+
"lg:pl-20 lg:pr-12": !s,
|
|
39
|
+
"order-last": !d && i
|
|
37
40
|
},
|
|
38
41
|
r
|
|
39
42
|
),
|
|
40
|
-
children:
|
|
43
|
+
children: a
|
|
41
44
|
}
|
|
42
45
|
);
|
|
43
|
-
}),
|
|
44
|
-
const { swapDesktop:
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
+
}), x = n(({ className: r, children: a, ...t }, l) => {
|
|
47
|
+
const { swapDesktop: s, swapMobile: i, isMd: d, loading: m } = u(p) || {};
|
|
48
|
+
return m ? /* @__PURE__ */ e("div", { className: "h-full w-full flex", children: /* @__PURE__ */ N("div", { className: "m-auto gap-4 grid w-10/12", children: [
|
|
49
|
+
/* @__PURE__ */ e("div", { className: "mx-auto h-8 bg-gray-300 rounded-full w-40 animate-pulse" }),
|
|
50
|
+
/* @__PURE__ */ e("div", { className: "h-6 bg-gray-300 rounded-full w-full animate-pulse" }),
|
|
51
|
+
/* @__PURE__ */ e("div", { className: "h-6 bg-gray-300 rounded-full w-full animate-pulse" })
|
|
52
|
+
] }) }) : /* @__PURE__ */ e(
|
|
46
53
|
"div",
|
|
47
54
|
{
|
|
48
|
-
ref:
|
|
55
|
+
ref: l,
|
|
49
56
|
...t,
|
|
50
|
-
className:
|
|
57
|
+
className: o(
|
|
51
58
|
"flex h-full items-center px-4 py-2 text-center md:p-8 lg:py-12",
|
|
52
59
|
{
|
|
53
|
-
"md:order-first lg:pl-20 lg:pr-12":
|
|
54
|
-
"lg:pl-12 lg:pr-20": !
|
|
55
|
-
"order-first": !
|
|
60
|
+
"md:order-first lg:pl-20 lg:pr-12": s,
|
|
61
|
+
"lg:pl-12 lg:pr-20": !s,
|
|
62
|
+
"order-first": !d && i
|
|
56
63
|
},
|
|
57
64
|
r
|
|
58
65
|
),
|
|
59
|
-
children:
|
|
66
|
+
children: a
|
|
60
67
|
}
|
|
61
68
|
);
|
|
62
|
-
}),
|
|
69
|
+
}), b = n(({ className: r, children: a, ...t }, l) => /* @__PURE__ */ e(
|
|
63
70
|
"p",
|
|
64
71
|
{
|
|
65
|
-
ref:
|
|
66
|
-
className:
|
|
67
|
-
"items-center
|
|
72
|
+
ref: l,
|
|
73
|
+
className: o(
|
|
74
|
+
"items-center font-semibold tracking-wider md:text-4xl lg:text-6xl",
|
|
68
75
|
r
|
|
69
76
|
),
|
|
70
77
|
...t,
|
|
71
|
-
children:
|
|
78
|
+
children: a
|
|
72
79
|
}
|
|
73
|
-
)),
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
LeftContent:
|
|
79
|
-
RightContent:
|
|
80
|
-
Title:
|
|
81
|
-
Text:
|
|
80
|
+
)), M = n(({ className: r, children: a, ...t }, l) => /* @__PURE__ */ e("p", { ref: l, className: o("text-lg", r), ...t, children: a }));
|
|
81
|
+
g.displayName = "SplitCard";
|
|
82
|
+
f.displayName = "SplitCard.LeftContent";
|
|
83
|
+
x.displayName = "SplitCard.RightContent";
|
|
84
|
+
const z = Object.assign(g, {
|
|
85
|
+
LeftContent: f,
|
|
86
|
+
RightContent: x,
|
|
87
|
+
Title: b,
|
|
88
|
+
Text: M
|
|
82
89
|
});
|
|
83
90
|
export {
|
|
84
|
-
|
|
91
|
+
z as SplitCard
|
|
85
92
|
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import
|
|
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 =
|
|
5
|
+
const p = f(null), N = f(
|
|
6
6
|
null
|
|
7
|
-
),
|
|
8
|
-
const [o, u] =
|
|
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:
|
|
10
|
+
totalStops: c ?? 0,
|
|
11
11
|
setTotalStops: m,
|
|
12
12
|
currentStop: o,
|
|
13
13
|
setCurrentStop: u
|
|
14
14
|
}),
|
|
15
|
-
[o, u,
|
|
15
|
+
[o, u, c, m]
|
|
16
16
|
);
|
|
17
|
-
return /* @__PURE__ */ l(p.Provider, { value:
|
|
18
|
-
}),
|
|
19
|
-
const { setTotalStops: e } =
|
|
20
|
-
return e == null || e(o), /* @__PURE__ */ l("div", { ref: s, className:
|
|
21
|
-
}),
|
|
22
|
-
const { currentStop: o = 0 } =
|
|
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:
|
|
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
|
-
}),
|
|
34
|
+
}), w = a(({ className: n }, t) => {
|
|
35
35
|
const {
|
|
36
36
|
setCurrentStop: s,
|
|
37
37
|
currentStop: e = 0,
|
|
38
38
|
totalStops: o = 0
|
|
39
|
-
} =
|
|
40
|
-
return /* @__PURE__ */
|
|
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
|
-
}),
|
|
59
|
-
const {
|
|
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:
|
|
65
|
+
stopNumber: m
|
|
62
66
|
}),
|
|
63
|
-
[
|
|
67
|
+
[m]
|
|
64
68
|
);
|
|
65
|
-
return /* @__PURE__ */ l(N.Provider, { value:
|
|
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:
|
|
70
|
-
"mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-future": t >= o && t <
|
|
71
|
-
"mt-4 h-1 w-full translate-x-1/2 bg-tubestop-line-complete": t < o && t <
|
|
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
|
-
|
|
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 ===
|
|
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
|
-
}),
|
|
92
|
-
const { currentStop: e = 0 } =
|
|
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:
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const L = Object.assign(
|
|
118
|
-
Header:
|
|
119
|
-
Stop:
|
|
120
|
-
Text:
|
|
121
|
-
Controls:
|
|
122
|
-
Body:
|
|
123
|
-
Content:
|
|
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.
|
|
3
|
+
"version": "2.3.36",
|
|
4
4
|
"description": "component lib",
|
|
5
5
|
"author": "trepur_ttenneb",
|
|
6
6
|
"private": false,
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
51
51
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
52
52
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
53
|
+
"@tailwindcss/line-clamp": "^0.4.4",
|
|
53
54
|
"class-variance-authority": "^0.7.0",
|
|
54
55
|
"classnames": "^2.5.1",
|
|
55
56
|
"clsx": "^2.1.1",
|