trepur_components 2.3.30 → 2.3.32

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.
@@ -0,0 +1,50 @@
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as a } from "react";
3
+ import { Icon as p } from "../Icon/index.js";
4
+ import s from "clsx";
5
+ const c = a(
6
+ ({
7
+ className: e,
8
+ children: o,
9
+ loading: t = !1,
10
+ variant: r = "primary",
11
+ size: n = "sm",
12
+ href: m,
13
+ target: g,
14
+ ...u
15
+ }) => /* @__PURE__ */ b("div", { className: "inline-block", children: /* @__PURE__ */ b(
16
+ "a",
17
+ {
18
+ href: m,
19
+ target: g,
20
+ className: s(
21
+ "flex items-center gap-3 rounded border text-center",
22
+ {
23
+ "duration-200": !t,
24
+ "border-button-primary-border bg-button-primary-bg text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-active": r === "primary" && !t,
25
+ "border-button-secondary-border bg-button-secondary-bg text-button-secondary-text hover:bg-button-secondary-hover active:bg-button-secondary-active": r === "secondary" && !t,
26
+ "border-button-ghost-border bg-button-ghost-bg text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": r === "ghost" && !t,
27
+ "border-button-bordered-border text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": r === "bordered" && !t,
28
+ "border-button-basic-border bg-button-basic-bg text-button-basic-text hover:bg-button-basic-hover active:bg-button-basic-active": r === "basic" && !t,
29
+ "w-40 animate-pulse border-loading bg-loading": t,
30
+ "px-12 py-3 text-base font-normal leading-4": n === "sm",
31
+ "px-12 py-3 text-lg font-normal leading-8": n === "md",
32
+ "px-12 py-4 text-xl font-normal leading-8": n === "lg"
33
+ },
34
+ e
35
+ ),
36
+ ...u,
37
+ children: !t && o
38
+ }
39
+ ) })
40
+ ), i = a(({ className: e, ...o }, t) => /* @__PURE__ */ b("p", { className: s("text-md", e), ref: t, ...o })), d = a(({ icon: e }, o) => /* @__PURE__ */ b(p, { size: "md", ref: o, icon: e }));
41
+ c.displayName = "Link";
42
+ d.displayName = "Link.Icon";
43
+ i.displayName = "Link.Label";
44
+ const v = Object.assign(c, {
45
+ Icon: d,
46
+ Label: i
47
+ });
48
+ export {
49
+ v as Link
50
+ };
@@ -1,37 +1,37 @@
1
1
  import { jsx as e, jsxs as p, Fragment as H } from "react/jsx-runtime";
2
- import { createContext as C, forwardRef as l, useState as v, useMemo as k, useContext as c, useRef as w } from "react";
2
+ import { createContext as w, forwardRef as l, useState as v, useMemo as C, useContext as m, useRef as k } from "react";
3
3
  import { HamburgerIcon as M } from "../HamburgerIcon/index.js";
4
4
  import { faChevronDown as j } from "@fortawesome/fontawesome-free-solid";
5
- import d from "clsx";
5
+ import n from "clsx";
6
6
  import { Icon as D } from "../Icon/index.js";
7
7
  import { NavItem as F } from "../NavItem/index.js";
8
- const i = C(null), N = l(({ className: t, children: r, loading: a }, s) => {
9
- const [o, n] = v(!1), m = k(
8
+ const i = w(null), N = l(({ className: t, children: r, loading: a }, o) => {
9
+ const [s, d] = v(!1), c = C(
10
10
  () => ({
11
- expanded: o,
12
- setExpanded: n,
11
+ expanded: s,
12
+ setExpanded: d,
13
13
  loading: a
14
14
  }),
15
- [o, n, a]
15
+ [s, d, a]
16
16
  );
17
- return /* @__PURE__ */ e(i.Provider, { value: m, children: /* @__PURE__ */ e("div", { className: t, ref: s, children: r }) });
17
+ return /* @__PURE__ */ e(i.Provider, { value: c, children: /* @__PURE__ */ e("div", { className: t, ref: o, children: r }) });
18
18
  }), f = l(
19
19
  ({ className: t, children: r }, a) => /* @__PURE__ */ e(
20
20
  "div",
21
21
  {
22
22
  ref: a,
23
- className: d("relative h-24 w-full bg-nav-bg px-2 py-2", t),
23
+ className: n("relative h-24 w-full bg-nav-bg px-2 py-2", t),
24
24
  children: r
25
25
  }
26
26
  )
27
27
  ), g = l(({ className: t, children: r }, a) => {
28
- const { loading: s, setExpanded: o, expanded: n } = c(i) || {};
29
- return /* @__PURE__ */ p("div", { ref: a, className: d("flex h-full md:hidden", t), children: [
30
- !s && /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
28
+ const { loading: o, setExpanded: s, expanded: d } = m(i) || {};
29
+ return /* @__PURE__ */ p("div", { ref: a, className: n("flex h-full md:hidden", t), children: [
30
+ !o && /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
31
31
  M,
32
32
  {
33
33
  variant: "ghost",
34
- onClick: () => o == null ? void 0 : o(!n),
34
+ onClick: () => s == null ? void 0 : s(!d),
35
35
  className: "aspect-square"
36
36
  }
37
37
  ) }),
@@ -41,7 +41,7 @@ const i = C(null), N = l(({ className: t, children: r, loading: a }, s) => {
41
41
  "div",
42
42
  {
43
43
  ref: a,
44
- className: d(
44
+ className: n(
45
45
  "hidden justify-between md:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
46
46
  t
47
47
  ),
@@ -49,12 +49,12 @@ const i = C(null), N = l(({ className: t, children: r, loading: a }, s) => {
49
49
  }
50
50
  )), x = l(
51
51
  ({ className: t, children: r }, a) => {
52
- const { expanded: s } = c(i) || {};
53
- return s ? /* @__PURE__ */ e(
52
+ const { expanded: o } = m(i) || {};
53
+ return o ? /* @__PURE__ */ e(
54
54
  "div",
55
55
  {
56
56
  ref: a,
57
- className: d(
57
+ className: n(
58
58
  "h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden",
59
59
  t
60
60
  ),
@@ -64,55 +64,56 @@ const i = C(null), N = l(({ className: t, children: r, loading: a }, s) => {
64
64
  }
65
65
  ), h = l(
66
66
  ({ className: t, children: r }, a) => {
67
- const { loading: s } = c(i) || {};
68
- return s ? /* @__PURE__ */ e(
67
+ const { loading: o } = m(i) || {};
68
+ return o ? /* @__PURE__ */ e(
69
69
  "div",
70
70
  {
71
71
  ref: a,
72
- className: d("my-4 md:flex md:gap-4 lg:gap-6", t),
73
- children: [...Array(5)].map((o, n) => /* @__PURE__ */ e(F, { loading: !0 }, n))
72
+ className: n("my-4 md:flex md:gap-4 lg:gap-6", t),
73
+ children: [...Array(5)].map((s, d) => /* @__PURE__ */ e(F, { loading: !0 }, d))
74
74
  }
75
75
  ) : /* @__PURE__ */ e(
76
76
  "div",
77
77
  {
78
78
  ref: a,
79
- className: d("my-4 md:flex md:gap-4 lg:gap-6", t),
79
+ className: n("my-4 md:flex md:gap-4 lg:gap-6", t),
80
80
  children: r
81
81
  }
82
82
  );
83
83
  }
84
- ), b = l(({ className: t, label: r, children: a, active: s = !1 }) => {
85
- const [o, n] = v(!1), m = w(null);
84
+ ), b = l(({ className: t, label: r, children: a, active: o = !1 }) => {
85
+ const [s, d] = v(!1), c = k(null);
86
86
  return /* @__PURE__ */ p(
87
87
  "div",
88
88
  {
89
- ref: m,
90
- onClick: () => n(!0),
91
- onMouseLeave: () => n(!1),
92
- className: d(
93
- "relative m-auto py-0 text-nav-text after:block after:scale-x-0 after:border-b-2 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
89
+ ref: c,
90
+ onMouseEnter: () => d(!0),
91
+ onMouseLeave: () => d(!1),
92
+ onClick: () => d(!s),
93
+ className: n(
94
+ "relative m-auto py-0 text-nav-text md:after:block after:scale-x-0 after:border-b-2 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
94
95
  {
95
- "font-bold": s,
96
- "font-light": !s
96
+ "font-bold": o,
97
+ "font-light": !o
97
98
  },
98
99
  t
99
100
  ),
100
101
  children: [
101
- /* @__PURE__ */ p("div", { className: "flex items-center gap-1", children: [
102
+ /* @__PURE__ */ p("div", { className: "flex justify-center items-center gap-1", children: [
102
103
  /* @__PURE__ */ e("p", { className: "text-lg", children: r }),
103
104
  /* @__PURE__ */ e(D, { size: "xs", icon: j })
104
105
  ] }),
105
- o && /* @__PURE__ */ e("div", { className: "absolute -left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-y-2 bg-nav-bg px-4 py-4", children: a }) })
106
+ s && /* @__PURE__ */ e("div", { className: "rounded-md md:absolute md:-left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "rounded-md grid grid-cols-1 gap-y-2 bg-nav-bg px-1 py-2 w-full", children: a }) })
106
107
  ]
107
108
  }
108
109
  );
109
- }), y = l(({ className: t, src: r, ...a }, s) => {
110
- const { loading: o } = c(i) || {};
111
- return o ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
110
+ }), y = l(({ className: t, src: r, ...a }, o) => {
111
+ const { loading: s } = m(i) || {};
112
+ return s ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e("div", { className: "h-20 w-20 animate-pulse bg-gray-300" }) }) : /* @__PURE__ */ e(
112
113
  "img",
113
114
  {
114
- className: d("h-20 flex-none", t),
115
- ref: s,
115
+ className: n("h-20 flex-none", t),
116
+ ref: o,
116
117
  src: r,
117
118
  ...a
118
119
  }
@@ -126,7 +127,7 @@ y.displayName = "Nav.Logo";
126
127
  h.displayName = "Nav.Section";
127
128
  x.displayName = "Nav.Body";
128
129
  b.displayName = "Nav.Folder";
129
- const A = Object.assign(N, {
130
+ const q = Object.assign(N, {
130
131
  Header: f,
131
132
  DesktopHeader: u,
132
133
  MobileHeader: g,
@@ -136,5 +137,5 @@ const A = Object.assign(N, {
136
137
  Folder: b
137
138
  });
138
139
  export {
139
- A as Nav
140
+ q as Nav
140
141
  };
@@ -7,6 +7,7 @@ declare const meta: {
7
7
  href?: string | undefined;
8
8
  active?: boolean | undefined;
9
9
  loading?: boolean | undefined;
10
+ isInFolder?: boolean | undefined;
10
11
  } & import('react').RefAttributes<HTMLAnchorElement>> & {
11
12
  Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
12
13
  };
@@ -4,6 +4,7 @@ declare const NavItem: import('react').ForwardRefExoticComponent<HTMLAttributes<
4
4
  href?: string | undefined;
5
5
  active?: boolean | undefined;
6
6
  loading?: boolean | undefined;
7
+ isInFolder?: boolean | undefined;
7
8
  } & import('react').RefAttributes<HTMLAnchorElement>> & {
8
9
  Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
9
10
  };
@@ -1,28 +1,39 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as o } from "react";
3
3
  import n from "clsx";
4
- const l = o(({ loading: t = !1, active: e, children: r, className: m, href: f, ...i }, c) => t ? /* @__PURE__ */ a("div", { className: "m-auto", children: /* @__PURE__ */ a("div", { className: "h-7 w-20 animate-pulse rounded-md bg-gray-300" }) }) : /* @__PURE__ */ a(
5
- "a",
6
- {
7
- href: f,
8
- ref: c,
9
- className: n(
10
- "m-auto inline-block py-0 text-nav-text after:block after:scale-x-0 after:border-b-2 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
11
- {
12
- "font-bold": e,
13
- "font-light": !e
14
- },
15
- m
16
- ),
17
- ...i,
18
- children: r
19
- }
20
- )), s = o(({ className: t, ...e }, r) => /* @__PURE__ */ a(
4
+ const l = o(
5
+ ({
6
+ loading: t = !1,
7
+ active: a,
8
+ children: r,
9
+ className: m,
10
+ href: i,
11
+ isInFolder: f = !1,
12
+ ...c
13
+ }, d) => t ? /* @__PURE__ */ e("div", { className: "m-auto", children: /* @__PURE__ */ e("div", { className: "h-7 w-20 animate-pulse rounded-md bg-gray-300" }) }) : /* @__PURE__ */ e(
14
+ "a",
15
+ {
16
+ href: i,
17
+ ref: d,
18
+ className: n(
19
+ "group text-center w-full m-auto inline-block py-0 text-nav-text",
20
+ {
21
+ "font-bold": a,
22
+ "font-light": !a,
23
+ "rounded-md hover:bg-gray-300 py-1": f
24
+ },
25
+ m
26
+ ),
27
+ ...c,
28
+ children: /* @__PURE__ */ e("span", { className: "text-center inline-block after:block after:scale-x-0 after:border-b-2 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out group-hover:cursor-pointer group-hover:after:scale-x-100", children: r })
29
+ }
30
+ )
31
+ ), s = o(({ className: t, ...a }, r) => /* @__PURE__ */ e(
21
32
  "p",
22
33
  {
23
34
  className: n("flex-none text-nowrap text-lg", t),
24
35
  ref: r,
25
- ...e
36
+ ...a
26
37
  }
27
38
  ));
28
39
  l.displayName = "NavItem";
@@ -12,6 +12,7 @@ import { NavItem } from './NavItem';
12
12
  import { Nav } from './Nav';
13
13
  import { Modal } from './Modal';
14
14
  import { MenuButton } from './MenuButton';
15
+ import { Link } from './Link';
15
16
  import { Input } from './Input';
16
17
  import { ImageCard } from './ImageCard';
17
18
  import { Image } from './Image';
@@ -35,4 +36,4 @@ import { Breadcrumbs } from './Breadcrumbs';
35
36
  import { AlertBar } from './AlertBar';
36
37
  import { Accordion } from './Accordion';
37
38
 
38
- export { Accordion, AlertBar, Breadcrumbs, Button, CalendarComponent, Card, Checkbox, Carousel, CarouselThumbnail, Collapsible, Counter, DetailUpdater, Dialog, Dropdown, Form, Footer, FooterNav, Greeting, Icon, Image, ImageCard, Input, MenuButton, Modal, Nav, NavItem, Pill, Search, Select, SplitCard, Stars, Testimonial, TextArea, Timeline, Tubestops, Video };
39
+ export { Accordion, AlertBar, Breadcrumbs, Button, CalendarComponent, Card, Checkbox, Carousel, CarouselThumbnail, Collapsible, Counter, DetailUpdater, Dialog, Dropdown, Form, Footer, FooterNav, Greeting, Icon, Image, ImageCard, Input, Link, MenuButton, Modal, Nav, NavItem, Pill, Search, Select, SplitCard, Stars, Testimonial, TextArea, Timeline, Tubestops, Video };
package/lib/index.js CHANGED
@@ -12,28 +12,29 @@ import { Counter as S } from "./components/Counter/index.js";
12
12
  import { DetailUpdater as v } from "./components/DetailUpdater/index.js";
13
13
  import { Dialog as D } from "./components/Dialog/index.js";
14
14
  import { Dropdown as N } from "./components/Dropdown/index.js";
15
- import { Form as k } from "./components/Form/index.js";
15
+ import { Form as M } from "./components/Form/index.js";
16
16
  import { Footer as G } from "./components/Footer/index.js";
17
- import { FooterNav as U } from "./components/FooterNav/index.js";
18
- import { Greeting as j } from "./components/Greeting/index.js";
19
- import { Icon as y } from "./components/Icon/index.js";
20
- import { Image as E } from "./components/Image/index.js";
21
- import { ImageCard as J } from "./components/ImageCard/index.js";
22
- import { Input as L } from "./components/Input/index.js";
23
- import { MenuButton as Q } from "./components/MenuButton/index.js";
24
- import { Modal as W } from "./components/Modal/index.js";
25
- import { Nav as Y } from "./components/Nav/index.js";
26
- import { NavItem as _ } from "./components/NavItem/index.js";
27
- import { Pill as oo } from "./components/Pill/index.js";
28
- import { Search as eo } from "./components/Search/index.js";
29
- import { Select as mo } from "./components/Select/index.js";
30
- import { SplitCard as xo } from "./components/SplitCard/index.js";
31
- import { Stars as ao } from "./components/Stars/index.js";
32
- import { Testimonial as no } from "./components/Testimonial/index.js";
33
- import { TextArea as uo } from "./components/TextArea/index.js";
34
- import { Timeline as so } from "./components/Timeline/index.js";
35
- import { Tubestops as bo } from "./components/Tubestops/index.js";
36
- import { Video as To } from "./components/Video/index.js";
17
+ import { FooterNav as P } from "./components/FooterNav/index.js";
18
+ import { Greeting as V } from "./components/Greeting/index.js";
19
+ import { Icon as q } from "./components/Icon/index.js";
20
+ import { Image as z } from "./components/Image/index.js";
21
+ import { ImageCard as H } from "./components/ImageCard/index.js";
22
+ import { Input as K } from "./components/Input/index.js";
23
+ import { Link as Q } from "./components/Link/index.js";
24
+ import { MenuButton as W } from "./components/MenuButton/index.js";
25
+ import { Modal as Y } from "./components/Modal/index.js";
26
+ import { Nav as _ } from "./components/Nav/index.js";
27
+ import { NavItem as oo } from "./components/NavItem/index.js";
28
+ import { Pill as eo } from "./components/Pill/index.js";
29
+ import { Search as mo } from "./components/Search/index.js";
30
+ import { Select as xo } from "./components/Select/index.js";
31
+ import { SplitCard as ao } from "./components/SplitCard/index.js";
32
+ import { Stars as no } from "./components/Stars/index.js";
33
+ import { Testimonial as uo } from "./components/Testimonial/index.js";
34
+ import { TextArea as so } from "./components/TextArea/index.js";
35
+ import { Timeline as bo } from "./components/Timeline/index.js";
36
+ import { Tubestops as To } from "./components/Tubestops/index.js";
37
+ import { Video as Bo } from "./components/Video/index.js";
37
38
  export {
38
39
  e as Accordion,
39
40
  m as AlertBar,
@@ -50,25 +51,26 @@ export {
50
51
  D as Dialog,
51
52
  N as Dropdown,
52
53
  G as Footer,
53
- U as FooterNav,
54
- k as Form,
55
- j as Greeting,
56
- y as Icon,
57
- E as Image,
58
- J as ImageCard,
59
- L as Input,
60
- Q as MenuButton,
61
- W as Modal,
62
- Y as Nav,
63
- _ as NavItem,
64
- oo as Pill,
65
- eo as Search,
66
- mo as Select,
67
- xo as SplitCard,
68
- ao as Stars,
69
- no as Testimonial,
70
- uo as TextArea,
71
- so as Timeline,
72
- bo as Tubestops,
73
- To as Video
54
+ P as FooterNav,
55
+ M as Form,
56
+ V as Greeting,
57
+ q as Icon,
58
+ z as Image,
59
+ H as ImageCard,
60
+ K as Input,
61
+ Q as Link,
62
+ W as MenuButton,
63
+ Y as Modal,
64
+ _ as Nav,
65
+ oo as NavItem,
66
+ eo as Pill,
67
+ mo as Search,
68
+ xo as Select,
69
+ ao as SplitCard,
70
+ no as Stars,
71
+ uo as Testimonial,
72
+ so as TextArea,
73
+ bo as Timeline,
74
+ To as Tubestops,
75
+ Bo as Video
74
76
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.30",
3
+ "version": "2.3.32",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,