allaw-ui 2.2.6 → 2.2.8

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,3 +1,4 @@
1
+ "use client";
1
2
  import React, { useState, useEffect } from "react";
2
3
  import Image from "next/image";
3
4
  import styles from "./Banner.module.css";
@@ -3,7 +3,6 @@ export type FlexContentProps = {
3
3
  reverse?: boolean;
4
4
  title?: string;
5
5
  sectionTitle: string;
6
- content: string;
7
6
  action?: {
8
7
  href: string;
9
8
  label: string;
@@ -13,6 +12,7 @@ export type FlexContentProps = {
13
12
  alt: string;
14
13
  };
15
14
  imageWidthPercentage?: number;
15
+ children?: any;
16
16
  };
17
17
  declare const FlexContent: React.FC<FlexContentProps>;
18
18
  export default FlexContent;
@@ -3,7 +3,7 @@ import styles from "./flexContent.module.css";
3
3
  import Image from "next/image";
4
4
  import Link from "next/link";
5
5
  var FlexContent = function (_a) {
6
- var _b = _a.reverse, reverse = _b === void 0 ? false : _b, title = _a.title, sectionTitle = _a.sectionTitle, content = _a.content, action = _a.action, imageContent = _a.imageContent, _c = _a.imageWidthPercentage, imageWidthPercentage = _c === void 0 ? 60 : _c;
6
+ var _b = _a.reverse, reverse = _b === void 0 ? false : _b, title = _a.title, sectionTitle = _a.sectionTitle, action = _a.action, imageContent = _a.imageContent, _c = _a.imageWidthPercentage, imageWidthPercentage = _c === void 0 ? 60 : _c, children = _a.children;
7
7
  var safeImageWidth = Math.max(10, Math.min(imageWidthPercentage, 90));
8
8
  var textWidth = 100 - safeImageWidth;
9
9
  return (React.createElement("section", { className: styles.flexContentContainer, "aria-labelledby": sectionTitle },
@@ -12,8 +12,8 @@ var FlexContent = function (_a) {
12
12
  React.createElement("div", { className: "".concat(styles.flexContentLeftWrapper, " ").concat(styles.desktopWidth), style: { width: "".concat(textWidth, "%") } },
13
13
  React.createElement("div", { className: styles.flexContentLeft },
14
14
  React.createElement("h3", { className: styles.flexContentSectionTitle }, sectionTitle),
15
- React.createElement("p", { className: styles.flexContentDescription }, content),
16
- action && (React.createElement(Link, { href: action.href, className: styles.flexContentButton },
15
+ React.createElement("p", { className: styles.flexContentDescription }, children),
16
+ (action === null || action === void 0 ? void 0 : action.href) && (React.createElement(Link, { href: action.href, className: styles.flexContentButton },
17
17
  React.createElement("span", { className: styles.flexContentButtonLabel }, action.label))))),
18
18
  (imageContent === null || imageContent === void 0 ? void 0 : imageContent.src) && (React.createElement("div", { className: styles.flexContentRight, style: { width: "".concat(safeImageWidth, "%") } },
19
19
  React.createElement(Image, { src: imageContent.src, alt: imageContent.alt, className: styles.flexContentImage, width: 1240, height: 550 }))))));
@@ -7,7 +7,7 @@
7
7
  gap: 90px;
8
8
  width: 100%;
9
9
  height: auto;
10
- min-height: 675px;
10
+ min-height: fit-content;
11
11
  }
12
12
 
13
13
  .flexContentTitle {
@@ -133,7 +133,7 @@
133
133
  overflow: hidden;
134
134
  }
135
135
 
136
- @media (max-width: 1200px) {
136
+ @media (max-width: 1000px) {
137
137
  .flexContentButton {
138
138
  align-self: stretch;
139
139
  justify-content: center;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",