mautourco-components 0.2.19 → 0.2.21

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.
Files changed (109) hide show
  1. package/dist/components/atoms/Icon/icons/BusIcon.js +1 -1
  2. package/dist/components/atoms/Icon/icons/CatamaranIcon.js +1 -1
  3. package/dist/components/atoms/Icon/icons/ClockIcon.d.ts +4 -0
  4. package/dist/components/atoms/Icon/icons/ClockIcon.js +36 -0
  5. package/dist/components/atoms/Icon/icons/CloseCircleIcon.js +1 -1
  6. package/dist/components/atoms/Icon/icons/MapIcon.js +1 -1
  7. package/dist/components/atoms/Icon/icons/PlusCircleIcon.js +1 -1
  8. package/dist/components/atoms/Icon/icons/SeaIcon.js +1 -1
  9. package/dist/components/atoms/Icon/icons/registry.d.ts +1 -0
  10. package/dist/components/atoms/Icon/icons/registry.js +2 -0
  11. package/dist/components/atoms/Inputs/Input/Input.d.ts +2 -1
  12. package/dist/components/atoms/Inputs/Input/Input.js +1 -1
  13. package/dist/components/atoms/Inputs/Textarea/Textarea.d.ts +3 -1
  14. package/dist/components/atoms/Inputs/Textarea/Textarea.js +7 -5
  15. package/dist/components/molecules/BookingPax/BookingPax.d.ts +7 -0
  16. package/dist/components/molecules/BookingPax/BookingPax.js +21 -0
  17. package/dist/components/molecules/BookingPax/BookingPaxAccom.d.ts +22 -0
  18. package/dist/components/molecules/BookingPax/BookingPaxAccom.js +61 -0
  19. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +2090 -0
  20. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.d.ts +31 -0
  21. package/dist/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.js +96 -0
  22. package/dist/components/molecules/BookingPax/BookingPaxExcursion.d.ts +14 -0
  23. package/dist/components/molecules/BookingPax/BookingPaxExcursion.js +31 -0
  24. package/dist/components/molecules/BookingPax/BookingPaxHeader.d.ts +16 -0
  25. package/dist/components/molecules/BookingPax/BookingPaxHeader.js +28 -0
  26. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +2103 -0
  27. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.d.ts +11 -0
  28. package/dist/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.js +19 -0
  29. package/dist/components/molecules/BookingPax/BookingPaxRemarks.d.ts +5 -0
  30. package/dist/components/molecules/BookingPax/BookingPaxRemarks.js +37 -0
  31. package/dist/components/molecules/BookingPax/BookingPaxTransfer.d.ts +18 -0
  32. package/dist/components/molecules/BookingPax/BookingPaxTransfer.js +40 -0
  33. package/dist/components/molecules/BookingPax/index.d.ts +5 -0
  34. package/dist/components/molecules/BookingPax/index.js +1 -0
  35. package/dist/components/molecules/Calendar/CalendarInput.d.ts +6 -3
  36. package/dist/components/molecules/Calendar/CalendarInput.js +10 -10
  37. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +2142 -0
  38. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.d.ts +11 -0
  39. package/dist/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.js +19 -0
  40. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.d.ts +9 -0
  41. package/dist/components/molecules/DialogContentPolicy/DialogCancellationAccom.js +24 -0
  42. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.d.ts +17 -0
  43. package/dist/components/molecules/DialogContentPolicy/DialogCancellationExcursion.js +20 -0
  44. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.d.ts +11 -0
  45. package/dist/components/molecules/DialogContentPolicy/DialogCancellationList.js +33 -0
  46. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.d.ts +11 -0
  47. package/dist/components/molecules/DialogContentPolicy/DialogContentPolicy.js +27 -0
  48. package/dist/components/molecules/DialogContentPolicy/index.d.ts +4 -0
  49. package/dist/components/molecules/DialogContentPolicy/index.js +1 -0
  50. package/dist/components/molecules/ServiceTitle/ServiceTitle.css +3 -0
  51. package/dist/components/molecules/ServiceTitle/ServiceTitle.d.ts +7 -1
  52. package/dist/components/molecules/ServiceTitle/ServiceTitle.js +4 -3
  53. package/dist/components/organisms/Booking/Booking.d.ts +2 -0
  54. package/dist/components/organisms/Booking/Booking.js +4 -0
  55. package/dist/components/organisms/Booking/BookingHeader.d.ts +8 -0
  56. package/dist/components/organisms/Booking/BookingHeader.js +17 -0
  57. package/dist/components/organisms/Booking/BookingPaxList.d.ts +25 -0
  58. package/dist/components/organisms/Booking/BookingPaxList.js +117 -0
  59. package/dist/components/organisms/Booking/BookingStep/BookingStep.d.ts +1 -0
  60. package/dist/components/organisms/Booking/BookingStep/BookingStep.js +5 -2
  61. package/dist/components/organisms/DateTimePicker/DateTimePicker.d.ts +6 -3
  62. package/dist/components/organisms/DateTimePicker/DateTimePicker.js +28 -22
  63. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.d.ts +10 -0
  64. package/dist/components/organisms/DialogBookingConfirm/DialogBookingConfirm.js +17 -0
  65. package/dist/components/ui/checkbox.d.ts +4 -0
  66. package/dist/components/ui/checkbox.js +31 -0
  67. package/dist/hooks/useBookingPax.d.ts +8 -0
  68. package/dist/hooks/useBookingPax.js +43 -0
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.js +1 -0
  71. package/package.json +2 -1
  72. package/src/components/atoms/Icon/icons/BusIcon.tsx +1 -1
  73. package/src/components/atoms/Icon/icons/CatamaranIcon.tsx +1 -1
  74. package/src/components/atoms/Icon/icons/ClockIcon.tsx +46 -0
  75. package/src/components/atoms/Icon/icons/CloseCircleIcon.tsx +1 -1
  76. package/src/components/atoms/Icon/icons/MapIcon.tsx +6 -2
  77. package/src/components/atoms/Icon/icons/PlusCircleIcon.tsx +1 -1
  78. package/src/components/atoms/Icon/icons/SeaIcon.tsx +1 -1
  79. package/src/components/atoms/Icon/icons/registry.tsx +2 -0
  80. package/src/components/atoms/Inputs/Input/Input.tsx +6 -5
  81. package/src/components/atoms/Inputs/Textarea/Textarea.tsx +18 -4
  82. package/src/components/molecules/BookingPax/BookingPax.tsx +12 -0
  83. package/src/components/molecules/BookingPax/BookingPaxAccom.tsx +120 -0
  84. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.css +4 -0
  85. package/src/components/molecules/BookingPax/BookingPaxClient/BookingPaxClient.tsx +188 -0
  86. package/src/components/molecules/BookingPax/BookingPaxExcursion.tsx +77 -0
  87. package/src/components/molecules/BookingPax/BookingPaxHeader.tsx +47 -0
  88. package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.css +15 -0
  89. package/src/components/molecules/BookingPax/BookingPaxLayout/BookingPaxLayout.tsx +25 -0
  90. package/src/components/molecules/BookingPax/BookingPaxRemarks.tsx +46 -0
  91. package/src/components/molecules/BookingPax/BookingPaxTransfer.tsx +121 -0
  92. package/src/components/molecules/BookingPax/index.ts +9 -0
  93. package/src/components/molecules/Calendar/CalendarInput.tsx +26 -24
  94. package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.css +37 -0
  95. package/src/components/molecules/DialogContentPolicy/CancellationLayout/CancellationLayout.tsx +28 -0
  96. package/src/components/molecules/DialogContentPolicy/DialogCancellationAccom.tsx +65 -0
  97. package/src/components/molecules/DialogContentPolicy/DialogCancellationExcursion.tsx +59 -0
  98. package/src/components/molecules/DialogContentPolicy/DialogCancellationList.tsx +49 -0
  99. package/src/components/molecules/DialogContentPolicy/DialogContentPolicy.tsx +45 -0
  100. package/src/components/molecules/DialogContentPolicy/index.ts +5 -0
  101. package/src/components/molecules/ServiceTitle/ServiceTitle.css +1 -1
  102. package/src/components/molecules/ServiceTitle/ServiceTitle.tsx +25 -7
  103. package/src/components/organisms/Booking/Booking.tsx +4 -0
  104. package/src/components/organisms/Booking/BookingHeader.tsx +24 -0
  105. package/src/components/organisms/Booking/BookingPaxList.tsx +224 -0
  106. package/src/components/organisms/Booking/BookingStep/BookingStep.tsx +8 -2
  107. package/src/components/organisms/DateTimePicker/DateTimePicker.tsx +69 -49
  108. package/src/components/organisms/DialogBookingConfirm/DialogBookingConfirm.tsx +25 -0
  109. package/src/components/ui/checkbox.tsx +32 -0
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { IconName } from '@/src/components/atoms/Icon/Icon';
3
+ import './BookingPaxLayout.css';
4
+ export interface BookingPaxLayoutProps {
5
+ title: React.ReactNode;
6
+ icon: IconName;
7
+ header?: React.ReactNode;
8
+ children?: React.ReactNode;
9
+ className?: string;
10
+ }
11
+ export declare const BookingPaxLayout: React.FC<BookingPaxLayoutProps>;
@@ -0,0 +1,19 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { cn } from '@/src/lib/utils';
14
+ import { ServiceTitle } from '../../ServiceTitle/ServiceTitle';
15
+ import './BookingPaxLayout.css';
16
+ export var BookingPaxLayout = function (props) {
17
+ var title = props.title, icon = props.icon, header = props.header, children = props.children, className = props.className;
18
+ return (_jsxs("div", __assign({ className: cn('booking-pax-layout', className) }, { children: [_jsxs("div", __assign({ className: "booking-pax-layout__header" }, { children: [_jsx(ServiceTitle, { title: title, icon: icon }), header] })), _jsx("div", __assign({ className: "booking-pax-layout__content" }, { children: children }))] })));
19
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export interface BookingPaxRemarksProps {
3
+ onChange?: (value: string) => void;
4
+ }
5
+ export declare const BookingPaxRemarks: React.FC<BookingPaxRemarksProps>;
@@ -0,0 +1,37 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { useEffect, useRef, useState } from 'react';
14
+ import Textarea from '../../atoms/Inputs/Textarea/Textarea';
15
+ import { Text } from '../../atoms/Typography/Typography';
16
+ export var BookingPaxRemarks = function (_a) {
17
+ var onChange = _a.onChange;
18
+ var _b = useState(''), remarks = _b[0], setRemarks = _b[1];
19
+ var textareaRef = useRef(null);
20
+ var adjustHeight = function () {
21
+ var textarea = textareaRef.current;
22
+ if (textarea) {
23
+ textarea.style.height = 'auto';
24
+ textarea.style.height = "".concat(textarea.scrollHeight, "px");
25
+ }
26
+ };
27
+ useEffect(function () {
28
+ adjustHeight();
29
+ }, [remarks]);
30
+ var handleChange = function (e) {
31
+ var value = e.target.value;
32
+ setRemarks(value);
33
+ onChange === null || onChange === void 0 ? void 0 : onChange(value);
34
+ adjustHeight();
35
+ };
36
+ return (_jsxs("div", __assign({ className: "space-y-2" }, { children: [_jsx(Text, __assign({ size: "sm" }, { children: "Remarks" })), _jsx(Textarea, { ref: textareaRef, placeholder: "Do you have any remarks?", onInput: handleChange, className: "resize-none overflow-hidden", rows: 1, style: { minHeight: '44px', height: '44px', lineHeight: '1.5' } })] })));
37
+ };
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { DateTimePickerProps } from '../../organisms/DateTimePicker/DateTimePicker';
3
+ import { BookingPaxClientInfo, BookingPaxClientProps } from './BookingPaxClient/BookingPaxClient';
4
+ export type ExcursionType = 'sea' | 'land' | 'catamaran';
5
+ export interface BookingPaxTransferProps extends Pick<BookingPaxClientProps, 'selectedClientsInfoIds' | 'onPaxChange'> {
6
+ clientsInfo: BookingPaxClientInfo[];
7
+ type: 'ARV' | 'DEP' | 'INH';
8
+ from: string;
9
+ to: string;
10
+ isSubmitted?: boolean;
11
+ paxCount: number;
12
+ maxPaxCount?: number;
13
+ onRemarkChange?: (value: string) => void;
14
+ onFlightNumberChange?: (value: string) => void;
15
+ onTimeChange?: DateTimePickerProps['onValueChange'];
16
+ onError?: (hasError: boolean) => void;
17
+ }
18
+ export declare const BookingPaxTransfer: React.FC<BookingPaxTransferProps>;
@@ -0,0 +1,40 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
13
+ import useBookingPax from '@/src/hooks/useBookingPax';
14
+ import { useCallback, useEffect, useMemo } from 'react';
15
+ import Input from '../../atoms/Inputs/Input/Input';
16
+ import { Text } from '../../atoms/Typography/Typography';
17
+ import DateTimePicker from '../../organisms/DateTimePicker/DateTimePicker';
18
+ import { BookingPaxClient, } from './BookingPaxClient/BookingPaxClient';
19
+ import { BookingPaxHeader } from './BookingPaxHeader';
20
+ import { BookingPaxLayout } from './BookingPaxLayout/BookingPaxLayout';
21
+ import { BookingPaxRemarks } from './BookingPaxRemarks';
22
+ var mapType = {
23
+ ARV: 'Arrival',
24
+ DEP: 'Departure',
25
+ INH: 'Inter-Hotel',
26
+ };
27
+ export var BookingPaxTransfer = function (props) {
28
+ var from = props.from, to = props.to, type = props.type, clientsInfo = props.clientsInfo, paxCount = props.paxCount, selectedClientsInfoIds = props.selectedClientsInfoIds, isSubmitted = props.isSubmitted, onPaxChange = props.onPaxChange, onRemarkChange = props.onRemarkChange, onTimeChange = props.onTimeChange, onError = props.onError, onFlightNumberChange = props.onFlightNumberChange;
29
+ var _a = useBookingPax(selectedClientsInfoIds), changeOptions = _a.changeOptions, onPaxOptionsChange = _a.onPaxOptionsChange, onSelectedClients = _a.onSelectedClients;
30
+ var handleFlightNumberChange = useCallback(function (e) {
31
+ onFlightNumberChange === null || onFlightNumberChange === void 0 ? void 0 : onFlightNumberChange(e.target.value);
32
+ }, [onFlightNumberChange]);
33
+ var id = useMemo(function () {
34
+ return "transfer-".concat(type, "-").concat(Math.random().toString(36).substring(2, 15));
35
+ }, [type]);
36
+ useEffect(function () {
37
+ onSelectedClients(clientsInfo, onPaxChange);
38
+ }, [changeOptions, onPaxChange]);
39
+ return (_jsxs(BookingPaxLayout, __assign({ title: _jsxs(_Fragment, { children: ["Transfer", ' ', _jsxs(Text, __assign({ as: "span", color: "accent", variant: "bold", size: "xl", className: "italic" }, { children: ["(", mapType[type], ")"] }))] }), icon: "car", className: "booking-pax-accom", header: _jsx(BookingPaxHeader, { children: _jsx(BookingPaxHeader.Location, { from: from, to: to }) }) }, { children: [type === 'INH' ? (_jsx(DateTimePicker, { icon: "clock", mode: "time", onValueChange: onTimeChange, placeholder: "Time of Transfer" })) : (_jsx(Input, { icon: "arrival", iconPosition: "leading", placeholder: "Flight number", onChange: handleFlightNumberChange })), _jsx(BookingPaxClient, { id: id, clients: clientsInfo, selectedClientsInfoIds: selectedClientsInfoIds, selectedIndex: 0, paxCount: paxCount, isSubmitted: isSubmitted, onPaxChange: onPaxOptionsChange, onError: onError }), _jsx(BookingPaxRemarks, { onChange: onRemarkChange })] })));
40
+ };
@@ -0,0 +1,5 @@
1
+ export type { BookingPaxAccomProps, RoomData } from './BookingPaxAccom';
2
+ export type { BookingPaxClientInfo, BookingPaxClientProps, } from './BookingPaxClient/BookingPaxClient';
3
+ export type { BookingPaxExcursionProps } from './BookingPaxExcursion';
4
+ export type { BookingPaxTransferProps } from './BookingPaxTransfer';
5
+ export * from './BookingPax';
@@ -0,0 +1 @@
1
+ export * from './BookingPax';
@@ -1,11 +1,12 @@
1
- import React from "react";
1
+ import React from 'react';
2
+ import { IconName } from '../../atoms/Icon/Icon';
2
3
  export interface CalendarInputProps {
3
4
  /** Placeholder text */
4
5
  placeholder?: string;
5
6
  /** Selected date value (formatted as string) */
6
7
  value?: string;
7
8
  /** State of the input: default, active, typing, disabled, success, error */
8
- state?: "default" | "active" | "typing" | "disabled" | "success" | "error";
9
+ state?: 'default' | 'active' | 'typing' | 'disabled' | 'success' | 'error';
9
10
  /** Helper/support text below input */
10
11
  /** Whether the input is disabled */
11
12
  disabled?: boolean;
@@ -24,11 +25,13 @@ export interface CalendarInputProps {
24
25
  /** Whether the calendar icon has full bg*/
25
26
  iconBGFull?: boolean;
26
27
  /** Position of the calendar icon: left or right */
27
- iconPosition?: "left" | "right";
28
+ iconPosition?: 'left' | 'right';
28
29
  /** Show chevron on the right when icon is on the left */
29
30
  showChevron?: boolean;
30
31
  /** Whether the calendar popover is open */
31
32
  isOpen?: boolean;
33
+ /** Icon to display on the left of the input */
34
+ icon?: IconName;
32
35
  }
33
36
  declare const CalendarInput: React.FC<CalendarInputProps>;
34
37
  export default CalendarInput;
@@ -10,15 +10,15 @@ var __assign = (this && this.__assign) || function () {
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- import React, { useState } from "react";
14
- import Icon from "../../atoms/Icon/Icon";
13
+ import React, { useState } from 'react';
14
+ import Icon from '../../atoms/Icon/Icon';
15
15
  var CalendarInput = function (_a) {
16
- var _b = _a.placeholder, placeholder = _b === void 0 ? "Select date" : _b, _c = _a.value, value = _c === void 0 ? "" : _c, _d = _a.state, state = _d === void 0 ? "default" : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, onCalendarClick = _a.onCalendarClick, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, _f = _a.className, className = _f === void 0 ? "" : _f, _g = _a.iconBGFull, iconBGFull = _g === void 0 ? true : _g, _h = _a.iconPosition, iconPosition = _h === void 0 ? "right" : _h, _j = _a.showChevron, showChevron = _j === void 0 ? false : _j, _k = _a.isOpen, isOpen = _k === void 0 ? false : _k;
17
- var _l = useState(false), isFocused = _l[0], setIsFocused = _l[1];
18
- var _m = useState(value), localValue = _m[0], setLocalValue = _m[1];
19
- var _o = useState(false), isTyping = _o[0], setIsTyping = _o[1];
20
- var finalState = disabled ? "disabled" : state;
21
- var displayState = isFocused && isTyping ? "typing" : isFocused ? "active" : finalState;
16
+ var _b = _a.placeholder, placeholder = _b === void 0 ? 'Select date' : _b, _c = _a.value, value = _c === void 0 ? '' : _c, _d = _a.state, state = _d === void 0 ? 'default' : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, onClick = _a.onClick, onCalendarClick = _a.onCalendarClick, onChange = _a.onChange, onFocus = _a.onFocus, onBlur = _a.onBlur, _f = _a.className, className = _f === void 0 ? '' : _f, _g = _a.iconBGFull, iconBGFull = _g === void 0 ? true : _g, _h = _a.iconPosition, iconPosition = _h === void 0 ? 'right' : _h, _j = _a.showChevron, showChevron = _j === void 0 ? false : _j, _k = _a.isOpen, isOpen = _k === void 0 ? false : _k, _l = _a.icon, icon = _l === void 0 ? 'calendar' : _l;
17
+ var _m = useState(false), isFocused = _m[0], setIsFocused = _m[1];
18
+ var _o = useState(value), localValue = _o[0], setLocalValue = _o[1];
19
+ var _p = useState(false), isTyping = _p[0], setIsTyping = _p[1];
20
+ var finalState = disabled ? 'disabled' : state;
21
+ var displayState = isFocused && isTyping ? 'typing' : isFocused ? 'active' : finalState;
22
22
  var handleInputChange = function (e) {
23
23
  var newValue = e.target.value;
24
24
  setLocalValue(newValue);
@@ -43,7 +43,7 @@ var CalendarInput = function (_a) {
43
43
  React.useEffect(function () {
44
44
  setLocalValue(value);
45
45
  }, [value]);
46
- var iconButton = (_jsx("button", __assign({ type: "button", className: "calendar-input__icon-button ".concat(iconBGFull ? " calendar-input__icon-button--full-bg" : "", " calendar-input__icon-button--").concat(iconPosition), onClick: handleCalendarClick, disabled: disabled, "aria-label": "Open calendar picker", title: "Select date" }, { children: _jsx(Icon, { name: "calendar", size: "sm", className: "calendar-input__icon" }) })));
47
- return (_jsxs("div", __assign({ className: "calendar-input calendar-input--".concat(displayState, " calendar-input--icon-").concat(iconPosition, " ").concat(className).trim(), "data-node-id": "3425:11289", onClick: onClick }, { children: [iconPosition === "left" && iconButton, _jsxs("div", __assign({ className: "calendar-input__input-wrapper" }, { children: [_jsx("input", { type: "text", className: "calendar-input__field", placeholder: placeholder, value: localValue || placeholder, disabled: disabled, onChange: handleInputChange, onFocus: handleFocus, onBlur: handleBlur, readOnly: true, "aria-label": "Select date" }), iconPosition === "left" && showChevron && (_jsx("div", __assign({ className: "calendar-input__chevron ".concat(isOpen ? 'calendar-input__chevron--open' : '') }, { children: _jsx(Icon, { name: "chevron-down", size: "sm" }) })))] })), iconPosition === "right" && iconButton] })));
46
+ var iconButton = (_jsx("button", __assign({ type: "button", className: "calendar-input__icon-button ".concat(iconBGFull ? ' calendar-input__icon-button--full-bg' : '', " calendar-input__icon-button--").concat(iconPosition), onClick: handleCalendarClick, disabled: disabled, "aria-label": "Open calendar picker", title: "Select date" }, { children: _jsx(Icon, { name: icon, size: "sm", className: "calendar-input__icon" }) })));
47
+ return (_jsxs("div", __assign({ className: "calendar-input calendar-input--".concat(displayState, " calendar-input--icon-").concat(iconPosition, " ").concat(className).trim(), "data-node-id": "3425:11289", onClick: onClick }, { children: [iconPosition === 'left' && iconButton, _jsxs("div", __assign({ className: "calendar-input__input-wrapper" }, { children: [_jsx("input", { type: "text", className: "calendar-input__field", placeholder: placeholder, value: localValue || placeholder, disabled: disabled, onChange: handleInputChange, onFocus: handleFocus, onBlur: handleBlur, readOnly: true, "aria-label": 'Select date' }), iconPosition === 'left' && showChevron && (_jsx("div", __assign({ className: "calendar-input__chevron ".concat(isOpen ? 'calendar-input__chevron--open' : '') }, { children: _jsx(Icon, { name: 'chevron-down', size: "sm" }) })))] })), iconPosition === 'right' && iconButton] })));
48
48
  };
49
49
  export default CalendarInput;