trepur_components 2.3.22 → 2.3.24

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.
@@ -24,3 +24,6 @@ export declare const Ghost: Story;
24
24
  export declare const Basic: Story;
25
25
  export declare const Loading: Story;
26
26
  export declare const Link: Story;
27
+ export declare const Small: Story;
28
+ export declare const Medium: Story;
29
+ export declare const Large: Story;
@@ -7,6 +7,7 @@ export interface ButtonProps {
7
7
  type?: 'button' | 'link';
8
8
  href?: string;
9
9
  target?: string;
10
+ size?: 'sm' | 'md' | 'lg';
10
11
  }
11
12
  declare const Button: import('react').ForwardRefExoticComponent<((HTMLAttributes<HTMLButtonElement> | HTMLAttributes<HTMLAnchorElement>) & ButtonProps) & import('react').RefAttributes<HTMLButtonElement | HTMLAnchorElement>> & {
12
13
  Icon: import('react').ForwardRefExoticComponent<{
@@ -1,26 +1,26 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import { Icon as m } from "../Icon/index.js";
3
+ import { Icon as g } from "../Icon/index.js";
4
4
  import s from "clsx";
5
- const g = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "button", ...e, children: o })), h = n(({ children: o, ...e }) => /* @__PURE__ */ r("div", { className: "inline-block", children: /* @__PURE__ */ r("a", { type: "button", className: "inline-grid", ...e, children: o }) })), a = n(
5
+ const l = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "button", ...e, children: o })), x = n(({ children: o, ...e }) => /* @__PURE__ */ r("div", { className: "inline-block", children: /* @__PURE__ */ r("a", { type: "button", className: "inline-grid", ...e, children: o }) })), c = n(
6
6
  ({
7
7
  className: o,
8
8
  children: e,
9
9
  loading: t = !1,
10
10
  variant: b = "primary",
11
11
  type: i = "button",
12
- disabled: y,
13
- href: d,
12
+ disabled: h,
13
+ href: m,
14
14
  target: p,
15
- ...l
15
+ size: a = "md"
16
16
  }) => /* @__PURE__ */ r(
17
- i === "button" ? g : h,
17
+ i === "button" ? l : x,
18
18
  {
19
- href: d,
19
+ href: m,
20
20
  target: p,
21
21
  disabled: t,
22
22
  className: s(
23
- "font-regular flex items-center gap-2 rounded-lg border px-8 py-3 text-center text-lg",
23
+ "flex items-center gap-3 rounded border text-center",
24
24
  {
25
25
  "duration-200": !t,
26
26
  "border-button-primary-border bg-button-primary-bg text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-active": b === "primary" && !t,
@@ -28,20 +28,23 @@ const g = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "butt
28
28
  "border-button-ghost-border bg-button-ghost-bg text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": b === "ghost" && !t,
29
29
  "border-button-bordered-border text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": b === "bordered" && !t,
30
30
  "border-button-basic-border bg-button-basic-bg text-button-basic-text hover:bg-button-basic-hover active:bg-button-basic-active": b === "basic" && !t,
31
- "w-40 animate-pulse border-loading bg-loading": t
31
+ "w-40 animate-pulse border-loading bg-loading": t,
32
+ "px-12 py-3 text-base font-normal leading-4": a === "sm",
33
+ "px-12 py-3 text-lg font-normal leading-8": a === "md",
34
+ "px-12 py-4 text-xl font-normal leading-8": a === "lg"
32
35
  },
33
36
  o
34
37
  ),
35
38
  children: !t && e
36
39
  }
37
40
  )
38
- ), c = n(({ className: o, ...e }, t) => /* @__PURE__ */ r("p", { className: s("text-md", o), ref: t, ...e })), u = n(({ icon: o }, e) => /* @__PURE__ */ r(m, { size: "md", ref: e, icon: o }));
39
- a.displayName = "Button";
40
- u.displayName = "Button.Icon";
41
- c.displayName = "Button.Label";
42
- const I = Object.assign(a, {
43
- Icon: u,
44
- Label: c
41
+ ), u = n(({ className: o, ...e }, t) => /* @__PURE__ */ r("p", { className: s("text-md", o), ref: t, ...e })), d = n(({ icon: o }, e) => /* @__PURE__ */ r(g, { size: "md", ref: e, icon: o }));
42
+ c.displayName = "Button";
43
+ d.displayName = "Button.Icon";
44
+ u.displayName = "Button.Label";
45
+ const I = Object.assign(c, {
46
+ Icon: d,
47
+ Label: u
45
48
  });
46
49
  export {
47
50
  I as Button
@@ -1,115 +1,124 @@
1
- import { jsx as a, jsxs as i, Fragment as y } from "react/jsx-runtime";
2
- import { createContext as H, forwardRef as r, useState as m, useMemo as C, useContext as p, useRef as k } from "react";
3
- import { HamburgerIcon as w } from "../HamburgerIcon/index.js";
4
- import { faChevronDown as M } from "@fortawesome/fontawesome-free-solid";
1
+ import { jsx as e, jsxs as i, Fragment as H } from "react/jsx-runtime";
2
+ import { createContext as C, forwardRef as o, useState as m, useMemo as k, useContext as p, useRef as w } from "react";
3
+ import { HamburgerIcon as M } from "../HamburgerIcon/index.js";
4
+ import { faChevronDown as j } from "@fortawesome/fontawesome-free-solid";
5
5
  import n from "clsx";
6
- import { Icon as j } from "../Icon/index.js";
7
- const c = H(null), v = r(({ className: s, children: t }, e) => {
8
- const [o, d] = m(!1), l = C(
6
+ import { Icon as D } from "../Icon/index.js";
7
+ const c = C(null), v = o(({ className: a, children: t }, s) => {
8
+ const [r, d] = m(!1), l = k(
9
9
  () => ({
10
- expanded: o,
10
+ expanded: r,
11
11
  setExpanded: d
12
12
  }),
13
- [o, d]
13
+ [r, d]
14
14
  );
15
- return /* @__PURE__ */ a(c.Provider, { value: l, children: /* @__PURE__ */ a("div", { className: s, ref: e, children: t }) });
16
- }), N = r(
17
- ({ className: s, children: t }, e) => /* @__PURE__ */ a(
15
+ return /* @__PURE__ */ e(c.Provider, { value: l, children: /* @__PURE__ */ e("div", { className: a, ref: s, children: t }) });
16
+ }), N = o(
17
+ ({ className: a, children: t }, s) => /* @__PURE__ */ e(
18
18
  "div",
19
19
  {
20
- ref: e,
21
- className: n("relative h-24 w-full bg-nav-bg px-2 py-2", s),
20
+ ref: s,
21
+ className: n("relative h-24 w-full bg-nav-bg px-2 py-2", a),
22
22
  children: t
23
23
  }
24
24
  )
25
- ), g = r(({ className: s, children: t }, e) => {
26
- const { setExpanded: o, expanded: d } = p(c) || {};
27
- return /* @__PURE__ */ i("div", { ref: e, className: n("flex h-full md:hidden", s), children: [
28
- /* @__PURE__ */ a("div", { className: "my-auto", children: /* @__PURE__ */ a(
29
- w,
25
+ ), f = o(({ className: a, children: t }, s) => {
26
+ const { setExpanded: r, expanded: d } = p(c) || {};
27
+ return /* @__PURE__ */ i("div", { ref: s, className: n("flex h-full md:hidden", a), children: [
28
+ /* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
29
+ M,
30
30
  {
31
31
  variant: "ghost",
32
- onClick: () => o == null ? void 0 : o(!d),
32
+ onClick: () => r == null ? void 0 : r(!d),
33
33
  className: "aspect-square"
34
34
  }
35
35
  ) }),
36
- /* @__PURE__ */ a("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: t })
36
+ /* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: t })
37
37
  ] });
38
- }), f = r(({ className: s, children: t }, e) => /* @__PURE__ */ a(
38
+ }), g = o(({ className: a, children: t }, s) => /* @__PURE__ */ e(
39
39
  "div",
40
40
  {
41
- ref: e,
41
+ ref: s,
42
42
  className: n(
43
43
  "hidden justify-between md:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
44
- s
44
+ a
45
45
  ),
46
46
  children: t
47
47
  }
48
- )), u = r(
49
- ({ className: s, children: t }, e) => {
50
- const { expanded: o } = p(c) || {};
51
- return o ? /* @__PURE__ */ a(
48
+ )), x = o(
49
+ ({ className: a, children: t }, s) => {
50
+ const { expanded: r } = p(c) || {};
51
+ return r ? /* @__PURE__ */ e(
52
52
  "div",
53
53
  {
54
- ref: e,
54
+ ref: s,
55
55
  className: n(
56
56
  "h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden",
57
- s
57
+ a
58
58
  ),
59
- children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: t })
59
+ children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: t })
60
60
  }
61
- ) : /* @__PURE__ */ a(y, {});
61
+ ) : /* @__PURE__ */ e(H, {});
62
62
  }
63
- ), x = r(
64
- ({ className: s, children: t }, e) => /* @__PURE__ */ a(
63
+ ), u = o(
64
+ ({ className: a, children: t }, s) => /* @__PURE__ */ e(
65
65
  "div",
66
66
  {
67
- ref: e,
68
- className: n("my-4 md:flex md:gap-4 lg:gap-8", s),
67
+ ref: s,
68
+ className: n("my-4 md:flex md:gap-4 lg:gap-6", a),
69
69
  children: t
70
70
  }
71
71
  )
72
- ), h = r(({ label: s, children: t, active: e = !1 }) => {
73
- const [o, d] = m(!1), l = k(null);
72
+ ), b = o(({ className: a, label: t, children: s, active: r = !1 }) => {
73
+ const [d, l] = m(!1), y = w(null);
74
74
  return /* @__PURE__ */ i(
75
75
  "div",
76
76
  {
77
- ref: l,
78
- onClick: () => d(!0),
79
- onMouseLeave: () => d(!1),
77
+ ref: y,
78
+ onClick: () => l(!0),
79
+ onMouseLeave: () => l(!1),
80
80
  className: n(
81
- "relative m-auto text-xl tracking-wider text-nav-text hover:cursor-pointer",
81
+ "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",
82
82
  {
83
- "font-bold": e,
84
- "font-normal": !e
85
- }
83
+ "font-bold": r,
84
+ "font-light": !r
85
+ },
86
+ a
86
87
  ),
87
88
  children: [
88
- /* @__PURE__ */ i("div", { className: "flex items-center gap-px ", children: [
89
- /* @__PURE__ */ a("p", { children: s }),
90
- /* @__PURE__ */ a(j, { icon: M })
89
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
90
+ /* @__PURE__ */ e("p", { className: "text-lg", children: t }),
91
+ /* @__PURE__ */ e(D, { size: "xs", icon: j })
91
92
  ] }),
92
- o && /* @__PURE__ */ a("div", { className: "absolute -left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-y-2 bg-nav-bg px-4 py-4", children: t }) })
93
+ d && /* @__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: s }) })
93
94
  ]
94
95
  }
95
96
  );
96
- }), b = r(({ className: s, src: t, ...e }, o) => /* @__PURE__ */ a("img", { className: n("h-20", s), ref: o, src: t, ...e }));
97
+ }), h = o(({ className: a, src: t, ...s }, r) => /* @__PURE__ */ e(
98
+ "img",
99
+ {
100
+ className: n("h-20 flex-none", a),
101
+ ref: r,
102
+ src: t,
103
+ ...s
104
+ }
105
+ ));
97
106
  v.displayName = "Nav";
98
107
  N.displayName = "Nav.Header";
99
- f.displayName = "Nav.DesktopHeader";
100
- g.displayName = "Nav.MobileHeader";
101
- b.displayName = "Nav.Logo";
102
- x.displayName = "Nav.Section";
103
- u.displayName = "Nav.Body";
104
- h.displayName = "Nav.Folder";
108
+ g.displayName = "Nav.DesktopHeader";
109
+ f.displayName = "Nav.MobileHeader";
110
+ h.displayName = "Nav.Logo";
111
+ u.displayName = "Nav.Section";
112
+ x.displayName = "Nav.Body";
113
+ b.displayName = "Nav.Folder";
105
114
  const R = Object.assign(v, {
106
115
  Header: N,
107
- DesktopHeader: f,
108
- MobileHeader: g,
109
- Section: x,
110
- Logo: b,
111
- Body: u,
112
- Folder: h
116
+ DesktopHeader: g,
117
+ MobileHeader: f,
118
+ Section: u,
119
+ Logo: h,
120
+ Body: x,
121
+ Folder: b
113
122
  });
114
123
  export {
115
124
  R as Nav
@@ -1,34 +1,27 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as o } from "react";
3
3
  import c from "clsx";
4
- const n = o(({ active: e, children: t, className: a, href: m, ...l }, f) => /* @__PURE__ */ r(
4
+ const s = o(({ active: e, children: t, className: a, href: l, ...m }, f) => /* @__PURE__ */ r(
5
5
  "a",
6
6
  {
7
- href: m,
7
+ href: l,
8
8
  ref: f,
9
9
  className: c(
10
- "m-auto h-8 py-0 text-nav-text after:block after:scale-x-0 after:border-b-4 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
10
+ "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",
11
11
  {
12
12
  "font-bold": e,
13
- "font-normal": !e
13
+ "font-light": !e
14
14
  },
15
15
  a
16
16
  ),
17
- ...l,
17
+ ...m,
18
18
  children: t
19
19
  }
20
- )), s = o(({ className: e, ...t }, a) => /* @__PURE__ */ r(
21
- "p",
22
- {
23
- className: "flex-none text-nowrap text-xl tracking-wider",
24
- ref: a,
25
- ...t
26
- }
27
- ));
28
- n.displayName = "NavItem";
29
- s.displayName = "NavItem.Label";
30
- const N = Object.assign(n, {
31
- Label: s
20
+ )), n = o(({ className: e, ...t }, a) => /* @__PURE__ */ r("p", { className: "flex-none text-nowrap text-lg", ref: a, ...t }));
21
+ s.displayName = "NavItem";
22
+ n.displayName = "NavItem.Label";
23
+ const N = Object.assign(s, {
24
+ Label: n
32
25
  });
33
26
  export {
34
27
  N as NavItem
@@ -1,36 +1,6 @@
1
1
  body.theme-penrithmrt {
2
- --color-ink: #495863;
3
- --color-transparent: transparent;
4
- --color-white: #ffffff;
5
- --color-black: #000000;
6
- --color-red: #bb0a1e;
7
- --color-grey: #2c373b;
8
- --color-light-grey: #495c63;
9
- --color-lightest-grey: #f5f5f5;
10
- --color-primary-strict: #ff007d;
11
- --color-border: #d0d0d0;
12
- --color-border-lightest: #eeeeee;
13
- --color-border-light: #d8d8d8;
14
- --color-border-dark: #616161;
15
- --color-facebook: #3b5999;
16
- --color-whatsapp: #25d366;
17
- --color-twitter: #55acee;
18
- --color-linkedin: #0a66c2;
19
- --color-email: #c71610;
20
- --color-github: #171515;
21
- --color-instagram: #8a3ab9;
22
- --color-interactive-facebook: #2d4474;
23
- --color-interactive-whatsapp: #25d566;
24
- --color-interactive-twitter: #55acee;
25
- --color-interactive-linkedin: #0a66c2;
26
- --color-interactive-instagram: #6d2e92;
27
- --color-interactive-email: #9f110c;
28
- --color-interactive-github: #000000;
29
- --color-gold: #e2b13c;
30
- --color-linkedin: #0e76a8;
31
-
32
2
  --color-primary: #3C2F71;
33
- --color-secondary: #c71f1f;
3
+ --color-secondary: #E94439;
34
4
  --color-tertiary: #921457;
35
5
 
36
6
  --color-loading: #a3a3a3;
@@ -55,7 +25,7 @@ body.theme-penrithmrt {
55
25
 
56
26
  --color-button-secondary-active: #c71f1f;
57
27
  --color-button-secondary-border: #c71f1f;
58
- --color-button-secondary-bg: #c71f1f;
28
+ --color-button-secondary-bg: #E94439;
59
29
  --color-button-secondary-text: #ffffff;
60
30
  --color-button-secondary-hover: #c71f1f;
61
31
 
@@ -23,46 +23,7 @@ const presetConfig: Config = {
23
23
  colors,
24
24
 
25
25
  fontFamily: {
26
- noto: ['Noto Sans JP', 'DM Sans', ...defaultTheme.fontFamily.sans],
27
- sans: ['DM Sans', 'Noto Sans JP', ...defaultTheme.fontFamily.sans],
28
- },
29
- fontSize: {
30
- xs: [
31
- '0.75rem',
32
- {
33
- lineHeight: '1.1rem',
34
- },
35
- ],
36
- xl: [
37
- '1.25rem',
38
- {
39
- lineHeight: '1.875rem',
40
- },
41
- ],
42
- '2xl': [
43
- '1.5rem',
44
- {
45
- lineHeight: '2.25rem',
46
- },
47
- ],
48
- '3xl': [
49
- '1.875rem',
50
- {
51
- lineHeight: '2.75rem',
52
- },
53
- ],
54
- '4xl': [
55
- '2.25rem',
56
- {
57
- lineHeight: '3.25rem',
58
- },
59
- ],
60
- '5xl': [
61
- '3rem',
62
- {
63
- lineHeight: '4rem',
64
- },
65
- ],
26
+ sans: ['Poppins', 'sans-serif'],
66
27
  },
67
28
  keyframes: {
68
29
  'rest-bounce': {
@@ -10,5 +10,4 @@ export default {
10
10
  '8.5': '2.125rem' /* 34px */,
11
11
  '9.5': '2.375rem' /* 38px */,
12
12
  13: '3.25rem' /* 52px */,
13
- 'app-header-height': 'var(--app-header-height, 0)',
14
13
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.22",
3
+ "version": "2.3.24",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,
@@ -47,6 +47,7 @@
47
47
  "@fortawesome/fontawesome-free-regular": "^5.1.0-3",
48
48
  "@fortawesome/fontawesome-free-solid": "^5.1.0-3",
49
49
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
50
+ "@fortawesome/free-solid-svg-icons": "^6.5.2",
50
51
  "@fortawesome/react-fontawesome": "^0.2.0",
51
52
  "class-variance-authority": "^0.7.0",
52
53
  "classnames": "^2.5.1",