mautourco-components 0.2.73 → 0.2.74
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/Icon/icons/ViewQuotationIcon.d.ts +8 -0
- package/dist/components/atoms/Icon/icons/ViewQuotationIcon.js +25 -0
- package/dist/components/atoms/Icon/icons/registry.d.ts +1 -0
- package/dist/components/atoms/Icon/icons/registry.js +2 -0
- package/dist/components/organisms/Docket/Docket.js +1 -1
- package/dist/styles/components/organism/docket.css +46 -0
- package/package.json +1 -1
- package/src/components/atoms/Icon/icons/ViewQuotationIcon.tsx +105 -0
- package/src/components/atoms/Icon/icons/registry.tsx +2 -0
- package/src/components/organisms/Docket/Docket.tsx +11 -9
- package/src/styles/components/organism/docket.css +46 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
var ViewQuotationIcon = function (_a) {
|
|
3
|
+
var _b = _a.size, size = _b === void 0 ? 'md' : _b, _c = _a.className, className = _c === void 0 ? '' : _c, color = _a.color;
|
|
4
|
+
var getSizeClasses = function () {
|
|
5
|
+
switch (size) {
|
|
6
|
+
case 'xs':
|
|
7
|
+
return 'w-3 h-3';
|
|
8
|
+
case 'sm':
|
|
9
|
+
return 'w-4 h-4';
|
|
10
|
+
case 'md':
|
|
11
|
+
return 'w-5 h-5';
|
|
12
|
+
case 'lg':
|
|
13
|
+
return 'w-6 h-6';
|
|
14
|
+
case 'xl':
|
|
15
|
+
return 'w-8 h-8';
|
|
16
|
+
default:
|
|
17
|
+
return 'w-5 h-5';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
var sizeClasses = getSizeClasses();
|
|
21
|
+
var colorClass = color ? "text-".concat(color) : 'text-current';
|
|
22
|
+
var classes = "".concat(sizeClasses, " ").concat(colorClass, " ").concat(className);
|
|
23
|
+
return (_jsxs("svg", { className: classes, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { x: "4", y: "4", width: "12", height: "12", stroke: "currentColor", strokeWidth: "1.5", fill: "none", strokeLinecap: "round" }), _jsx("path", { d: "M4 4L4 1M4 4L1 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M16 4L16 1M16 4L19 4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M4 16L4 19M4 16L1 16", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M16 16L16 19M16 16L19 16", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("ellipse", { cx: "10", cy: "10", rx: "3.5", ry: "2.5", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }), _jsx("circle", { cx: "10", cy: "10", r: "1.5", fill: "currentColor" })] }));
|
|
24
|
+
};
|
|
25
|
+
export default ViewQuotationIcon;
|
|
@@ -70,6 +70,7 @@ import TwitterIcon from './TwitterIcon';
|
|
|
70
70
|
import User from './User';
|
|
71
71
|
import UserIcon from './UserIcon';
|
|
72
72
|
import UtensilsIcon from './Utensils';
|
|
73
|
+
import ViewQuotationIcon from './ViewQuotationIcon';
|
|
73
74
|
import WalletIcon from './WalletIcon';
|
|
74
75
|
import YouTubeIcon from './Youtube';
|
|
75
76
|
var ChevronDown = function (props) { return _jsx(Chevron, __assign({ direction: "down" }, props)); };
|
|
@@ -148,4 +149,5 @@ export var ICONS = {
|
|
|
148
149
|
'close-circle': CloseCircleIcon,
|
|
149
150
|
clock: ClockIcon,
|
|
150
151
|
'info-2': Info2Icon,
|
|
152
|
+
'view-quotation': ViewQuotationIcon,
|
|
151
153
|
};
|
|
@@ -43,7 +43,7 @@ export var DocketHeader = function (_a) {
|
|
|
43
43
|
export var DocketFooter = function (_a) {
|
|
44
44
|
var _b = _a.mode, mode = _b === void 0 ? 'multiple' : _b, onAddNewQuoteClick = _a.onAddNewQuoteClick, onViewClick = _a.onViewClick, onSaveClick = _a.onSaveClick, onBookNowClick = _a.onBookNowClick, _c = _a.className, className = _c === void 0 ? '' : _c;
|
|
45
45
|
var isSingleMode = mode === 'single';
|
|
46
|
-
return (_jsxs("div", { className: "docket__footer ".concat(className), children: [!isSingleMode && onAddNewQuoteClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "docket__footer-button docket__footer-button--full", children: "Add new quote" })),
|
|
46
|
+
return (_jsxs("div", { className: "docket__footer ".concat(className), children: [!isSingleMode && onAddNewQuoteClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", leadingIcon: "plus", onClick: onAddNewQuoteClick, className: "docket__footer-button docket__footer-button--full", children: "Add new quote" })), !isSingleMode && onViewClick && (_jsx("div", { className: "docket__footer-view", children: _jsxs("button", { type: "button", onClick: onViewClick, className: "docket__footer-view-link", children: [_jsx(Icon, { name: "view-quotation", size: "sm", className: "docket__footer-view-icon" }), _jsx("span", { className: "docket__footer-view-text", children: "View quotation" })] }) })), _jsxs("div", { className: "docket__footer-actions", children: [onSaveClick && (_jsx(Button, { variant: "outline-secondary", size: "sm", onClick: onSaveClick, className: "docket__footer-button", children: "Save quotation" })), onBookNowClick && (_jsx(Button, { variant: "secondary", size: "sm", onClick: onBookNowClick, className: "docket__footer-button docket__footer-button--primary", children: "Book now" }))] })] }));
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* Docket is a container component for displaying quotation/docket information.
|
|
@@ -221,6 +221,52 @@
|
|
|
221
221
|
min-width: 162px;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
+
.docket__footer-view {
|
|
225
|
+
display: flex;
|
|
226
|
+
justify-content: flex-end;
|
|
227
|
+
width: 100%;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.docket__footer-view-link {
|
|
231
|
+
display: inline-flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: var(--component-button-spacing-ghost-sm-gap, 6px);
|
|
234
|
+
background: none;
|
|
235
|
+
border: none;
|
|
236
|
+
padding: var(--component-button-spacing-ghost-sm-padding-y, 0px) var(--component-button-spacing-ghost-sm-padding-x, 0px);
|
|
237
|
+
cursor: pointer;
|
|
238
|
+
font-family: var(--font-font-family-body, 'Satoshi', sans-serif);
|
|
239
|
+
font-size: var(--font-size-text-sm, 14px);
|
|
240
|
+
font-weight: var(--font-weight-font-medium, 500);
|
|
241
|
+
line-height: var(--font-leading-leading-sm, 20px);
|
|
242
|
+
color: var(--color-button-ghost-foreground-default, #78716c);
|
|
243
|
+
text-decoration: none;
|
|
244
|
+
transition: color 0.2s ease;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.docket__footer-view-link:hover {
|
|
248
|
+
color: var(--color-button-ghost-foreground-hover, #44403c);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.docket__footer-view-link:active {
|
|
252
|
+
color: var(--color-button-ghost-foreground-pressed, #1c1917);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.docket__footer-view-link:focus {
|
|
256
|
+
outline: none;
|
|
257
|
+
color: var(--color-button-ghost-foreground-focused, #1c1917);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.docket__footer-view-text {
|
|
261
|
+
display: inline-block;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.docket__footer-view-icon {
|
|
265
|
+
display: inline-flex;
|
|
266
|
+
align-items: center;
|
|
267
|
+
color: inherit;
|
|
268
|
+
}
|
|
269
|
+
|
|
224
270
|
.docket__footer-actions {
|
|
225
271
|
display: flex;
|
|
226
272
|
gap: var(--spacing-gap-md, 8px);
|
package/package.json
CHANGED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ViewQuotationIconProps {
|
|
4
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
className?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ViewQuotationIcon: React.FC<ViewQuotationIconProps> = ({
|
|
10
|
+
size = 'md',
|
|
11
|
+
className = '',
|
|
12
|
+
color,
|
|
13
|
+
}) => {
|
|
14
|
+
const getSizeClasses = () => {
|
|
15
|
+
switch (size) {
|
|
16
|
+
case 'xs':
|
|
17
|
+
return 'w-3 h-3';
|
|
18
|
+
case 'sm':
|
|
19
|
+
return 'w-4 h-4';
|
|
20
|
+
case 'md':
|
|
21
|
+
return 'w-5 h-5';
|
|
22
|
+
case 'lg':
|
|
23
|
+
return 'w-6 h-6';
|
|
24
|
+
case 'xl':
|
|
25
|
+
return 'w-8 h-8';
|
|
26
|
+
default:
|
|
27
|
+
return 'w-5 h-5';
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const sizeClasses = getSizeClasses();
|
|
32
|
+
const colorClass = color ? `text-${color}` : 'text-current';
|
|
33
|
+
const classes = `${sizeClasses} ${colorClass} ${className}`;
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={classes}
|
|
38
|
+
viewBox="0 0 20 20"
|
|
39
|
+
fill="none"
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
41
|
+
{/* Square frame */}
|
|
42
|
+
<rect
|
|
43
|
+
x="4"
|
|
44
|
+
y="4"
|
|
45
|
+
width="12"
|
|
46
|
+
height="12"
|
|
47
|
+
stroke="currentColor"
|
|
48
|
+
strokeWidth="1.5"
|
|
49
|
+
fill="none"
|
|
50
|
+
strokeLinecap="round"
|
|
51
|
+
/>
|
|
52
|
+
{/* Corner brackets extending outward - top-left */}
|
|
53
|
+
<path
|
|
54
|
+
d="M4 4L4 1M4 4L1 4"
|
|
55
|
+
stroke="currentColor"
|
|
56
|
+
strokeWidth="1.5"
|
|
57
|
+
strokeLinecap="round"
|
|
58
|
+
strokeLinejoin="round"
|
|
59
|
+
/>
|
|
60
|
+
{/* Corner brackets - top-right */}
|
|
61
|
+
<path
|
|
62
|
+
d="M16 4L16 1M16 4L19 4"
|
|
63
|
+
stroke="currentColor"
|
|
64
|
+
strokeWidth="1.5"
|
|
65
|
+
strokeLinecap="round"
|
|
66
|
+
strokeLinejoin="round"
|
|
67
|
+
/>
|
|
68
|
+
{/* Corner brackets - bottom-left */}
|
|
69
|
+
<path
|
|
70
|
+
d="M4 16L4 19M4 16L1 16"
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
strokeWidth="1.5"
|
|
73
|
+
strokeLinecap="round"
|
|
74
|
+
strokeLinejoin="round"
|
|
75
|
+
/>
|
|
76
|
+
{/* Corner brackets - bottom-right */}
|
|
77
|
+
<path
|
|
78
|
+
d="M16 16L16 19M16 16L19 16"
|
|
79
|
+
stroke="currentColor"
|
|
80
|
+
strokeWidth="1.5"
|
|
81
|
+
strokeLinecap="round"
|
|
82
|
+
strokeLinejoin="round"
|
|
83
|
+
/>
|
|
84
|
+
{/* Eye shape */}
|
|
85
|
+
<ellipse
|
|
86
|
+
cx="10"
|
|
87
|
+
cy="10"
|
|
88
|
+
rx="3.5"
|
|
89
|
+
ry="2.5"
|
|
90
|
+
stroke="currentColor"
|
|
91
|
+
strokeWidth="1.5"
|
|
92
|
+
fill="none"
|
|
93
|
+
/>
|
|
94
|
+
{/* Eye pupil */}
|
|
95
|
+
<circle
|
|
96
|
+
cx="10"
|
|
97
|
+
cy="10"
|
|
98
|
+
r="1.5"
|
|
99
|
+
fill="currentColor"
|
|
100
|
+
/>
|
|
101
|
+
</svg>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export default ViewQuotationIcon;
|
|
@@ -60,6 +60,7 @@ import TwitterIcon from './TwitterIcon';
|
|
|
60
60
|
import User from './User';
|
|
61
61
|
import UserIcon from './UserIcon';
|
|
62
62
|
import UtensilsIcon from './Utensils';
|
|
63
|
+
import ViewQuotationIcon from './ViewQuotationIcon';
|
|
63
64
|
import WalletIcon from './WalletIcon';
|
|
64
65
|
import YouTubeIcon from './Youtube';
|
|
65
66
|
|
|
@@ -152,6 +153,7 @@ export const ICONS = {
|
|
|
152
153
|
'close-circle': CloseCircleIcon as unknown as IconComponent,
|
|
153
154
|
clock: ClockIcon as unknown as IconComponent,
|
|
154
155
|
'info-2': Info2Icon as unknown as IconComponent,
|
|
156
|
+
'view-quotation': ViewQuotationIcon as unknown as IconComponent,
|
|
155
157
|
} as const satisfies Record<string, IconComponent>;
|
|
156
158
|
|
|
157
159
|
export type IconName = keyof typeof ICONS;
|
|
@@ -275,16 +275,18 @@ export const DocketFooter: React.FC<DocketFooterProps> = ({
|
|
|
275
275
|
Add new quote
|
|
276
276
|
</Button>
|
|
277
277
|
)}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
<
|
|
281
|
-
|
|
282
|
-
size="sm"
|
|
278
|
+
{!isSingleMode && onViewClick && (
|
|
279
|
+
<div className="docket__footer-view">
|
|
280
|
+
<button
|
|
281
|
+
type="button"
|
|
283
282
|
onClick={onViewClick}
|
|
284
|
-
className="docket__footer-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
283
|
+
className="docket__footer-view-link">
|
|
284
|
+
<Icon name="view-quotation" size="sm" className="docket__footer-view-icon" />
|
|
285
|
+
<span className="docket__footer-view-text">View quotation</span>
|
|
286
|
+
</button>
|
|
287
|
+
</div>
|
|
288
|
+
)}
|
|
289
|
+
<div className="docket__footer-actions">
|
|
288
290
|
{onSaveClick && (
|
|
289
291
|
<Button
|
|
290
292
|
variant="outline-secondary"
|
|
@@ -207,6 +207,52 @@
|
|
|
207
207
|
min-width: 162px;
|
|
208
208
|
}
|
|
209
209
|
|
|
210
|
+
.docket__footer-view {
|
|
211
|
+
display: flex;
|
|
212
|
+
justify-content: flex-end;
|
|
213
|
+
width: 100%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.docket__footer-view-link {
|
|
217
|
+
display: inline-flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
gap: var(--component-button-spacing-ghost-sm-gap, 6px);
|
|
220
|
+
background: none;
|
|
221
|
+
border: none;
|
|
222
|
+
padding: var(--component-button-spacing-ghost-sm-padding-y, 0px) var(--component-button-spacing-ghost-sm-padding-x, 0px);
|
|
223
|
+
cursor: pointer;
|
|
224
|
+
font-family: var(--font-font-family-body, 'Satoshi', sans-serif);
|
|
225
|
+
font-size: var(--font-size-text-sm, 14px);
|
|
226
|
+
font-weight: var(--font-weight-font-medium, 500);
|
|
227
|
+
line-height: var(--font-leading-leading-sm, 20px);
|
|
228
|
+
color: var(--color-button-ghost-foreground-default, #78716c);
|
|
229
|
+
text-decoration: none;
|
|
230
|
+
transition: color 0.2s ease;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.docket__footer-view-link:hover {
|
|
234
|
+
color: var(--color-button-ghost-foreground-hover, #44403c);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.docket__footer-view-link:active {
|
|
238
|
+
color: var(--color-button-ghost-foreground-pressed, #1c1917);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.docket__footer-view-link:focus {
|
|
242
|
+
outline: none;
|
|
243
|
+
color: var(--color-button-ghost-foreground-focused, #1c1917);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.docket__footer-view-text {
|
|
247
|
+
display: inline-block;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.docket__footer-view-icon {
|
|
251
|
+
display: inline-flex;
|
|
252
|
+
align-items: center;
|
|
253
|
+
color: inherit;
|
|
254
|
+
}
|
|
255
|
+
|
|
210
256
|
.docket__footer-actions {
|
|
211
257
|
display: flex;
|
|
212
258
|
gap: var(--spacing-gap-md, 8px);
|