trepur_components 2.3.26 → 2.3.28
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/Accordion.stories.d.ts +0 -34
- 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 +16 -18
- package/lib/components/Carousel/index.js +101 -100
- package/lib/components/CarouselThumbnail/index.d.ts +14 -14
- package/lib/components/Collapsible/Collapsible.stories.d.ts +0 -34
- 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 +2 -5
- package/lib/components/DetailUpdater/index.js +14 -17
- 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/FileUploader/FileUploader.stories.d.ts +0 -34
- package/lib/components/FooterNav/index.js +24 -16
- package/lib/components/Form/Form.stories.d.ts +3 -54
- package/lib/components/Input/index.js +36 -36
- package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -49
- 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/NavItem/index.js +21 -14
- package/lib/components/Search/Search.stories.d.ts +1 -43
- package/lib/components/Search/index.d.ts +1 -1
- package/lib/components/Select/Select.stories.d.ts +1 -33
- package/lib/components/Select/index.d.ts +1 -1
- package/lib/components/Showcase/Showcase.stories.d.ts +3 -41
- package/lib/components/Showcase/index.d.ts +1 -1
- package/lib/components/SideNav/SideNav.stories.d.ts +4 -44
- package/lib/components/SideNav/index.d.ts +2 -2
- package/lib/components/SocialButton/SocialButton.stories.d.ts +10 -57
- package/lib/components/SocialButton/index.d.ts +2 -3
- 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 +19 -19
- package/lib/tailwind/boxShadow.ts +1 -1
- package/lib/tailwind/colors.ts +27 -27
- package/lib/tailwind/container.ts +2 -2
- package/lib/tailwind/preset.ts +12 -12
- package/lib/tailwind/spacing.ts +1 -1
- package/lib/utils/controls.d.ts +0 -35
- package/package.json +4 -2
|
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react';
|
|
|
3
3
|
|
|
4
4
|
export interface CarouselThumbnailContextProps {
|
|
5
5
|
slideWrapperClassName?: string;
|
|
6
|
-
breakpoints?: Record<string, Omit<KeenSliderOptions<
|
|
6
|
+
breakpoints?: Record<string, Omit<KeenSliderOptions<object, object, KeenSliderHooks>, 'breakpoints'>>;
|
|
7
7
|
defaultAnimation?: {
|
|
8
8
|
duration?: number;
|
|
9
9
|
easing?: (t: number) => number;
|
|
@@ -24,20 +24,20 @@ export interface CarouselThumbnailContextProps {
|
|
|
24
24
|
rubberband?: boolean;
|
|
25
25
|
slides?: any[];
|
|
26
26
|
vertical?: boolean;
|
|
27
|
-
animationStarted?: (slider: KeenSliderInstance<
|
|
28
|
-
animationStopped?: (slider: KeenSliderInstance<
|
|
29
|
-
animationEnded?: (slider: KeenSliderInstance<
|
|
30
|
-
created?: (slider: KeenSliderInstance<
|
|
31
|
-
destroyed?: (slider: KeenSliderInstance<
|
|
32
|
-
detailsChanged?: (slider: KeenSliderInstance<
|
|
33
|
-
dragged?: (slider: KeenSliderInstance<
|
|
34
|
-
dragStarted?: (slider: KeenSliderInstance<
|
|
35
|
-
dragChecked?: (slider: KeenSliderInstance<
|
|
36
|
-
dragEnded?: (slider: KeenSliderInstance<
|
|
37
|
-
beforeOptionsChanged?: (slider: KeenSliderInstance<
|
|
38
|
-
optionsChanged?: (slider: KeenSliderInstance<
|
|
27
|
+
animationStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
28
|
+
animationStopped?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
29
|
+
animationEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
30
|
+
created?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
31
|
+
destroyed?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
32
|
+
detailsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
33
|
+
dragged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
34
|
+
dragStarted?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
35
|
+
dragChecked?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
36
|
+
dragEnded?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
37
|
+
beforeOptionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
38
|
+
optionsChanged?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
39
39
|
slideChanged?: boolean;
|
|
40
|
-
updated?: (slider: KeenSliderInstance<
|
|
40
|
+
updated?: (slider: KeenSliderInstance<object, object, KeenSliderHooks>) => void;
|
|
41
41
|
spacing?: number;
|
|
42
42
|
number?: number;
|
|
43
43
|
origin?: number | 'auto' | 'center';
|
|
@@ -14,40 +14,6 @@ declare const meta: {
|
|
|
14
14
|
Text: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
15
15
|
};
|
|
16
16
|
parameters: {};
|
|
17
|
-
argTypes: {
|
|
18
|
-
id: {
|
|
19
|
-
description: string;
|
|
20
|
-
control: {
|
|
21
|
-
type: string;
|
|
22
|
-
default: boolean;
|
|
23
|
-
};
|
|
24
|
-
table: {
|
|
25
|
-
category: string;
|
|
26
|
-
type: {
|
|
27
|
-
summary: string;
|
|
28
|
-
};
|
|
29
|
-
defaultValue: {
|
|
30
|
-
summary: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
className: {
|
|
35
|
-
description: string;
|
|
36
|
-
control: {
|
|
37
|
-
type: string;
|
|
38
|
-
default: boolean;
|
|
39
|
-
};
|
|
40
|
-
table: {
|
|
41
|
-
category: string;
|
|
42
|
-
type: {
|
|
43
|
-
summary: string;
|
|
44
|
-
};
|
|
45
|
-
defaultValue: {
|
|
46
|
-
summary: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
17
|
args: {
|
|
52
18
|
children: import("react/jsx-runtime").JSX.Element[];
|
|
53
19
|
};
|
|
@@ -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,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
3
2
|
export interface DetailUpdatesProps {
|
|
4
3
|
id?: string;
|
|
5
4
|
className?: 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;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
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
|
-
|
|
6
|
-
const D = ({
|
|
5
|
+
const j = ({
|
|
7
6
|
id: n,
|
|
8
7
|
className: c,
|
|
9
8
|
title: d,
|
|
10
|
-
description:
|
|
11
|
-
expandText:
|
|
9
|
+
description: m,
|
|
10
|
+
expandText: o,
|
|
12
11
|
collapseText: p,
|
|
13
12
|
ctaText: f,
|
|
14
|
-
onClick: k,
|
|
15
|
-
onChange: u,
|
|
16
13
|
children: h,
|
|
17
|
-
onSubmit:
|
|
14
|
+
onSubmit: i,
|
|
18
15
|
onCancel: l,
|
|
19
16
|
value: t
|
|
20
17
|
}) => {
|
|
21
18
|
const [a, r] = x(!1);
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
!a && /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ s(g, { id: n, className: c, children: [
|
|
20
|
+
!a && /* @__PURE__ */ s("div", { className: "mx-4 py-6", children: [
|
|
21
|
+
/* @__PURE__ */ s("div", { className: "flex justify-between", children: [
|
|
25
22
|
/* @__PURE__ */ e("p", { className: "font-semiBold text-ink", children: d }),
|
|
26
23
|
/* @__PURE__ */ e(
|
|
27
24
|
"p",
|
|
@@ -30,14 +27,14 @@ const D = ({
|
|
|
30
27
|
onClick: () => {
|
|
31
28
|
r(!0);
|
|
32
29
|
},
|
|
33
|
-
children:
|
|
30
|
+
children: o
|
|
34
31
|
}
|
|
35
32
|
)
|
|
36
33
|
] }),
|
|
37
34
|
/* @__PURE__ */ e("p", { className: "text-ink", children: t !== void 0 ? t : "-" })
|
|
38
35
|
] }),
|
|
39
|
-
a && /* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
36
|
+
a && /* @__PURE__ */ s("div", { className: "mx-4 py-6", children: [
|
|
37
|
+
/* @__PURE__ */ s("div", { className: "flex justify-between", children: [
|
|
41
38
|
/* @__PURE__ */ e("p", { className: "font-semiBold text-ink", children: d }),
|
|
42
39
|
/* @__PURE__ */ e(
|
|
43
40
|
"p",
|
|
@@ -50,14 +47,14 @@ const D = ({
|
|
|
50
47
|
}
|
|
51
48
|
)
|
|
52
49
|
] }),
|
|
53
|
-
/* @__PURE__ */ e("p", { className: "text-light-grey", children:
|
|
50
|
+
/* @__PURE__ */ e("p", { className: "text-light-grey", children: m }),
|
|
54
51
|
/* @__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
52
|
/* @__PURE__ */ e(N, { variant: "secondary", onClick: () => {
|
|
56
|
-
|
|
53
|
+
i == null || i(), r(!1);
|
|
57
54
|
}, children: f })
|
|
58
55
|
] })
|
|
59
56
|
] });
|
|
60
57
|
};
|
|
61
58
|
export {
|
|
62
|
-
|
|
59
|
+
j as DetailUpdater
|
|
63
60
|
};
|
|
@@ -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 {};
|
|
@@ -8,40 +8,6 @@ declare const meta: {
|
|
|
8
8
|
Text: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
9
9
|
FilePreview: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
10
|
};
|
|
11
|
-
argTypes: {
|
|
12
|
-
id: {
|
|
13
|
-
description: string;
|
|
14
|
-
control: {
|
|
15
|
-
type: string;
|
|
16
|
-
default: boolean;
|
|
17
|
-
};
|
|
18
|
-
table: {
|
|
19
|
-
category: string;
|
|
20
|
-
type: {
|
|
21
|
-
summary: string;
|
|
22
|
-
};
|
|
23
|
-
defaultValue: {
|
|
24
|
-
summary: string;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
className: {
|
|
29
|
-
description: string;
|
|
30
|
-
control: {
|
|
31
|
-
type: string;
|
|
32
|
-
default: boolean;
|
|
33
|
-
};
|
|
34
|
-
table: {
|
|
35
|
-
category: string;
|
|
36
|
-
type: {
|
|
37
|
-
summary: string;
|
|
38
|
-
};
|
|
39
|
-
defaultValue: {
|
|
40
|
-
summary: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
11
|
args: {
|
|
46
12
|
children: import("react/jsx-runtime").JSX.Element[];
|
|
47
13
|
onDrop: (files: any) => void;
|
|
@@ -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";
|