trepur_components 2.3.47 → 2.3.49

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 (96) hide show
  1. package/lib/assets/trepurComponentsLogo.svg +32 -0
  2. package/lib/components/Accordion/Accordion.stories.d.ts +1 -1
  3. package/lib/components/AlertBar/AlertBar.stories.d.ts +1 -1
  4. package/lib/components/AlertBar/index.js +6 -6
  5. package/lib/components/Breadcrumbs/Breadcrumbs.stories.d.ts +2 -2
  6. package/lib/components/Breadcrumbs/index.d.ts +1 -1
  7. package/lib/components/Breadcrumbs/index.js +4 -4
  8. package/lib/components/Button/Button.stories.d.ts +1 -1
  9. package/lib/components/Button/index.js +16 -15
  10. package/lib/components/Calendar/Calendar.stories.d.ts +1 -1
  11. package/lib/components/Calendar/index.js +1 -1
  12. package/lib/components/Card/Card.stories.d.ts +1 -1
  13. package/lib/components/Card/index.js +18 -23
  14. package/lib/components/Carousel/Carousel.stories.d.ts +1 -1
  15. package/lib/components/Carousel/index.d.ts +1 -1
  16. package/lib/components/Carousel/index.js +44 -44
  17. package/lib/components/CarouselThumbnail/CarouselThumbnail.stories.d.ts +1 -1
  18. package/lib/components/CarouselThumbnail/index.d.ts +1 -1
  19. package/lib/components/CarouselThumbnail/index.js +33 -32
  20. package/lib/components/Checkbox/Checkbox.stories.d.ts +1 -1
  21. package/lib/components/Collapsible/Collapsible.stories.d.ts +1 -1
  22. package/lib/components/Collapsible/index.d.ts +2 -2
  23. package/lib/components/Collapsible/index.js +40 -42
  24. package/lib/components/Counter/Counter.stories.d.ts +1 -1
  25. package/lib/components/Counter/index.js +6 -6
  26. package/lib/components/DetailUpdater/DetailUpdater.stories.d.ts +1 -1
  27. package/lib/components/DetailUpdater/index.d.ts +0 -1
  28. package/lib/components/Dropdown/Dropdown.stories.d.ts +1 -1
  29. package/lib/components/Dropdown/index.d.ts +1 -1
  30. package/lib/components/Dropdown/index.js +34 -32
  31. package/lib/components/FileUploader/FileUploader.stories.d.ts +1 -1
  32. package/lib/components/Footer/Footer.stories.d.ts +1 -1
  33. package/lib/components/FooterNav/FooterNav.stories.d.ts +3 -3
  34. package/lib/components/FooterNav/index.d.ts +3 -3
  35. package/lib/components/FooterNav/index.js +6 -5
  36. package/lib/components/Form/Form.stories.d.ts +1 -1
  37. package/lib/components/Form/index.d.ts +1 -1
  38. package/lib/components/Gallery/Gallery.stories.d.ts +1 -1
  39. package/lib/components/Gallery/index.d.ts +1 -1
  40. package/lib/components/Greeting/Greeting.stories.d.ts +1 -1
  41. package/lib/components/HamburgerIcon/HamburgerIcon.stories.d.ts +1 -1
  42. package/lib/components/Icon/Icon.stories.d.ts +1 -1
  43. package/lib/components/Icon/index.d.ts +1 -1
  44. package/lib/components/Image/Image.stories.d.ts +1 -1
  45. package/lib/components/ImageCard/ImageCard.stories.d.ts +1 -1
  46. package/lib/components/ImageCard/index.d.ts +1 -1
  47. package/lib/components/ImageCard/index.js +10 -9
  48. package/lib/components/Input/Input.stories.d.ts +3 -3
  49. package/lib/components/Input/index.d.ts +2 -2
  50. package/lib/components/Input/index.js +22 -21
  51. package/lib/components/Link/Link.stories.d.ts +1 -2
  52. package/lib/components/Link/index.js +18 -17
  53. package/lib/components/Map/Map.stories.d.ts +1 -1
  54. package/lib/components/Map/index.js +2 -2
  55. package/lib/components/Map/utils.d.ts +1 -1
  56. package/lib/components/Map/utils.js +3 -6
  57. package/lib/components/MenuButton/MenuButton.stories.d.ts +1 -1
  58. package/lib/components/Nav/Nav.stories.d.ts +2 -2
  59. package/lib/components/Nav/index.d.ts +2 -2
  60. package/lib/components/Nav/index.js +49 -49
  61. package/lib/components/NavItem/NavItem.stories.d.ts +5 -5
  62. package/lib/components/NavItem/index.d.ts +4 -4
  63. package/lib/components/Pill/Pill.stories.d.ts +1 -1
  64. package/lib/components/Pill/index.js +6 -6
  65. package/lib/components/Search/Search.stories.d.ts +1 -1
  66. package/lib/components/Select/Select.stories.d.ts +1 -1
  67. package/lib/components/Showcase/Showcase.stories.d.ts +1 -1
  68. package/lib/components/Showcase/index.d.ts +1 -1
  69. package/lib/components/SideNav/SideNav.stories.d.ts +1 -1
  70. package/lib/components/SocialButton/SocialButton.stories.d.ts +1 -1
  71. package/lib/components/SplitCard/SplitCard.stories.d.ts +1 -1
  72. package/lib/components/SplitCard/index.js +3 -3
  73. package/lib/components/Stars/Stars.stories.d.ts +1 -1
  74. package/lib/components/Testimonial/Testimonial.stories.d.ts +1 -1
  75. package/lib/components/Testimonial/index.d.ts +1 -1
  76. package/lib/components/TextArea/TextArea.stories.d.ts +2 -2
  77. package/lib/components/TextArea/index.d.ts +1 -1
  78. package/lib/components/TextArea/index.js +3 -3
  79. package/lib/components/Timeline/Timeline.stories.d.ts +1 -1
  80. package/lib/components/Timeline/index.js +14 -14
  81. package/lib/components/Tubestops/Tubestops.stories.d.ts +1 -1
  82. package/lib/components/Tubestops/index.js +58 -61
  83. package/lib/components/Video/Video.stories.d.ts +1 -1
  84. package/lib/components/Video/index.d.ts +1 -1
  85. package/lib/components/index.d.ts +37 -37
  86. package/lib/documentation/assets/index.d.ts +1 -1
  87. package/lib/documentation/typography/Fonts/Fonts.stories.d.ts +1 -1
  88. package/lib/node_modules/keen-slider/react.js +261 -294
  89. package/lib/style.css +1 -1
  90. package/lib/utils/matchMedia.js +1 -2
  91. package/lib/utils/screens.js +3 -7
  92. package/package.json +2 -2
  93. package/lib/components/Calendar/style.css.js +0 -1
  94. package/lib/components/Map/map.css.js +0 -1
  95. package/lib/node_modules/@maptiler/sdk/dist/maptiler-sdk.css.js +0 -1
  96. package/lib/node_modules/keen-slider/keen-slider.min.css.js +0 -1
@@ -1,25 +1,25 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { createContext as z, forwardRef as m, useState as g, useMemo as I, useContext as x } from "react";
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as m, useState as g, useMemo as z, createContext as I, useContext as x } from "react";
3
3
  import { Icon as w } from "../Icon/index.js";
4
- import { faChevronRight as K, faChevronLeft as L, faCircle as T } from "@fortawesome/fontawesome-free-solid";
4
+ import { faCircle as K, faChevronRight as L, faChevronLeft as T } from "@fortawesome/fontawesome-free-solid";
5
5
  import u from "clsx";
6
- import "../../node_modules/keen-slider/keen-slider.min.css.js";
6
+ /* empty css */
7
7
  import { useKeenSlider as $ } from "../../node_modules/keen-slider/react.js";
8
8
  import { WheelControls as M } from "./utils.js";
9
- const p = z(null), b = m(
9
+ const p = I(null), b = m(
10
10
  ({
11
- breakpoints: r,
11
+ breakpoints: o,
12
12
  children: t,
13
- className: o,
13
+ className: s,
14
14
  loop: e,
15
- perView: n,
15
+ perView: r,
16
16
  rubberband: c,
17
17
  spacing: l,
18
- ...s
18
+ ...a
19
19
  }, f) => {
20
20
  const [d, i] = g(0), [C, D] = g(!1), [y, v] = $(
21
21
  {
22
- breakpoints: r,
22
+ breakpoints: o,
23
23
  loop: e,
24
24
  rubberband: c,
25
25
  slideChanged(h) {
@@ -30,44 +30,44 @@ const p = z(null), b = m(
30
30
  },
31
31
  slides: {
32
32
  spacing: l,
33
- perView: n
33
+ perView: r
34
34
  }
35
35
  },
36
36
  [M]
37
- ), A = I(
37
+ ), A = z(
38
38
  () => ({
39
39
  sliderRef: y,
40
40
  instanceRef: v,
41
41
  currentSlide: d,
42
42
  setCurrentSlide: i,
43
- perView: n,
44
- ...s
43
+ perView: r,
44
+ ...a
45
45
  }),
46
46
  [
47
- s,
47
+ a,
48
48
  y,
49
49
  v.current,
50
50
  d,
51
51
  i,
52
- n,
52
+ r,
53
53
  C
54
54
  ]
55
55
  ), P = (h) => {
56
56
  var N;
57
57
  h.key === "Tab" && ((N = v.current) == null || N.next());
58
58
  };
59
- return /* @__PURE__ */ a(p.Provider, { value: A, children: /* @__PURE__ */ a(
59
+ return /* @__PURE__ */ n(p.Provider, { value: A, children: /* @__PURE__ */ n(
60
60
  "div",
61
61
  {
62
62
  onKeyDown: P,
63
- className: u("navigation-wrapper w-full", o),
63
+ className: u("navigation-wrapper w-full", s),
64
64
  ref: f,
65
- ...s,
65
+ ...a,
66
66
  children: t
67
67
  }
68
68
  ) });
69
69
  }
70
- ), k = m(({ children: r, className: t, ...o }, e) => /* @__PURE__ */ a(
70
+ ), k = m(({ children: o, className: t, ...s }, e) => /* @__PURE__ */ n(
71
71
  "div",
72
72
  {
73
73
  ref: e,
@@ -75,59 +75,59 @@ const p = z(null), b = m(
75
75
  "navigation-wrapper flex w-full justify-between gap-4",
76
76
  t
77
77
  ),
78
- ...o,
79
- children: r
78
+ ...s,
79
+ children: o
80
80
  }
81
- )), S = m(({ className: r, children: t, ...o }) => {
82
- const { sliderRef: e } = x(p) || {};
83
- return /* @__PURE__ */ a(
81
+ )), S = m(({ className: o, children: t, ...s }, e) => {
82
+ const { sliderRef: r } = x(p) || {};
83
+ return /* @__PURE__ */ n(
84
84
  "div",
85
85
  {
86
- ref: e,
87
- className: u("keen-slider w-full pb-4", r),
88
- ...o,
86
+ ref: r ?? e,
87
+ className: u("keen-slider w-full pb-4", o),
88
+ ...s,
89
89
  children: t
90
90
  }
91
91
  );
92
- }), R = m(({ className: r, rightArrow: t = !1, ...o }, e) => {
93
- const { instanceRef: n } = x(p) || {};
94
- return /* @__PURE__ */ a(
92
+ }), R = m(({ className: o, rightArrow: t = !1, ...s }, e) => {
93
+ const { instanceRef: r } = x(p) || {};
94
+ return /* @__PURE__ */ n(
95
95
  "div",
96
96
  {
97
97
  ref: e,
98
98
  className: u(
99
99
  "hidden md:block my-auto text-carousel-arrow-default hover:cursor-pointer hover:text-carousel-arrow-hover",
100
- r
100
+ o
101
101
  ),
102
102
  onClick: (c) => {
103
- var l, s;
104
- t ? c.stopPropagation() !== void 0 || ((l = n.current) == null || l.next()) : c.stopPropagation() !== void 0 || ((s = n.current) == null || s.prev());
103
+ var l, a;
104
+ t ? c.stopPropagation() !== void 0 || ((l = r.current) == null || l.next()) : c.stopPropagation() !== void 0 || ((a = r.current) == null || a.prev());
105
105
  },
106
- ...o,
107
- children: /* @__PURE__ */ a(w, { icon: t ? K : L, size: "3x" })
106
+ ...s,
107
+ children: /* @__PURE__ */ n(w, { icon: t ? L : T, size: "3x" })
108
108
  }
109
109
  );
110
- }), j = m(({ className: r, ...t }, o) => {
111
- var l, s, f, d;
112
- const { instanceRef: e, currentSlide: n } = x(p) || {}, c = (d = (f = (s = (l = e == null ? void 0 : e.current) == null ? void 0 : l.track) == null ? void 0 : s.details) == null ? void 0 : f.slides) == null ? void 0 : d.length;
113
- return /* @__PURE__ */ a("div", { className: u("flex justify-center gap-0.5 pt-2", r), children: [...Array(c).keys()].map((i) => /* @__PURE__ */ a(
110
+ }), j = m(({ className: o, ...t }, s) => {
111
+ var l, a, f, d;
112
+ const { instanceRef: e, currentSlide: r } = x(p) || {}, c = (d = (f = (a = (l = e == null ? void 0 : e.current) == null ? void 0 : l.track) == null ? void 0 : a.details) == null ? void 0 : f.slides) == null ? void 0 : d.length;
113
+ return /* @__PURE__ */ n("div", { className: u("flex justify-center gap-0.5 pt-2", o), children: [...Array(c).keys()].map((i) => /* @__PURE__ */ n(
114
114
  "button",
115
115
  {
116
- ref: o,
116
+ ref: s,
117
117
  type: "button",
118
118
  onClick: () => {
119
119
  var C;
120
120
  (C = e.current) == null || C.moveToIdx(i);
121
121
  },
122
122
  "aria-label": `carousel-button${t.id ? `-${t.id}` : ""}`,
123
- children: /* @__PURE__ */ a(
123
+ children: /* @__PURE__ */ n(
124
124
  w,
125
125
  {
126
126
  className: u(
127
127
  "hover:text-carousel-dots-hover",
128
- n === i ? "text-carousel-dots-active" : "text-carousel-dots-default"
128
+ r === i ? "text-carousel-dots-active" : "text-carousel-dots-default"
129
129
  ),
130
- icon: T,
130
+ icon: K,
131
131
  size: "xl"
132
132
  }
133
133
  )
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { CarouselThumbnail } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { KeenSliderInstance, KeenSliderHooks, KeenSliderOptions } from 'keen-slider/react';
2
1
  import { HTMLAttributes } from 'react';
2
+ import { KeenSliderInstance, KeenSliderHooks, KeenSliderOptions } from 'keen-slider/react';
3
3
 
4
4
  export interface CarouselThumbnailContextProps {
5
5
  slideWrapperClassName?: string;
@@ -1,35 +1,35 @@
1
- import { jsx as l, jsxs as f, Fragment as C } from "react/jsx-runtime";
2
- import { createContext as T, forwardRef as o, useMemo as x, useContext as v } from "react";
1
+ import { jsx as i, jsxs as C, Fragment as T } from "react/jsx-runtime";
2
+ import { forwardRef as o, useMemo as x, createContext as v, useContext as N } from "react";
3
3
  import t from "clsx";
4
- import "../../node_modules/keen-slider/keen-slider.min.css.js";
4
+ /* empty css */
5
5
  import { useKeenSlider as a } from "../../node_modules/keen-slider/react.js";
6
- import { breakpointsToRender as N } from "./const.js";
7
- import { WheelControls as S, ThumbnailPlugin as g } from "./utils.js";
8
- const m = T(null), u = o(({ children: i, className: e, ...r }, s) => {
6
+ import { breakpointsToRender as S } from "./const.js";
7
+ import { WheelControls as g, ThumbnailPlugin as w } from "./utils.js";
8
+ const m = v(null), u = o(({ children: r, className: l, ...e }, s) => {
9
9
  const n = x(
10
10
  () => ({
11
- ...r
11
+ ...e
12
12
  }),
13
- [r]
13
+ [e]
14
14
  );
15
- return /* @__PURE__ */ l(m.Provider, { value: n, children: /* @__PURE__ */ l(
15
+ return /* @__PURE__ */ i(m.Provider, { value: n, children: /* @__PURE__ */ i(
16
16
  "div",
17
17
  {
18
18
  ref: s,
19
- className: t("navigation-wrapper w-full", e),
20
- ...r,
21
- children: i
19
+ className: t("navigation-wrapper w-full", l),
20
+ ...e,
21
+ children: r
22
22
  }
23
23
  ) });
24
- }), d = o(({ className: i, children: e }) => {
25
- const { rubberband: r, loop: s, ...n } = v(m) || {}, [b, p] = a(
24
+ }), d = o(({ className: r, children: l }, e) => {
25
+ const { rubberband: s, loop: n, ...b } = N(m) || {}, [p, h] = a(
26
26
  {
27
- breakpoints: N,
28
- loop: s,
29
- rubberband: r
27
+ breakpoints: S,
28
+ loop: n,
29
+ rubberband: s
30
30
  },
31
- [S]
32
- ), [h] = a(
31
+ [g]
32
+ ), [f] = a(
33
33
  {
34
34
  initial: 0,
35
35
  slides: {
@@ -37,38 +37,39 @@ const m = T(null), u = o(({ children: i, className: e, ...r }, s) => {
37
37
  spacing: 10
38
38
  }
39
39
  },
40
- [g(p)]
40
+ [w(h)]
41
41
  );
42
- return /* @__PURE__ */ f(C, { children: [
43
- /* @__PURE__ */ l(
42
+ return /* @__PURE__ */ C(T, { children: [
43
+ /* @__PURE__ */ i(
44
44
  "div",
45
45
  {
46
- ref: b,
46
+ ref: p ?? e,
47
47
  className: t(
48
48
  "keen-slider h-96 w-full rounded-t-2xl pb-4",
49
- i
49
+ r
50
50
  ),
51
- ...n,
52
- children: e
51
+ ...b,
52
+ children: l
53
53
  }
54
54
  ),
55
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("div", { ref: h, className: "keen-slider thumbnail h-24 w-16", children: e }) })
55
+ /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i("div", { ref: f, className: "keen-slider thumbnail h-24 w-16", children: l }) })
56
56
  ] });
57
- }), c = o(({ src: i, ...e }) => /* @__PURE__ */ l(
57
+ }), c = o(({ src: r, ...l }, e) => /* @__PURE__ */ i(
58
58
  "img",
59
59
  {
60
+ ref: e,
60
61
  className: "keen-slider__slide rounded-t-2xl object-cover",
61
- src: i,
62
- ...e
62
+ src: r,
63
+ ...l
63
64
  }
64
65
  ));
65
66
  u.displayName = "CarouselThumbnail";
66
67
  d.displayName = "CarouselThumbnail.Slides";
67
68
  c.displayName = "CarouselThumbnail.Slide";
68
- const F = Object.assign(u, {
69
+ const K = Object.assign(u, {
69
70
  Slides: d,
70
71
  Slide: c
71
72
  });
72
73
  export {
73
- F as CarouselThumbnail
74
+ K as CarouselThumbnail
74
75
  };
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { Checkbox } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { Collapsible } from '.';
2
1
  import { StoryObj } from '@storybook/react';
2
+ import { Collapsible } from '.';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,11 +1,11 @@
1
- import { ImageProps } from '../Image';
2
1
  import { HTMLAttributes } from 'react';
2
+ import { ImageProps } from '../Image';
3
3
 
4
4
  export interface CollapsibleContextProps {
5
5
  loading?: boolean;
6
6
  expanded?: boolean;
7
7
  setExpanded?: (expanded: boolean) => void;
8
- expandFully?: boolean;
8
+ defaultExpanded?: boolean;
9
9
  }
10
10
  declare const Collapsible: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & CollapsibleContextProps & import('react').RefAttributes<HTMLDivElement>> & {
11
11
  Header: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,21 +1,20 @@
1
- import { jsx as t, jsxs as H } from "react/jsx-runtime";
2
- import { createContext as T, forwardRef as o, useState as I, useMemo as S, useContext as c } from "react";
3
- import { Icon as j } from "../Icon/index.js";
4
- import { Image as L } from "../Image/index.js";
5
- import { faChevronDown as k, faChevronUp as q } from "@fortawesome/fontawesome-free-solid";
1
+ import { jsx as s, jsxs as H } from "react/jsx-runtime";
2
+ import { forwardRef as o, useState as T, useMemo as I, createContext as S, useContext as c } from "react";
3
+ import { Icon as L } from "../Icon/index.js";
4
+ import { Image as j } from "../Image/index.js";
5
+ import { faChevronDown as M, faChevronUp as _ } from "@fortawesome/fontawesome-free-solid";
6
6
  import n from "clsx";
7
- const r = T(null), x = o(
8
- ({ id: e, className: l, children: a, loading: s, expandFully: i = !1, ...m }, g) => {
9
- const [p, d] = I(!1), w = S(
7
+ const m = S(null), x = o(
8
+ ({ id: e, className: l, children: t, loading: a, defaultExpanded: i = !1, ...r }, g) => {
9
+ const [p, d] = T(i), w = I(
10
10
  () => ({
11
- loading: s,
11
+ loading: a,
12
12
  expanded: p,
13
- setExpanded: d,
14
- expandFully: i
13
+ setExpanded: d
15
14
  }),
16
- [s, p, d]
15
+ [a, p, d]
17
16
  );
18
- return /* @__PURE__ */ t(r.Provider, { value: w, children: /* @__PURE__ */ t(
17
+ return /* @__PURE__ */ s(m.Provider, { value: w, children: /* @__PURE__ */ s(
19
18
  "div",
20
19
  {
21
20
  id: e,
@@ -24,81 +23,80 @@ const r = T(null), x = o(
24
23
  l
25
24
  ),
26
25
  ref: g,
27
- ...m,
28
- children: a
26
+ ...r,
27
+ children: t
29
28
  }
30
29
  ) });
31
30
  }
32
- ), C = o(({ className: e, children: l, ...a }, s) => {
33
- const { expanded: i, setExpanded: m } = c(r) || {};
31
+ ), C = o(({ className: e, children: l, ...t }, a) => {
32
+ const { expanded: i, setExpanded: r } = c(m) || {};
34
33
  return /* @__PURE__ */ H(
35
34
  "div",
36
35
  {
37
36
  className: n("flex h-24 pr-4 sm:pr-8", e),
38
- onClick: () => m == null ? void 0 : m(!i),
39
- ref: s,
40
- ...a,
37
+ onClick: () => r == null ? void 0 : r(!i),
38
+ ref: a,
39
+ ...t,
41
40
  children: [
42
41
  l,
43
- /* @__PURE__ */ t("div", { className: "my-auto flex-none", children: /* @__PURE__ */ t(j, { icon: i ? k : q }) })
42
+ /* @__PURE__ */ s("div", { className: "my-auto flex-none", children: /* @__PURE__ */ s(L, { icon: i ? M : _ }) })
44
43
  ]
45
44
  }
46
45
  );
47
- }), b = o(({ children: e, className: l, ...a }, s) => /* @__PURE__ */ t(
46
+ }), b = o(({ children: e, className: l, ...t }, a) => /* @__PURE__ */ s(
48
47
  "div",
49
48
  {
50
49
  className: n("mx-4 my-auto grid w-full", l),
51
- ref: s,
52
- ...a,
50
+ ref: a,
51
+ ...t,
53
52
  children: e
54
53
  }
55
- )), u = o(({ className: e, src: l, ...a }, s) => /* @__PURE__ */ t("div", { ref: s, className: n("aspect-square flex-none p-4", e), children: /* @__PURE__ */ t(L, { src: l, className: "h-full rounded-2xl", ...a }) })), f = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
54
+ )), u = o(({ className: e, src: l, ...t }, a) => /* @__PURE__ */ s("div", { ref: a, className: n("aspect-square flex-none p-4", e), children: /* @__PURE__ */ s(j, { src: l, className: "h-full rounded-2xl", ...t }) })), N = o(({ className: e, ...l }, t) => /* @__PURE__ */ s(
56
55
  "p",
57
56
  {
58
57
  className: n("text-xxs text-light-grey truncate md:text-xs", e),
59
- ref: a,
58
+ ref: t,
60
59
  ...l
61
60
  }
62
- )), N = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
61
+ )), f = o(({ className: e, ...l }, t) => /* @__PURE__ */ s(
63
62
  "p",
64
63
  {
65
64
  className: n("md:text-md truncate text-sm", e),
66
- ref: a,
65
+ ref: t,
67
66
  ...l
68
67
  }
69
- )), h = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
68
+ )), h = o(({ className: e, ...l }, t) => /* @__PURE__ */ s(
70
69
  "p",
71
70
  {
72
71
  className: n("truncate text-xs md:text-sm", e),
73
- ref: a,
72
+ ref: t,
74
73
  ...l
75
74
  }
76
- )), y = o(({ children: e, className: l, ...a }, s) => {
77
- const { expanded: i, expandFully: m } = c(r) || {};
78
- return /* @__PURE__ */ t(
75
+ )), y = o(({ children: e, className: l, ...t }, a) => {
76
+ const { expanded: i } = c(m) || {};
77
+ return /* @__PURE__ */ s(
79
78
  "div",
80
79
  {
81
80
  className: n(
82
81
  "w-auto overflow-scroll px-4 transition-max-height duration-300",
83
82
  {
84
- "max-h-32": i && !m,
85
- "max-h-full": i && m,
83
+ "max-h-[800px]": i,
86
84
  "max-h-0": !i
87
85
  },
88
86
  l
89
87
  ),
90
- ref: s,
91
- ...a,
88
+ ref: a,
89
+ ...t,
92
90
  children: e
93
91
  }
94
92
  );
95
- }), v = o(({ className: e, ...l }, a) => /* @__PURE__ */ t("p", { className: n("text-xs md:text-sm", e), ref: a, ...l }));
93
+ }), v = o(({ children: e, className: l, ...t }, a) => /* @__PURE__ */ s("p", { className: n("text-xs md:text-sm pb-6", l), ref: a, ...t, dangerouslySetInnerHTML: { __html: e } }));
96
94
  x.displayName = "Collapsible";
97
95
  C.displayName = "Collapsible.Header";
98
96
  y.displayName = "Collapsible.Content";
99
97
  u.displayName = "Collapsible.Image";
100
- f.displayName = "Collapsible.Label";
101
- N.displayName = "Collapsible.Title";
98
+ N.displayName = "Collapsible.Label";
99
+ f.displayName = "Collapsible.Title";
102
100
  h.displayName = "Collapsible.Subtitle";
103
101
  b.displayName = "Collapsible.HeaderContent";
104
102
  v.displayName = "Collapsible.Text";
@@ -106,8 +104,8 @@ const U = Object.assign(x, {
106
104
  Header: C,
107
105
  HeaderContent: b,
108
106
  Image: u,
109
- Label: f,
110
- Title: N,
107
+ Label: N,
108
+ Title: f,
111
109
  Subtitle: h,
112
110
  Content: y,
113
111
  Text: v
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { Counter } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,9 +1,9 @@
1
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";
2
+ import { forwardRef as t, useState as f, useMemo as I, createContext as v, useContext as c } from "react";
3
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(
4
+ import { faChevronCircleRight as h, faChevronCircleLeft as N } from "@fortawesome/fontawesome-free-solid";
5
+ const r = v(null), a = t(({ children: e, count: o = 0 }, d) => {
6
+ const [u, s] = f(o), p = I(
7
7
  () => ({
8
8
  currentCount: u,
9
9
  setCurrentCount: s
@@ -16,7 +16,7 @@ const r = f(null), a = t(({ children: e, count: o = 0 }, d) => {
16
16
  return /* @__PURE__ */ n("div", { className: "my-auto cursor-pointer", children: /* @__PURE__ */ n(
17
17
  i,
18
18
  {
19
- icon: h,
19
+ icon: N,
20
20
  onClick: () => e == null ? void 0 : e(o - 1)
21
21
  }
22
22
  ) });
@@ -25,7 +25,7 @@ const r = f(null), a = t(({ children: e, count: o = 0 }, d) => {
25
25
  return /* @__PURE__ */ n("div", { className: "my-auto cursor-pointer", children: /* @__PURE__ */ n(
26
26
  i,
27
27
  {
28
- icon: N,
28
+ icon: h,
29
29
  onClick: () => e == null ? void 0 : e(o + 1)
30
30
  }
31
31
  ) });
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { DetailUpdater } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface DetailUpdatesProps {
3
2
  id?: string;
4
3
  className?: string;
@@ -1,5 +1,5 @@
1
- import { StoryObj } from '@storybook/react';
2
1
  import { Dropdown } from './';
2
+ import { StoryObj } from '@storybook/react';
3
3
 
4
4
  declare const meta: {
5
5
  title: string;
@@ -1,5 +1,5 @@
1
- import { ButtonProps } from '../Button';
2
1
  import { HTMLAttributes } from 'react';
2
+ import { ButtonProps } from '../Button';
3
3
 
4
4
  export interface DropdownContextProps {
5
5
  showDropdown?: boolean;
@@ -1,45 +1,47 @@
1
- import { jsx as n, jsxs as w } from "react/jsx-runtime";
2
- import { createContext as f, forwardRef as r, useState as D, useRef as b, useMemo as x, useContext as a } from "react";
3
- import { Button as l } from "../Button/index.js";
4
- import { faChevronDown as y } from "@fortawesome/fontawesome-free-solid";
5
- import { useClickOutside as v } from "./utils.js";
6
- const s = f(null), d = r(({ children: t }) => {
7
- const [o, e] = D(!1), i = b(null), u = x(
1
+ import { jsx as r, jsxs as f } from "react/jsx-runtime";
2
+ import { forwardRef as s, useState as D, useRef as b, useMemo as x, createContext as y, useContext as i } from "react";
3
+ import { Button as d } from "../Button/index.js";
4
+ import { faChevronDown as v } from "@fortawesome/fontawesome-free-solid";
5
+ import { useClickOutside as C } from "./utils.js";
6
+ const a = y(null), c = s(({ children: t }, n) => {
7
+ const [o, e] = D(!1), l = b(null), w = x(
8
8
  () => ({
9
9
  showDropdown: o,
10
10
  setShowDropdown: e
11
11
  }),
12
12
  [o, e]
13
13
  );
14
- return v(i, () => {
14
+ return C(l, () => {
15
15
  e(!1);
16
- }), /* @__PURE__ */ n(s.Provider, { value: u, children: /* @__PURE__ */ n("div", { ref: i, className: "relative inline-block text-left", children: t }) });
17
- }), c = r(({ children: t }) => {
18
- const { showDropdown: o, setShowDropdown: e } = a(s) || {};
19
- return /* @__PURE__ */ w(l, { onClick: () => e == null ? void 0 : e(!o), children: [
16
+ }), /* @__PURE__ */ r(a.Provider, { value: w, children: /* @__PURE__ */ r("div", { ref: l ?? n, className: "relative inline-block text-left", children: t }) });
17
+ }), m = s(({ children: t }, n) => {
18
+ const { showDropdown: o, setShowDropdown: e } = i(a) || {};
19
+ return /* @__PURE__ */ f(d, { ref: n, onClick: () => e == null ? void 0 : e(!o), children: [
20
20
  t,
21
- /* @__PURE__ */ n(l.Icon, { icon: y })
21
+ /* @__PURE__ */ r(d.Icon, { icon: v })
22
22
  ] });
23
- }), m = r(
24
- ({ children: t }) => {
25
- const { showDropdown: o } = a(s) || {};
26
- return o ? /* @__PURE__ */ n(
23
+ }), p = s(
24
+ ({ children: t }, n) => {
25
+ const { showDropdown: o } = i(a) || {};
26
+ return o ? /* @__PURE__ */ r(
27
27
  "div",
28
28
  {
29
+ ref: n,
29
30
  className: "z-50 mt-2 w-48 rounded-lg border-2 bg-primary text-white",
30
31
  role: "menu",
31
32
  "aria-orientation": "vertical",
32
33
  "aria-labelledby": "menu-button",
33
- children: /* @__PURE__ */ n("ul", { className: "py-1 text-sm", children: t })
34
+ children: /* @__PURE__ */ r("ul", { className: "py-1 text-sm", children: t })
34
35
  }
35
- ) : /* @__PURE__ */ n("div", {});
36
+ ) : /* @__PURE__ */ r("div", {});
36
37
  }
37
- ), p = r(
38
- ({ children: t }) => {
39
- const { setShowDropdown: o } = a(s) || {};
40
- return /* @__PURE__ */ n(
38
+ ), u = s(
39
+ ({ children: t }, n) => {
40
+ const { setShowDropdown: o } = i(a) || {};
41
+ return /* @__PURE__ */ r(
41
42
  "li",
42
43
  {
44
+ ref: n,
43
45
  className: "px-4 py-2",
44
46
  onClick: () => {
45
47
  o == null || o(!1);
@@ -52,15 +54,15 @@ const s = f(null), d = r(({ children: t }) => {
52
54
  );
53
55
  }
54
56
  );
55
- d.displayName = "Dropdown";
56
- c.displayName = "Dropdown.Label";
57
- m.displayName = "Dropdown.List";
58
- p.displayName = "Dropdown.Item";
59
- const I = Object.assign(d, {
60
- Label: c,
61
- List: m,
62
- Item: p
57
+ c.displayName = "Dropdown";
58
+ m.displayName = "Dropdown.Label";
59
+ p.displayName = "Dropdown.List";
60
+ u.displayName = "Dropdown.Item";
61
+ const g = Object.assign(c, {
62
+ Label: m,
63
+ List: p,
64
+ Item: u
63
65
  });
64
66
  export {
65
- I as Dropdown
67
+ g as Dropdown
66
68
  };