trepur_components 2.3.9 → 2.3.11
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/_virtual/react.js +4 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +47 -0
- package/lib/components/Accordion/const.d.ts +31 -0
- package/lib/components/Accordion/index.d.ts +5 -0
- package/lib/components/Accordion/index.js +9 -0
- package/lib/components/AlertBar/AlertBar.stories.d.ts +25 -0
- package/lib/components/AlertBar/index.d.ts +15 -0
- package/lib/components/AlertBar/index.js +66 -0
- package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
- package/lib/components/Avatar/index.d.ts +3 -0
- package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +18 -0
- package/lib/components/Breadcrumbs/index.d.ts +15 -0
- package/lib/components/Breadcrumbs/index.js +49 -0
- package/lib/components/Button/Button.stories.d.ts +24 -0
- package/lib/components/Button/index.d.ts +14 -0
- package/lib/components/Button/index.js +43 -0
- package/lib/components/Calendar/Calendar.stories.d.ts +11 -0
- package/lib/components/Calendar/index.d.ts +14 -0
- package/lib/components/Calendar/index.js +49 -0
- package/lib/components/Calendar/style.css.js +1 -0
- package/lib/components/Card/Card.stories.d.ts +11 -0
- package/lib/components/Card/index.d.ts +2 -0
- package/lib/components/Card/index.js +25 -0
- package/lib/components/Carousel/Carousel.stories.d.ts +23 -0
- package/lib/components/Carousel/index.d.ts +70 -0
- package/lib/components/Carousel/index.js +159 -0
- package/lib/components/Carousel/utils.d.ts +1 -0
- package/lib/components/Carousel/utils.js +38 -0
- package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +22 -0
- package/lib/components/CarouselThumbnail/const.d.ts +1 -0
- package/lib/components/CarouselThumbnail/const.js +20 -0
- package/lib/components/CarouselThumbnail/index.d.ts +51 -0
- package/lib/components/CarouselThumbnail/index.js +74 -0
- package/lib/components/CarouselThumbnail/utils.d.ts +2 -0
- package/lib/components/CarouselThumbnail/utils.js +65 -0
- package/lib/components/Checkbox/Checkbox.stories.d.ts +17 -0
- package/lib/components/Checkbox/index.d.ts +11 -0
- package/lib/components/Checkbox/index.js +28 -0
- package/lib/components/Collapsible/Collapsible.stories.d.ts +57 -0
- package/lib/components/Collapsible/index.d.ts +19 -0
- package/lib/components/Collapsible/index.js +87 -0
- package/lib/components/Counter/Counter.stories.d.ts +17 -0
- package/lib/components/Counter/index.d.ts +14 -0
- package/lib/components/Counter/index.js +49 -0
- package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +20 -0
- package/lib/components/DetailUpdater/index.d.ts +18 -0
- package/lib/components/DetailUpdater/index.js +63 -0
- package/lib/components/Dialog/Dialog.stories.d.ts +15 -0
- package/lib/components/Dialog/index.d.ts +12 -0
- package/lib/components/Dialog/index.js +16 -0
- package/lib/components/Dropdown/Dropdown.stories.d.ts +17 -0
- package/lib/components/Dropdown/index.d.ts +13 -0
- package/lib/components/Dropdown/index.js +66 -0
- package/lib/components/Dropdown/utils.d.ts +1 -0
- package/lib/components/Dropdown/utils.js +14 -0
- package/lib/components/FileUploader/FilePreview.d.ts +8 -0
- package/lib/components/FileUploader/FileUploader.stories.d.ts +52 -0
- package/lib/components/FileUploader/index.d.ts +15 -0
- package/lib/components/Footer/Footer.stories.d.ts +19 -0
- package/lib/components/Footer/index.d.ts +16 -0
- package/lib/components/Footer/index.js +36 -0
- package/lib/components/FooterNav/FooterNav.stories.d.ts +22 -0
- package/lib/components/FooterNav/index.d.ts +15 -0
- package/lib/components/FooterNav/index.js +38 -0
- package/lib/components/Form/Form.stories.d.ts +117 -0
- package/lib/components/Form/index.d.ts +13 -0
- package/lib/components/Form/index.js +17 -0
- package/lib/components/Gallery/Gallery.stories.d.ts +16 -0
- package/lib/components/Gallery/index.d.ts +7 -0
- package/lib/components/Greeting/Greeting.stories.d.ts +13 -0
- package/lib/components/Greeting/index.d.ts +7 -0
- package/lib/components/Greeting/index.js +20 -0
- package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +10 -0
- package/lib/components/HamburgerIcon/index.d.ts +2 -0
- package/lib/components/HamburgerIcon/index.js +78 -0
- package/lib/components/Icon/Icon.stories.d.ts +16 -0
- package/lib/components/Icon/index.d.ts +10 -0
- package/lib/components/Icon/index.js +23 -0
- package/lib/components/Image/Image.stories.d.ts +13 -0
- package/lib/components/Image/index.d.ts +5 -0
- package/lib/components/Image/index.js +17 -0
- package/lib/components/ImageCard/ImageCard.stories.d.ts +19 -0
- package/lib/components/ImageCard/index.d.ts +11 -0
- package/lib/components/ImageCard/index.js +32 -0
- package/lib/components/Input/Input.stories.d.ts +22 -0
- package/lib/components/Input/index.d.ts +33 -0
- package/lib/components/Input/index.js +83 -0
- package/lib/components/MenuButton/MenuButton.stories.d.ts +76 -0
- package/lib/components/MenuButton/index.d.ts +14 -0
- package/lib/components/MenuButton/index.js +56 -0
- package/lib/components/Modal/Modal.stories.d.ts +67 -0
- package/lib/components/Modal/index.d.ts +10 -0
- package/lib/components/Modal/index.js +45 -0
- package/lib/components/Nav/Nav.stories.d.ts +31 -0
- package/lib/components/Nav/index.d.ts +20 -0
- package/lib/components/Nav/index.js +81 -0
- package/lib/components/NavItem/NavItem.stories.d.ts +17 -0
- package/lib/components/NavItem/index.d.ts +8 -0
- package/lib/components/NavItem/index.js +31 -0
- package/lib/components/Pill/Pill.stories.d.ts +22 -0
- package/lib/components/Pill/index.d.ts +17 -0
- package/lib/components/Pill/index.js +30 -0
- package/lib/components/Search/Search.stories.d.ts +86 -0
- package/lib/components/Search/index.d.ts +12 -0
- package/lib/components/Search/index.js +42 -0
- package/lib/components/Select/Select.stories.d.ts +56 -0
- package/lib/components/Select/index.d.ts +11 -0
- package/lib/components/Select/index.js +68 -0
- package/lib/components/Showcase/Showcase.stories.d.ts +55 -0
- package/lib/components/Showcase/index.d.ts +15 -0
- package/lib/components/SideNav/SideNav.stories.d.ts +80 -0
- package/lib/components/SideNav/index.d.ts +12 -0
- package/lib/components/SocialButton/SocialButton.stories.d.ts +130 -0
- package/lib/components/SocialButton/index.d.ts +12 -0
- package/lib/components/SplitCard/SplitCard.stories.d.ts +21 -0
- package/lib/components/SplitCard/index.d.ts +14 -0
- package/lib/components/Stars/Star.stories.d.ts +14 -0
- package/lib/components/Stars/index.d.ts +8 -0
- package/lib/components/Stars/index.js +22 -0
- package/lib/components/Testimonial/Testimonial.stories.d.ts +21 -0
- package/lib/components/Testimonial/index.d.ts +13 -0
- package/lib/components/Testimonial/index.js +42 -0
- package/lib/components/TextArea/TextArea.stories.d.ts +21 -0
- package/lib/components/TextArea/index.d.ts +33 -0
- package/lib/components/TextArea/index.js +76 -0
- package/lib/components/Timeline/Timeline.stories.d.ts +21 -0
- package/lib/components/Timeline/index.d.ts +11 -0
- package/lib/components/Timeline/index.js +31 -0
- package/lib/components/Tubestops/Tubestops.stories.d.ts +19 -0
- package/lib/components/Tubestops/index.d.ts +15 -0
- package/lib/components/Tubestops/index.js +77 -0
- package/lib/components/Video/Video.stories.d.ts +23 -0
- package/lib/components/Video/index.d.ts +18 -0
- package/lib/components/Video/index.js +32 -0
- package/{src/components/index.ts → lib/components/index.d.ts} +35 -71
- package/lib/documentation/assets/index.d.ts +3 -0
- package/lib/documentation/typography/Fonts/Fonts.d.ts +2 -0
- package/lib/documentation/typography/Fonts/Fonts.stories.d.ts +10 -0
- package/lib/index.js +72 -0
- package/lib/node_modules/keen-slider/keen-slider.min.css.js +1 -0
- package/lib/node_modules/keen-slider/react.js +591 -0
- package/lib/style.css +1 -0
- package/lib/styles/global.css +19 -0
- package/{src → lib}/styles/themes/local.css +9 -1
- package/lib/styles/themes/penrithmrt.css +101 -0
- package/{tailwind → lib/tailwind}/colors.ts +12 -1
- package/lib/utils/controls.d.ts +36 -0
- package/lib/utils/matchMedia.d.ts +2 -0
- package/lib/utils/screens.d.ts +7 -0
- package/package.json +4 -1
- package/.eslintrc.cjs +0 -72
- package/.husky/pre-commit +0 -4
- package/.prettierignore +0 -10
- package/.prettierrc.json +0 -22
- package/postcss.config.js +0 -8
- package/src/components/Accordion/Accordion.stories.tsx +0 -39
- package/src/components/Accordion/const.tsx +0 -34
- package/src/components/Accordion/index.tsx +0 -22
- package/src/components/AlertBar/AlertBar.stories.tsx +0 -89
- package/src/components/AlertBar/index.tsx +0 -82
- package/src/components/Avatar/Avatar.stories.tsx +0 -14
- package/src/components/Avatar/index.tsx +0 -492
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -29
- package/src/components/Breadcrumbs/index.tsx +0 -89
- package/src/components/Button/Button.stories.tsx +0 -24
- package/src/components/Button/index.tsx +0 -59
- package/src/components/Calendar/Calendar.stories.tsx +0 -21
- package/src/components/Calendar/index.tsx +0 -92
- package/src/components/Calendar/style.css +0 -233
- package/src/components/Card/Card.stories.tsx +0 -14
- package/src/components/Card/index.tsx +0 -39
- package/src/components/Carousel/Carousel.stories.tsx +0 -44
- package/src/components/Carousel/index.tsx +0 -301
- package/src/components/Carousel/utils.ts +0 -53
- package/src/components/CarouselThumbnail/CarouselThumbnail.stories.tsx +0 -29
- package/src/components/CarouselThumbnail/const.ts +0 -17
- package/src/components/CarouselThumbnail/index.tsx +0 -169
- package/src/components/CarouselThumbnail/utils.ts +0 -87
- package/src/components/Checkbox/Checkbox.mdx +0 -33
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -27
- package/src/components/Checkbox/index.tsx +0 -44
- package/src/components/Collapsible/Collapsible.stories.tsx +0 -67
- package/src/components/Collapsible/index.tsx +0 -169
- package/src/components/Counter/Counter.stories.tsx +0 -20
- package/src/components/Counter/index.tsx +0 -98
- package/src/components/DetailUpdater/DetailUpdater.stories.tsx +0 -37
- package/src/components/DetailUpdater/index.tsx +0 -107
- package/src/components/Dialog/Dialog.stories.tsx +0 -65
- package/src/components/Dialog/index.tsx +0 -29
- package/src/components/Dropdown/Dropdown.stories.tsx +0 -22
- package/src/components/Dropdown/index.tsx +0 -117
- package/src/components/Dropdown/utils.ts +0 -15
- package/src/components/FileUploader/FilePreview.tsx +0 -45
- package/src/components/FileUploader/FileUploader.stories.tsx +0 -28
- package/src/components/FileUploader/index.tsx +0 -177
- package/src/components/Footer/Footer.stories.tsx +0 -47
- package/src/components/Footer/index.tsx +0 -96
- package/src/components/FooterNav/FooterNav.stories.tsx +0 -32
- package/src/components/FooterNav/index.tsx +0 -75
- package/src/components/Form/Form.stories.tsx +0 -86
- package/src/components/Form/index.tsx +0 -41
- package/src/components/Gallery/Gallery.stories.tsx +0 -39
- package/src/components/Gallery/index.tsx +0 -31
- package/src/components/Greeting/Greeting.stories.tsx +0 -16
- package/src/components/Greeting/index.tsx +0 -49
- package/src/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -14
- package/src/components/HamburgerIcon/index.tsx +0 -75
- package/src/components/Icon/Icon.stories.tsx +0 -41
- package/src/components/Icon/index.tsx +0 -33
- package/src/components/Image/Image.stories.tsx +0 -17
- package/src/components/Image/index.tsx +0 -25
- package/src/components/ImageCard/ImageCard.stories.tsx +0 -29
- package/src/components/ImageCard/index.tsx +0 -75
- package/src/components/Input/Input.stories.tsx +0 -25
- package/src/components/Input/index.tsx +0 -139
- package/src/components/MenuButton/MenuButton.stories.tsx +0 -46
- package/src/components/MenuButton/index.tsx +0 -66
- package/src/components/Modal/Modal.stories.tsx +0 -82
- package/src/components/Modal/index.tsx +0 -71
- package/src/components/Nav/Nav.stories.tsx +0 -80
- package/src/components/Nav/index.tsx +0 -171
- package/src/components/NavItem/NavItem.stories.tsx +0 -17
- package/src/components/NavItem/index.tsx +0 -39
- package/src/components/Pill/Pill.stories.tsx +0 -51
- package/src/components/Pill/index.tsx +0 -69
- package/src/components/Search/Search.stories.tsx +0 -63
- package/src/components/Search/index.tsx +0 -64
- package/src/components/Select/Select.stories.tsx +0 -55
- package/src/components/Select/index.tsx +0 -97
- package/src/components/Showcase/Showcase.stories.tsx +0 -31
- package/src/components/Showcase/index.tsx +0 -62
- package/src/components/SideNav/SideNav.stories.tsx +0 -50
- package/src/components/SideNav/index.tsx +0 -39
- package/src/components/SocialButton/SocialButton.stories.tsx +0 -88
- package/src/components/SocialButton/index.tsx +0 -63
- package/src/components/SplitCard/SplitCard.stories.tsx +0 -34
- package/src/components/SplitCard/index.tsx +0 -132
- package/src/components/Stars/Star.stories.tsx +0 -18
- package/src/components/Stars/index.tsx +0 -38
- package/src/components/Testimonial/Testimonial.stories.tsx +0 -37
- package/src/components/Testimonial/index.tsx +0 -123
- package/src/components/TextArea/TextArea.stories.tsx +0 -24
- package/src/components/TextArea/index.tsx +0 -133
- package/src/components/Timeline/Timeline.stories.tsx +0 -45
- package/src/components/Timeline/index.tsx +0 -65
- package/src/components/Tubestops/Tubestops.stories.tsx +0 -22
- package/src/components/Tubestops/index.tsx +0 -132
- package/src/components/Video/Video.stories.tsx +0 -58
- package/src/components/Video/assets/example.mp4 +0 -0
- package/src/components/Video/assets/example.ogv +0 -0
- package/src/components/Video/assets/example.webm +0 -0
- package/src/components/Video/index.tsx +0 -92
- package/src/custom.d.ts +0 -14
- package/src/documentation/Colours.mdx +0 -192
- package/src/documentation/Introduction.mdx +0 -13
- package/src/documentation/assets/index.ts +0 -3
- package/src/documentation/assets/trepurComponentsLogo.svg +0 -32
- package/src/documentation/typography/Fonts/Fonts.stories.tsx +0 -14
- package/src/documentation/typography/Fonts/Fonts.tsx +0 -73
- package/src/fonts/Sora/OFL.txt +0 -93
- package/src/fonts/Sora/README.txt +0 -70
- package/src/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
- package/src/fonts/Sora/static/Sora-Bold.ttf +0 -0
- package/src/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
- package/src/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
- package/src/fonts/Sora/static/Sora-Light.ttf +0 -0
- package/src/fonts/Sora/static/Sora-Medium.ttf +0 -0
- package/src/fonts/Sora/static/Sora-Regular.ttf +0 -0
- package/src/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
- package/src/fonts/Sora/static/Sora-Thin.ttf +0 -0
- package/src/styles/global.css +0 -75
- package/src/styles/themes/test.css +0 -28
- package/src/utils/controls.ts +0 -44
- package/src/utils/matchMedia.ts +0 -9
- package/src/utils/screens.ts +0 -7
- package/tailwind.config.ts +0 -13
- package/tsconfig.json +0 -49
- package/tsconfig.node.json +0 -12
- package/vite.config.mjs +0 -64
- /package/{src/index.ts → lib/index.d.ts} +0 -0
- /package/{tailwind → lib/tailwind}/boxShadow.ts +0 -0
- /package/{tailwind → lib/tailwind}/container.ts +0 -0
- /package/{tailwind → lib/tailwind}/preset.ts +0 -0
- /package/{tailwind → lib/tailwind}/spacing.ts +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Counter } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('./').CounterContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
DecrementIcon: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
IncrementIcon: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Count: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
};
|
|
11
|
+
args: {
|
|
12
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof Counter>;
|
|
17
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CounterContextProps {
|
|
4
|
+
currentCount?: number;
|
|
5
|
+
setCurrentCount?: (val: number) => void;
|
|
6
|
+
count?: number;
|
|
7
|
+
onClick?: (count: number) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const Counter: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & CounterContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
10
|
+
DecrementIcon: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
IncrementIcon: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Count: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
};
|
|
14
|
+
export { Counter };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as f, forwardRef as t, useState as I, useMemo as v, useContext as c } from "react";
|
|
3
|
+
import { Icon as i } from "../Icon/index.js";
|
|
4
|
+
import { faChevronCircleLeft as h, faChevronCircleRight as N } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
const r = f(null), a = t(({ children: e, count: o = 0 }, d) => {
|
|
6
|
+
const [u, s] = I(o), p = v(
|
|
7
|
+
() => ({
|
|
8
|
+
currentCount: u,
|
|
9
|
+
setCurrentCount: s
|
|
10
|
+
}),
|
|
11
|
+
[u, s]
|
|
12
|
+
);
|
|
13
|
+
return /* @__PURE__ */ n(r.Provider, { value: p, children: /* @__PURE__ */ n("div", { ref: d, className: "flex gap-6 rounded-lg ", children: e }) });
|
|
14
|
+
}), m = t(() => {
|
|
15
|
+
const { setCurrentCount: e, currentCount: o = 0 } = c(r) || {};
|
|
16
|
+
return /* @__PURE__ */ n("div", { className: "my-auto cursor-pointer", children: /* @__PURE__ */ n(
|
|
17
|
+
i,
|
|
18
|
+
{
|
|
19
|
+
icon: h,
|
|
20
|
+
onClick: () => e == null ? void 0 : e(o - 1)
|
|
21
|
+
}
|
|
22
|
+
) });
|
|
23
|
+
}), C = t(() => {
|
|
24
|
+
const { setCurrentCount: e, currentCount: o = 0 } = c(r) || {};
|
|
25
|
+
return /* @__PURE__ */ n("div", { className: "my-auto cursor-pointer", children: /* @__PURE__ */ n(
|
|
26
|
+
i,
|
|
27
|
+
{
|
|
28
|
+
icon: N,
|
|
29
|
+
onClick: () => e == null ? void 0 : e(o + 1)
|
|
30
|
+
}
|
|
31
|
+
) });
|
|
32
|
+
}), l = t(
|
|
33
|
+
() => {
|
|
34
|
+
const { currentCount: e } = c(r) || {};
|
|
35
|
+
return /* @__PURE__ */ n("div", { className: "overflow-hidden text-center", children: e });
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
a.displayName = "Counter";
|
|
39
|
+
m.displayName = "Counter.DecrementIcon";
|
|
40
|
+
C.displayName = "Counter.IncrementIcon";
|
|
41
|
+
l.displayName = "Counter.Count";
|
|
42
|
+
const j = Object.assign(a, {
|
|
43
|
+
DecrementIcon: m,
|
|
44
|
+
IncrementIcon: C,
|
|
45
|
+
Count: l
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
j as Counter
|
|
49
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { DetailUpdater } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ id, className, title, description, expandText, collapseText, ctaText, onClick, onChange, children, onSubmit, onCancel, value, }: import('./').DetailUpdatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
expandText: string;
|
|
11
|
+
collapseText: string;
|
|
12
|
+
ctaText: string;
|
|
13
|
+
onClick: (fieldValues: any) => void;
|
|
14
|
+
onChange: (value: any) => void;
|
|
15
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof DetailUpdater>;
|
|
20
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DetailUpdatesProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
expandText: string;
|
|
9
|
+
collapseText: string;
|
|
10
|
+
ctaText: string;
|
|
11
|
+
onClick?: (fieldValues: any) => void;
|
|
12
|
+
onChange?: (fieldValues: any) => void;
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
onSubmit?: () => void;
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
value?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const DetailUpdater: ({ id, className, title, description, expandText, collapseText, ctaText, onClick, onChange, children, onSubmit, onCancel, value, }: DetailUpdatesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x } from "react";
|
|
3
|
+
import { Button as N } from "../Button/index.js";
|
|
4
|
+
import { Card as g } from "../Card/index.js";
|
|
5
|
+
import "../../node_modules/keen-slider/keen-slider.min.css.js";
|
|
6
|
+
const D = ({
|
|
7
|
+
id: n,
|
|
8
|
+
className: c,
|
|
9
|
+
title: d,
|
|
10
|
+
description: o,
|
|
11
|
+
expandText: m,
|
|
12
|
+
collapseText: p,
|
|
13
|
+
ctaText: f,
|
|
14
|
+
onClick: k,
|
|
15
|
+
onChange: u,
|
|
16
|
+
children: h,
|
|
17
|
+
onSubmit: s,
|
|
18
|
+
onCancel: l,
|
|
19
|
+
value: t
|
|
20
|
+
}) => {
|
|
21
|
+
const [a, r] = x(!1);
|
|
22
|
+
return /* @__PURE__ */ i(g, { id: n, className: c, children: [
|
|
23
|
+
!a && /* @__PURE__ */ i("div", { className: "mx-4 py-6", children: [
|
|
24
|
+
/* @__PURE__ */ i("div", { className: "flex justify-between", children: [
|
|
25
|
+
/* @__PURE__ */ e("p", { className: "font-semiBold text-ink", children: d }),
|
|
26
|
+
/* @__PURE__ */ e(
|
|
27
|
+
"p",
|
|
28
|
+
{
|
|
29
|
+
className: "font-semiBold text-ink cursor-pointer underline",
|
|
30
|
+
onClick: () => {
|
|
31
|
+
r(!0);
|
|
32
|
+
},
|
|
33
|
+
children: m
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ e("p", { className: "text-ink", children: t !== void 0 ? t : "-" })
|
|
38
|
+
] }),
|
|
39
|
+
a && /* @__PURE__ */ i("div", { className: "mx-4 py-6", children: [
|
|
40
|
+
/* @__PURE__ */ i("div", { className: "flex justify-between", children: [
|
|
41
|
+
/* @__PURE__ */ e("p", { className: "font-semiBold text-ink", children: d }),
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"p",
|
|
44
|
+
{
|
|
45
|
+
className: "font-semiBold text-ink cursor-pointer underline",
|
|
46
|
+
onClick: () => {
|
|
47
|
+
l == null || l(), r(!1);
|
|
48
|
+
},
|
|
49
|
+
children: p
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ e("p", { className: "text-light-grey", children: o }),
|
|
54
|
+
/* @__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
|
+
/* @__PURE__ */ e(N, { variant: "secondary", onClick: () => {
|
|
56
|
+
s == null || s(), r(!1);
|
|
57
|
+
}, children: f })
|
|
58
|
+
] })
|
|
59
|
+
] });
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
D as DetailUpdater
|
|
63
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ id, className, title, paragraph, dismissText, onDismissClick, primaryCta, secondaryCta, imageUrl, }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
args: {
|
|
7
|
+
title: string;
|
|
8
|
+
paragraph: string;
|
|
9
|
+
dismissText: string;
|
|
10
|
+
imageUrl: string;
|
|
11
|
+
onDismissClick: import('@storybook/addon-actions').HandlerFunction;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const _Dialog: (args: any) => React.ReactElement;
|
|
15
|
+
export default meta;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
2
|
+
|
|
3
|
+
export interface Props extends Partial<Pick<HTMLElement, 'className' | 'id'>> {
|
|
4
|
+
title: string;
|
|
5
|
+
paragraph: string;
|
|
6
|
+
dismissText: string;
|
|
7
|
+
onDismissClick?: () => void;
|
|
8
|
+
primaryCta?: ButtonProps;
|
|
9
|
+
secondaryCta?: ButtonProps;
|
|
10
|
+
imageUrl?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Dialog: ({ id, className, title, paragraph, dismissText, onDismissClick, primaryCta, secondaryCta, imageUrl, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Card as r } from "../Card/index.js";
|
|
3
|
+
const n = ({
|
|
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]" });
|
|
14
|
+
export {
|
|
15
|
+
n as Dialog
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Dropdown } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLButtonElement> & import('../Button').ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
List: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
|
|
10
|
+
};
|
|
11
|
+
args: {
|
|
12
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof Dropdown>;
|
|
17
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonProps } from '../Button';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
|
|
4
|
+
export interface DropdownContextProps {
|
|
5
|
+
showDropdown?: boolean;
|
|
6
|
+
setShowDropdown?: (val: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Dropdown: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
9
|
+
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
List: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & import('react').RefAttributes<HTMLLIElement>>;
|
|
12
|
+
};
|
|
13
|
+
export { Dropdown };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as f, forwardRef as a, useState as D, useRef as b, useMemo as x, useContext as l } from "react";
|
|
3
|
+
import { Button as d } from "../Button/index.js";
|
|
4
|
+
import { faChevronDown as y } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
import { useClickOutside as C } from "./utils.js";
|
|
6
|
+
const i = f(null), c = a(({ children: e }) => {
|
|
7
|
+
const [n, t] = D(!1), s = b(null), o = x(
|
|
8
|
+
() => ({
|
|
9
|
+
showDropdown: n,
|
|
10
|
+
setShowDropdown: t
|
|
11
|
+
}),
|
|
12
|
+
[n, t]
|
|
13
|
+
);
|
|
14
|
+
return C(s, () => {
|
|
15
|
+
t(!1);
|
|
16
|
+
}), /* @__PURE__ */ r(i.Provider, { value: o, children: /* @__PURE__ */ r("div", { ref: s, className: "relative inline-block text-left", children: e }) });
|
|
17
|
+
}), m = a(({ children: e }) => {
|
|
18
|
+
const { showDropdown: n, setShowDropdown: t } = l(i) || {};
|
|
19
|
+
return /* @__PURE__ */ u(d, { onClick: () => t == null ? void 0 : t(!n), children: [
|
|
20
|
+
e,
|
|
21
|
+
/* @__PURE__ */ r(d.Icon, { icon: y })
|
|
22
|
+
] });
|
|
23
|
+
}), p = a(
|
|
24
|
+
({ children: e }) => {
|
|
25
|
+
const { showDropdown: n } = l(i) || {};
|
|
26
|
+
return n ? /* @__PURE__ */ r(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: "z-50 mt-2 w-48 rounded-lg border-2 bg-primary text-white",
|
|
30
|
+
role: "menu",
|
|
31
|
+
"aria-orientation": "vertical",
|
|
32
|
+
"aria-labelledby": "menu-button",
|
|
33
|
+
children: /* @__PURE__ */ r("ul", { className: "py-1 text-sm", children: e })
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ r("div", {});
|
|
36
|
+
}
|
|
37
|
+
), w = a(
|
|
38
|
+
({ children: e, onClick: n }) => {
|
|
39
|
+
const { showDropdown: t, setShowDropdown: s } = l(i) || {};
|
|
40
|
+
return /* @__PURE__ */ r(
|
|
41
|
+
"li",
|
|
42
|
+
{
|
|
43
|
+
className: "px-4 py-2",
|
|
44
|
+
onClick: (o) => {
|
|
45
|
+
o == null || o.target, s == null || s(!1);
|
|
46
|
+
},
|
|
47
|
+
onKeyDown: (o) => {
|
|
48
|
+
o.key === "Enter" && (o == null || o.target);
|
|
49
|
+
},
|
|
50
|
+
children: e
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
c.displayName = "Dropdown";
|
|
56
|
+
m.displayName = "Dropdown.Label";
|
|
57
|
+
p.displayName = "Dropdown.List";
|
|
58
|
+
w.displayName = "Dropdown.Item";
|
|
59
|
+
const g = Object.assign(c, {
|
|
60
|
+
Label: m,
|
|
61
|
+
List: p,
|
|
62
|
+
Item: w
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
g as Dropdown
|
|
66
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useClickOutside(ref: any, onClickOutside: () => void): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect as u } from "react";
|
|
2
|
+
function c(e, t) {
|
|
3
|
+
u(() => {
|
|
4
|
+
function n(o) {
|
|
5
|
+
e.current && !e.current.contains(o.target) && t();
|
|
6
|
+
}
|
|
7
|
+
return document.addEventListener("mousedown", n), () => {
|
|
8
|
+
document.removeEventListener("mousedown", n);
|
|
9
|
+
};
|
|
10
|
+
}, [e, t]);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
c as useClickOutside
|
|
14
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface FilePreviewProps {
|
|
2
|
+
id?: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
fileData?: any;
|
|
5
|
+
onDismiss?: (e: any) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const FilePreview: ({ id, className, fileData, onDismiss, }: FilePreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { FileUploader } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('./').FileUploaderContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
Input: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
|
+
Text: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
9
|
+
FilePreview: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
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
|
+
args: {
|
|
46
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
47
|
+
onDrop: (files: any) => void;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export default meta;
|
|
51
|
+
type Story = StoryObj<typeof FileUploader>;
|
|
52
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FileUploaderContextProps {
|
|
4
|
+
fileList?: any;
|
|
5
|
+
setFileList: (open: any) => void;
|
|
6
|
+
inDropZone?: boolean;
|
|
7
|
+
setInDropZone?: (val: boolean) => void;
|
|
8
|
+
onDrop: React.DragEventHandler<HTMLDivElement> | undefined;
|
|
9
|
+
}
|
|
10
|
+
declare const FileUploader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & FileUploaderContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
11
|
+
Input: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Text: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
13
|
+
FilePreview: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
};
|
|
15
|
+
export { FileUploader };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { Footer } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
Bar: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
8
|
+
Section: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Column: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Title: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Text: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof Footer>;
|
|
19
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface Props {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
text?: string;
|
|
7
|
+
variant?: 'light' | 'dark';
|
|
8
|
+
}
|
|
9
|
+
declare const Footer: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
10
|
+
Bar: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
Section: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Column: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Title: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Text: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
};
|
|
16
|
+
export { Footer };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a } from "react";
|
|
3
|
+
import i from "clsx";
|
|
4
|
+
const s = a(({ children: o, className: t }, e) => /* @__PURE__ */ r(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: e,
|
|
8
|
+
className: i(
|
|
9
|
+
"grid grid-cols-1 gap-y-12 bg-footer-bg p-8 text-footer-text",
|
|
10
|
+
t
|
|
11
|
+
),
|
|
12
|
+
children: o
|
|
13
|
+
}
|
|
14
|
+
)), n = a(({ children: o, className: t }, e) => /* @__PURE__ */ r("p", { ref: e, className: i("text-center", t), children: o })), m = a(({ children: o, className: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: i("grid grid-cols-3 gap-12", t), children: o })), c = a(
|
|
15
|
+
({ children: o, className: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: t, children: o })
|
|
16
|
+
), l = a(
|
|
17
|
+
({ children: o, className: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: t, children: o })
|
|
18
|
+
), d = a(
|
|
19
|
+
({ children: o, className: t }, e) => /* @__PURE__ */ r("div", { ref: e, className: t, children: o })
|
|
20
|
+
);
|
|
21
|
+
s.displayName = "Footer";
|
|
22
|
+
n.displayName = "Footer.Bar";
|
|
23
|
+
m.displayName = "Footer.Section";
|
|
24
|
+
c.displayName = "Footer.Column";
|
|
25
|
+
l.displayName = "Footer.Title";
|
|
26
|
+
d.displayName = "Footer.Text";
|
|
27
|
+
const u = Object.assign(s, {
|
|
28
|
+
Bar: n,
|
|
29
|
+
Section: m,
|
|
30
|
+
Column: c,
|
|
31
|
+
Title: l,
|
|
32
|
+
Text: d
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
u as Footer
|
|
36
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { FooterNav } from './';
|
|
3
|
+
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
|
+
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
8
|
+
href?: string | undefined;
|
|
9
|
+
onClick?: any;
|
|
10
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Icon: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
icon: import('@fortawesome/fontawesome-svg-core').IconProp | import('@fortawesome/fontawesome-free-solid').IconDefinition;
|
|
14
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
|
+
};
|
|
16
|
+
args: {
|
|
17
|
+
children: import("react/jsx-runtime").JSX.Element[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof FooterNav>;
|
|
22
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
import { IconDefinition } from '@fortawesome/fontawesome-free-solid';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const FooterNav: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>> & {
|
|
6
|
+
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
7
|
+
href?: string | undefined;
|
|
8
|
+
onClick?: any;
|
|
9
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Icon: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
|
|
12
|
+
icon: IconDefinition | IconProp;
|
|
13
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
14
|
+
};
|
|
15
|
+
export { FooterNav };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import n from "clsx";
|
|
4
|
+
import { Icon as p } from "../Icon/index.js";
|
|
5
|
+
const l = s(({ className: t, children: o, ...e }, a) => /* @__PURE__ */ r(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: n(
|
|
9
|
+
"border-lightest-grey fixed bottom-0 flex w-full justify-between border-t px-4",
|
|
10
|
+
t
|
|
11
|
+
),
|
|
12
|
+
ref: a,
|
|
13
|
+
...e,
|
|
14
|
+
children: o
|
|
15
|
+
}
|
|
16
|
+
)), m = s(({ className: t, children: o, href: e, onClick: a, ...N }) => /* @__PURE__ */ r(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: n(
|
|
20
|
+
"group w-full cursor-pointer py-2 text-center transition-all duration-500",
|
|
21
|
+
t
|
|
22
|
+
),
|
|
23
|
+
...N,
|
|
24
|
+
children: /* @__PURE__ */ r("a", { href: e, onClick: a, children: o })
|
|
25
|
+
}
|
|
26
|
+
)), i = s(({ className: t, children: o, ...e }, a) => /* @__PURE__ */ r("p", { className: (n("font-regular pt-0.5 text-xs"), t), ...e, children: o })), c = s(({ className: t, icon: o, ...e }) => /* @__PURE__ */ r(p, { icon: o, ...e }));
|
|
27
|
+
l.displayName = "FooterNav";
|
|
28
|
+
m.displayName = "FooterNav.Item";
|
|
29
|
+
c.displayName = "FooterNav.Icon";
|
|
30
|
+
i.displayName = "FooterNav.Label";
|
|
31
|
+
const x = Object.assign(l, {
|
|
32
|
+
Item: m,
|
|
33
|
+
Label: i,
|
|
34
|
+
Icon: c
|
|
35
|
+
});
|
|
36
|
+
export {
|
|
37
|
+
x as FooterNav
|
|
38
|
+
};
|