mautourco-components 0.2.52 → 0.2.54
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/molecules/DateDisplay/DateDisplay.js +1 -1
- package/dist/components/organisms/TabServiceDetails/DetailContentTransfer.js +2 -2
- package/dist/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.css +2 -0
- package/dist/components/ui/tooltip.js +2 -2
- package/package.json +1 -1
- package/src/components/molecules/DateDisplay/DateDisplay.tsx +1 -1
- package/src/components/organisms/TabServiceDetails/DetailContentTransfer.tsx +2 -2
- package/src/components/organisms/TabServiceDetails/TabServiceDetailsLayout/TabServiceDetailsLayout.css +2 -0
- package/src/components/ui/tooltip.tsx +15 -4
|
@@ -18,7 +18,7 @@ export function DateDisplay(props) {
|
|
|
18
18
|
var _a = props.dates, dates = _a === void 0 ? [] : _a, _b = props.arrowSize, arrowSize = _b === void 0 ? 'sm' : _b, _c = props.calendarSize, calendarSize = _c === void 0 ? 'sm' : _c, _d = props.textSize, textSize = _d === void 0 ? 'sm' : _d, _e = props.colorMode, colorMode = _e === void 0 ? 'black' : _e, _f = props.className, className = _f === void 0 ? '' : _f;
|
|
19
19
|
var formattedDates = useMemo(function () {
|
|
20
20
|
return dates.map(function (d) {
|
|
21
|
-
var dateObj =
|
|
21
|
+
var dateObj = new Date(d);
|
|
22
22
|
// Check if the date is valid then format it to dd/MM/yyyy format
|
|
23
23
|
if (isValid(dateObj)) {
|
|
24
24
|
return format(dateObj, 'dd/MM/yyyy');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Chip from '../../atoms/Chip/Chip';
|
|
3
3
|
export function DetailContentTransfer(props) {
|
|
4
|
-
var pax = props.pax, clientType = props.clientType, carName = props.carName, airConditioning = props.airConditioning,
|
|
5
|
-
return (_jsxs("div", { className: "flex gap-4", children: [_jsx(Chip, { type: "outline", color: "brand", label: pax, leadingIcon: "user", isBlackText: true }), _jsx(Chip, { type: "outline", color: "brand", label: "Client type: ".concat(clientType), leadingIcon: "user", isBlackText: true }), _jsx(Chip, { type: "outline", color: "brand", label: carName, leadingIcon: "car", isBlackText: true }), airConditioning && (_jsx(Chip, { type: "outline", color: "brand", label: "Air conditioning", leadingIcon: "air", isBlackText: true })), luggageTruck && (_jsx(Chip, { type: "outline", color: "brand", label: "Luggage truck: ".concat(luggageTruck > 1 ? "x".concat(luggageTruck) : luggageTruck), leadingIcon: "luggage", isBlackText: true }))] }));
|
|
4
|
+
var pax = props.pax, clientType = props.clientType, carName = props.carName, airConditioning = props.airConditioning, _a = props.luggageTruck, luggageTruck = _a === void 0 ? 0 : _a;
|
|
5
|
+
return (_jsxs("div", { className: "flex gap-4", children: [_jsx(Chip, { type: "outline", color: "brand", label: pax, leadingIcon: "user", isBlackText: true }), _jsx(Chip, { type: "outline", color: "brand", label: "Client type: ".concat(clientType), leadingIcon: "user", isBlackText: true }), _jsx(Chip, { type: "outline", color: "brand", label: carName, leadingIcon: "car", isBlackText: true }), airConditioning && (_jsx(Chip, { type: "outline", color: "brand", label: "Air conditioning", leadingIcon: "air", isBlackText: true })), luggageTruck > 0 && (_jsx(Chip, { type: "outline", color: "brand", label: "Luggage truck: ".concat(luggageTruck > 1 ? "x".concat(luggageTruck) : luggageTruck), leadingIcon: "luggage", isBlackText: true }))] }));
|
|
6
6
|
}
|
|
@@ -25,7 +25,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
25
25
|
import { cn } from '../../lib/utils';
|
|
26
26
|
function TooltipProvider(_a) {
|
|
27
27
|
var _b = _a.delayDuration, delayDuration = _b === void 0 ? 0 : _b, props = __rest(_a, ["delayDuration"]);
|
|
28
|
-
return _jsx(TooltipPrimitive.Provider, __assign({ "data-slot": "tooltip-provider", delayDuration: delayDuration }, props));
|
|
28
|
+
return (_jsx(TooltipPrimitive.Provider, __assign({ "data-slot": "tooltip-provider", delayDuration: delayDuration }, props)));
|
|
29
29
|
}
|
|
30
30
|
function Tooltip(_a) {
|
|
31
31
|
var props = __rest(_a, []);
|
|
@@ -37,6 +37,6 @@ function TooltipTrigger(_a) {
|
|
|
37
37
|
}
|
|
38
38
|
function TooltipContent(_a) {
|
|
39
39
|
var className = _a.className, _b = _a.sideOffset, sideOffset = _b === void 0 ? 0 : _b, children = _a.children, props = __rest(_a, ["className", "sideOffset", "children"]);
|
|
40
|
-
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, __assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-
|
|
40
|
+
return (_jsx(TooltipPrimitive.Portal, { children: _jsxs(TooltipPrimitive.Content, __assign({ "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn('bg-[var(--tooltip-color-background-default)] text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance', className) }, props, { children: [children, _jsx(TooltipPrimitive.Arrow, { className: "bg-[var(--tooltip-color-background-default)] fill-[var(--tooltip-color-background-default)] z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })] })) }));
|
|
41
41
|
}
|
|
42
42
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export function DateDisplay(props: DateDisplayProps) {
|
|
|
46
46
|
} = props;
|
|
47
47
|
const formattedDates = useMemo(() => {
|
|
48
48
|
return dates.map((d) => {
|
|
49
|
-
const dateObj =
|
|
49
|
+
const dateObj = new Date(d);
|
|
50
50
|
// Check if the date is valid then format it to dd/MM/yyyy format
|
|
51
51
|
if (isValid(dateObj)) {
|
|
52
52
|
return format(dateObj, 'dd/MM/yyyy');
|
|
@@ -9,7 +9,7 @@ export interface DetailContentTransferProps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export function DetailContentTransfer(props: DetailContentTransferProps) {
|
|
12
|
-
const { pax, clientType, carName, airConditioning, luggageTruck } = props;
|
|
12
|
+
const { pax, clientType, carName, airConditioning, luggageTruck = 0 } = props;
|
|
13
13
|
return (
|
|
14
14
|
<div className="flex gap-4">
|
|
15
15
|
<Chip type="outline" color="brand" label={pax} leadingIcon="user" isBlackText />
|
|
@@ -30,7 +30,7 @@ export function DetailContentTransfer(props: DetailContentTransferProps) {
|
|
|
30
30
|
isBlackText
|
|
31
31
|
/>
|
|
32
32
|
)}
|
|
33
|
-
{luggageTruck && (
|
|
33
|
+
{luggageTruck > 0 && (
|
|
34
34
|
<Chip
|
|
35
35
|
type="outline"
|
|
36
36
|
color="brand"
|
|
@@ -3,8 +3,17 @@ import * as React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { cn } from '@/src/lib/utils';
|
|
5
5
|
|
|
6
|
-
function TooltipProvider({
|
|
7
|
-
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delayDuration = 0,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
|
|
10
|
+
return (
|
|
11
|
+
<TooltipPrimitive.Provider
|
|
12
|
+
data-slot="tooltip-provider"
|
|
13
|
+
delayDuration={delayDuration}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
8
17
|
}
|
|
9
18
|
|
|
10
19
|
function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {
|
|
@@ -15,7 +24,9 @@ function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root
|
|
|
15
24
|
);
|
|
16
25
|
}
|
|
17
26
|
|
|
18
|
-
function TooltipTrigger({
|
|
27
|
+
function TooltipTrigger({
|
|
28
|
+
...props
|
|
29
|
+
}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
|
|
19
30
|
return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />;
|
|
20
31
|
}
|
|
21
32
|
|
|
@@ -31,7 +42,7 @@ function TooltipContent({
|
|
|
31
42
|
data-slot="tooltip-content"
|
|
32
43
|
sideOffset={sideOffset}
|
|
33
44
|
className={cn(
|
|
34
|
-
'bg-
|
|
45
|
+
'bg-[var(--tooltip-color-background-default)] text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',
|
|
35
46
|
className
|
|
36
47
|
)}
|
|
37
48
|
{...props}>
|