trepur_components 2.3.25 → 2.3.27
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/Accordion/index.js +5 -5
- package/lib/components/AlertBar/index.js +31 -27
- package/lib/components/Button/index.js +2 -3
- package/lib/components/Calendar/index.js +27 -27
- package/lib/components/Card/index.js +7 -7
- package/lib/components/Carousel/Carousel.stories.d.ts +1 -3
- package/lib/components/Carousel/index.d.ts +15 -17
- package/lib/components/Carousel/index.js +100 -100
- package/lib/components/CarouselThumbnail/index.d.ts +14 -14
- package/lib/components/Collapsible/index.js +44 -41
- package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +1 -3
- package/lib/components/DetailUpdater/index.d.ts +1 -4
- package/lib/components/DetailUpdater/index.js +11 -13
- package/lib/components/Dialog/Dialog.stories.d.ts +1 -1
- package/lib/components/Dialog/index.d.ts +2 -2
- package/lib/components/Dialog/index.js +4 -14
- package/lib/components/Dropdown/index.js +41 -41
- package/lib/components/FileUploader/FilePreview.d.ts +1 -1
- package/lib/components/FooterNav/index.js +24 -16
- package/lib/components/Form/Form.stories.d.ts +3 -22
- package/lib/components/Input/index.js +36 -36
- package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -17
- package/lib/components/MenuButton/index.d.ts +1 -3
- package/lib/components/MenuButton/index.js +9 -15
- package/lib/components/Modal/Modal.stories.d.ts +1 -1
- package/lib/components/Modal/index.d.ts +1 -1
- package/lib/components/Nav/index.js +85 -81
- package/lib/components/NavItem/index.js +21 -14
- package/lib/components/Search/Search.stories.d.ts +1 -11
- package/lib/components/Search/index.d.ts +1 -1
- package/lib/components/Select/Select.stories.d.ts +1 -1
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/components/Showcase/Showcase.stories.d.ts +3 -7
- package/lib/components/Showcase/index.d.ts +1 -1
- package/lib/components/SideNav/SideNav.stories.d.ts +4 -12
- package/lib/components/SideNav/index.d.ts +2 -2
- package/lib/components/SocialButton/SocialButton.stories.d.ts +10 -25
- package/lib/components/SocialButton/index.d.ts +1 -1
- package/lib/components/SplitCard/index.js +34 -34
- package/lib/components/Stars/index.d.ts +0 -3
- package/lib/components/Stars/index.js +6 -6
- package/lib/components/Testimonial/index.js +31 -15
- package/lib/components/TextArea/index.js +37 -37
- package/lib/components/index.d.ts +1 -1
- package/lib/styles/themes/penrithmrt.css +12 -12
- package/lib/tailwind/boxShadow.ts +1 -1
- package/lib/tailwind/colors.ts +20 -20
- package/lib/tailwind/container.ts +2 -2
- package/lib/tailwind/preset.ts +12 -12
- package/lib/tailwind/spacing.ts +1 -1
- package/package.json +4 -2
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Image as
|
|
5
|
-
import { faChevronDown as
|
|
6
|
-
import
|
|
7
|
-
const n =
|
|
8
|
-
const [r, m] =
|
|
1
|
+
import { jsx as a, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as H, forwardRef as s, useState as T, useMemo as I, useContext as p } from "react";
|
|
3
|
+
import { Icon as S } from "../Icon/index.js";
|
|
4
|
+
import { Image as j } from "../Image/index.js";
|
|
5
|
+
import { faChevronDown as L, faChevronUp as k } from "@fortawesome/fontawesome-free-solid";
|
|
6
|
+
import d from "clsx";
|
|
7
|
+
const n = H(null), c = s(({ id: e, className: l, children: t, loading: o, ...i }, y) => {
|
|
8
|
+
const [r, m] = T(!1), g = I(
|
|
9
9
|
() => ({
|
|
10
|
-
loading:
|
|
10
|
+
loading: o,
|
|
11
11
|
expanded: r,
|
|
12
12
|
setExpanded: m
|
|
13
13
|
}),
|
|
14
|
-
[
|
|
14
|
+
[o, r, m]
|
|
15
15
|
);
|
|
16
|
-
return /* @__PURE__ */ a(n.Provider, { value:
|
|
16
|
+
return /* @__PURE__ */ a(n.Provider, { value: g, children: /* @__PURE__ */ a(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
19
|
id: e,
|
|
20
|
-
className:
|
|
21
|
-
|
|
20
|
+
className: d(
|
|
21
|
+
"w-full rounded-2xl bg-white hover:cursor-pointer",
|
|
22
|
+
l
|
|
23
|
+
),
|
|
24
|
+
ref: y,
|
|
22
25
|
...i,
|
|
23
26
|
children: t
|
|
24
27
|
}
|
|
25
28
|
) });
|
|
26
|
-
}),
|
|
27
|
-
const { expanded:
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
}), x = s(({ children: e, ...l }, t) => {
|
|
30
|
+
const { expanded: o, setExpanded: i } = p(n) || {};
|
|
31
|
+
return /* @__PURE__ */ w(
|
|
29
32
|
"div",
|
|
30
33
|
{
|
|
31
34
|
className: "flex h-24 pr-4 sm:pr-8",
|
|
32
|
-
onClick: () => i == null ? void 0 : i(!
|
|
35
|
+
onClick: () => i == null ? void 0 : i(!o),
|
|
33
36
|
ref: t,
|
|
34
37
|
...l,
|
|
35
38
|
children: [
|
|
36
39
|
e,
|
|
37
|
-
/* @__PURE__ */ a("div", { className: "my-auto flex-none", children: /* @__PURE__ */ a(
|
|
40
|
+
/* @__PURE__ */ a("div", { className: "my-auto flex-none", children: /* @__PURE__ */ a(S, { icon: o ? L : k }) })
|
|
38
41
|
]
|
|
39
42
|
}
|
|
40
43
|
);
|
|
41
|
-
}),
|
|
44
|
+
}), C = s(({ children: e, ...l }, t) => /* @__PURE__ */ a("div", { className: "mx-4 my-auto grid w-full", ref: t, ...l, children: e })), b = s(({ src: e, ...l }, t) => /* @__PURE__ */ a("div", { ref: t, className: "aspect-square flex-none p-4", children: /* @__PURE__ */ a(j, { src: e, className: "h-full rounded-2xl", ...l }) })), u = s(({ ...e }, l) => /* @__PURE__ */ a(
|
|
42
45
|
"p",
|
|
43
46
|
{
|
|
44
47
|
className: "text-xxs text-light-grey truncate md:text-xs",
|
|
45
48
|
ref: l,
|
|
46
49
|
...e
|
|
47
50
|
}
|
|
48
|
-
)),
|
|
49
|
-
const { expanded:
|
|
51
|
+
)), N = s(({ ...e }, l) => /* @__PURE__ */ a("p", { className: "md:text-md truncate text-sm", ref: l, ...e })), f = s(({ ...e }, l) => /* @__PURE__ */ a("p", { className: "truncate text-xs md:text-sm", ref: l, ...e })), h = s(({ children: e, ...l }, t) => {
|
|
52
|
+
const { expanded: o } = p(n) || {};
|
|
50
53
|
return /* @__PURE__ */ a(
|
|
51
54
|
"div",
|
|
52
55
|
{
|
|
53
|
-
className:
|
|
56
|
+
className: d(
|
|
54
57
|
"w-auto overflow-scroll px-4 transition-max-height duration-300",
|
|
55
58
|
{
|
|
56
|
-
"max-h-32":
|
|
57
|
-
"max-h-0": !
|
|
59
|
+
"max-h-32": o,
|
|
60
|
+
"max-h-0": !o
|
|
58
61
|
}
|
|
59
62
|
),
|
|
60
63
|
ref: t,
|
|
@@ -62,25 +65,25 @@ const n = w(null), c = o(({ id: e, className: l, children: t, loading: s, ...i }
|
|
|
62
65
|
children: e
|
|
63
66
|
}
|
|
64
67
|
);
|
|
65
|
-
}),
|
|
68
|
+
}), v = s(({ ...e }, l) => /* @__PURE__ */ a("p", { className: "text-xs md:text-sm", ref: l, ...e }));
|
|
66
69
|
c.displayName = "Collapsible";
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
x.displayName = "Collapsible.Header";
|
|
71
|
+
h.displayName = "Collapsible.Content";
|
|
72
|
+
b.displayName = "Collapsible.Image";
|
|
73
|
+
u.displayName = "Collapsible.Label";
|
|
74
|
+
N.displayName = "Collapsible.Title";
|
|
75
|
+
f.displayName = "Collapsible.Subtitle";
|
|
76
|
+
C.displayName = "Collapsible.HeaderContent";
|
|
77
|
+
v.displayName = "Collapsible.Text";
|
|
75
78
|
const U = Object.assign(c, {
|
|
76
|
-
Header:
|
|
77
|
-
HeaderContent:
|
|
78
|
-
Image:
|
|
79
|
-
Label:
|
|
80
|
-
Title:
|
|
81
|
-
Subtitle:
|
|
82
|
-
Content:
|
|
83
|
-
Text:
|
|
79
|
+
Header: x,
|
|
80
|
+
HeaderContent: C,
|
|
81
|
+
Image: b,
|
|
82
|
+
Label: u,
|
|
83
|
+
Title: N,
|
|
84
|
+
Subtitle: f,
|
|
85
|
+
Content: h,
|
|
86
|
+
Text: v
|
|
84
87
|
});
|
|
85
88
|
export {
|
|
86
89
|
U as Collapsible
|
|
@@ -3,15 +3,13 @@ import { DetailUpdater } from './';
|
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ id, className, title, description, expandText, collapseText, ctaText,
|
|
6
|
+
component: ({ id, className, title, description, expandText, collapseText, ctaText, children, onSubmit, onCancel, value }: import('./').DetailUpdatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
args: {
|
|
8
8
|
title: string;
|
|
9
9
|
description: string;
|
|
10
10
|
expandText: string;
|
|
11
11
|
collapseText: string;
|
|
12
12
|
ctaText: string;
|
|
13
|
-
onClick: (fieldValues: any) => void;
|
|
14
|
-
onChange: (value: any) => void;
|
|
15
13
|
children: import("react/jsx-runtime").JSX.Element;
|
|
16
14
|
};
|
|
17
15
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
|
|
3
2
|
export interface DetailUpdatesProps {
|
|
4
3
|
id?: string;
|
|
@@ -8,11 +7,9 @@ export interface DetailUpdatesProps {
|
|
|
8
7
|
expandText: string;
|
|
9
8
|
collapseText: string;
|
|
10
9
|
ctaText: string;
|
|
11
|
-
onClick?: (fieldValues: any) => void;
|
|
12
|
-
onChange?: (fieldValues: any) => void;
|
|
13
10
|
children: React.ReactNode;
|
|
14
11
|
onSubmit?: () => void;
|
|
15
12
|
onCancel?: () => void;
|
|
16
13
|
value?: string;
|
|
17
14
|
}
|
|
18
|
-
export declare const DetailUpdater: ({ id, className, title, description, expandText, collapseText, ctaText,
|
|
15
|
+
export declare const DetailUpdater: ({ id, className, title, description, expandText, collapseText, ctaText, children, onSubmit, onCancel, value }: DetailUpdatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,22 +3,20 @@ import { useState as x } from "react";
|
|
|
3
3
|
import { Button as N } from "../Button/index.js";
|
|
4
4
|
import { Card as g } from "../Card/index.js";
|
|
5
5
|
import "../../node_modules/keen-slider/keen-slider.min.css.js";
|
|
6
|
-
const
|
|
6
|
+
const w = ({
|
|
7
7
|
id: n,
|
|
8
8
|
className: c,
|
|
9
9
|
title: d,
|
|
10
|
-
description:
|
|
11
|
-
expandText:
|
|
10
|
+
description: m,
|
|
11
|
+
expandText: o,
|
|
12
12
|
collapseText: p,
|
|
13
13
|
ctaText: f,
|
|
14
|
-
onClick: k,
|
|
15
|
-
onChange: u,
|
|
16
14
|
children: h,
|
|
17
15
|
onSubmit: s,
|
|
18
|
-
onCancel:
|
|
16
|
+
onCancel: r,
|
|
19
17
|
value: t
|
|
20
18
|
}) => {
|
|
21
|
-
const [a,
|
|
19
|
+
const [a, l] = x(!1);
|
|
22
20
|
return /* @__PURE__ */ i(g, { id: n, className: c, children: [
|
|
23
21
|
!a && /* @__PURE__ */ i("div", { className: "mx-4 py-6", children: [
|
|
24
22
|
/* @__PURE__ */ i("div", { className: "flex justify-between", children: [
|
|
@@ -28,9 +26,9 @@ const D = ({
|
|
|
28
26
|
{
|
|
29
27
|
className: "font-semiBold text-ink cursor-pointer underline",
|
|
30
28
|
onClick: () => {
|
|
31
|
-
|
|
29
|
+
l(!0);
|
|
32
30
|
},
|
|
33
|
-
children:
|
|
31
|
+
children: o
|
|
34
32
|
}
|
|
35
33
|
)
|
|
36
34
|
] }),
|
|
@@ -44,20 +42,20 @@ const D = ({
|
|
|
44
42
|
{
|
|
45
43
|
className: "font-semiBold text-ink cursor-pointer underline",
|
|
46
44
|
onClick: () => {
|
|
47
|
-
|
|
45
|
+
r == null || r(), l(!1);
|
|
48
46
|
},
|
|
49
47
|
children: p
|
|
50
48
|
}
|
|
51
49
|
)
|
|
52
50
|
] }),
|
|
53
|
-
/* @__PURE__ */ e("p", { className: "text-light-grey", children:
|
|
51
|
+
/* @__PURE__ */ e("p", { className: "text-light-grey", children: m }),
|
|
54
52
|
/* @__PURE__ */ e("div", { className: "grid w-full grid-cols-1 gap-0 py-4 md:grid-cols-2 md:gap-4 lg:w-2/3", children: h }),
|
|
55
53
|
/* @__PURE__ */ e(N, { variant: "secondary", onClick: () => {
|
|
56
|
-
s == null || s(),
|
|
54
|
+
s == null || s(), l(!1);
|
|
57
55
|
}, children: f })
|
|
58
56
|
] })
|
|
59
57
|
] });
|
|
60
58
|
};
|
|
61
59
|
export {
|
|
62
|
-
|
|
60
|
+
w as DetailUpdater
|
|
63
61
|
};
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: (
|
|
5
|
+
component: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
args: {
|
|
7
7
|
title: string;
|
|
8
8
|
paragraph: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonProps } from '../Button';
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface DialogProps extends Partial<Pick<HTMLElement, 'className' | 'id'>> {
|
|
4
4
|
title: string;
|
|
5
5
|
paragraph: string;
|
|
6
6
|
dismissText: string;
|
|
@@ -9,4 +9,4 @@ export interface Props extends Partial<Pick<HTMLElement, 'className' | 'id'>> {
|
|
|
9
9
|
secondaryCta?: ButtonProps;
|
|
10
10
|
imageUrl?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare const Dialog: (
|
|
12
|
+
export declare const Dialog: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Card as
|
|
3
|
-
const
|
|
4
|
-
id: s,
|
|
5
|
-
className: i,
|
|
6
|
-
title: m,
|
|
7
|
-
paragraph: t,
|
|
8
|
-
dismissText: o,
|
|
9
|
-
onDismissClick: e,
|
|
10
|
-
primaryCta: p,
|
|
11
|
-
secondaryCta: l,
|
|
12
|
-
imageUrl: c
|
|
13
|
-
}) => /* @__PURE__ */ a(r, { className: "max-w-[600px]" });
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Card as o } from "../Card/index.js";
|
|
3
|
+
const t = () => /* @__PURE__ */ r(o, { className: "max-w-[600px]" });
|
|
14
4
|
export {
|
|
15
|
-
|
|
5
|
+
t as Dialog
|
|
16
6
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as f, forwardRef as
|
|
3
|
-
import { Button as
|
|
1
|
+
import { jsx as n, jsxs as w } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as f, forwardRef as r, useState as D, useRef as b, useMemo as x, useContext as a } from "react";
|
|
3
|
+
import { Button as l } from "../Button/index.js";
|
|
4
4
|
import { faChevronDown as y } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
-
import { useClickOutside as
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
5
|
+
import { useClickOutside as v } from "./utils.js";
|
|
6
|
+
const s = f(null), d = r(({ children: t }) => {
|
|
7
|
+
const [o, e] = D(!1), i = b(null), u = x(
|
|
8
8
|
() => ({
|
|
9
|
-
showDropdown:
|
|
10
|
-
setShowDropdown:
|
|
9
|
+
showDropdown: o,
|
|
10
|
+
setShowDropdown: e
|
|
11
11
|
}),
|
|
12
|
-
[
|
|
12
|
+
[o, e]
|
|
13
13
|
);
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
}), /* @__PURE__ */
|
|
17
|
-
}),
|
|
18
|
-
const { showDropdown:
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */
|
|
14
|
+
return v(i, () => {
|
|
15
|
+
e(!1);
|
|
16
|
+
}), /* @__PURE__ */ n(s.Provider, { value: u, children: /* @__PURE__ */ n("div", { ref: i, className: "relative inline-block text-left", children: t }) });
|
|
17
|
+
}), c = r(({ children: t }) => {
|
|
18
|
+
const { showDropdown: o, setShowDropdown: e } = a(s) || {};
|
|
19
|
+
return /* @__PURE__ */ w(l, { onClick: () => e == null ? void 0 : e(!o), children: [
|
|
20
|
+
t,
|
|
21
|
+
/* @__PURE__ */ n(l.Icon, { icon: y })
|
|
22
22
|
] });
|
|
23
|
-
}),
|
|
24
|
-
({ children:
|
|
25
|
-
const { showDropdown:
|
|
26
|
-
return
|
|
23
|
+
}), m = r(
|
|
24
|
+
({ children: t }) => {
|
|
25
|
+
const { showDropdown: o } = a(s) || {};
|
|
26
|
+
return o ? /* @__PURE__ */ n(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
className: "z-50 mt-2 w-48 rounded-lg border-2 bg-primary text-white",
|
|
30
30
|
role: "menu",
|
|
31
31
|
"aria-orientation": "vertical",
|
|
32
32
|
"aria-labelledby": "menu-button",
|
|
33
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ n("ul", { className: "py-1 text-sm", children: t })
|
|
34
34
|
}
|
|
35
|
-
) : /* @__PURE__ */
|
|
35
|
+
) : /* @__PURE__ */ n("div", {});
|
|
36
36
|
}
|
|
37
|
-
),
|
|
38
|
-
({ children:
|
|
39
|
-
const {
|
|
40
|
-
return /* @__PURE__ */
|
|
37
|
+
), p = r(
|
|
38
|
+
({ children: t }) => {
|
|
39
|
+
const { setShowDropdown: o } = a(s) || {};
|
|
40
|
+
return /* @__PURE__ */ n(
|
|
41
41
|
"li",
|
|
42
42
|
{
|
|
43
43
|
className: "px-4 py-2",
|
|
44
|
-
onClick: (
|
|
45
|
-
o == null || o
|
|
44
|
+
onClick: () => {
|
|
45
|
+
o == null || o(!1);
|
|
46
46
|
},
|
|
47
|
-
onKeyDown: (
|
|
48
|
-
|
|
47
|
+
onKeyDown: (e) => {
|
|
48
|
+
e.key;
|
|
49
49
|
},
|
|
50
|
-
children:
|
|
50
|
+
children: t
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
Label:
|
|
61
|
-
List:
|
|
62
|
-
Item:
|
|
55
|
+
d.displayName = "Dropdown";
|
|
56
|
+
c.displayName = "Dropdown.Label";
|
|
57
|
+
m.displayName = "Dropdown.List";
|
|
58
|
+
p.displayName = "Dropdown.Item";
|
|
59
|
+
const I = Object.assign(d, {
|
|
60
|
+
Label: c,
|
|
61
|
+
List: m,
|
|
62
|
+
Item: p
|
|
63
63
|
});
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
I as Dropdown
|
|
66
66
|
};
|
|
@@ -4,5 +4,5 @@ interface FilePreviewProps {
|
|
|
4
4
|
fileData?: any;
|
|
5
5
|
onDismiss?: (e: any) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare const FilePreview: ({ id, className, fileData, onDismiss
|
|
7
|
+
export declare const FilePreview: ({ id, className, fileData, onDismiss }: FilePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,29 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { Icon as
|
|
5
|
-
const l =
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import s from "clsx";
|
|
4
|
+
import { Icon as N } from "../Icon/index.js";
|
|
5
|
+
const l = n(({ className: o, children: e, ...t }, r) => /* @__PURE__ */ a(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
8
|
-
className:
|
|
8
|
+
className: s(
|
|
9
9
|
"border-lightest-grey fixed bottom-0 flex w-full justify-between border-t px-4",
|
|
10
|
-
|
|
10
|
+
o
|
|
11
11
|
),
|
|
12
|
-
ref:
|
|
13
|
-
...
|
|
14
|
-
children:
|
|
12
|
+
ref: r,
|
|
13
|
+
...t,
|
|
14
|
+
children: e
|
|
15
15
|
}
|
|
16
|
-
)), m =
|
|
16
|
+
)), m = n(({ className: o, children: e, href: t, onClick: r, ...p }) => /* @__PURE__ */ a(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
className:
|
|
19
|
+
className: s(
|
|
20
20
|
"group w-full cursor-pointer py-2 text-center transition-all duration-500",
|
|
21
|
-
|
|
21
|
+
o
|
|
22
22
|
),
|
|
23
|
-
...
|
|
24
|
-
children: /* @__PURE__ */
|
|
23
|
+
...p,
|
|
24
|
+
children: /* @__PURE__ */ a("a", { href: t, onClick: r, children: e })
|
|
25
25
|
}
|
|
26
|
-
)), i =
|
|
26
|
+
)), i = n(({ className: o, children: e, ...t }, r) => /* @__PURE__ */ a(
|
|
27
|
+
"p",
|
|
28
|
+
{
|
|
29
|
+
ref: r,
|
|
30
|
+
className: (s("font-regular pt-0.5 text-xs"), o),
|
|
31
|
+
...t,
|
|
32
|
+
children: e
|
|
33
|
+
}
|
|
34
|
+
)), c = n(({ icon: o, ...e }) => /* @__PURE__ */ a(N, { icon: o, ...e }));
|
|
27
35
|
l.displayName = "FooterNav";
|
|
28
36
|
m.displayName = "FooterNav.Item";
|
|
29
37
|
c.displayName = "FooterNav.Icon";
|
|
@@ -5,25 +5,10 @@ declare const meta: {
|
|
|
5
5
|
title: string;
|
|
6
6
|
component: ({ id, className, onSubmit, ref, components }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
|
-
title: {
|
|
9
|
-
type: {
|
|
10
|
-
name: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
};
|
|
13
|
-
description: string;
|
|
14
|
-
table: {
|
|
15
|
-
type: {
|
|
16
|
-
summary: string;
|
|
17
|
-
};
|
|
18
|
-
defaultValue: {
|
|
19
|
-
summary: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
8
|
onSubmit: {
|
|
24
9
|
type: {
|
|
25
|
-
name:
|
|
26
|
-
required:
|
|
10
|
+
name: "function";
|
|
11
|
+
required: false;
|
|
27
12
|
};
|
|
28
13
|
description: string;
|
|
29
14
|
action: string;
|
|
@@ -38,7 +23,7 @@ declare const meta: {
|
|
|
38
23
|
};
|
|
39
24
|
ref: {
|
|
40
25
|
type: {
|
|
41
|
-
name:
|
|
26
|
+
name: "other";
|
|
42
27
|
value: string;
|
|
43
28
|
};
|
|
44
29
|
description: string;
|
|
@@ -101,14 +86,10 @@ declare const meta: {
|
|
|
101
86
|
htmlType: string;
|
|
102
87
|
label: string;
|
|
103
88
|
placeholder: string;
|
|
104
|
-
children: string;
|
|
105
|
-
className: string;
|
|
106
89
|
} | {
|
|
107
90
|
htmlType: string;
|
|
108
|
-
children: string;
|
|
109
91
|
label?: undefined;
|
|
110
92
|
placeholder?: undefined;
|
|
111
|
-
className?: undefined;
|
|
112
93
|
})[];
|
|
113
94
|
};
|
|
114
95
|
};
|
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
import { jsx as o, jsxs as I } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as b, forwardRef as a, useMemo as N, useRef as
|
|
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
|
|
5
|
-
const
|
|
4
|
+
const s = b(null), p = a(({ children: n, errors: e, placeholder: t, ...r }, l) => {
|
|
5
|
+
const f = N(
|
|
6
6
|
() => ({
|
|
7
|
-
errors:
|
|
8
|
-
placeholder:
|
|
9
|
-
...
|
|
7
|
+
errors: e,
|
|
8
|
+
placeholder: t,
|
|
9
|
+
...r
|
|
10
10
|
}),
|
|
11
|
-
[
|
|
11
|
+
[e, r]
|
|
12
12
|
);
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
13
|
+
return /* @__PURE__ */ o(s.Provider, { value: f, children: /* @__PURE__ */ o("div", { ref: l, children: n }) });
|
|
14
14
|
}), u = a(
|
|
15
|
-
({ children:
|
|
16
|
-
const
|
|
15
|
+
({ children: n, ...e }, t) => {
|
|
16
|
+
const r = 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 = r.current) == null ? void 0 : l.focus();
|
|
24
24
|
},
|
|
25
|
-
ref:
|
|
26
|
-
...
|
|
27
|
-
children:
|
|
25
|
+
ref: t,
|
|
26
|
+
...e,
|
|
27
|
+
children: n
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
),
|
|
31
|
+
), i = a(({ className: n, children: e, required: t = !1 }, r) => /* @__PURE__ */ I(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
|
-
ref:
|
|
35
|
-
className: m("flex px-1 text-sm font-normal leading-5",
|
|
34
|
+
ref: r,
|
|
35
|
+
className: m("flex px-1 text-sm font-normal leading-5", n),
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */ o("p", { children:
|
|
38
|
-
|
|
37
|
+
/* @__PURE__ */ o("p", { children: e }),
|
|
38
|
+
t && /* @__PURE__ */ o("p", { className: "text-sm font-normal", children: " *" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
|
-
)),
|
|
42
|
-
({ ...
|
|
43
|
-
const { errors:
|
|
41
|
+
)), c = a(
|
|
42
|
+
({ ...n }) => {
|
|
43
|
+
const { errors: e, placeholder: t } = d(s) || {};
|
|
44
44
|
return /* @__PURE__ */ o(
|
|
45
45
|
"input",
|
|
46
46
|
{
|
|
47
|
-
placeholder:
|
|
47
|
+
placeholder: t,
|
|
48
48
|
className: m(
|
|
49
49
|
"text-ink text-md w-full rounded-md border border-gray-300 bg-white py-2 pl-4",
|
|
50
50
|
{
|
|
51
|
-
"border-error border-2":
|
|
51
|
+
"border-error border-2": e != null
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
...
|
|
54
|
+
...n
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
),
|
|
59
|
-
const { errors:
|
|
58
|
+
), x = a(({ ...n }, e) => {
|
|
59
|
+
const { errors: t } = d(s) || {};
|
|
60
60
|
return /* @__PURE__ */ o(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
|
-
ref:
|
|
63
|
+
ref: e,
|
|
64
64
|
className: "text-md gap-y-2 pl-1 pt-2 font-semibold text-error-default",
|
|
65
|
-
...
|
|
66
|
-
children:
|
|
65
|
+
...n,
|
|
66
|
+
children: t == null ? void 0 : t.map((r, l) => /* @__PURE__ */ o("p", { children: r }, `error-msg-${l + 1}`))
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
70
|
p.displayName = "Input";
|
|
71
71
|
u.displayName = "Input.Item";
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
i.displayName = "Input.Label";
|
|
73
|
+
c.displayName = "Input.Box";
|
|
74
|
+
x.displayName = "Input.Validation";
|
|
75
75
|
const C = Object.assign(p, {
|
|
76
76
|
Item: u,
|
|
77
|
-
Label:
|
|
78
|
-
Box:
|
|
79
|
-
Validation:
|
|
77
|
+
Label: i,
|
|
78
|
+
Box: c,
|
|
79
|
+
Validation: x
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
82
|
C as Input
|
|
@@ -3,23 +3,8 @@ import { StoryObj } from '@storybook/react';
|
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: ({ id, className,
|
|
6
|
+
component: ({ id, className, menuItems, onClick }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
argTypes: {
|
|
8
|
-
backgroundColour: {
|
|
9
|
-
type: {
|
|
10
|
-
name: string;
|
|
11
|
-
required: boolean;
|
|
12
|
-
};
|
|
13
|
-
options: string[];
|
|
14
|
-
description: string;
|
|
15
|
-
table: {
|
|
16
|
-
type: {
|
|
17
|
-
summary: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
defaultValue: string;
|
|
21
|
-
control: string;
|
|
22
|
-
};
|
|
23
8
|
menuItems: {
|
|
24
9
|
description: string;
|
|
25
10
|
control: string;
|
|
@@ -63,7 +48,6 @@ declare const meta: {
|
|
|
63
48
|
};
|
|
64
49
|
};
|
|
65
50
|
args: {
|
|
66
|
-
backgroundColour: string;
|
|
67
51
|
onClick: import('@storybook/addon-actions').HandlerFunction;
|
|
68
52
|
menuItems: {
|
|
69
53
|
name: string;
|