mautourco-components 0.2.21 → 0.2.23
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/Checkbox/Checkbox.d.ts +3 -2
- package/dist/components/atoms/Checkbox/Checkbox.js +16 -6
- package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
- package/dist/components/atoms/Inputs/Input/Input.d.ts +1 -1
- package/dist/components/molecules/AddItemButton/AddItemButton.css +2088 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.d.ts +7 -0
- package/dist/components/molecules/AddItemButton/AddItemButton.js +19 -0
- package/dist/components/molecules/BookingPax/BookingPax.d.ts +43 -0
- package/dist/components/molecules/BookingPax/BookingPax.js +43 -0
- package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +34 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +10 -0
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +89 -1
- package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +34 -11
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +43 -0
- package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +19 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +15 -0
- package/dist/components/molecules/BookingPax/BookingPaxHeader.js +13 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +30 -0
- package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +15 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +14 -0
- package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +11 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +51 -0
- package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +19 -2
- package/dist/components/molecules/BookingPax/index.d.ts +1 -0
- package/dist/components/molecules/BookingPax/index.js +1 -0
- package/dist/components/molecules/Calendar/DateTime.d.ts +5 -5
- package/dist/components/molecules/Calendar/DateTime.js +48 -37
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +20 -0
- package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +17 -6
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +18 -0
- package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +14 -3
- package/dist/components/molecules/ServiceSelector/ServiceSelector.d.ts +3 -0
- package/dist/components/molecules/ServiceSelector/ServiceSelector.js +23 -12
- package/dist/components/organisms/Booking/BookingPaxList.d.ts +64 -0
- package/dist/components/organisms/Booking/BookingPaxList.js +19 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.d.ts +12 -0
- package/dist/components/organisms/BookingAddItem/AddItemNewService.js +48 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.d.ts +9 -0
- package/dist/components/organisms/BookingAddItem/AddItemSelector.js +23 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.d.ts +16 -0
- package/dist/components/organisms/BookingAddItem/BookingAddItem.js +66 -0
- package/dist/components/organisms/BookingAddItem/index.d.ts +3 -0
- package/dist/components/organisms/BookingAddItem/index.js +3 -0
- package/dist/components/organisms/DateTimePicker/DateTimePicker.js +11 -7
- package/dist/components/organisms/Dialog/Dialog.d.ts +1 -1
- package/dist/components/organisms/Dialog/Dialog.js +4 -4
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.d.ts +29 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.js +31 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.d.ts +29 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingMailSent.js +31 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingReference.d.ts +35 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingReference.js +37 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.d.ts +35 -0
- package/dist/components/organisms/DialogBookingConfirm/BookingSuccess.js +33 -0
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +39 -2
- package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +25 -1
- package/dist/components/organisms/DialogBookingConfirm/index.d.ts +5 -0
- package/dist/components/organisms/DialogBookingConfirm/index.js +1 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.d.ts +1 -0
- package/dist/components/organisms/PaxSelector/PaxSelector.js +50 -28
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.d.ts +25 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationAccom.js +16 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.d.ts +24 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationBody.js +24 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.d.ts +30 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationExcursion.js +15 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.d.ts +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationHeader.js +23 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.d.ts +22 -0
- package/dist/components/organisms/TabCancellationPolicy/CancellationTransfer.js +13 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.d.ts +22 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderAccom.js +13 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.d.ts +18 -0
- package/dist/components/organisms/TabCancellationPolicy/HeaderExcursion.js +12 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +7 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.js +2 -1
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.d.ts +18 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyExcursion.js +12 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.d.ts +11 -0
- package/dist/components/organisms/TabCancellationPolicy/PolicyTransfer.js +11 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.d.ts +29 -0
- package/dist/components/organisms/TabCancellationPolicy/TabCancellationPolicy.js +29 -0
- package/dist/components/ui/popover.js +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -2
- package/dist/styles/components/checkbox.css +16 -9
- package/dist/styles/components/molecule/calendarInput.css +3 -4
- package/dist/styles/components/molecule/service-selector.css +70 -21
- package/package.json +1 -2
- package/src/components/atoms/Checkbox/Checkbox.tsx +38 -23
- package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +2 -2
- package/src/components/atoms/Inputs/Input/Input.tsx +1 -1
- package/src/components/molecules/AddItemButton/AddItemButton.css +5 -0
- package/src/components/molecules/AddItemButton/AddItemButton.tsx +18 -0
- package/src/components/molecules/BookingPax/BookingPax.tsx +43 -0
- package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +34 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +6 -0
- package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +92 -18
- package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +43 -0
- package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +28 -1
- package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +30 -0
- package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +14 -0
- package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +52 -2
- package/src/components/molecules/BookingPax/index.ts +2 -0
- package/src/components/molecules/Calendar/DateTime.tsx +69 -53
- package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +32 -12
- package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +27 -11
- package/src/components/molecules/ServiceSelector/ServiceSelector.tsx +91 -83
- package/src/components/organisms/Booking/BookingPaxList.tsx +64 -0
- package/src/components/organisms/BookingAddItem/AddItemNewService.tsx +95 -0
- package/src/components/organisms/BookingAddItem/AddItemSelector.tsx +43 -0
- package/src/components/organisms/BookingAddItem/BookingAddItem.tsx +120 -0
- package/src/components/organisms/BookingAddItem/index.ts +3 -0
- package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +13 -7
- package/src/components/organisms/Dialog/Dialog.tsx +13 -20
- package/src/components/organisms/DialogBookingConfirm/BookingCancellationPolicy.tsx +44 -0
- package/src/components/organisms/DialogBookingConfirm/BookingMailSent.tsx +56 -0
- package/src/components/organisms/DialogBookingConfirm/BookingReference.tsx +74 -0
- package/src/components/organisms/DialogBookingConfirm/BookingSuccess.tsx +67 -0
- package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +43 -2
- package/src/components/organisms/DialogBookingConfirm/index.ts +6 -0
- package/src/components/organisms/PaxSelector/PaxSelector.tsx +305 -193
- package/src/components/organisms/TabCancellationPolicy/CancellationAccom.tsx +25 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationBody.tsx +24 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationExcursion.tsx +30 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationHeader.tsx +23 -0
- package/src/components/organisms/TabCancellationPolicy/CancellationTransfer.tsx +22 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderAccom.tsx +22 -0
- package/src/components/organisms/TabCancellationPolicy/HeaderExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.css +3 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyAccom/PolicyAccom.tsx +3 -2
- package/src/components/organisms/TabCancellationPolicy/PolicyExcursion.tsx +18 -0
- package/src/components/organisms/TabCancellationPolicy/PolicyTransfer.tsx +11 -0
- package/src/components/organisms/TabCancellationPolicy/TabCancellationPolicy.tsx +29 -0
- package/src/components/ui/popover.tsx +2 -4
- package/src/styles/components/checkbox.css +16 -9
- package/src/styles/components/molecule/calendarInput.css +12 -13
- package/src/styles/components/molecule/service-selector.css +71 -23
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/checkbox.js +0 -31
- package/src/components/ui/checkbox.tsx +0 -32
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
export interface PolicyTransferProps {
|
|
2
2
|
carName: string;
|
|
3
3
|
}
|
|
4
|
+
/**
|
|
5
|
+
* PolicyTransfer is a component that allows the user to display the policy transfer.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <PolicyTransfer
|
|
9
|
+
* carName="Car Name"
|
|
10
|
+
* />
|
|
11
|
+
*
|
|
12
|
+
* @param props - The props for the PolicyTransfer component.
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
4
15
|
export default function PolicyTransfer(props: PolicyTransferProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -38,6 +38,17 @@ var policies = [
|
|
|
38
38
|
policy: '100% applicable fee claimed to the Operator',
|
|
39
39
|
},
|
|
40
40
|
];
|
|
41
|
+
/**
|
|
42
|
+
* PolicyTransfer is a component that allows the user to display the policy transfer.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <PolicyTransfer
|
|
46
|
+
* carName="Car Name"
|
|
47
|
+
* />
|
|
48
|
+
*
|
|
49
|
+
* @param props - The props for the PolicyTransfer component.
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
41
52
|
export default function PolicyTransfer(props) {
|
|
42
53
|
var carName = props.carName;
|
|
43
54
|
return (_jsxs("div", __assign({ className: "policy-excursion" }, { children: [_jsx(TextWithIcon, __assign({ icon: "car", textVariant: "bold", iconSize: "md", textSize: "md" }, { children: carName })), _jsx("div", __assign({ className: "grid grid-cols-2 xl:grid-cols-3 gap-x-4" }, { children: policies.map(function (policy, index) { return (_jsxs("div", __assign({ className: "mt-4" }, { children: [_jsx(Text, __assign({ variant: "medium", size: "sm", leading: "4" }, { children: policy.title })), _jsx("ul", __assign({ className: "pl-8" }, { children: _jsx("li", __assign({ className: "list-disc" }, { children: _jsx(Text, __assign({ size: "sm", leading: "4" }, { children: policy.policy })) })) }))] }), "policy-".concat(index))); }) }))] })));
|
|
@@ -3,6 +3,35 @@ import CancellationAccom from './CancellationAccom';
|
|
|
3
3
|
import CancellationExcursion from './CancellationExcursion';
|
|
4
4
|
import CancellationTransfer from './CancellationTransfer';
|
|
5
5
|
import TabCancellationPolicyLayout from './TabCancellationPolicyLayout/TabCancellationPolicyLayout';
|
|
6
|
+
/**
|
|
7
|
+
* TabCancellationPolicy is a component that allows the user to display the tab cancellation policy.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <TabCancellationPolicy>
|
|
11
|
+
* <TabCancellationPolicy.Accom
|
|
12
|
+
* hotelName="Hotel Name"
|
|
13
|
+
* pax="8 pax"
|
|
14
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
15
|
+
* image="/images/accom.png"
|
|
16
|
+
* roomPolicies={roomPolicies}
|
|
17
|
+
* isOnRequest={false}
|
|
18
|
+
* />
|
|
19
|
+
* <TabCancellationPolicy.Excursion
|
|
20
|
+
* name="Excursion Name"
|
|
21
|
+
* date="2024-01-01"
|
|
22
|
+
* image="/images/excursion.png"
|
|
23
|
+
* pickUpPoint="Pick Up Point"
|
|
24
|
+
* policies="Policies"
|
|
25
|
+
* />
|
|
26
|
+
* <TabCancellationPolicy.Transfer
|
|
27
|
+
* carName="Car Name"
|
|
28
|
+
* transferData={transferData}
|
|
29
|
+
* />
|
|
30
|
+
* </TabCancellationPolicy>
|
|
31
|
+
*
|
|
32
|
+
* @param props - The props for the TabCancellationPolicy component.
|
|
33
|
+
* @returns The TabCancellationPolicy component.
|
|
34
|
+
*/
|
|
6
35
|
declare function TabCancellationPolicy(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
7
36
|
declare namespace TabCancellationPolicy {
|
|
8
37
|
var Layout: typeof TabCancellationPolicyLayout;
|
|
@@ -14,6 +14,35 @@ import CancellationAccom from './CancellationAccom';
|
|
|
14
14
|
import CancellationExcursion from './CancellationExcursion';
|
|
15
15
|
import CancellationTransfer from './CancellationTransfer';
|
|
16
16
|
import TabCancellationPolicyLayout from './TabCancellationPolicyLayout/TabCancellationPolicyLayout';
|
|
17
|
+
/**
|
|
18
|
+
* TabCancellationPolicy is a component that allows the user to display the tab cancellation policy.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <TabCancellationPolicy>
|
|
22
|
+
* <TabCancellationPolicy.Accom
|
|
23
|
+
* hotelName="Hotel Name"
|
|
24
|
+
* pax="8 pax"
|
|
25
|
+
* dates={['2024-01-01', '2024-01-02']}
|
|
26
|
+
* image="/images/accom.png"
|
|
27
|
+
* roomPolicies={roomPolicies}
|
|
28
|
+
* isOnRequest={false}
|
|
29
|
+
* />
|
|
30
|
+
* <TabCancellationPolicy.Excursion
|
|
31
|
+
* name="Excursion Name"
|
|
32
|
+
* date="2024-01-01"
|
|
33
|
+
* image="/images/excursion.png"
|
|
34
|
+
* pickUpPoint="Pick Up Point"
|
|
35
|
+
* policies="Policies"
|
|
36
|
+
* />
|
|
37
|
+
* <TabCancellationPolicy.Transfer
|
|
38
|
+
* carName="Car Name"
|
|
39
|
+
* transferData={transferData}
|
|
40
|
+
* />
|
|
41
|
+
* </TabCancellationPolicy>
|
|
42
|
+
*
|
|
43
|
+
* @param props - The props for the TabCancellationPolicy component.
|
|
44
|
+
* @returns The TabCancellationPolicy component.
|
|
45
|
+
*/
|
|
17
46
|
export default function TabCancellationPolicy(props) {
|
|
18
47
|
return _jsx("div", __assign({ className: "tab-cancellation-policy" }, props));
|
|
19
48
|
}
|
|
@@ -33,7 +33,7 @@ function PopoverTrigger(_a) {
|
|
|
33
33
|
}
|
|
34
34
|
function PopoverContent(_a) {
|
|
35
35
|
var className = _a.className, _b = _a.align, align = _b === void 0 ? 'center' : _b, _c = _a.sideOffset, sideOffset = _c === void 0 ? 4 : _c, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
36
|
-
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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
|
|
36
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, __assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden border-[var(--color-elevation-state-hover-subtle)] z-[99999]', className) }, props)) }));
|
|
37
37
|
}
|
|
38
38
|
function PopoverAnchor(_a) {
|
|
39
39
|
var props = __rest(_a, []);
|
package/dist/index.d.ts
CHANGED
|
@@ -15,11 +15,13 @@ export { default as Spinner } from './components/atoms/Spinner/Spinner';
|
|
|
15
15
|
export { Heading, Text } from './components/atoms/Typography/Typography';
|
|
16
16
|
export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
|
|
17
17
|
export { ActionDropdown, type ActionDropdownItem, } from './components/molecules/ActionDropdown/ActionDropdown';
|
|
18
|
+
export { AddItemButton } from './components/molecules/AddItemButton/AddItemButton';
|
|
18
19
|
export * from './components/molecules/BookingResume';
|
|
19
20
|
export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
20
21
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
21
22
|
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
22
23
|
export * from './components/molecules/DetailsInfo';
|
|
24
|
+
export * from './components/molecules/DialogContentPolicy';
|
|
23
25
|
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
24
26
|
export { default as FromTo } from './components/molecules/FromTo/FromTo';
|
|
25
27
|
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
@@ -38,10 +40,12 @@ export * from './components/molecules/BookingPax';
|
|
|
38
40
|
export { DetailsClientInfo } from './components/molecules/DetailsInfo/DetailsClient/DetailsClient';
|
|
39
41
|
export { default as TableServiceItem } from './components/molecules/TableServiceItem';
|
|
40
42
|
export * from './components/organisms/Booking';
|
|
43
|
+
export * from './components/organisms/BookingAddItem';
|
|
41
44
|
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
42
45
|
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
43
46
|
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
44
47
|
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
48
|
+
export * from './components/organisms/DialogBookingConfirm';
|
|
45
49
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
46
50
|
export { default as MultipleQuotationDocket } from './components/organisms/MultipleQuotationDocket';
|
|
47
51
|
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
@@ -81,6 +85,9 @@ export type { RoundTripData, RoundTripProps, RoundTripTransfer, } from './compon
|
|
|
81
85
|
export type { SearchBarTransferData, SearchBarTransferProps, TransferMode, } from './components/organisms/SearchBarTransfer/SearchBarTransfer';
|
|
82
86
|
export type { TopNavigationProps } from './components/organisms/TopNavigation/TopNavigation';
|
|
83
87
|
export type { TransferLineData, TransferLineProps, TransferType, } from './components/organisms/TransferLine/TransferLine';
|
|
88
|
+
export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
|
|
89
|
+
export type { InputProps } from './components/atoms/Inputs/Input/Input';
|
|
90
|
+
export type { AddItemButtonProps } from './components/molecules/AddItemButton/AddItemButton';
|
|
84
91
|
export type { BreadcrumbsItem, BreadcrumbsProps, } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
85
92
|
export type { FromToProps } from './components/molecules/FromTo/FromTo';
|
|
86
93
|
export type { SectionTitleProps } from './components/molecules/SectionTitle/SectionTitle';
|
package/dist/index.js
CHANGED
|
@@ -17,11 +17,13 @@ export { Heading, Text } from './components/atoms/Typography/Typography';
|
|
|
17
17
|
export { DateDisplay } from './components/molecules/DateDisplay/DateDisplay';
|
|
18
18
|
// Molecules - Composed components
|
|
19
19
|
export { ActionDropdown, } from './components/molecules/ActionDropdown/ActionDropdown';
|
|
20
|
+
export { AddItemButton } from './components/molecules/AddItemButton/AddItemButton';
|
|
20
21
|
export * from './components/molecules/BookingResume';
|
|
21
22
|
export { Breadcrumbs } from './components/molecules/Breadcrumbs/Breadcrumbs';
|
|
22
23
|
export { default as CalendarInput } from './components/molecules/Calendar/CalendarInput';
|
|
23
24
|
export { default as TimePicker } from './components/molecules/Calendar/TimePicker';
|
|
24
25
|
export * from './components/molecules/DetailsInfo';
|
|
26
|
+
export * from './components/molecules/DialogContentPolicy';
|
|
25
27
|
export { default as FeatureRow } from './components/molecules/FeatureRow/FeatureRow';
|
|
26
28
|
export { default as FromTo } from './components/molecules/FromTo/FromTo';
|
|
27
29
|
export { default as LocationDropdown } from './components/molecules/LocationDropdown/LocationDropdown';
|
|
@@ -41,10 +43,12 @@ export * from './components/molecules/BookingPax';
|
|
|
41
43
|
export { DetailsClientInfo } from './components/molecules/DetailsInfo/DetailsClient/DetailsClient';
|
|
42
44
|
export { default as TableServiceItem } from './components/molecules/TableServiceItem';
|
|
43
45
|
export * from './components/organisms/Booking';
|
|
46
|
+
export * from './components/organisms/BookingAddItem';
|
|
44
47
|
export { default as CarBookingCard } from './components/organisms/CarBookingCard/CarBookingCard';
|
|
45
48
|
export { CardContainer } from './components/organisms/CardContainer/CardContainer';
|
|
46
49
|
export { default as DateTimePicker } from './components/organisms/DateTimePicker/DateTimePicker';
|
|
47
50
|
export { Dialog } from './components/organisms/Dialog/Dialog';
|
|
51
|
+
export * from './components/organisms/DialogBookingConfirm';
|
|
48
52
|
export { Footer } from './components/organisms/Footer/Footer';
|
|
49
53
|
export { default as MultipleQuotationDocket } from './components/organisms/MultipleQuotationDocket';
|
|
50
54
|
export { default as PaxSelector } from './components/organisms/PaxSelector/PaxSelector';
|
|
@@ -71,5 +75,3 @@ export { default as SearchIcon } from './components/atoms/Icon/icons/Search';
|
|
|
71
75
|
export { default as SettingsIcon } from './components/atoms/Icon/icons/Settings';
|
|
72
76
|
export { default as UserIcon } from './components/atoms/Icon/icons/User';
|
|
73
77
|
export * from './types/table';
|
|
74
|
-
// export type { InputProps } from './components/atoms/Inputs/Input/Input';
|
|
75
|
-
// export type { CheckboxProps } from './components/atoms/Checkbox/Checkbox';
|
|
@@ -2079,7 +2079,8 @@
|
|
|
2079
2079
|
.checkbox-container {
|
|
2080
2080
|
display: inline-flex;
|
|
2081
2081
|
align-items: center;
|
|
2082
|
-
width:
|
|
2082
|
+
width: auto;
|
|
2083
|
+
min-height: 33px;
|
|
2083
2084
|
}
|
|
2084
2085
|
|
|
2085
2086
|
.checkbox-input {
|
|
@@ -2095,14 +2096,18 @@
|
|
|
2095
2096
|
.checkbox-label {
|
|
2096
2097
|
display: flex;
|
|
2097
2098
|
align-items: center;
|
|
2098
|
-
column-gap: var(
|
|
2099
|
+
column-gap: var(
|
|
2100
|
+
--checkbox-spacing-inline-gap,
|
|
2101
|
+
var(--multiselect-spacing-option-icon-gap, 0.625rem)
|
|
2102
|
+
);
|
|
2099
2103
|
cursor: pointer;
|
|
2100
2104
|
-webkit-user-select: none;
|
|
2101
2105
|
user-select: none;
|
|
2102
2106
|
width: 100%;
|
|
2103
|
-
padding: var(--checkbox-spacing-label-padding, 0.5rem 0.75rem);
|
|
2107
|
+
/* padding: var(--checkbox-spacing-label-padding, 0.5rem 0.75rem); */
|
|
2104
2108
|
border-radius: var(--checkbox-border-radius, 0.375rem);
|
|
2105
|
-
transition: all var(--checkbox-transition-duration, 0.2s)
|
|
2109
|
+
transition: all var(--checkbox-transition-duration, 0.2s)
|
|
2110
|
+
var(--checkbox-transition-timing, ease-in-out);
|
|
2106
2111
|
}
|
|
2107
2112
|
|
|
2108
2113
|
.checkbox-box {
|
|
@@ -2113,12 +2118,13 @@
|
|
|
2113
2118
|
border-radius: var(--checkbox-size-box-border-radius, 0.125rem);
|
|
2114
2119
|
background-color: var(--color-white);
|
|
2115
2120
|
opacity: var(--opacity-opacity-100);
|
|
2116
|
-
top: var(--checkbox-position-top, 0.125rem);
|
|
2117
|
-
left: var(--checkbox-position-left, 0.125rem);
|
|
2121
|
+
/* top: var(--checkbox-position-top, 0.125rem);
|
|
2122
|
+
left: var(--checkbox-position-left, 0.125rem); */
|
|
2118
2123
|
display: flex;
|
|
2119
2124
|
align-items: center;
|
|
2120
2125
|
justify-content: center;
|
|
2121
|
-
transition: all var(--checkbox-transition-duration, 0.2s)
|
|
2126
|
+
transition: all var(--checkbox-transition-duration, 0.2s)
|
|
2127
|
+
var(--checkbox-transition-timing, ease-in-out);
|
|
2122
2128
|
flex-shrink: 0;
|
|
2123
2129
|
}
|
|
2124
2130
|
|
|
@@ -2128,7 +2134,8 @@
|
|
|
2128
2134
|
font-size: var(--checkbox-typography-fontSize, 0.875rem);
|
|
2129
2135
|
line-height: var(--checkbox-typography-lineHeight, 1.25rem);
|
|
2130
2136
|
color: var(--color-gray-900);
|
|
2131
|
-
transition: color var(--checkbox-transition-duration, 0.2s)
|
|
2137
|
+
transition: color var(--checkbox-transition-duration, 0.2s)
|
|
2138
|
+
var(--checkbox-transition-timing, ease-in-out);
|
|
2132
2139
|
}
|
|
2133
2140
|
|
|
2134
2141
|
.checkbox-leading {
|
|
@@ -2156,7 +2163,7 @@
|
|
|
2156
2163
|
|
|
2157
2164
|
.checkbox--checked .checkbox-box {
|
|
2158
2165
|
background-color: var(--color-transparent);
|
|
2159
|
-
border-color: var(--
|
|
2166
|
+
border-color: var(--color-atoll-green-800);
|
|
2160
2167
|
}
|
|
2161
2168
|
|
|
2162
2169
|
.checkbox--checked .checkbox-label {
|
|
@@ -2076,7 +2076,7 @@
|
|
|
2076
2076
|
|
|
2077
2077
|
.calendar-input {
|
|
2078
2078
|
display: flex;
|
|
2079
|
-
height:
|
|
2079
|
+
height: 3rem;
|
|
2080
2080
|
width: 100%;
|
|
2081
2081
|
align-items: center;
|
|
2082
2082
|
gap: 0.5rem;
|
|
@@ -2187,8 +2187,8 @@
|
|
|
2187
2187
|
|
|
2188
2188
|
/* Ensure label and icon remain visible when wrapper is set to active via data-state */
|
|
2189
2189
|
|
|
2190
|
-
.calendar-input-wrapper[data-state=
|
|
2191
|
-
.calendar-input-wrapper[data-state=
|
|
2190
|
+
.calendar-input-wrapper[data-state='active'] .calendar-input__label,
|
|
2191
|
+
.calendar-input-wrapper[data-state='active'] .calendar-input__icon-button {
|
|
2192
2192
|
visibility: visible;
|
|
2193
2193
|
opacity: 1;
|
|
2194
2194
|
}
|
|
@@ -2304,5 +2304,4 @@
|
|
|
2304
2304
|
padding-top: 0.5rem;
|
|
2305
2305
|
padding-bottom: 0.5rem;
|
|
2306
2306
|
}
|
|
2307
|
-
|
|
2308
2307
|
}
|
|
@@ -2085,9 +2085,15 @@
|
|
|
2085
2085
|
|
|
2086
2086
|
.service-selector__trigger {
|
|
2087
2087
|
width: 100%;
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2088
|
+
max-height: 48px;
|
|
2089
|
+
padding: var(--service-selector-spacing-service-selector-padding-y, 12px)
|
|
2090
|
+
var(--service-selector-spacing-service-selector-padding-x, 24px);
|
|
2091
|
+
background-color: var(
|
|
2092
|
+
--service-selector-color-service-selector-background-default,
|
|
2093
|
+
#ffffff
|
|
2094
|
+
);
|
|
2095
|
+
border: var(--service-selector-border-width-default, 1px) solid
|
|
2096
|
+
var(--service-selector-color-service-selector-border-default, #a3a3a3);
|
|
2091
2097
|
border-radius: var(--border-radius-rounded-xl, 12px);
|
|
2092
2098
|
opacity: var(--opacity-opacity-100, 1);
|
|
2093
2099
|
display: flex;
|
|
@@ -2097,11 +2103,22 @@
|
|
|
2097
2103
|
cursor: pointer;
|
|
2098
2104
|
transition: all 0.2s ease-in-out;
|
|
2099
2105
|
/* Website/Light/Level 1 */
|
|
2100
|
-
box-shadow:
|
|
2106
|
+
box-shadow:
|
|
2107
|
+
var(--spacing-base-0, 0px) var(--spacing-base-0, 0px)
|
|
2108
|
+
var(--backdrop-blur-backdrop-blur-sm, 4px) var(--spacing-base-0, 0px)
|
|
2109
|
+
rgba(48, 54, 66, 0.11),
|
|
2110
|
+
var(--spacing-base-0, 0px) var(--spacing-base-0-5, 2px)
|
|
2111
|
+
var(--backdrop-blur-backdrop-blur-xs, 2px) var(--spacing-base-0, 0px)
|
|
2112
|
+
rgba(48, 54, 66, 0.1);
|
|
2101
2113
|
}
|
|
2102
2114
|
|
|
2103
|
-
.service-selector__trigger:hover:not(:disabled):not(
|
|
2104
|
-
|
|
2115
|
+
.service-selector__trigger:hover:not(:disabled):not(
|
|
2116
|
+
.service-selector__trigger--selected
|
|
2117
|
+
) {
|
|
2118
|
+
background-color: var(
|
|
2119
|
+
--service-selector-color-service-selector-background-hover,
|
|
2120
|
+
#ccfbf6
|
|
2121
|
+
);
|
|
2105
2122
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
2106
2123
|
}
|
|
2107
2124
|
|
|
@@ -2139,7 +2156,10 @@
|
|
|
2139
2156
|
/* Trigger States */
|
|
2140
2157
|
|
|
2141
2158
|
.service-selector__trigger--default {
|
|
2142
|
-
background-color: var(
|
|
2159
|
+
background-color: var(
|
|
2160
|
+
--service-selector-color-service-selector-background-default,
|
|
2161
|
+
#ffffff
|
|
2162
|
+
);
|
|
2143
2163
|
border-color: var(--service-selector-color-service-selector-border-default, #a3a3a3);
|
|
2144
2164
|
}
|
|
2145
2165
|
|
|
@@ -2156,20 +2176,29 @@
|
|
|
2156
2176
|
/* Selected state - same style as default */
|
|
2157
2177
|
|
|
2158
2178
|
.service-selector__trigger.service-selector__trigger--selected {
|
|
2159
|
-
background-color: var(
|
|
2179
|
+
background-color: var(
|
|
2180
|
+
--service-selector-color-service-selector-background-default,
|
|
2181
|
+
#ffffff
|
|
2182
|
+
);
|
|
2160
2183
|
border-color: var(--service-selector-color-service-selector-border-default, #a3a3a3);
|
|
2161
2184
|
}
|
|
2162
2185
|
|
|
2163
|
-
.service-selector__trigger.service-selector__trigger--selected
|
|
2164
|
-
.service-selector__trigger
|
|
2165
|
-
.service-selector__trigger.service-selector__trigger--selected
|
|
2186
|
+
.service-selector__trigger.service-selector__trigger--selected
|
|
2187
|
+
.service-selector__trigger-icon,
|
|
2188
|
+
.service-selector__trigger.service-selector__trigger--selected
|
|
2189
|
+
.service-selector__trigger-text,
|
|
2190
|
+
.service-selector__trigger.service-selector__trigger--selected
|
|
2191
|
+
.service-selector__trigger-chevron {
|
|
2166
2192
|
color: var(--service-selector-color-service-selector-foreground-default, #0f7173);
|
|
2167
2193
|
}
|
|
2168
2194
|
|
|
2169
2195
|
/* When dropdown is open AND a service is selected, keep default style */
|
|
2170
2196
|
|
|
2171
2197
|
.service-selector__trigger.service-selector__trigger--selected:hover {
|
|
2172
|
-
background-color: var(
|
|
2198
|
+
background-color: var(
|
|
2199
|
+
--service-selector-color-service-selector-background-hover,
|
|
2200
|
+
#ccfbf6
|
|
2201
|
+
);
|
|
2173
2202
|
border-color: var(--service-selector-color-service-selector-border-hover, #0f7173);
|
|
2174
2203
|
}
|
|
2175
2204
|
|
|
@@ -2186,17 +2215,21 @@
|
|
|
2186
2215
|
/* Dropdown Panel */
|
|
2187
2216
|
|
|
2188
2217
|
.service-selector__panel {
|
|
2189
|
-
position: absolute;
|
|
2218
|
+
/* position: absolute; */
|
|
2190
2219
|
top: 100%;
|
|
2191
2220
|
left: 0;
|
|
2192
2221
|
right: 0;
|
|
2222
|
+
padding: 0;
|
|
2193
2223
|
margin-top: 8px;
|
|
2194
2224
|
background-color: var(--color-elevation-level-1, #ffffff);
|
|
2195
2225
|
border-radius: var(--service-selector-boder-radius-dropdown-item-default, 12px);
|
|
2196
2226
|
overflow: hidden;
|
|
2197
2227
|
z-index: 50;
|
|
2198
|
-
border: var(--service-selector-border-width-default, 1px) solid
|
|
2199
|
-
|
|
2228
|
+
border: var(--service-selector-border-width-default, 1px) solid
|
|
2229
|
+
var(--service-selector-color-service-selector-border-default, #a3a3a3);
|
|
2230
|
+
box-shadow:
|
|
2231
|
+
0px 0px 4px 0px rgba(48, 54, 66, 0.11),
|
|
2232
|
+
0px 0px 2px 0px rgba(48, 54, 66, 0.1);
|
|
2200
2233
|
}
|
|
2201
2234
|
|
|
2202
2235
|
.service-selector__content {
|
|
@@ -2230,14 +2263,18 @@
|
|
|
2230
2263
|
|
|
2231
2264
|
.service-selector__option {
|
|
2232
2265
|
width: 100%;
|
|
2233
|
-
padding: var(--service-selector-spacing-dropdown-item-padding-y, 12px)
|
|
2266
|
+
padding: var(--service-selector-spacing-dropdown-item-padding-y, 12px)
|
|
2267
|
+
var(--service-selector-spacing-dropdown-item-padding-x, 24px);
|
|
2234
2268
|
display: flex;
|
|
2235
2269
|
align-items: center;
|
|
2236
2270
|
gap: var(--service-selector-spacing-dropdown-item-gap, 12px);
|
|
2237
2271
|
cursor: pointer;
|
|
2238
2272
|
transition: all 0.2s ease-in-out;
|
|
2239
2273
|
border: 0;
|
|
2240
|
-
background-color: var(
|
|
2274
|
+
background-color: var(
|
|
2275
|
+
--service-selector-color-dropdown-item-background-default,
|
|
2276
|
+
transparent
|
|
2277
|
+
);
|
|
2241
2278
|
text-align: left;
|
|
2242
2279
|
border-radius: var(--service-selector-boder-radius-dropdown-item-default, 12px);
|
|
2243
2280
|
}
|
|
@@ -2246,17 +2283,25 @@
|
|
|
2246
2283
|
background-color: var(--service-selector-color-dropdown-item-background-hover, #f5f5f5);
|
|
2247
2284
|
}
|
|
2248
2285
|
|
|
2249
|
-
.service-selector__option:hover:not(:disabled):not(.service-selector__option--selected)
|
|
2250
|
-
.service-selector__option
|
|
2286
|
+
.service-selector__option:hover:not(:disabled):not(.service-selector__option--selected)
|
|
2287
|
+
.service-selector__option-icon,
|
|
2288
|
+
.service-selector__option:hover:not(:disabled):not(.service-selector__option--selected)
|
|
2289
|
+
.service-selector__option-text {
|
|
2251
2290
|
color: var(--service-selector-color-dropdown-item-foreground-hover, #404040);
|
|
2252
2291
|
}
|
|
2253
2292
|
|
|
2254
2293
|
.service-selector__option--selected {
|
|
2255
|
-
background-color: var(
|
|
2294
|
+
background-color: var(
|
|
2295
|
+
--service-selector-color-dropdown-item-background-active,
|
|
2296
|
+
#042c2f
|
|
2297
|
+
);
|
|
2256
2298
|
}
|
|
2257
2299
|
|
|
2258
2300
|
.service-selector__option--selected:hover {
|
|
2259
|
-
background-color: var(
|
|
2301
|
+
background-color: var(
|
|
2302
|
+
--service-selector-color-dropdown-item-background-active,
|
|
2303
|
+
#042c2f
|
|
2304
|
+
);
|
|
2260
2305
|
}
|
|
2261
2306
|
|
|
2262
2307
|
.service-selector__option--selected .service-selector__option-icon,
|
|
@@ -2308,3 +2353,7 @@
|
|
|
2308
2353
|
padding: 10px 16px;
|
|
2309
2354
|
}
|
|
2310
2355
|
}
|
|
2356
|
+
|
|
2357
|
+
[data-radix-popper-content-wrapper] {
|
|
2358
|
+
z-index: 99999 !important;
|
|
2359
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mautourco-components",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Bibliothèque de composants Motorco pour le redesign",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"motorco"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@radix-ui/react-checkbox": "^1.3.3",
|
|
29
28
|
"@radix-ui/react-popover": "^1.1.15",
|
|
30
29
|
"@radix-ui/react-slot": "^1.2.4",
|
|
31
30
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import Check from '../Icon/icons/Check';
|
|
3
|
+
import { Text } from '../Typography/Typography';
|
|
3
4
|
|
|
4
|
-
interface CheckboxProps {
|
|
5
|
+
export interface CheckboxProps {
|
|
5
6
|
checked?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
error?: boolean;
|
|
8
9
|
label?: string;
|
|
9
|
-
onChange?: (checked: boolean) => void;
|
|
10
10
|
className?: string;
|
|
11
11
|
id?: string;
|
|
12
12
|
leadingContent?: React.ReactNode;
|
|
13
|
+
labelPosition?: 'leading' | 'trailing';
|
|
14
|
+
onChange?: (checked: boolean) => void;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
const Checkbox: React.FC<CheckboxProps> = ({
|
|
@@ -20,61 +22,74 @@ const Checkbox: React.FC<CheckboxProps> = ({
|
|
|
20
22
|
onChange,
|
|
21
23
|
className = '',
|
|
22
24
|
id,
|
|
23
|
-
leadingContent
|
|
25
|
+
leadingContent,
|
|
26
|
+
labelPosition = 'trailing',
|
|
24
27
|
}) => {
|
|
28
|
+
const [isChecked, setIsChecked] = useState(false);
|
|
29
|
+
|
|
25
30
|
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
26
|
-
if (!disabled
|
|
27
|
-
|
|
31
|
+
if (!disabled) {
|
|
32
|
+
setIsChecked(e.target.checked);
|
|
28
33
|
}
|
|
34
|
+
onChange?.(e.target.checked);
|
|
29
35
|
};
|
|
30
36
|
|
|
31
37
|
const handleLabelClick = (e: React.MouseEvent<HTMLLabelElement>) => {
|
|
32
38
|
if (!disabled && onChange) {
|
|
33
39
|
e.preventDefault();
|
|
34
|
-
onChange(!
|
|
40
|
+
onChange(!isChecked);
|
|
35
41
|
}
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
const getStateClasses = () => {
|
|
39
45
|
if (disabled) return 'checkbox--disabled';
|
|
40
46
|
if (error) return 'checkbox--error';
|
|
41
|
-
if (
|
|
47
|
+
if (isChecked) return 'checkbox--checked';
|
|
42
48
|
return 'checkbox--default';
|
|
43
49
|
};
|
|
44
50
|
|
|
45
51
|
const checkboxId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
|
|
46
52
|
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
setIsChecked(checked);
|
|
55
|
+
}, [checked]);
|
|
56
|
+
|
|
57
|
+
const renderLabel = () => {
|
|
58
|
+
return (
|
|
59
|
+
label && (
|
|
60
|
+
<Text
|
|
61
|
+
as="span"
|
|
62
|
+
size="sm"
|
|
63
|
+
variant="medium"
|
|
64
|
+
color={error ? 'state-error' : 'default'}>
|
|
65
|
+
{label}
|
|
66
|
+
</Text>
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
47
71
|
return (
|
|
48
72
|
<div className={`checkbox-container ${getStateClasses()} ${className}`}>
|
|
49
|
-
<label
|
|
50
|
-
htmlFor={checkboxId}
|
|
51
|
-
className="checkbox-label"
|
|
52
|
-
onClick={handleLabelClick}
|
|
53
|
-
>
|
|
73
|
+
<label htmlFor={checkboxId} className="checkbox-label" onClick={handleLabelClick}>
|
|
54
74
|
<input
|
|
55
75
|
type="checkbox"
|
|
56
76
|
id={checkboxId}
|
|
57
|
-
checked={
|
|
77
|
+
checked={isChecked}
|
|
58
78
|
disabled={disabled}
|
|
59
79
|
onChange={handleChange}
|
|
60
80
|
className="checkbox-input"
|
|
61
81
|
readOnly
|
|
62
82
|
/>
|
|
83
|
+
{labelPosition === 'leading' && renderLabel()}
|
|
63
84
|
<div className="checkbox-button">
|
|
64
85
|
<div className="checkbox-touch-target">
|
|
65
86
|
<div className="checkbox-box">
|
|
66
|
-
{
|
|
67
|
-
<Check size="sm" className="checkbox-icon" />
|
|
68
|
-
)}
|
|
87
|
+
{isChecked && <Check size="sm" className="checkbox-icon" />}
|
|
69
88
|
</div>
|
|
70
89
|
</div>
|
|
71
90
|
</div>
|
|
72
|
-
{leadingContent &&
|
|
73
|
-
|
|
74
|
-
)}
|
|
75
|
-
{label && (
|
|
76
|
-
<span className="checkbox-text">{label}</span>
|
|
77
|
-
)}
|
|
91
|
+
{leadingContent && <span className="checkbox-leading">{leadingContent}</span>}
|
|
92
|
+
{labelPosition === 'trailing' && renderLabel()}
|
|
78
93
|
</label>
|
|
79
94
|
</div>
|
|
80
95
|
);
|
|
@@ -45,12 +45,12 @@ const PlusCircleIcon: React.FC<PlusCircleIconProps> = ({
|
|
|
45
45
|
<g clipPath="url(#clip0_7074_66340)">
|
|
46
46
|
<path
|
|
47
47
|
d="M13.915 8.00098C13.915 4.7334 11.2666 2.08416 7.99902 2.08398C4.73134 2.08398 2.08203 4.73329 2.08203 8.00098C2.08221 11.2685 4.73145 13.917 7.99902 13.917C11.2664 13.9168 13.9149 11.2684 13.915 8.00098ZM7.24902 10.667V8.75098H5.33203C4.91793 8.75098 4.58221 8.41504 4.58203 8.00098C4.58203 7.58676 4.91782 7.25098 5.33203 7.25098H7.24902V5.33398C7.24902 4.91977 7.58481 4.58398 7.99902 4.58398C8.41309 4.58416 8.74902 4.91988 8.74902 5.33398V7.25098H10.665L10.7422 7.25488C11.1203 7.29337 11.415 7.61271 11.415 8.00098C11.4149 8.38912 11.1202 8.70862 10.7422 8.74707L10.665 8.75098H8.74902V10.667C8.74902 11.0811 8.41309 11.4168 7.99902 11.417C7.58481 11.417 7.24902 11.0812 7.24902 10.667ZM15.415 8.00098C15.4149 12.0968 12.0949 15.4168 7.99902 15.417C3.90302 15.417 0.582208 12.0969 0.582031 8.00098C0.582031 3.90487 3.90291 0.583984 7.99902 0.583984C12.095 0.584161 15.415 3.90497 15.415 8.00098Z"
|
|
48
|
-
fill="
|
|
48
|
+
fill="currentColor"
|
|
49
49
|
/>
|
|
50
50
|
</g>
|
|
51
51
|
<defs>
|
|
52
52
|
<clipPath id="clip0_7074_66340">
|
|
53
|
-
<rect width="16" height="16" fill="
|
|
53
|
+
<rect width="16" height="16" fill="currentColor" />
|
|
54
54
|
</clipPath>
|
|
55
55
|
</defs>
|
|
56
56
|
</svg>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Icon from '../../atoms/Icon/Icon';
|
|
3
|
+
import { Text } from '../../atoms/Typography/Typography';
|
|
4
|
+
import './AddItemButton.css';
|
|
5
|
+
|
|
6
|
+
export interface AddItemButtonProps {
|
|
7
|
+
label: React.ReactNode;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const AddItemButton: React.FC<AddItemButtonProps> = ({ label, onClick }) => {
|
|
12
|
+
return (
|
|
13
|
+
<button className="add-item-button" onClick={onClick}>
|
|
14
|
+
<Icon name="plus-circle" size="lg" />
|
|
15
|
+
<Text variant="medium">{label}</Text>
|
|
16
|
+
</button>
|
|
17
|
+
);
|
|
18
|
+
};
|