mautourco-components 0.2.62 → 0.2.64

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.
@@ -23,5 +23,5 @@ export interface ButtonProps {
23
23
  /** Classes CSS supplémentaires */
24
24
  className?: string;
25
25
  }
26
- declare const Button: React.FC<ButtonProps>;
26
+ declare function Button({ variant, size, children, leadingIcon, trailingIcon, iconSize, disabled, onClick, type, className, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
27
27
  export default Button;
@@ -1,25 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from '../Icon/Icon';
3
3
  import './Button.css';
4
- var Button = function (_a) {
4
+ function Button(_a) {
5
5
  var _b = _a.variant, variant = _b === void 0 ? 'primary' : _b, _c = _a.size, size = _c === void 0 ? 'md' : _c, children = _a.children, leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, _d = _a.iconSize, iconSize = _d === void 0 ? 'sm' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, _f = _a.type, type = _f === void 0 ? 'button' : _f, _g = _a.className, className = _g === void 0 ? '' : _g;
6
6
  var baseClasses = 'button';
7
7
  var normalizedVariant = variant === 'outline' ? 'outline-primary' : variant;
8
8
  var variantClass = "button--".concat(normalizedVariant);
9
9
  var sizeClass = "button--".concat(size);
10
10
  var disabledClass = disabled ? 'button--disabled' : '';
11
- var buttonClasses = [
12
- baseClasses,
13
- variantClass,
14
- sizeClass,
15
- disabledClass,
16
- className,
17
- ]
11
+ var buttonClasses = [baseClasses, variantClass, sizeClass, disabledClass, className]
18
12
  .filter(Boolean)
19
13
  .join(' ');
20
14
  var hasLeadingIcon = Boolean(leadingIcon);
21
15
  var hasTrailingIcon = Boolean(trailingIcon);
22
16
  var withIconClass = hasLeadingIcon || hasTrailingIcon ? 'button--with-icon' : '';
23
17
  return (_jsxs("button", { type: type, className: [buttonClasses, withIconClass].filter(Boolean).join(' '), disabled: disabled, onClick: onClick, children: [hasLeadingIcon && (_jsx("span", { className: "button__icon button__icon--leading", children: _jsx(Icon, { name: leadingIcon, size: iconSize }) })), _jsx("span", { className: "button__label", children: children }), hasTrailingIcon && (_jsx("span", { className: "button__icon button__icon--trailing", children: _jsx(Icon, { name: trailingIcon, size: iconSize }) }))] }));
24
- };
18
+ }
25
19
  export default Button;
@@ -16,6 +16,5 @@ import TextWithIcon from '../../molecules/TextWithIcon/TextWithIcon';
16
16
  import TimelineItem from '../../molecules/TimelineItem/TimelineItem';
17
17
  export function Timeline(props) {
18
18
  var arrival = props.arrival, departure = props.departure, services = props.services, className = props.className;
19
- return (_jsxs("div", { className: cn('space-y-10', className), children: [_jsxs(TextWithIcon, { icon: "arrival", color: "accent", iconSize: "lg", textSize: "lg", children: ["Arrival :", ' ', _jsx(Text, { variant: "regular", size: "lg", leading: "5", color: "default", as: "span", children: arrival })] }), _jsx("div", { className: "overflow-x-auto overflow-y-hidden", children: _jsx("div", { className: "flex gap-x-3 pb-8 2xl:pb-0", children: services.map(function (service, index) { return (_jsxs(TimelineItem, { children: [service.type === 'transfer' && (_jsx(TimelineItem.Transfer, __assign({}, service.data))), service.type === 'accommodation' && (_jsx(TimelineItem.Accommodation, __assign({}, service.data))), service.type === 'excursion' && (_jsx(TimelineItem.Excursion, __assign({}, service.data)))] }, "tm-".concat(index))); }) }) }), _jsxs(TextWithIcon, { icon: "departure", color: "accent", iconSize: "lg", textSize: "lg", children: ["Departure :", ' ', _jsx(Text, { variant: "regular", size: "lg", leading: "5", color: "default", as: "span", children: departure })] })] }));
19
+ return (_jsxs("div", { className: cn('space-y-10', className), children: [_jsxs(TextWithIcon, { icon: "arrival", color: "accent", iconSize: "lg", textSize: "lg", children: ["Arrival :", ' ', _jsx(Text, { variant: "regular", size: "lg", leading: "5", color: "default", as: "span", children: arrival })] }), _jsx("div", { className: "overflow-x-auto overflow-y-hidden", children: _jsx("div", { className: "flex gap-x-3 pb-8", children: services.map(function (service, index) { return (_jsxs(TimelineItem, { children: [service.type === 'transfer' && (_jsx(TimelineItem.Transfer, __assign({}, service.data))), service.type === 'accommodation' && (_jsx(TimelineItem.Accommodation, __assign({}, service.data))), service.type === 'excursion' && (_jsx(TimelineItem.Excursion, __assign({}, service.data)))] }, "tm-".concat(index))); }) }) }), _jsxs(TextWithIcon, { icon: "departure", color: "accent", iconSize: "lg", textSize: "lg", children: ["Departure :", ' ', _jsx(Text, { variant: "regular", size: "lg", leading: "5", color: "default", as: "span", children: departure })] })] }));
20
20
  }
21
- ;
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export { default as Stepper } from './components/molecules/Stepper/Stepper';
41
41
  export { default as TextWithIcon } from './components/molecules/TextWithIcon/TextWithIcon';
42
42
  export { default as TimelineItem } from './components/molecules/TimelineItem/TimelineItem';
43
43
  export { default as Toast } from './components/molecules/Toast/Toast';
44
+ export * from './components/molecules/TooltipDisplay/TooltipDisplay';
44
45
  export { Illustration } from './components/atoms/Illustration/Illustration';
45
46
  export * from './components/molecules/BookingPax';
46
47
  export { DetailsClientInfo } from './components/molecules/DetailsInfo/DetailsClient/DetailsClient';
package/dist/index.js CHANGED
@@ -43,6 +43,7 @@ export { default as Stepper } from './components/molecules/Stepper/Stepper';
43
43
  export { default as TextWithIcon } from './components/molecules/TextWithIcon/TextWithIcon';
44
44
  export { default as TimelineItem } from './components/molecules/TimelineItem/TimelineItem';
45
45
  export { default as Toast } from './components/molecules/Toast/Toast';
46
+ export * from './components/molecules/TooltipDisplay/TooltipDisplay';
46
47
  // Organisms - Complex components
47
48
  export { Illustration } from './components/atoms/Illustration/Illustration';
48
49
  export * from './components/molecules/BookingPax';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mautourco-components",
3
- "version": "0.2.62",
3
+ "version": "0.2.64",
4
4
  "private": false,
5
5
  "description": "Bibliothèque de composants Mautourco pour le redesign",
6
6
  "main": "dist/index.js",
@@ -4,7 +4,13 @@ import './Button.css';
4
4
 
5
5
  export interface ButtonProps {
6
6
  /** Variant du bouton */
7
- variant?: 'primary' | 'secondary' | 'outline' | 'outline-primary' | 'outline-secondary' | 'destructive';
7
+ variant?:
8
+ | 'primary'
9
+ | 'secondary'
10
+ | 'outline'
11
+ | 'outline-primary'
12
+ | 'outline-secondary'
13
+ | 'destructive';
8
14
  /** Taille du bouton */
9
15
  size?: 'sm' | 'md' | 'lg' | 'xl';
10
16
  /** Contenu du bouton */
@@ -25,7 +31,7 @@ export interface ButtonProps {
25
31
  className?: string;
26
32
  }
27
33
 
28
- const Button: React.FC<ButtonProps> = ({
34
+ function Button({
29
35
  variant = 'primary',
30
36
  size = 'md',
31
37
  children,
@@ -36,21 +42,14 @@ const Button: React.FC<ButtonProps> = ({
36
42
  onClick,
37
43
  type = 'button',
38
44
  className = '',
39
- }) => {
45
+ }: ButtonProps) {
40
46
  const baseClasses = 'button';
41
- const normalizedVariant =
42
- variant === 'outline' ? 'outline-primary' : variant;
47
+ const normalizedVariant = variant === 'outline' ? 'outline-primary' : variant;
43
48
  const variantClass = `button--${normalizedVariant}`;
44
49
  const sizeClass = `button--${size}`;
45
50
  const disabledClass = disabled ? 'button--disabled' : '';
46
51
 
47
- const buttonClasses = [
48
- baseClasses,
49
- variantClass,
50
- sizeClass,
51
- disabledClass,
52
- className,
53
- ]
52
+ const buttonClasses = [baseClasses, variantClass, sizeClass, disabledClass, className]
54
53
  .filter(Boolean)
55
54
  .join(' ');
56
55
 
@@ -63,8 +62,7 @@ const Button: React.FC<ButtonProps> = ({
63
62
  type={type}
64
63
  className={[buttonClasses, withIconClass].filter(Boolean).join(' ')}
65
64
  disabled={disabled}
66
- onClick={onClick}
67
- >
65
+ onClick={onClick}>
68
66
  {hasLeadingIcon && (
69
67
  <span className="button__icon button__icon--leading">
70
68
  <Icon name={leadingIcon!} size={iconSize} />
@@ -78,6 +76,6 @@ const Button: React.FC<ButtonProps> = ({
78
76
  )}
79
77
  </button>
80
78
  );
81
- };
79
+ }
82
80
 
83
81
  export default Button;
@@ -29,7 +29,7 @@ export function Timeline(props: TimelineProps) {
29
29
  </Text>
30
30
  </TextWithIcon>
31
31
  <div className="overflow-x-auto overflow-y-hidden">
32
- <div className="flex gap-x-3 pb-8 2xl:pb-0">
32
+ <div className="flex gap-x-3 pb-8">
33
33
  {services.map((service, index) => (
34
34
  <TimelineItem key={`tm-${index}`}>
35
35
  {service.type === 'transfer' && (
@@ -55,4 +55,4 @@ export function Timeline(props: TimelineProps) {
55
55
  </TextWithIcon>
56
56
  </div>
57
57
  );
58
- };
58
+ }