mautourco-components 0.2.110 → 0.2.112
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.
- package/dist/components/atoms/Chip/Chip.d.ts +1 -1
- package/dist/components/atoms/Chip/Chip.js +2 -2
- package/dist/components/organisms/SearchBarTransfer/SearchBarTransfer.js +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Chip/Chip.tsx +3 -3
- package/src/components/organisms/SearchBarTransfer/SearchBarTransfer.tsx +1 -1
|
@@ -27,5 +27,5 @@ export interface ChipProps {
|
|
|
27
27
|
/** Icon externe */
|
|
28
28
|
externalIcon?: string;
|
|
29
29
|
}
|
|
30
|
-
declare
|
|
30
|
+
declare function Chip({ label, children, size, type, color, leadingIcon, trailingIcon, iconSize, className, isBlackText, externalIcon, onClick, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export default Chip;
|
|
@@ -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
|
import './Chip.css';
|
|
4
|
-
|
|
4
|
+
function Chip(_a) {
|
|
5
5
|
var label = _a.label, children = _a.children, _b = _a.size, size = _b === void 0 ? 'sm' : _b, _c = _a.type, type = _c === void 0 ? 'filled' : _c, _d = _a.color, color = _d === void 0 ? 'brand' : _d, leadingIcon = _a.leadingIcon, trailingIcon = _a.trailingIcon, _e = _a.iconSize, iconSize = _e === void 0 ? 'sm' : _e, _f = _a.className, className = _f === void 0 ? '' : _f, _g = _a.isBlackText, isBlackText = _g === void 0 ? false : _g, externalIcon = _a.externalIcon, onClick = _a.onClick;
|
|
6
6
|
var baseClasses = 'chip';
|
|
7
7
|
var sizeClass = "chip--".concat(size);
|
|
@@ -24,5 +24,5 @@ var Chip = function (_a) {
|
|
|
24
24
|
var hasTrailingIcon = Boolean(trailingIcon);
|
|
25
25
|
var content = label || children;
|
|
26
26
|
return (_jsxs("div", { className: chipClasses, onClick: onClick, role: onClick ? 'button' : undefined, tabIndex: onClick ? 0 : undefined, children: [hasLeadingIcon && (_jsx("span", { className: "chip__icon chip__icon--leading", children: _jsx(Icon, { name: leadingIcon, size: iconSize }) })), externalIcon && (_jsx("img", { src: externalIcon, alt: "", className: "w-4 h-4 object-contain" })), _jsx("span", { className: "chip__label", children: content }), hasTrailingIcon && (_jsx("span", { className: "chip__icon chip__icon--trailing", children: _jsx(Icon, { name: trailingIcon, size: iconSize }) }))] }));
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
export default Chip;
|
|
@@ -397,6 +397,6 @@ function SearchBarTransfer(_a) {
|
|
|
397
397
|
'inter-hotel': { label: 'Inter-Hotel', icon: 'building' },
|
|
398
398
|
};
|
|
399
399
|
return nonEmptyGroups.map(function (type, groupIndex) { return (_jsxs(React.Fragment, { children: [_jsxs("div", { className: "search-bar-transfer__category-header", children: [_jsx(Icon, { name: categoryInfo[type].icon, size: "md" }), _jsx(Text, { size: "md", variant: "bold", color: "default", as: "span", children: categoryInfo[type].label })] }), groupedTransfers[type].map(function (line) { return (_jsx(TransferLine, { id: line.id, type: line.type, paxData: line.paxData, transferDate: line.transferDate, pickupPoint: line.pickupPoint, dropoffPoint: line.dropoffPoint, locations: locations, onDataChange: function (data) { return handleTransferLineChange(line.id, data); }, onDelete: function () { return handleDeleteTransferLine(line.id); }, showDelete: transferLines.length > 1, checkEmpty: error !== null, scrollOnOpen: scrollOnOpen, onPaxOpenChange: onPaxOpenChange }, "".concat(line.id, "-").concat(validationTrigger))); }), groupIndex < nonEmptyGroups.length - 1 && (_jsx("svg", { className: "search-bar-transfer__divider", xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "1", viewBox: "0 0 1076 1", fill: "none", preserveAspectRatio: "none", children: _jsx("path", { d: "M0 0.5L1076 0.499906", stroke: "var(--color-border-medium, #A3A3A3)", strokeWidth: "1", strokeDasharray: "10 10" }) }))] }, type)); });
|
|
400
|
-
})() }))] })), _jsxs("div", { className: "search-bar-transfer__actions", children: [_jsx(Checkbox, { checked: sameVehicle, onChange: setSameVehicle, label: "Use the same vehicle for all your transfers" }), _jsxs("div", { className: "search-bar-transfer__cta", children: [error && _jsx(Toast, { text: error, type: "danger" }),
|
|
400
|
+
})() }))] })), _jsxs("div", { className: "search-bar-transfer__actions", children: [_jsx(Checkbox, { checked: sameVehicle, onChange: setSameVehicle, label: "Use the same vehicle for all your transfers" }), _jsxs("div", { className: "search-bar-transfer__cta", children: [error && _jsx(Toast, { text: error, type: "danger" }), _jsxs(Button, { variant: "primary", size: "lg", onClick: handleSearch, children: [isUpdateLabel && 'Update', " Search"] })] })] })] }));
|
|
401
401
|
}
|
|
402
402
|
export default SearchBarTransfer;
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ export interface ChipProps {
|
|
|
29
29
|
externalIcon?: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
function Chip({
|
|
33
33
|
label,
|
|
34
34
|
children,
|
|
35
35
|
size = 'sm',
|
|
@@ -42,7 +42,7 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
42
42
|
isBlackText = false,
|
|
43
43
|
externalIcon,
|
|
44
44
|
onClick,
|
|
45
|
-
})
|
|
45
|
+
}: ChipProps) {
|
|
46
46
|
const baseClasses = 'chip';
|
|
47
47
|
const sizeClass = `chip--${size}`;
|
|
48
48
|
const typeClass = `chip--${type}`;
|
|
@@ -88,6 +88,6 @@ const Chip: React.FC<ChipProps> = ({
|
|
|
88
88
|
)}
|
|
89
89
|
</div>
|
|
90
90
|
);
|
|
91
|
-
}
|
|
91
|
+
}
|
|
92
92
|
|
|
93
93
|
export default Chip;
|
|
@@ -664,7 +664,7 @@ function SearchBarTransfer({
|
|
|
664
664
|
<div className="search-bar-transfer__cta">
|
|
665
665
|
{error && <Toast text={error} type="danger" />}
|
|
666
666
|
<Button variant="primary" size="lg" onClick={handleSearch}>
|
|
667
|
-
{
|
|
667
|
+
{isUpdateLabel && 'Update'} Search
|
|
668
668
|
</Button>
|
|
669
669
|
</div>
|
|
670
670
|
</div>
|