trepur_components 2.3.9 → 2.3.10

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.
Files changed (282) hide show
  1. package/lib/_virtual/react.js +4 -0
  2. package/lib/components/Accordion/Accordion.stories.d.ts +47 -0
  3. package/lib/components/Accordion/const.d.ts +31 -0
  4. package/lib/components/Accordion/index.d.ts +5 -0
  5. package/lib/components/Accordion/index.js +9 -0
  6. package/lib/components/AlertBar/AlertBar.stories.d.ts +24 -0
  7. package/lib/components/AlertBar/index.d.ts +16 -0
  8. package/lib/components/AlertBar/index.js +36 -0
  9. package/lib/components/Avatar/Avatar.stories.d.ts +10 -0
  10. package/lib/components/Avatar/index.d.ts +3 -0
  11. package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +18 -0
  12. package/lib/components/Breadcrumbs/index.d.ts +17 -0
  13. package/lib/components/Breadcrumbs/index.js +16 -0
  14. package/lib/components/Button/Button.stories.d.ts +20 -0
  15. package/lib/components/Button/index.d.ts +13 -0
  16. package/lib/components/Button/index.js +30 -0
  17. package/lib/components/Calendar/Calendar.stories.d.ts +11 -0
  18. package/lib/components/Calendar/index.d.ts +14 -0
  19. package/lib/components/Calendar/index.js +49 -0
  20. package/lib/components/Calendar/style.css.js +1 -0
  21. package/lib/components/Card/Card.stories.d.ts +11 -0
  22. package/lib/components/Card/index.d.ts +2 -0
  23. package/lib/components/Card/index.js +25 -0
  24. package/lib/components/Carousel/Carousel.stories.d.ts +23 -0
  25. package/lib/components/Carousel/index.d.ts +70 -0
  26. package/lib/components/Carousel/index.js +159 -0
  27. package/lib/components/Carousel/utils.d.ts +1 -0
  28. package/lib/components/Carousel/utils.js +38 -0
  29. package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +22 -0
  30. package/lib/components/CarouselThumbnail/const.d.ts +1 -0
  31. package/lib/components/CarouselThumbnail/const.js +20 -0
  32. package/lib/components/CarouselThumbnail/index.d.ts +51 -0
  33. package/lib/components/CarouselThumbnail/index.js +74 -0
  34. package/lib/components/CarouselThumbnail/utils.d.ts +2 -0
  35. package/lib/components/CarouselThumbnail/utils.js +65 -0
  36. package/lib/components/Checkbox/Checkbox.stories.d.ts +17 -0
  37. package/lib/components/Checkbox/index.d.ts +11 -0
  38. package/lib/components/Checkbox/index.js +28 -0
  39. package/lib/components/Collapsible/Collapsible.stories.d.ts +57 -0
  40. package/lib/components/Collapsible/index.d.ts +19 -0
  41. package/lib/components/Collapsible/index.js +87 -0
  42. package/lib/components/Counter/Counter.stories.d.ts +17 -0
  43. package/lib/components/Counter/index.d.ts +14 -0
  44. package/lib/components/Counter/index.js +49 -0
  45. package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +20 -0
  46. package/lib/components/DetailUpdater/index.d.ts +18 -0
  47. package/lib/components/DetailUpdater/index.js +63 -0
  48. package/lib/components/Dialog/Dialog.stories.d.ts +15 -0
  49. package/lib/components/Dialog/index.d.ts +12 -0
  50. package/lib/components/Dialog/index.js +16 -0
  51. package/lib/components/Dropdown/Dropdown.stories.d.ts +17 -0
  52. package/lib/components/Dropdown/index.d.ts +13 -0
  53. package/lib/components/Dropdown/index.js +66 -0
  54. package/lib/components/Dropdown/utils.d.ts +1 -0
  55. package/lib/components/Dropdown/utils.js +14 -0
  56. package/lib/components/FileUploader/FilePreview.d.ts +8 -0
  57. package/lib/components/FileUploader/FileUploader.stories.d.ts +52 -0
  58. package/lib/components/FileUploader/index.d.ts +15 -0
  59. package/lib/components/Footer/Footer.stories.d.ts +19 -0
  60. package/lib/components/Footer/index.d.ts +16 -0
  61. package/lib/components/Footer/index.js +36 -0
  62. package/lib/components/FooterNav/FooterNav.stories.d.ts +22 -0
  63. package/lib/components/FooterNav/index.d.ts +15 -0
  64. package/lib/components/FooterNav/index.js +38 -0
  65. package/lib/components/Form/Form.stories.d.ts +117 -0
  66. package/lib/components/Form/index.d.ts +13 -0
  67. package/lib/components/Form/index.js +17 -0
  68. package/lib/components/Gallery/Gallery.stories.d.ts +16 -0
  69. package/lib/components/Gallery/index.d.ts +7 -0
  70. package/lib/components/Greeting/Greeting.stories.d.ts +13 -0
  71. package/lib/components/Greeting/index.d.ts +7 -0
  72. package/lib/components/Greeting/index.js +20 -0
  73. package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +10 -0
  74. package/lib/components/HamburgerIcon/index.d.ts +2 -0
  75. package/lib/components/HamburgerIcon/index.js +78 -0
  76. package/lib/components/Icon/Icon.stories.d.ts +16 -0
  77. package/lib/components/Icon/index.d.ts +10 -0
  78. package/lib/components/Icon/index.js +23 -0
  79. package/lib/components/Image/Image.stories.d.ts +13 -0
  80. package/lib/components/Image/index.d.ts +5 -0
  81. package/lib/components/Image/index.js +17 -0
  82. package/lib/components/ImageCard/ImageCard.stories.d.ts +19 -0
  83. package/lib/components/ImageCard/index.d.ts +11 -0
  84. package/lib/components/ImageCard/index.js +32 -0
  85. package/lib/components/Input/Input.stories.d.ts +22 -0
  86. package/lib/components/Input/index.d.ts +33 -0
  87. package/lib/components/Input/index.js +83 -0
  88. package/lib/components/MenuButton/MenuButton.stories.d.ts +76 -0
  89. package/lib/components/MenuButton/index.d.ts +14 -0
  90. package/lib/components/MenuButton/index.js +56 -0
  91. package/lib/components/Modal/Modal.stories.d.ts +67 -0
  92. package/lib/components/Modal/index.d.ts +10 -0
  93. package/lib/components/Modal/index.js +45 -0
  94. package/lib/components/Nav/Nav.stories.d.ts +32 -0
  95. package/lib/components/Nav/index.d.ts +21 -0
  96. package/lib/components/Nav/index.js +82 -0
  97. package/lib/components/NavItem/NavItem.stories.d.ts +18 -0
  98. package/lib/components/NavItem/index.d.ts +8 -0
  99. package/lib/components/NavItem/index.js +24 -0
  100. package/lib/components/Pill/Pill.stories.d.ts +22 -0
  101. package/lib/components/Pill/index.d.ts +17 -0
  102. package/lib/components/Pill/index.js +31 -0
  103. package/lib/components/Search/Search.stories.d.ts +86 -0
  104. package/lib/components/Search/index.d.ts +12 -0
  105. package/lib/components/Search/index.js +42 -0
  106. package/lib/components/Select/Select.stories.d.ts +56 -0
  107. package/lib/components/Select/index.d.ts +11 -0
  108. package/lib/components/Select/index.js +68 -0
  109. package/lib/components/Showcase/Showcase.stories.d.ts +55 -0
  110. package/lib/components/Showcase/index.d.ts +15 -0
  111. package/lib/components/SideNav/SideNav.stories.d.ts +80 -0
  112. package/lib/components/SideNav/index.d.ts +12 -0
  113. package/lib/components/SocialButton/SocialButton.stories.d.ts +130 -0
  114. package/lib/components/SocialButton/index.d.ts +12 -0
  115. package/lib/components/SplitCard/SplitCard.stories.d.ts +21 -0
  116. package/lib/components/SplitCard/index.d.ts +14 -0
  117. package/lib/components/Stars/Star.stories.d.ts +14 -0
  118. package/lib/components/Stars/index.d.ts +8 -0
  119. package/lib/components/Stars/index.js +22 -0
  120. package/lib/components/Testimonial/Testimonial.stories.d.ts +21 -0
  121. package/lib/components/Testimonial/index.d.ts +13 -0
  122. package/lib/components/Testimonial/index.js +42 -0
  123. package/lib/components/TextArea/TextArea.stories.d.ts +21 -0
  124. package/lib/components/TextArea/index.d.ts +33 -0
  125. package/lib/components/TextArea/index.js +76 -0
  126. package/lib/components/Timeline/Timeline.stories.d.ts +21 -0
  127. package/lib/components/Timeline/index.d.ts +11 -0
  128. package/lib/components/Timeline/index.js +31 -0
  129. package/lib/components/Tubestops/Tubestops.stories.d.ts +19 -0
  130. package/lib/components/Tubestops/index.d.ts +15 -0
  131. package/lib/components/Tubestops/index.js +77 -0
  132. package/lib/components/Video/Video.stories.d.ts +23 -0
  133. package/lib/components/Video/index.d.ts +18 -0
  134. package/lib/components/Video/index.js +32 -0
  135. package/{src/components/index.ts → lib/components/index.d.ts} +35 -71
  136. package/lib/documentation/assets/index.d.ts +3 -0
  137. package/lib/documentation/typography/Fonts/Fonts.d.ts +2 -0
  138. package/lib/documentation/typography/Fonts/Fonts.stories.d.ts +10 -0
  139. package/lib/index.js +72 -0
  140. package/lib/node_modules/keen-slider/keen-slider.min.css.js +1 -0
  141. package/lib/node_modules/keen-slider/react.js +591 -0
  142. package/lib/style.css +1 -0
  143. package/lib/utils/controls.d.ts +36 -0
  144. package/lib/utils/matchMedia.d.ts +2 -0
  145. package/lib/utils/screens.d.ts +7 -0
  146. package/package.json +4 -1
  147. package/.eslintrc.cjs +0 -72
  148. package/.husky/pre-commit +0 -4
  149. package/.prettierignore +0 -10
  150. package/.prettierrc.json +0 -22
  151. package/postcss.config.js +0 -8
  152. package/src/components/Accordion/Accordion.stories.tsx +0 -39
  153. package/src/components/Accordion/const.tsx +0 -34
  154. package/src/components/Accordion/index.tsx +0 -22
  155. package/src/components/AlertBar/AlertBar.stories.tsx +0 -89
  156. package/src/components/AlertBar/index.tsx +0 -82
  157. package/src/components/Avatar/Avatar.stories.tsx +0 -14
  158. package/src/components/Avatar/index.tsx +0 -492
  159. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -29
  160. package/src/components/Breadcrumbs/index.tsx +0 -89
  161. package/src/components/Button/Button.stories.tsx +0 -24
  162. package/src/components/Button/index.tsx +0 -59
  163. package/src/components/Calendar/Calendar.stories.tsx +0 -21
  164. package/src/components/Calendar/index.tsx +0 -92
  165. package/src/components/Calendar/style.css +0 -233
  166. package/src/components/Card/Card.stories.tsx +0 -14
  167. package/src/components/Card/index.tsx +0 -39
  168. package/src/components/Carousel/Carousel.stories.tsx +0 -44
  169. package/src/components/Carousel/index.tsx +0 -301
  170. package/src/components/Carousel/utils.ts +0 -53
  171. package/src/components/CarouselThumbnail/CarouselThumbnail.stories.tsx +0 -29
  172. package/src/components/CarouselThumbnail/const.ts +0 -17
  173. package/src/components/CarouselThumbnail/index.tsx +0 -169
  174. package/src/components/CarouselThumbnail/utils.ts +0 -87
  175. package/src/components/Checkbox/Checkbox.mdx +0 -33
  176. package/src/components/Checkbox/Checkbox.stories.tsx +0 -27
  177. package/src/components/Checkbox/index.tsx +0 -44
  178. package/src/components/Collapsible/Collapsible.stories.tsx +0 -67
  179. package/src/components/Collapsible/index.tsx +0 -169
  180. package/src/components/Counter/Counter.stories.tsx +0 -20
  181. package/src/components/Counter/index.tsx +0 -98
  182. package/src/components/DetailUpdater/DetailUpdater.stories.tsx +0 -37
  183. package/src/components/DetailUpdater/index.tsx +0 -107
  184. package/src/components/Dialog/Dialog.stories.tsx +0 -65
  185. package/src/components/Dialog/index.tsx +0 -29
  186. package/src/components/Dropdown/Dropdown.stories.tsx +0 -22
  187. package/src/components/Dropdown/index.tsx +0 -117
  188. package/src/components/Dropdown/utils.ts +0 -15
  189. package/src/components/FileUploader/FilePreview.tsx +0 -45
  190. package/src/components/FileUploader/FileUploader.stories.tsx +0 -28
  191. package/src/components/FileUploader/index.tsx +0 -177
  192. package/src/components/Footer/Footer.stories.tsx +0 -47
  193. package/src/components/Footer/index.tsx +0 -96
  194. package/src/components/FooterNav/FooterNav.stories.tsx +0 -32
  195. package/src/components/FooterNav/index.tsx +0 -75
  196. package/src/components/Form/Form.stories.tsx +0 -86
  197. package/src/components/Form/index.tsx +0 -41
  198. package/src/components/Gallery/Gallery.stories.tsx +0 -39
  199. package/src/components/Gallery/index.tsx +0 -31
  200. package/src/components/Greeting/Greeting.stories.tsx +0 -16
  201. package/src/components/Greeting/index.tsx +0 -49
  202. package/src/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -14
  203. package/src/components/HamburgerIcon/index.tsx +0 -75
  204. package/src/components/Icon/Icon.stories.tsx +0 -41
  205. package/src/components/Icon/index.tsx +0 -33
  206. package/src/components/Image/Image.stories.tsx +0 -17
  207. package/src/components/Image/index.tsx +0 -25
  208. package/src/components/ImageCard/ImageCard.stories.tsx +0 -29
  209. package/src/components/ImageCard/index.tsx +0 -75
  210. package/src/components/Input/Input.stories.tsx +0 -25
  211. package/src/components/Input/index.tsx +0 -139
  212. package/src/components/MenuButton/MenuButton.stories.tsx +0 -46
  213. package/src/components/MenuButton/index.tsx +0 -66
  214. package/src/components/Modal/Modal.stories.tsx +0 -82
  215. package/src/components/Modal/index.tsx +0 -71
  216. package/src/components/Nav/Nav.stories.tsx +0 -80
  217. package/src/components/Nav/index.tsx +0 -171
  218. package/src/components/NavItem/NavItem.stories.tsx +0 -17
  219. package/src/components/NavItem/index.tsx +0 -39
  220. package/src/components/Pill/Pill.stories.tsx +0 -51
  221. package/src/components/Pill/index.tsx +0 -69
  222. package/src/components/Search/Search.stories.tsx +0 -63
  223. package/src/components/Search/index.tsx +0 -64
  224. package/src/components/Select/Select.stories.tsx +0 -55
  225. package/src/components/Select/index.tsx +0 -97
  226. package/src/components/Showcase/Showcase.stories.tsx +0 -31
  227. package/src/components/Showcase/index.tsx +0 -62
  228. package/src/components/SideNav/SideNav.stories.tsx +0 -50
  229. package/src/components/SideNav/index.tsx +0 -39
  230. package/src/components/SocialButton/SocialButton.stories.tsx +0 -88
  231. package/src/components/SocialButton/index.tsx +0 -63
  232. package/src/components/SplitCard/SplitCard.stories.tsx +0 -34
  233. package/src/components/SplitCard/index.tsx +0 -132
  234. package/src/components/Stars/Star.stories.tsx +0 -18
  235. package/src/components/Stars/index.tsx +0 -38
  236. package/src/components/Testimonial/Testimonial.stories.tsx +0 -37
  237. package/src/components/Testimonial/index.tsx +0 -123
  238. package/src/components/TextArea/TextArea.stories.tsx +0 -24
  239. package/src/components/TextArea/index.tsx +0 -133
  240. package/src/components/Timeline/Timeline.stories.tsx +0 -45
  241. package/src/components/Timeline/index.tsx +0 -65
  242. package/src/components/Tubestops/Tubestops.stories.tsx +0 -22
  243. package/src/components/Tubestops/index.tsx +0 -132
  244. package/src/components/Video/Video.stories.tsx +0 -58
  245. package/src/components/Video/assets/example.mp4 +0 -0
  246. package/src/components/Video/assets/example.ogv +0 -0
  247. package/src/components/Video/assets/example.webm +0 -0
  248. package/src/components/Video/index.tsx +0 -92
  249. package/src/custom.d.ts +0 -14
  250. package/src/documentation/Colours.mdx +0 -192
  251. package/src/documentation/Introduction.mdx +0 -13
  252. package/src/documentation/assets/index.ts +0 -3
  253. package/src/documentation/assets/trepurComponentsLogo.svg +0 -32
  254. package/src/documentation/typography/Fonts/Fonts.stories.tsx +0 -14
  255. package/src/documentation/typography/Fonts/Fonts.tsx +0 -73
  256. package/src/fonts/Sora/OFL.txt +0 -93
  257. package/src/fonts/Sora/README.txt +0 -70
  258. package/src/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
  259. package/src/fonts/Sora/static/Sora-Bold.ttf +0 -0
  260. package/src/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
  261. package/src/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
  262. package/src/fonts/Sora/static/Sora-Light.ttf +0 -0
  263. package/src/fonts/Sora/static/Sora-Medium.ttf +0 -0
  264. package/src/fonts/Sora/static/Sora-Regular.ttf +0 -0
  265. package/src/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
  266. package/src/fonts/Sora/static/Sora-Thin.ttf +0 -0
  267. package/src/utils/controls.ts +0 -44
  268. package/src/utils/matchMedia.ts +0 -9
  269. package/src/utils/screens.ts +0 -7
  270. package/tailwind.config.ts +0 -13
  271. package/tsconfig.json +0 -49
  272. package/tsconfig.node.json +0 -12
  273. package/vite.config.mjs +0 -64
  274. /package/{src/index.ts → lib/index.d.ts} +0 -0
  275. /package/{src → lib}/styles/global.css +0 -0
  276. /package/{src → lib}/styles/themes/local.css +0 -0
  277. /package/{src → lib}/styles/themes/test.css +0 -0
  278. /package/{tailwind → lib/tailwind}/boxShadow.ts +0 -0
  279. /package/{tailwind → lib/tailwind}/colors.ts +0 -0
  280. /package/{tailwind → lib/tailwind}/container.ts +0 -0
  281. /package/{tailwind → lib/tailwind}/preset.ts +0 -0
  282. /package/{tailwind → lib/tailwind}/spacing.ts +0 -0
@@ -0,0 +1,76 @@
1
+ import { MenuButton } from '.';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: ({ id, className, backgroundColour, menuItems, onClick, }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
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
+ menuItems: {
24
+ description: string;
25
+ control: string;
26
+ table: {
27
+ type: {
28
+ summary: string;
29
+ };
30
+ };
31
+ };
32
+ id: {
33
+ description: string;
34
+ control: {
35
+ type: string;
36
+ default: boolean;
37
+ };
38
+ table: {
39
+ category: string;
40
+ type: {
41
+ summary: string;
42
+ };
43
+ defaultValue: {
44
+ summary: string;
45
+ };
46
+ };
47
+ };
48
+ className: {
49
+ description: string;
50
+ control: {
51
+ type: string;
52
+ default: boolean;
53
+ };
54
+ table: {
55
+ category: string;
56
+ type: {
57
+ summary: string;
58
+ };
59
+ defaultValue: {
60
+ summary: string;
61
+ };
62
+ };
63
+ };
64
+ };
65
+ args: {
66
+ backgroundColour: string;
67
+ onClick: import('@storybook/addon-actions').HandlerFunction;
68
+ menuItems: {
69
+ name: string;
70
+ href: string;
71
+ }[];
72
+ };
73
+ };
74
+ export default meta;
75
+ type Story = StoryObj<typeof MenuButton>;
76
+ export declare const Default: Story;
@@ -0,0 +1,14 @@
1
+ import { Colours } from '../../utils/controls';
2
+ import { default as React } from 'react';
3
+
4
+ export interface Props {
5
+ id?: string;
6
+ className?: string;
7
+ backgroundColour?: Colours;
8
+ menuItems: Array<{
9
+ name: string;
10
+ href: string;
11
+ }>;
12
+ onClick?: React.MouseEventHandler;
13
+ }
14
+ export declare const MenuButton: ({ id, className, backgroundColour, menuItems, onClick, }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import { jsx as t, Fragment as h, jsxs as o } from "react/jsx-runtime";
2
+ import { useState as u } from "react";
3
+ import { Dropdown as l } from "../Dropdown/index.js";
4
+ import { Image as c } from "../Image/index.js";
5
+ import p from "classnames";
6
+ const H = ({
7
+ id: s,
8
+ className: d,
9
+ backgroundColour: w = "white",
10
+ menuItems: a,
11
+ onClick: e
12
+ }) => {
13
+ const [r, i] = u(!1), m = p(
14
+ d,
15
+ "h-[45px] w-[80px] overflow-hidden rounded-full border-2 border-lightest-grey my-auto flex cursor-pointer justify-between pl-2 text-center hover:shadow-md"
16
+ );
17
+ return a ? /* @__PURE__ */ o("div", { children: [
18
+ /* @__PURE__ */ o(
19
+ "div",
20
+ {
21
+ id: s,
22
+ className: m,
23
+ onClick: () => {
24
+ i(!r);
25
+ },
26
+ children: [
27
+ /* @__PURE__ */ t("div", { className: "mx-auto my-auto", onClick: (n) => e == null ? void 0 : e(n), children: /* @__PURE__ */ o(
28
+ "svg",
29
+ {
30
+ width: "18",
31
+ height: "24",
32
+ viewBox: "0 0 24 15",
33
+ xmlns: "http://www.w3.org/2000/svg",
34
+ children: [
35
+ /* @__PURE__ */ t("path", { d: "M0 1.5C0 0.947715 0.447715 0.5 1 0.5H21C21.5523 0.5 22 0.947715 22 1.5C22 2.05228 21.5523 2.5 21 2.5H1C0.447716 2.5 0 2.05228 0 1.5Z" }),
36
+ /* @__PURE__ */ t("path", { d: "M0 7.5C0 6.94772 0.447715 6.5 1 6.5H21C21.5523 6.5 22 6.94772 22 7.5C22 8.05228 21.5523 8.5 21 8.5H1C0.447716 8.5 0 8.05228 0 7.5Z" }),
37
+ /* @__PURE__ */ t("path", { d: "M0 13.5C0 12.9477 0.447715 12.5 1 12.5H21C21.5523 12.5 22 12.9477 22 13.5C22 14.0523 21.5523 14.5 21 14.5H1C0.447716 14.5 0 14.0523 0 13.5Z" })
38
+ ]
39
+ }
40
+ ) }),
41
+ /* @__PURE__ */ t(
42
+ c,
43
+ {
44
+ src: "https://picsum.photos/300/300",
45
+ className: "mx-auto my-auto h-8 w-8 rounded-full object-contain"
46
+ }
47
+ )
48
+ ]
49
+ }
50
+ ),
51
+ r && /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(l, {}) })
52
+ ] }) : /* @__PURE__ */ t(h, {});
53
+ };
54
+ export {
55
+ H as MenuButton
56
+ };
@@ -0,0 +1,67 @@
1
+ import { default as React } from 'react';
2
+
3
+ declare const meta: {
4
+ title: string;
5
+ component: ({ id, className, children, visible, onOverlayClick, mobileGutter, animationStyle, }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ argTypes: {
14
+ id: {
15
+ type: {
16
+ name: string;
17
+ required: boolean;
18
+ };
19
+ description: string;
20
+ table: {
21
+ type: {
22
+ summary: string;
23
+ };
24
+ };
25
+ };
26
+ className: {
27
+ type: {
28
+ name: string;
29
+ required: boolean;
30
+ };
31
+ description: string;
32
+ table: {
33
+ type: {
34
+ summary: string;
35
+ };
36
+ };
37
+ };
38
+ children: {
39
+ type: {
40
+ name: string;
41
+ value: string;
42
+ };
43
+ description: string;
44
+ table: {
45
+ type: {
46
+ summary: string;
47
+ };
48
+ defaultValue: {
49
+ summary: string;
50
+ };
51
+ };
52
+ };
53
+ onOverlayClick: {
54
+ type: {
55
+ name: string;
56
+ required: boolean;
57
+ };
58
+ description: string;
59
+ };
60
+ };
61
+ args: {
62
+ visible: boolean;
63
+ children: import("react/jsx-runtime").JSX.Element;
64
+ };
65
+ };
66
+ export declare const _Modal: (args: any) => React.ReactElement;
67
+ export default meta;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface Props extends Partial<Pick<HTMLElement, 'className' | 'id'>> {
4
+ children?: React.ReactNode;
5
+ visible?: boolean;
6
+ onOverlayClick?: () => void;
7
+ mobileGutter?: boolean;
8
+ animationStyle?: 'fade' | 'slideBottom';
9
+ }
10
+ export declare const Modal: ({ id, className, children, visible, onOverlayClick, mobileGutter, animationStyle, }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,45 @@
1
+ import { jsx as a, Fragment as l, jsxs as w } from "react/jsx-runtime";
2
+ import { useState as c, useEffect as k } from "react";
3
+ import u from "classnames";
4
+ const g = ({
5
+ id: d,
6
+ className: m,
7
+ children: o,
8
+ visible: t = !1,
9
+ onOverlayClick: f,
10
+ mobileGutter: p,
11
+ animationStyle: x = "fade"
12
+ }) => {
13
+ const [s, r] = c(!t), [i, n] = c(t);
14
+ k(() => {
15
+ let e;
16
+ return t ? (r(!1), e = setTimeout(() => {
17
+ n(!0);
18
+ }, 100)) : (n(!1), e = setTimeout(() => {
19
+ r(!0);
20
+ }, 300)), () => {
21
+ clearTimeout(e);
22
+ };
23
+ }, [t]);
24
+ const y = u(
25
+ {
26
+ "opacity-100": !s && i
27
+ },
28
+ "block h-screen w-screen fixed right-0 top-0 z-50 opacity-0 transition-opacity duration-300 ease-linear ease-out",
29
+ m
30
+ ), h = u(
31
+ {
32
+ "opacity-100": i,
33
+ "px-4 md:px-0": p,
34
+ "transition-transform duration-300 ease-linear ease-out opacity-100 translate-y-full": x === "slideBottom"
35
+ },
36
+ " mx-auto flex w-full md:w-auto fixed left-1/2 top-1/2 z-50 block -translate-x-1/2 -translate-y-1/2 transform opacity-0 transition-opacity duration-300 ease-linear ease-out"
37
+ );
38
+ return s ? /* @__PURE__ */ a(l, {}) : /* @__PURE__ */ w(l, { children: [
39
+ /* @__PURE__ */ a("div", { id: d, className: y, onClick: f }),
40
+ o && /* @__PURE__ */ a("div", { className: h, children: o })
41
+ ] });
42
+ };
43
+ export {
44
+ g as Modal
45
+ };
@@ -0,0 +1,32 @@
1
+ import { Nav } from '..';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('.').NavContextProps & import('react').RefAttributes<HTMLDivElement>> & {
7
+ Header: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
8
+ logo: string;
9
+ } & import('react').RefAttributes<HTMLDivElement>>;
10
+ DesktopHeader: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
11
+ LeftSection: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
12
+ RightSection: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
13
+ Logo: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLImageElement> & import('../Image').ImageProps & import('react').RefAttributes<HTMLImageElement>>;
14
+ Body: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
15
+ Folder: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & {
16
+ label: string;
17
+ } & import('react').RefAttributes<HTMLDivElement>>;
18
+ };
19
+ parameters: {
20
+ docs: {
21
+ story: {
22
+ iframe: string;
23
+ };
24
+ };
25
+ };
26
+ args: {
27
+ children: import("react/jsx-runtime").JSX.Element[];
28
+ };
29
+ };
30
+ export default meta;
31
+ type Story = StoryObj<typeof Nav>;
32
+ export declare const Default: Story;
@@ -0,0 +1,21 @@
1
+ import { ImageProps } from '../Image';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ export interface NavContextProps {
5
+ expanded?: boolean;
6
+ setExpanded?: (val: boolean) => void;
7
+ }
8
+ declare const Nav: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & NavContextProps & import('react').RefAttributes<HTMLDivElement>> & {
9
+ Header: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
10
+ logo: string;
11
+ } & import('react').RefAttributes<HTMLDivElement>>;
12
+ DesktopHeader: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
13
+ LeftSection: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
14
+ RightSection: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
15
+ Logo: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLImageElement> & ImageProps & import('react').RefAttributes<HTMLImageElement>>;
16
+ Body: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
17
+ Folder: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & {
18
+ label: string;
19
+ } & import('react').RefAttributes<HTMLDivElement>>;
20
+ };
21
+ export { Nav };
@@ -0,0 +1,82 @@
1
+ import { jsx as e, jsxs as d, Fragment as y } from "react/jsx-runtime";
2
+ import { createContext as b, forwardRef as n, useState as c, useMemo as w, useContext as m, useRef as C } from "react";
3
+ import { HamburgerIcon as H } from "../HamburgerIcon/index.js";
4
+ import { faChevronDown as L } from "@fortawesome/fontawesome-free-solid";
5
+ import p from "clsx";
6
+ import { Icon as S } from "../Icon/index.js";
7
+ const i = b(null), v = n(({ children: a }, s) => {
8
+ const [r, t] = c(!1), o = w(
9
+ () => ({
10
+ expanded: r,
11
+ setExpanded: t
12
+ }),
13
+ [r, t]
14
+ );
15
+ return /* @__PURE__ */ e(i.Provider, { value: o, children: /* @__PURE__ */ e("div", { children: a }) });
16
+ }), N = n(({ children: a, logo: s }, r) => {
17
+ const { setExpanded: t, expanded: o } = m(i) || {};
18
+ return /* @__PURE__ */ d("div", { ref: r, className: p("relative h-20 w-full bg-nav px-2 py-2"), children: [
19
+ /* @__PURE__ */ d("div", { className: "flex h-full md:hidden", children: [
20
+ /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
21
+ H,
22
+ {
23
+ onClick: () => t == null ? void 0 : t(!o),
24
+ className: "aspect-square"
25
+ }
26
+ ) }),
27
+ /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-full w-28 -translate-x-1/2 -translate-y-1/2 transform", children: /* @__PURE__ */ e(l, { src: s }) })
28
+ ] }),
29
+ a
30
+ ] });
31
+ }), f = n(
32
+ ({ children: a }, s) => {
33
+ const { expanded: r } = m(i) || {};
34
+ return r ? /* @__PURE__ */ e("div", { className: "h-screen bg-nav px-8 pb-12 pt-20 md:hidden", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: a }) }) : /* @__PURE__ */ e(y, {});
35
+ }
36
+ ), u = n(({ children: a }, s) => /* @__PURE__ */ e("div", { className: "hidden grid-cols-7 gap-8 md:grid", children: a })), x = n(({ children: a }, s) => /* @__PURE__ */ e("div", { className: "col-span-3 my-4 justify-between text-center md:flex", children: a })), g = n(({ label: a, children: s }) => {
37
+ const [r, t] = c(!1), o = C(null);
38
+ return /* @__PURE__ */ d(
39
+ "div",
40
+ {
41
+ ref: o,
42
+ onClick: () => t(!0),
43
+ onMouseLeave: () => t(!1),
44
+ className: "mx-auto text-xl font-normal tracking-wider text-white hover:cursor-pointer",
45
+ children: [
46
+ /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
47
+ /* @__PURE__ */ e("p", { children: a }),
48
+ /* @__PURE__ */ e(S, { icon: L })
49
+ ] }),
50
+ r && /* @__PURE__ */ e("div", { className: "mb:pb-2 grid grid-cols-1 bg-nav md:gap-5 md:pt-8", children: s })
51
+ ]
52
+ }
53
+ );
54
+ }), l = n(({ className: a, src: s, ...r }, t) => /* @__PURE__ */ e("div", { className: "flex-none", children: /* @__PURE__ */ e(
55
+ "img",
56
+ {
57
+ className: p("rounded-full", a),
58
+ ref: t,
59
+ src: s,
60
+ ...r
61
+ }
62
+ ) })), h = n(({ children: a }, s) => /* @__PURE__ */ e("div", { className: "col-span-3 my-4 justify-between text-center md:flex", children: a }));
63
+ v.displayName = "Nav";
64
+ N.displayName = "Nav.Header";
65
+ u.displayName = "Nav.DesktopHeader";
66
+ l.displayName = "Nav.Logo";
67
+ x.displayName = "Nav.LeftSection";
68
+ h.displayName = "Nav.RightSection";
69
+ f.displayName = "Nav.Body";
70
+ g.displayName = "Nav.Folder";
71
+ const I = Object.assign(v, {
72
+ Header: N,
73
+ DesktopHeader: u,
74
+ LeftSection: x,
75
+ RightSection: h,
76
+ Logo: l,
77
+ Body: f,
78
+ Folder: g
79
+ });
80
+ export {
81
+ I as Nav
82
+ };
@@ -0,0 +1,18 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { NavItem } from './';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLAnchorElement> & {
7
+ href: string;
8
+ } & import('react').RefAttributes<HTMLAnchorElement>> & {
9
+ Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
10
+ };
11
+ args: {
12
+ className: string;
13
+ children: import("react/jsx-runtime").JSX.Element[];
14
+ };
15
+ };
16
+ export default meta;
17
+ type Story = StoryObj<typeof NavItem>;
18
+ export declare const Default: Story;
@@ -0,0 +1,8 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ declare const NavItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLAnchorElement> & {
4
+ href: string;
5
+ } & import('react').RefAttributes<HTMLAnchorElement>> & {
6
+ Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
7
+ };
8
+ export { NavItem };
@@ -0,0 +1,24 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as o } from "react";
3
+ import i from "clsx";
4
+ const s = o(({ children: t, className: a, href: e, ...l }, n) => /* @__PURE__ */ r(
5
+ "a",
6
+ {
7
+ href: e,
8
+ ref: n,
9
+ className: i(
10
+ "mx-auto h-8 py-0 text-white after:block after:scale-x-0 after:border-b-4 after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
11
+ a
12
+ ),
13
+ ...l,
14
+ children: t
15
+ }
16
+ )), m = o(({ className: t, ...a }, e) => /* @__PURE__ */ r("p", { className: "text-xl font-normal tracking-wider", ref: e, ...a }));
17
+ s.displayName = "NavItem";
18
+ m.displayName = "NavItem.Label";
19
+ const N = Object.assign(s, {
20
+ Label: m
21
+ });
22
+ export {
23
+ N as NavItem
24
+ };
@@ -0,0 +1,22 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ import { Pill } from './';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('./').PillProps & import('react').RefAttributes<HTMLDivElement>> & {
7
+ Icon: import('react').ForwardRefExoticComponent<{
8
+ icon: any;
9
+ } & import('react').RefAttributes<SVGSVGElement>>;
10
+ Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
11
+ };
12
+ args: {
13
+ children: import("react/jsx-runtime").JSX.Element[];
14
+ };
15
+ };
16
+ export default meta;
17
+ type Story = StoryObj<typeof Pill>;
18
+ export declare const Default: Story;
19
+ export declare const Error: Story;
20
+ export declare const Warning: Story;
21
+ export declare const Success: Story;
22
+ export declare const Info: Story;
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ export type PickU<T, K extends keyof T> = T extends any ? {
4
+ [P in K]: T[P];
5
+ } : never;
6
+ export type PillVariant = 'default' | 'warning' | 'error' | 'info' | 'success';
7
+ export interface PillProps {
8
+ variant?: PillVariant;
9
+ loading?: boolean;
10
+ }
11
+ declare const Pill: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & PillProps & import('react').RefAttributes<HTMLDivElement>> & {
12
+ Icon: import('react').ForwardRefExoticComponent<{
13
+ icon: any;
14
+ } & import('react').RefAttributes<SVGSVGElement>>;
15
+ Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
16
+ };
17
+ export { Pill };
@@ -0,0 +1,31 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as t } from "react";
3
+ import s from "clsx";
4
+ import { Icon as a } from "../Icon/index.js";
5
+ const i = t(({ children: l, variant: e = "default" }, r) => /* @__PURE__ */ o(
6
+ "div",
7
+ {
8
+ ref: r,
9
+ className: s(
10
+ "inline-grid grid-flow-col items-center gap-1 rounded-full border px-2 py-0.5",
11
+ {
12
+ "": e === "default",
13
+ "border-error-default bg-error-light text-error-default": e === "error",
14
+ "border-info-default bg-info-light text-info-default": e === "info",
15
+ "border-success-default bg-success-light text-success-default": e === "success",
16
+ "border-warning-default bg-warning-light text-warning-default": e === "warning"
17
+ }
18
+ ),
19
+ children: l
20
+ }
21
+ )), d = t(({ className: l, ...e }, r) => /* @__PURE__ */ o("p", { className: s("text-xs", l), ref: r, ...e })), n = t(({ icon: l }, e) => /* @__PURE__ */ o(a, { size: "xs", ref: e, icon: l }));
22
+ i.displayName = "Pill";
23
+ n.displayName = "Pill.Icon";
24
+ d.displayName = "Chip.Label";
25
+ const m = Object.assign(i, {
26
+ Icon: n,
27
+ Label: d
28
+ });
29
+ export {
30
+ m as Pill
31
+ };
@@ -0,0 +1,86 @@
1
+ import { Search } from '.';
2
+ import { StoryObj } from '@storybook/react';
3
+
4
+ declare const meta: {
5
+ title: string;
6
+ component: ({ id, className, onChange, placeholder, text, leftIconProps, rightIconProps, }: import('.').Props) => import("react/jsx-runtime").JSX.Element;
7
+ parameters: {};
8
+ argTypes: {
9
+ leftIconProps: {
10
+ description: string;
11
+ control: string;
12
+ table: {
13
+ category: string;
14
+ };
15
+ };
16
+ rightIconProps: {
17
+ description: string;
18
+ control: string;
19
+ table: {
20
+ category: string;
21
+ };
22
+ };
23
+ placeholder: {
24
+ description: string;
25
+ control: string;
26
+ table: {
27
+ category: string;
28
+ };
29
+ };
30
+ text: {
31
+ description: string;
32
+ control: string;
33
+ table: {
34
+ category: string;
35
+ };
36
+ };
37
+ id: {
38
+ description: string;
39
+ control: {
40
+ type: string;
41
+ default: boolean;
42
+ };
43
+ table: {
44
+ category: string;
45
+ type: {
46
+ summary: string;
47
+ };
48
+ defaultValue: {
49
+ summary: string;
50
+ };
51
+ };
52
+ };
53
+ className: {
54
+ description: string;
55
+ control: {
56
+ type: string;
57
+ default: boolean;
58
+ };
59
+ table: {
60
+ category: string;
61
+ type: {
62
+ summary: string;
63
+ };
64
+ defaultValue: {
65
+ summary: string;
66
+ };
67
+ };
68
+ };
69
+ };
70
+ args: {
71
+ placeholder: string;
72
+ leftIconProps: {
73
+ type: string;
74
+ className: string;
75
+ bgColour: string;
76
+ };
77
+ rightIconProps: {
78
+ type: string;
79
+ className: string;
80
+ bgColour: string;
81
+ };
82
+ };
83
+ };
84
+ export default meta;
85
+ type Story = StoryObj<typeof Search>;
86
+ export declare const Default: Story;
@@ -0,0 +1,12 @@
1
+ import { IconProps } from '../Icon';
2
+
3
+ export interface Props {
4
+ id?: string;
5
+ className?: string;
6
+ onChange?: (val: string | number) => void;
7
+ placeholder?: string;
8
+ text?: string;
9
+ leftIconProps?: IconProps;
10
+ rightIconProps?: IconProps;
11
+ }
12
+ export declare const Search: ({ id, className, onChange, placeholder, text, leftIconProps, rightIconProps, }: Props) => import("react/jsx-runtime").JSX.Element;