trepur_components 2.3.28 → 2.3.29

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.
@@ -1,12 +1,12 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { createContext as I, forwardRef as h, useState as k, useMemo as K, useContext as b } from "react";
2
+ import { createContext as I, forwardRef as h, useState as S, useMemo as K, useContext as b } from "react";
3
3
  import { Icon as j } from "../Icon/index.js";
4
4
  import { faChevronRight as L, faChevronLeft as O, faCircle as T } from "@fortawesome/fontawesome-free-solid";
5
5
  import m from "clsx";
6
6
  import "../../node_modules/keen-slider/keen-slider.min.css.js";
7
7
  import { useKeenSlider as $ } from "../../node_modules/keen-slider/react.js";
8
8
  import { WheelControls as M } from "./utils.js";
9
- const g = I(null), A = h(
9
+ const N = I(null), A = h(
10
10
  ({
11
11
  breakpoints: s,
12
12
  children: t,
@@ -17,7 +17,7 @@ const g = I(null), A = h(
17
17
  spacing: c,
18
18
  ...i
19
19
  }, y) => {
20
- const [f, u] = k(1), [x, l] = k(!1), [C, p] = $(
20
+ const [f, u] = S(1), [x, l] = S(!1), [C, p] = $(
21
21
  {
22
22
  breakpoints: s,
23
23
  loop: e,
@@ -34,7 +34,7 @@ const g = I(null), A = h(
34
34
  }
35
35
  },
36
36
  [M]
37
- ), w = K(
37
+ ), g = K(
38
38
  () => ({
39
39
  sliderRef: C,
40
40
  instanceRef: p,
@@ -52,14 +52,14 @@ const g = I(null), A = h(
52
52
  n,
53
53
  x
54
54
  ]
55
- ), N = (d) => {
55
+ ), w = (d) => {
56
56
  var v;
57
57
  d.key === "Tab" && ((v = p.current) == null || v.next());
58
58
  };
59
- return /* @__PURE__ */ o(g.Provider, { value: w, children: /* @__PURE__ */ o(
59
+ return /* @__PURE__ */ o(N.Provider, { value: g, children: /* @__PURE__ */ o(
60
60
  "div",
61
61
  {
62
- onKeyDown: N,
62
+ onKeyDown: w,
63
63
  className: m("navigation-wrapper w-full", a),
64
64
  ref: y,
65
65
  ...i,
@@ -79,7 +79,7 @@ const g = I(null), A = h(
79
79
  children: s
80
80
  }
81
81
  )), P = h(({ className: s, children: t, ...a }) => {
82
- const { sliderRef: e } = b(g) || {};
82
+ const { sliderRef: e } = b(N) || {};
83
83
  return /* @__PURE__ */ o(
84
84
  "div",
85
85
  {
@@ -90,13 +90,13 @@ const g = I(null), A = h(
90
90
  }
91
91
  );
92
92
  }), R = h(({ className: s, rightArrow: t = !1, ...a }, e) => {
93
- const { instanceRef: n } = b(g) || {};
93
+ const { instanceRef: n } = b(N) || {};
94
94
  return /* @__PURE__ */ o(
95
95
  "div",
96
96
  {
97
97
  ref: e,
98
98
  className: m(
99
- "my-auto text-carousel-arrow-default hover:cursor-pointer hover:text-carousel-arrow-hover",
99
+ "hidden md:block my-auto text-carousel-arrow-default hover:cursor-pointer hover:text-carousel-arrow-hover",
100
100
  s
101
101
  ),
102
102
  onClick: (r) => {
@@ -114,18 +114,18 @@ const g = I(null), A = h(
114
114
  loop: n,
115
115
  currentSlide: r = 1,
116
116
  perView: c = 1
117
- } = b(g) || {}, i = (x = (u = (f = (y = e == null ? void 0 : e.current) == null ? void 0 : y.track) == null ? void 0 : f.details) == null ? void 0 : u.slides) == null ? void 0 : x.length;
118
- return /* @__PURE__ */ o("div", { className: m("flex justify-center", s), children: [...Array(i).keys()].map((l) => {
119
- var w, N, d, v;
120
- const C = ((v = (d = (N = (w = e == null ? void 0 : e.current) == null ? void 0 : w.track) == null ? void 0 : N.details) == null ? void 0 : d.slides) == null ? void 0 : v.length) ?? 1, p = n ? r + c <= C ? l >= r && l < r + c : l >= r || r + c - C - 1 >= l : r === l;
117
+ } = b(N) || {}, i = (x = (u = (f = (y = e == null ? void 0 : e.current) == null ? void 0 : y.track) == null ? void 0 : f.details) == null ? void 0 : u.slides) == null ? void 0 : x.length;
118
+ return /* @__PURE__ */ o("div", { className: m("flex justify-center gap-0.5 pt-2", s), children: [...Array(i).keys()].map((l) => {
119
+ var g, w, d, v;
120
+ const C = ((v = (d = (w = (g = e == null ? void 0 : e.current) == null ? void 0 : g.track) == null ? void 0 : w.details) == null ? void 0 : d.slides) == null ? void 0 : v.length) ?? 1, p = n ? r + c <= C ? l >= r && l < r + c : l >= r || r + c - C - 1 >= l : r === l;
121
121
  return /* @__PURE__ */ o(
122
122
  "button",
123
123
  {
124
124
  ref: a,
125
125
  type: "button",
126
126
  onClick: () => {
127
- var S;
128
- (S = e.current) == null || S.moveToIdx(l);
127
+ var k;
128
+ (k = e.current) == null || k.moveToIdx(l);
129
129
  },
130
130
  "aria-label": `carousel-button${t.id ? `-${t.id}` : ""}`,
131
131
  children: /* @__PURE__ */ o(
@@ -136,7 +136,7 @@ const g = I(null), A = h(
136
136
  p ? "text-carousel-dots-active" : "text-carousel-dots-default"
137
137
  ),
138
138
  icon: T,
139
- size: "2x"
139
+ size: "xl"
140
140
  }
141
141
  )
142
142
  },
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as m } from "react";
3
3
  import { Image as p } from "../Image/index.js";
4
- import C from "clsx";
4
+ import c from "clsx";
5
5
  const d = m(({ className: a, children: e, ...r }, n) => /* @__PURE__ */ t(
6
6
  "div",
7
7
  {
8
- className: C(
8
+ className: c(
9
9
  "grid max-w-96 overflow-hidden rounded-xl bg-white drop-shadow",
10
10
  a
11
11
  ),
@@ -13,14 +13,14 @@ const d = m(({ className: a, children: e, ...r }, n) => /* @__PURE__ */ t(
13
13
  ...r,
14
14
  children: e
15
15
  }
16
- )), s = m(({ src: a, ...e }) => /* @__PURE__ */ t("div", { className: "h-64", children: /* @__PURE__ */ t(p, { src: a, ...e }) })), o = m(({ children: a, ...e }, r) => /* @__PURE__ */ t("div", { className: "px-2 pb-4 pt-2", ref: r, ...e, children: a })), i = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-lg", ref: e, ...a })), l = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-sm", ref: e, ...a })), g = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-md pt-2", ref: e, ...a }));
16
+ )), s = m(({ src: a, ...e }) => /* @__PURE__ */ t("div", { className: "h-64 object-cover", children: /* @__PURE__ */ t(p, { src: a, ...e }) })), o = m(({ children: a, ...e }, r) => /* @__PURE__ */ t("div", { className: "px-2 pb-4 pt-2", ref: r, ...e, children: a })), i = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-lg", ref: e, ...a })), l = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-sm", ref: e, ...a })), g = m(({ ...a }, e) => /* @__PURE__ */ t("p", { className: "text-md pt-2", ref: e, ...a }));
17
17
  d.displayName = "ImageCard";
18
18
  s.displayName = "ImageCard.Image";
19
19
  i.displayName = "ImageCard.Title";
20
20
  l.displayName = "ImageCard.Subtitle";
21
21
  o.displayName = "ImageCard.Content";
22
22
  g.displayName = "ImageCard.Text";
23
- const f = Object.assign(d, {
23
+ const b = Object.assign(d, {
24
24
  Image: s,
25
25
  Content: o,
26
26
  Title: i,
@@ -28,5 +28,5 @@ const f = Object.assign(d, {
28
28
  Text: g
29
29
  });
30
30
  export {
31
- f as ImageCard
31
+ b as ImageCard
32
32
  };
@@ -0,0 +1,20 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ interface PaletteContextProps {
4
+ prefix?: string;
5
+ record: Record<string, string>;
6
+ }
7
+ interface PaletteGroupProps {
8
+ config: Record<string, Record<string, string>>;
9
+ }
10
+ interface SwatchContextProps {
11
+ swatchId: string;
12
+ swatch: string;
13
+ }
14
+ export declare const Palette: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & PaletteContextProps & import('react').RefAttributes<HTMLDivElement>>;
15
+ export declare const PaletteGroup: import('react').ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement> & PaletteContextProps & import('react').RefAttributes<HTMLDivElement> & PaletteGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
16
+ export declare const Swatch: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & SwatchContextProps & import('react').RefAttributes<HTMLDivElement>> & {
17
+ Canvas: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
18
+ Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
19
+ };
20
+ export {};
@@ -71,6 +71,13 @@ body {
71
71
  --color-button-bordered-text: #000000;
72
72
  --color-button-bordered-hover: #5f5f5f;
73
73
 
74
+ /* Carousel */
75
+ --color-carousel-dots-active: #1a1dd9;
76
+ --color-carousel-dots-default: #2c2525;
77
+ --color-carousel-dots-hover: #1a1dd9;
78
+ --color-carousel-arrow-default: #31a3dd;
79
+ --color-carousel-arrow-hover: #ae127a;
80
+
74
81
  /* Footer */
75
82
  --color-footer-bg: #1b54c6;
76
83
  --color-footer-text: #ffffff;
@@ -88,13 +95,6 @@ body {
88
95
  --color-tubestop-text-complete: #c9c8c8;
89
96
  --color-tubestop-text-future: #5b5b5b;
90
97
 
91
- /* Carousel */
92
- --color-carousel-dots-active: #1a1dd9;
93
- --color-carousel-dots-default: #2c2525;
94
- --color-carousel-dots-hover: #1a1dd9;
95
- --color-carousel-arrow-default: #31a3dd;
96
- --color-carousel-arrow-hover: #ae127a;
97
-
98
98
  /* Nav */
99
99
  --color-nav: #ae127a;
100
100
  }
@@ -48,12 +48,12 @@ body.theme-penrithmrt {
48
48
  --color-button-basic-hover: #cecece;
49
49
 
50
50
  /* Carousel */
51
- --color-carousel-arrow-default: '#3c2f71';
52
- --color-carousel-arrow-hover: '#e94439';
53
- --color-carousel-dots-default: '#3c2f71';
54
- --color-carousel-dots-active: '#e94439';
55
- --color-carousel-dots-hover: '#e94439';
56
-
51
+ --color-carousel-arrow-default: #3c2f71;
52
+ --color-carousel-arrow-hover: #e94439;
53
+ --color-carousel-dots-default: #3c2f71;
54
+ --color-carousel-dots-active: #e94439;
55
+ --color-carousel-dots-hover: #e94439;
56
+
57
57
  /* Footer */
58
58
  --color-footer-bg: #1b54c6;
59
59
  --color-footer-text: #ffffff;
@@ -1,4 +1,3 @@
1
- /* eslint-disable sort-keys */
2
1
  export default {
3
2
  primary: 'var(--color-primary)',
4
3
  secondary: 'var(--color-secondary)',
@@ -75,7 +74,7 @@ export default {
75
74
  hover: 'var(--color-carousel-arrow-hover)'
76
75
  },
77
76
  dots: {
78
- default: 'var(--color-carousel-dots-inactive)',
77
+ default: 'var(--color-carousel-dots-default)',
79
78
  active: 'var(--color-carousel-dots-active)',
80
79
  hover: 'var(--color-carousel-dots-hover)'
81
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trepur_components",
3
- "version": "2.3.28",
3
+ "version": "2.3.29",
4
4
  "description": "component lib",
5
5
  "author": "trepur_ttenneb",
6
6
  "private": false,