mautourco-components 0.2.32 → 0.2.33

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.
@@ -12,6 +12,7 @@ export interface InputProps {
12
12
  icon?: IconName;
13
13
  iconPosition?: 'leading' | 'trailing';
14
14
  type?: HTMLInputTypeAttribute;
15
+ id?: string;
15
16
  }
16
17
  declare const Input: React.FC<InputProps>;
17
18
  export default Input;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from '../../Icon/Icon';
3
3
  var Input = function (_a) {
4
- var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Input text' : _c, value = _a.value, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, icon = _a.icon, _f = _a.iconPosition, iconPosition = _f === void 0 ? 'trailing' : _f, _g = _a.type, type = _g === void 0 ? 'text' : _g;
4
+ var _b = _a.variant, variant = _b === void 0 ? 'default' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Input text' : _c, value = _a.value, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, icon = _a.icon, _f = _a.iconPosition, iconPosition = _f === void 0 ? 'trailing' : _f, _g = _a.type, type = _g === void 0 ? 'text' : _g, id = _a.id;
5
5
  var baseClasses = 'input-field';
6
6
  var variantClasses = {
7
7
  default: 'input-field--default',
@@ -11,6 +11,6 @@ var Input = function (_a) {
11
11
  disabled: 'input-field--disabled',
12
12
  };
13
13
  var inputClasses = "".concat(baseClasses, " ").concat(variantClasses[variant], " ").concat(icon ? "input-field--with-icon input-field--icon-".concat(iconPosition) : '', " ").concat(className).trim();
14
- return (_jsxs("div", { className: "input-wrapper ".concat(icon ? 'input-wrapper--with-icon' : '').trim(), children: [icon && iconPosition === 'leading' && (_jsx("span", { className: "input-icon input-icon--leading", children: _jsx(Icon, { name: icon, size: "sm" }) })), _jsx("input", { type: type, className: inputClasses, placeholder: placeholder, value: value, disabled: disabled || variant === 'disabled', onChange: onChange, onFocus: onFocus, onBlur: onBlur }), icon && iconPosition === 'trailing' && (_jsx("span", { className: "input-icon input-icon--trailing", children: _jsx(Icon, { name: icon, size: "sm" }) }))] }));
14
+ return (_jsxs("div", { className: "input-wrapper ".concat(icon ? 'input-wrapper--with-icon' : '').trim(), children: [icon && iconPosition === 'leading' && (_jsx("span", { className: "input-icon input-icon--leading", children: _jsx(Icon, { name: icon, size: "sm" }) })), _jsx("input", { id: id, type: type, className: inputClasses, placeholder: placeholder, value: value, disabled: disabled || variant === 'disabled', onChange: onChange, onFocus: onFocus, onBlur: onBlur }), icon && iconPosition === 'trailing' && (_jsx("span", { className: "input-icon input-icon--trailing", children: _jsx(Icon, { name: icon, size: "sm" }) }))] }));
15
15
  };
16
16
  export default Input;
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  interface SelectedValueProps {
3
3
  value: string;
4
- onRemove?: () => void;
5
4
  className?: string;
6
5
  iconSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
6
  size?: 'xs' | 'sm' | 'md' | 'lg';
8
7
  variant?: 'filled' | 'text';
8
+ color?: 'accent' | 'neutral';
9
+ onRemove?: () => void;
10
+ onSelect?: () => void;
9
11
  }
10
12
  declare const SelectedValue: React.FC<SelectedValueProps>;
11
13
  export default SelectedValue;
@@ -2,17 +2,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Icon from '../Icon/Icon';
3
3
  import { Text } from '../Typography/Typography';
4
4
  var SelectedValue = function (_a) {
5
- var value = _a.value, onRemove = _a.onRemove, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.iconSize, iconSize = _c === void 0 ? 'xs' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.variant, variant = _e === void 0 ? 'filled' : _e;
5
+ var value = _a.value, _b = _a.className, className = _b === void 0 ? '' : _b, _c = _a.iconSize, iconSize = _c === void 0 ? 'xs' : _c, _d = _a.size, size = _d === void 0 ? 'md' : _d, _e = _a.variant, variant = _e === void 0 ? 'filled' : _e, _f = _a.color, color = _f === void 0 ? 'accent' : _f, onRemove = _a.onRemove, onSelect = _a.onSelect;
6
6
  var handleRemove = function (event) {
7
7
  event.stopPropagation();
8
8
  if (onRemove) {
9
9
  onRemove();
10
10
  }
11
11
  };
12
- var classes = "selected-value selected-value--".concat(size, " selected-value--").concat(variant, " ").concat(className).trim();
12
+ var classes = "selected-value selected-value--".concat(size, " selected-value--").concat(color, " selected-value--").concat(variant, " ").concat(className, " ").concat(onSelect ? 'cursor-pointer' : '').trim();
13
13
  var getTextSize = function () {
14
14
  return size; // Utilise directement la taille passée en prop
15
15
  };
16
- return (_jsxs("div", { className: classes, children: [_jsx(Text, { size: getTextSize(), variant: "medium", leading: "4", className: "selected-value__text", children: value }), variant !== 'text' && onRemove && (_jsx("button", { type: "button", className: "selected-value__remove", onClick: handleRemove, "aria-label": "Remove ".concat(value), children: _jsx(Icon, { name: "close", size: iconSize, className: "selected-value__remove-icon" }) }))] }));
16
+ return (_jsxs("div", { className: classes, onClick: onSelect, children: [_jsx(Text, { size: getTextSize(), variant: "medium", leading: "4", className: "selected-value__text", children: value }), variant !== 'text' && onRemove && (_jsx("button", { type: "button", className: "selected-value__remove", onClick: handleRemove, "aria-label": "Remove ".concat(value), children: _jsx(Icon, { name: "close", size: iconSize, className: "selected-value__remove-icon" }) }))] }));
17
17
  };
18
18
  export default SelectedValue;
@@ -7,5 +7,6 @@ export interface DialogSendingMailProps {
7
7
  }
8
8
  export declare const DialogSendingMail: {
9
9
  (props: DialogSendingMailProps): import("react/jsx-runtime").JSX.Element;
10
- Content: React.FC<import("./DialogSendingMailContent").DialogSendingMailContentProps>;
10
+ SingleQuote: React.FC<import("./DialogSendingMailContent").DialogSendingMailContentProps>;
11
+ MultipleQuotes: React.FC<import("./DialogSendingMailMultiple/DialogSendingMailMultiple").DialogSendingMailMultipleProps>;
11
12
  };
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { DialogBookingConfirm } from '../DialogBookingConfirm';
3
3
  import { DialogSendingMailContent } from './DialogSendingMailContent';
4
+ import { DialogSendingMailMultiple } from './DialogSendingMailMultiple/DialogSendingMailMultiple';
4
5
  export var DialogSendingMail = function (props) {
5
6
  var open = props.open, setOpen = props.setOpen, children = props.children, _a = props.type, type = _a === void 0 ? 'booking' : _a;
6
7
  return (_jsx(DialogBookingConfirm, { open: open, title: "Send ".concat(type, " via mail"), setOpen: setOpen, className: "!max-w-[800px]", closeOnOverlayClick: true, children: children }));
7
8
  };
8
- DialogSendingMail.Content = DialogSendingMailContent;
9
+ DialogSendingMail.SingleQuote = DialogSendingMailContent;
10
+ DialogSendingMail.MultipleQuotes = DialogSendingMailMultiple;