@joza/joza-ui-kit 0.1.9 → 0.1.11

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.
@@ -57,8 +57,11 @@ const Button2 = ({ label, size = "", style = "", disabled = false, icon: Icon, c
57
57
 
58
58
  var styles$b = {"carousel":"carousel-module_carousel__wqzvf","carousel__track":"carousel-module_carousel__track__tYeyk","carousel__logo":"carousel-module_carousel__logo__Rm8zv"};
59
59
 
60
- const Carousel = ({ imgs }) => {
61
- return (jsx("div", { className: styles$b.carousel, children: jsx("div", { className: styles$b.carousel__track, children: imgs.map((item, index) => (jsx("div", { className: styles$b.carousel__logo, children: jsx("img", { src: item.src, alt: item.alt }) }, `first-${index}`))) }) }));
60
+ const Carousel = (props) => {
61
+ const { imgs, ImageComponent } = props;
62
+ // Pas de "as any" : au pire un cast sûr vers ElementType (pas d'any)
63
+ const Img = ImageComponent ?? "img";
64
+ return (jsx("div", { className: styles$b.carousel, children: jsx("div", { className: styles$b.carousel__track, children: imgs.map((imgProps, index) => (jsx("div", { className: styles$b.carousel__logo, children: jsx(Img, { ...imgProps }) }, `img-${index}`))) }) }));
62
65
  };
63
66
 
64
67
  /**
@@ -290,10 +293,12 @@ var styles$9 = {"horizontalMenu":"horizontal-menu-module_horizontalMenu__x03o-",
290
293
  const HorizontalMenu = ({ logo, items, cta }) => {
291
294
  const [isMenuOpen, setIsMenuOpen] = useState(false);
292
295
  return (jsx("nav", { className: styles$9.horizontalMenu, children: jsxs("div", { className: styles$9.horizontalMenu__container, children: [jsxs("div", { className: styles$9.horizontalMenu__inner, children: [logo &&
293
- jsx("a", { href: "#", className: styles$9.horizontalMenu__logo, children: jsx("img", { src: logo.src, alt: logo.alt }) }), jsx("div", { className: styles$9.horizontalMenu__menu, children: jsx("div", { className: styles$9.horizontalMenu__list, children: items.map((item) => (jsx("a", { href: item.href, className: styles$9.horizontalMenu__link, children: item.label }, item.label))) }) }), jsx("div", { className: styles$9.horizontalMenu__cta, children: jsx(Button2, { label: cta.label, onClick: cta.action }) }), jsx("div", { className: styles$9.horizontalMenu__mobile_toggle, children: jsx(Button2, { style: "ghost", onClick: () => setIsMenuOpen(!isMenuOpen), children: isMenuOpen ? jsx(X, { style: { width: '1.5rem', height: '1.5rem' } }) : jsx(Menu, { style: { width: '1.5rem', height: '1.5rem' } }) }) })] }), isMenuOpen && (jsx("div", { className: styles$9.horizontalMenu__mobile_menu, children: jsxs("div", { className: styles$9.horizontalMenu__mobile_content, children: [items.map((item) => (jsx("a", { href: item.href, className: styles$9.horizontalMenu__mobile_link, onClick: () => setIsMenuOpen(false), children: item.label }, item.label))), jsx("div", { className: styles$9.horizontalMenu__mobile_cta, children: jsx(Button2, { label: cta.label, onClick: () => {
294
- cta.action();
295
- setIsMenuOpen(false);
296
- }, size: "full" }) })] }) }))] }) }));
296
+ jsx("a", { href: "#", className: styles$9.horizontalMenu__logo, children: jsx("img", { src: logo.src, alt: logo.alt }) }), jsx("div", { className: styles$9.horizontalMenu__menu, children: jsx("div", { className: styles$9.horizontalMenu__list, children: items.map((item) => (jsx("a", { href: item.href, className: styles$9.horizontalMenu__link, children: item.label }, item.label))) }) }), cta &&
297
+ jsx("div", { className: styles$9.horizontalMenu__cta, children: jsx(Button2, { label: cta.label, onClick: cta.action }) }), jsx("div", { className: styles$9.horizontalMenu__mobile_toggle, children: jsx(Button2, { style: "ghost", onClick: () => setIsMenuOpen(!isMenuOpen), children: isMenuOpen ? jsx(X, { style: { width: '1.5rem', height: '1.5rem' } }) : jsx(Menu, { style: { width: '1.5rem', height: '1.5rem' } }) }) })] }), isMenuOpen && (jsx("div", { className: styles$9.horizontalMenu__mobile_menu, children: jsxs("div", { className: styles$9.horizontalMenu__mobile_content, children: [items.map((item) => (jsx("a", { href: item.href, className: styles$9.horizontalMenu__mobile_link, onClick: () => setIsMenuOpen(false), children: item.label }, item.label))), cta &&
298
+ jsx("div", { className: styles$9.horizontalMenu__mobile_cta, children: jsx(Button2, { label: cta.label, onClick: () => {
299
+ cta.action();
300
+ setIsMenuOpen(false);
301
+ }, size: "full" }) })] }) }))] }) }));
297
302
  };
298
303
 
299
304
  var styles$8 = {"horizontalPoints__container":"horizontal-points-module_horizontalPoints__container__mRGx9","horizontalPoints__item":"horizontal-points-module_horizontalPoints__item__xnRLO"};