trepur_components 2.3.46 → 2.3.48
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/assets/trepurComponentsLogo.svg +32 -0
- package/lib/components/AlertBar/index.js +3 -3
- package/lib/components/Breadcrumbs/index.js +14 -14
- package/lib/components/Button/index.js +16 -15
- package/lib/components/Card/index.js +18 -23
- package/lib/components/Carousel/index.js +38 -38
- package/lib/components/CarouselThumbnail/index.js +33 -32
- package/lib/components/Dropdown/index.js +34 -32
- package/lib/components/FooterNav/index.js +6 -5
- package/lib/components/ImageCard/index.js +16 -15
- package/lib/components/Input/Input.stories.d.ts +1 -1
- package/lib/components/Input/index.d.ts +1 -1
- package/lib/components/Input/index.js +20 -19
- package/lib/components/Link/Link.stories.d.ts +0 -1
- package/lib/components/Link/index.js +18 -17
- package/lib/components/Nav/index.js +49 -49
- package/lib/components/Pill/index.js +6 -6
- package/lib/components/Timeline/index.js +14 -14
- package/lib/components/Tubestops/index.js +58 -61
- package/lib/documentation/assets/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
1
|
+
import { jsx as i, jsxs as C, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as x, forwardRef as o, useMemo as v, useContext as N } from "react";
|
|
3
3
|
import t from "clsx";
|
|
4
4
|
import "../../node_modules/keen-slider/keen-slider.min.css.js";
|
|
5
5
|
import { useKeenSlider as a } from "../../node_modules/keen-slider/react.js";
|
|
6
|
-
import { breakpointsToRender as
|
|
7
|
-
import { WheelControls as
|
|
8
|
-
const m =
|
|
9
|
-
const n =
|
|
6
|
+
import { breakpointsToRender as S } from "./const.js";
|
|
7
|
+
import { WheelControls as g, ThumbnailPlugin as w } from "./utils.js";
|
|
8
|
+
const m = x(null), u = o(({ children: r, className: l, ...e }, s) => {
|
|
9
|
+
const n = v(
|
|
10
10
|
() => ({
|
|
11
|
-
...
|
|
11
|
+
...e
|
|
12
12
|
}),
|
|
13
|
-
[
|
|
13
|
+
[e]
|
|
14
14
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ i(m.Provider, { value: n, children: /* @__PURE__ */ i(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
18
|
ref: s,
|
|
19
|
-
className: t("navigation-wrapper w-full",
|
|
20
|
-
...
|
|
21
|
-
children:
|
|
19
|
+
className: t("navigation-wrapper w-full", l),
|
|
20
|
+
...e,
|
|
21
|
+
children: r
|
|
22
22
|
}
|
|
23
23
|
) });
|
|
24
|
-
}), d = o(({ className:
|
|
25
|
-
const { rubberband:
|
|
24
|
+
}), d = o(({ className: r, children: l }, e) => {
|
|
25
|
+
const { rubberband: s, loop: n, ...b } = N(m) || {}, [p, h] = a(
|
|
26
26
|
{
|
|
27
|
-
breakpoints:
|
|
28
|
-
loop:
|
|
29
|
-
rubberband:
|
|
27
|
+
breakpoints: S,
|
|
28
|
+
loop: n,
|
|
29
|
+
rubberband: s
|
|
30
30
|
},
|
|
31
|
-
[
|
|
32
|
-
), [
|
|
31
|
+
[g]
|
|
32
|
+
), [f] = a(
|
|
33
33
|
{
|
|
34
34
|
initial: 0,
|
|
35
35
|
slides: {
|
|
@@ -37,38 +37,39 @@ const m = T(null), u = o(({ children: i, className: e, ...r }, s) => {
|
|
|
37
37
|
spacing: 10
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
-
[
|
|
40
|
+
[w(h)]
|
|
41
41
|
);
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ C(T, { children: [
|
|
43
|
+
/* @__PURE__ */ i(
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
|
-
ref:
|
|
46
|
+
ref: p ?? e,
|
|
47
47
|
className: t(
|
|
48
48
|
"keen-slider h-96 w-full rounded-t-2xl pb-4",
|
|
49
|
-
|
|
49
|
+
r
|
|
50
50
|
),
|
|
51
|
-
...
|
|
52
|
-
children:
|
|
51
|
+
...b,
|
|
52
|
+
children: l
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("div", { ref: f, className: "keen-slider thumbnail h-24 w-16", children: l }) })
|
|
56
56
|
] });
|
|
57
|
-
}), c = o(({ src:
|
|
57
|
+
}), c = o(({ src: r, ...l }, e) => /* @__PURE__ */ i(
|
|
58
58
|
"img",
|
|
59
59
|
{
|
|
60
|
+
ref: e,
|
|
60
61
|
className: "keen-slider__slide rounded-t-2xl object-cover",
|
|
61
|
-
src:
|
|
62
|
-
...
|
|
62
|
+
src: r,
|
|
63
|
+
...l
|
|
63
64
|
}
|
|
64
65
|
));
|
|
65
66
|
u.displayName = "CarouselThumbnail";
|
|
66
67
|
d.displayName = "CarouselThumbnail.Slides";
|
|
67
68
|
c.displayName = "CarouselThumbnail.Slide";
|
|
68
|
-
const
|
|
69
|
+
const K = Object.assign(u, {
|
|
69
70
|
Slides: d,
|
|
70
71
|
Slide: c
|
|
71
72
|
});
|
|
72
73
|
export {
|
|
73
|
-
|
|
74
|
+
K as CarouselThumbnail
|
|
74
75
|
};
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { faChevronDown as
|
|
5
|
-
import { useClickOutside as
|
|
6
|
-
const
|
|
7
|
-
const [o, e] =
|
|
1
|
+
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as D, forwardRef as s, useState as b, useRef as x, useMemo as y, useContext as i } from "react";
|
|
3
|
+
import { Button as d } from "../Button/index.js";
|
|
4
|
+
import { faChevronDown as v } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
import { useClickOutside as C } from "./utils.js";
|
|
6
|
+
const a = D(null), c = s(({ children: t }, n) => {
|
|
7
|
+
const [o, e] = b(!1), l = x(null), w = y(
|
|
8
8
|
() => ({
|
|
9
9
|
showDropdown: o,
|
|
10
10
|
setShowDropdown: e
|
|
11
11
|
}),
|
|
12
12
|
[o, e]
|
|
13
13
|
);
|
|
14
|
-
return
|
|
14
|
+
return C(l, () => {
|
|
15
15
|
e(!1);
|
|
16
|
-
}), /* @__PURE__ */
|
|
17
|
-
}),
|
|
18
|
-
const { showDropdown: o, setShowDropdown: e } = a
|
|
19
|
-
return /* @__PURE__ */
|
|
16
|
+
}), /* @__PURE__ */ r(a.Provider, { value: w, children: /* @__PURE__ */ r("div", { ref: l ?? n, className: "relative inline-block text-left", children: t }) });
|
|
17
|
+
}), m = s(({ children: t }, n) => {
|
|
18
|
+
const { showDropdown: o, setShowDropdown: e } = i(a) || {};
|
|
19
|
+
return /* @__PURE__ */ f(d, { ref: n, onClick: () => e == null ? void 0 : e(!o), children: [
|
|
20
20
|
t,
|
|
21
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ r(d.Icon, { icon: v })
|
|
22
22
|
] });
|
|
23
|
-
}),
|
|
24
|
-
({ children: t }) => {
|
|
25
|
-
const { showDropdown: o } = a
|
|
26
|
-
return o ? /* @__PURE__ */
|
|
23
|
+
}), p = s(
|
|
24
|
+
({ children: t }, n) => {
|
|
25
|
+
const { showDropdown: o } = i(a) || {};
|
|
26
|
+
return o ? /* @__PURE__ */ r(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
|
+
ref: n,
|
|
29
30
|
className: "z-50 mt-2 w-48 rounded-lg border-2 bg-primary text-white",
|
|
30
31
|
role: "menu",
|
|
31
32
|
"aria-orientation": "vertical",
|
|
32
33
|
"aria-labelledby": "menu-button",
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
+
children: /* @__PURE__ */ r("ul", { className: "py-1 text-sm", children: t })
|
|
34
35
|
}
|
|
35
|
-
) : /* @__PURE__ */
|
|
36
|
+
) : /* @__PURE__ */ r("div", {});
|
|
36
37
|
}
|
|
37
|
-
),
|
|
38
|
-
({ children: t }) => {
|
|
39
|
-
const { setShowDropdown: o } = a
|
|
40
|
-
return /* @__PURE__ */
|
|
38
|
+
), u = s(
|
|
39
|
+
({ children: t }, n) => {
|
|
40
|
+
const { setShowDropdown: o } = i(a) || {};
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
41
42
|
"li",
|
|
42
43
|
{
|
|
44
|
+
ref: n,
|
|
43
45
|
className: "px-4 py-2",
|
|
44
46
|
onClick: () => {
|
|
45
47
|
o == null || o(!1);
|
|
@@ -52,15 +54,15 @@ const s = f(null), d = r(({ children: t }) => {
|
|
|
52
54
|
);
|
|
53
55
|
}
|
|
54
56
|
);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
Label:
|
|
61
|
-
List:
|
|
62
|
-
Item:
|
|
57
|
+
c.displayName = "Dropdown";
|
|
58
|
+
m.displayName = "Dropdown.Label";
|
|
59
|
+
p.displayName = "Dropdown.List";
|
|
60
|
+
u.displayName = "Dropdown.Item";
|
|
61
|
+
const g = Object.assign(c, {
|
|
62
|
+
Label: m,
|
|
63
|
+
List: p,
|
|
64
|
+
Item: u
|
|
63
65
|
});
|
|
64
66
|
export {
|
|
65
|
-
|
|
67
|
+
g as Dropdown
|
|
66
68
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as n } from "react";
|
|
3
3
|
import s from "clsx";
|
|
4
|
-
import { Icon as
|
|
4
|
+
import { Icon as d } from "../Icon/index.js";
|
|
5
5
|
const l = n(({ className: o, children: e, ...t }, r) => /* @__PURE__ */ a(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
@@ -13,9 +13,10 @@ const l = n(({ className: o, children: e, ...t }, r) => /* @__PURE__ */ a(
|
|
|
13
13
|
...t,
|
|
14
14
|
children: e
|
|
15
15
|
}
|
|
16
|
-
)), m = n(({ className: o, children: e, href: t, onClick: r, ...p }) => /* @__PURE__ */ a(
|
|
16
|
+
)), m = n(({ className: o, children: e, href: t, onClick: r, ...p }, N) => /* @__PURE__ */ a(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
+
ref: N,
|
|
19
20
|
className: s(
|
|
20
21
|
"group w-full cursor-pointer py-2 text-center transition-all duration-500",
|
|
21
22
|
o
|
|
@@ -31,16 +32,16 @@ const l = n(({ className: o, children: e, ...t }, r) => /* @__PURE__ */ a(
|
|
|
31
32
|
...t,
|
|
32
33
|
children: e
|
|
33
34
|
}
|
|
34
|
-
)), c = n(({ icon: o, ...e }) => /* @__PURE__ */ a(
|
|
35
|
+
)), c = n(({ icon: o, ...e }, t) => /* @__PURE__ */ a(d, { icon: o, ref: t, ...e }));
|
|
35
36
|
l.displayName = "FooterNav";
|
|
36
37
|
m.displayName = "FooterNav.Item";
|
|
37
38
|
c.displayName = "FooterNav.Icon";
|
|
38
39
|
i.displayName = "FooterNav.Label";
|
|
39
|
-
const
|
|
40
|
+
const F = Object.assign(l, {
|
|
40
41
|
Item: m,
|
|
41
42
|
Label: i,
|
|
42
43
|
Icon: c
|
|
43
44
|
});
|
|
44
45
|
export {
|
|
45
|
-
|
|
46
|
+
F as FooterNav
|
|
46
47
|
};
|
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as o } from "react";
|
|
3
3
|
import { Image as N } from "../Image/index.js";
|
|
4
|
-
import
|
|
4
|
+
import r from "clsx";
|
|
5
5
|
import { Button as f } from "../Button/index.js";
|
|
6
|
-
const d = o(({ className: a, children: e, onClick: t, ...
|
|
6
|
+
const d = o(({ className: a, children: e, onClick: t, ...s }, I) => /* @__PURE__ */ m(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref: I,
|
|
10
|
-
className:
|
|
10
|
+
className: r(
|
|
11
11
|
"grid overflow-hidden rounded-xl bg-white drop-shadow",
|
|
12
12
|
a
|
|
13
13
|
),
|
|
14
14
|
onClick: t,
|
|
15
|
-
...
|
|
15
|
+
...s,
|
|
16
16
|
children: e
|
|
17
17
|
}
|
|
18
|
-
)), n = o(({ src: a, ...e }) => /* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(N, { className: "object-cover", src: a, ...e }) })),
|
|
18
|
+
)), n = o(({ src: a, ...e }, t) => /* @__PURE__ */ m("div", { ref: t, className: "h-64", children: /* @__PURE__ */ m(N, { className: "object-cover", src: a, ...e }) })), l = o(({ children: a, className: e, ...t }, s) => /* @__PURE__ */ m("div", { className: r("p-4 pt-2", e), ref: s, ...t, children: a })), i = o(({ className: a, ...e }, t) => /* @__PURE__ */ m("p", { className: r("text-sm font-bold", a), ref: t, ...e })), p = o(({ className: a, ...e }, t) => /* @__PURE__ */ m("p", { className: r("text-sm font-normal", a), ref: t, ...e })), c = o(({ className: a, ...e }, t) => /* @__PURE__ */ m(
|
|
19
19
|
"p",
|
|
20
20
|
{
|
|
21
|
-
className:
|
|
21
|
+
className: r("line-clamp-5 pt-2 text-md font-normal", a),
|
|
22
22
|
ref: t,
|
|
23
23
|
...e
|
|
24
24
|
}
|
|
25
|
-
)), g = o(({ children: a, className: e, ...t }) => /* @__PURE__ */ m(
|
|
25
|
+
)), g = o(({ children: a, className: e, ...t }, s) => /* @__PURE__ */ m(
|
|
26
26
|
f,
|
|
27
27
|
{
|
|
28
|
-
|
|
28
|
+
ref: s,
|
|
29
|
+
className: r("mt-4 my-auto w-full justify-center", e),
|
|
29
30
|
...t,
|
|
30
31
|
children: a
|
|
31
32
|
}
|
|
32
|
-
)), C = o(({ children: a, className: e, ...t }) => /* @__PURE__ */ m("p", { className:
|
|
33
|
+
)), C = o(({ children: a, className: e, ...t }, s) => /* @__PURE__ */ m("p", { ref: s, className: r("pt-4 text-end text-sm", e), ...t, children: a }));
|
|
33
34
|
d.displayName = "ImageCard";
|
|
34
35
|
n.displayName = "ImageCard.Image";
|
|
35
|
-
|
|
36
|
+
i.displayName = "ImageCard.Title";
|
|
36
37
|
p.displayName = "ImageCard.Subtitle";
|
|
37
|
-
|
|
38
|
+
l.displayName = "ImageCard.Content";
|
|
38
39
|
c.displayName = "ImageCard.Text";
|
|
39
40
|
g.displayName = "ImageCard.Button";
|
|
40
41
|
C.displayName = "ImageCard.Caption";
|
|
41
|
-
const
|
|
42
|
+
const h = Object.assign(d, {
|
|
42
43
|
Image: n,
|
|
43
|
-
Content:
|
|
44
|
-
Title:
|
|
44
|
+
Content: l,
|
|
45
|
+
Title: i,
|
|
45
46
|
Subtitle: p,
|
|
46
47
|
Text: c,
|
|
47
48
|
Button: g,
|
|
48
49
|
Caption: C
|
|
49
50
|
});
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
h as ImageCard
|
|
52
53
|
};
|
|
@@ -8,7 +8,7 @@ declare const meta: {
|
|
|
8
8
|
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
9
9
|
required?: boolean | undefined;
|
|
10
10
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
-
Box: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<
|
|
11
|
+
Box: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLInputElement> & import('react').RefAttributes<HTMLInputElement>>;
|
|
12
12
|
Validation: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
13
|
};
|
|
14
14
|
args: {
|
|
@@ -27,7 +27,7 @@ declare const Input: import('react').ForwardRefExoticComponent<HTMLAttributes<HT
|
|
|
27
27
|
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
28
28
|
required?: boolean | undefined;
|
|
29
29
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
30
|
-
Box: import('react').ForwardRefExoticComponent<HTMLAttributes<
|
|
30
|
+
Box: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLInputElement> & import('react').RefAttributes<HTMLInputElement>>;
|
|
31
31
|
Validation: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
32
32
|
};
|
|
33
33
|
export { Input };
|
|
@@ -1,69 +1,70 @@
|
|
|
1
1
|
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as b, forwardRef as a, useMemo as N, useRef as y, useContext as d } from "react";
|
|
3
3
|
import m from "clsx";
|
|
4
|
-
const s = b(null), p = a(({ children:
|
|
4
|
+
const s = b(null), p = a(({ children: r, errors: e, placeholder: t, ...n }, l) => {
|
|
5
5
|
const f = N(
|
|
6
6
|
() => ({
|
|
7
7
|
errors: e,
|
|
8
8
|
placeholder: t,
|
|
9
|
-
...
|
|
9
|
+
...n
|
|
10
10
|
}),
|
|
11
|
-
[e,
|
|
11
|
+
[e, n]
|
|
12
12
|
);
|
|
13
|
-
return /* @__PURE__ */ o(s.Provider, { value: f, children: /* @__PURE__ */ o("div", { ref: l, children:
|
|
13
|
+
return /* @__PURE__ */ o(s.Provider, { value: f, children: /* @__PURE__ */ o("div", { ref: l, children: r }) });
|
|
14
14
|
}), u = a(
|
|
15
|
-
({ children:
|
|
16
|
-
const
|
|
15
|
+
({ children: r, ...e }, t) => {
|
|
16
|
+
const n = y(null);
|
|
17
17
|
return /* @__PURE__ */ o(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
className: "mt-4 w-full",
|
|
21
21
|
onClick: () => {
|
|
22
22
|
var l;
|
|
23
|
-
return (l =
|
|
23
|
+
return (l = n.current) == null ? void 0 : l.focus();
|
|
24
24
|
},
|
|
25
25
|
ref: t,
|
|
26
26
|
...e,
|
|
27
|
-
children:
|
|
27
|
+
children: r
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
), i = a(({ className:
|
|
31
|
+
), i = a(({ className: r, children: e, required: t = !1 }, n) => /* @__PURE__ */ I(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
35
|
-
className: m("flex px-1 text-sm font-normal leading-5",
|
|
34
|
+
ref: n,
|
|
35
|
+
className: m("flex px-1 text-sm font-normal leading-5", r),
|
|
36
36
|
children: [
|
|
37
37
|
/* @__PURE__ */ o("p", { children: e }),
|
|
38
38
|
t && /* @__PURE__ */ o("p", { className: "text-sm font-normal", children: " *" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
)), c = a(
|
|
42
|
-
({ ...
|
|
43
|
-
const { errors:
|
|
42
|
+
({ ...r }, e) => {
|
|
43
|
+
const { errors: t, placeholder: n } = d(s) || {};
|
|
44
44
|
return /* @__PURE__ */ o(
|
|
45
45
|
"input",
|
|
46
46
|
{
|
|
47
|
-
|
|
47
|
+
ref: e,
|
|
48
|
+
placeholder: n,
|
|
48
49
|
className: m(
|
|
49
50
|
"text-ink text-md w-full rounded-md border border-gray-300 bg-white py-2 pl-4",
|
|
50
51
|
{
|
|
51
|
-
"border-error border-2":
|
|
52
|
+
"border-error border-2": t != null
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
|
-
...
|
|
55
|
+
...r
|
|
55
56
|
}
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
|
-
), x = a(({ ...
|
|
59
|
+
), x = a(({ ...r }, e) => {
|
|
59
60
|
const { errors: t } = d(s) || {};
|
|
60
61
|
return /* @__PURE__ */ o(
|
|
61
62
|
"div",
|
|
62
63
|
{
|
|
63
64
|
ref: e,
|
|
64
65
|
className: "text-md gap-y-2 pl-1 pt-2 font-semibold text-error-default",
|
|
65
|
-
...
|
|
66
|
-
children: t == null ? void 0 : t.map((
|
|
66
|
+
...r,
|
|
67
|
+
children: t == null ? void 0 : t.map((n, l) => /* @__PURE__ */ o("p", { children: n }, `error-msg-${l + 1}`))
|
|
67
68
|
}
|
|
68
69
|
);
|
|
69
70
|
});
|
|
@@ -26,6 +26,5 @@ export declare const Ghost: Story;
|
|
|
26
26
|
export declare const Basic: Story;
|
|
27
27
|
export declare const Loading: Story;
|
|
28
28
|
export declare const Small: Story;
|
|
29
|
-
export declare const Medium: Story;
|
|
30
29
|
export declare const Large: Story;
|
|
31
30
|
export declare const Download: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as a } from "react";
|
|
3
|
-
import { Icon as
|
|
3
|
+
import { Icon as h } from "../Icon/index.js";
|
|
4
4
|
import c from "clsx";
|
|
5
5
|
const i = a(
|
|
6
6
|
({
|
|
@@ -8,15 +8,16 @@ const i = a(
|
|
|
8
8
|
children: e,
|
|
9
9
|
loading: t = !1,
|
|
10
10
|
variant: r = "primary",
|
|
11
|
-
size:
|
|
11
|
+
size: b = "sm",
|
|
12
12
|
downloadFileName: s,
|
|
13
|
-
href:
|
|
13
|
+
href: m,
|
|
14
14
|
target: u,
|
|
15
15
|
...p
|
|
16
|
-
}) => /* @__PURE__ */
|
|
16
|
+
}, x) => /* @__PURE__ */ n(
|
|
17
17
|
"a",
|
|
18
18
|
{
|
|
19
|
-
|
|
19
|
+
ref: x,
|
|
20
|
+
href: m,
|
|
20
21
|
target: u,
|
|
21
22
|
...s && { download: s },
|
|
22
23
|
className: c(
|
|
@@ -29,24 +30,24 @@ const i = a(
|
|
|
29
30
|
"border-button-bordered-border text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": r === "bordered" && !t,
|
|
30
31
|
"border-button-basic-border bg-button-basic-bg text-button-basic-text hover:bg-button-basic-hover active:bg-button-basic-active": r === "basic" && !t,
|
|
31
32
|
"w-40 animate-pulse border-loading bg-loading": t,
|
|
32
|
-
"px-12 py-3 text-base font-normal leading-4":
|
|
33
|
-
"px-12 py-3 text-lg font-normal leading-8":
|
|
34
|
-
"px-12 py-4 text-xl font-normal leading-8":
|
|
33
|
+
"px-12 py-3 text-base font-normal leading-4": b === "sm",
|
|
34
|
+
"px-12 py-3 text-lg font-normal leading-8": b === "md",
|
|
35
|
+
"px-12 py-4 text-xl font-normal leading-8": b === "lg"
|
|
35
36
|
},
|
|
36
37
|
o
|
|
37
38
|
),
|
|
38
39
|
...p,
|
|
39
40
|
children: !t && e
|
|
40
41
|
}
|
|
41
|
-
)
|
|
42
|
-
),
|
|
42
|
+
)
|
|
43
|
+
), g = a(({ className: o, ...e }, t) => /* @__PURE__ */ n("p", { className: c("text-md", o), ref: t, ...e })), d = a(({ icon: o }, e) => /* @__PURE__ */ n(h, { size: "lg", ref: e, icon: o }));
|
|
43
44
|
i.displayName = "Link";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
Icon:
|
|
48
|
-
Label:
|
|
45
|
+
d.displayName = "Link.Icon";
|
|
46
|
+
g.displayName = "Link.Label";
|
|
47
|
+
const L = Object.assign(i, {
|
|
48
|
+
Icon: d,
|
|
49
|
+
Label: g
|
|
49
50
|
});
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
L as Link
|
|
52
53
|
};
|