mautourco-components 0.2.9 → 0.2.10

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 (193) hide show
  1. package/dist/components/atoms/Button/Button.css +28 -0
  2. package/dist/components/atoms/Button/Button.d.ts +1 -1
  3. package/dist/components/atoms/Button/Button.js +2 -1
  4. package/dist/components/atoms/Chip/Chip.css +2238 -0
  5. package/dist/components/atoms/Chip/Chip.d.ts +27 -0
  6. package/dist/components/atoms/Chip/Chip.js +37 -0
  7. package/dist/components/atoms/Divider/Divider.css +2135 -0
  8. package/dist/components/atoms/Divider/Divider.d.ts +14 -0
  9. package/dist/components/atoms/Divider/Divider.js +16 -0
  10. package/dist/components/atoms/Icon/Icon.d.ts +4 -3
  11. package/dist/components/atoms/Icon/Icon.js +4 -118
  12. package/dist/components/atoms/Icon/icons/AccomIcon.d.ts +12 -0
  13. package/dist/components/atoms/Icon/icons/AccomIcon.js +36 -0
  14. package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.d.ts +8 -0
  15. package/dist/components/atoms/Icon/icons/ArrowDownOutlineIcon.js +36 -0
  16. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.d.ts +8 -0
  17. package/dist/components/atoms/Icon/icons/ArrowRightOutlineIcon.js +36 -0
  18. package/dist/components/atoms/Icon/icons/Building2OutlineIcon.d.ts +8 -0
  19. package/dist/components/atoms/Icon/icons/Building2OutlineIcon.js +36 -0
  20. package/dist/components/atoms/Icon/icons/BusIcon.d.ts +12 -0
  21. package/dist/components/atoms/Icon/icons/BusIcon.js +36 -0
  22. package/dist/components/atoms/Icon/icons/Calendar2Icon.d.ts +12 -0
  23. package/dist/components/atoms/Icon/icons/Calendar2Icon.js +36 -0
  24. package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.d.ts +8 -0
  25. package/dist/components/atoms/Icon/icons/CalendarRangeOutlineIcon.js +36 -0
  26. package/dist/components/atoms/Icon/icons/MapIcon.d.ts +8 -0
  27. package/dist/components/atoms/Icon/icons/MapIcon.js +36 -0
  28. package/dist/components/atoms/Icon/icons/MicroIcon.d.ts +12 -0
  29. package/dist/components/atoms/Icon/icons/MicroIcon.js +36 -0
  30. package/dist/components/atoms/Icon/icons/MoreVerticalIcon.d.ts +12 -0
  31. package/dist/components/atoms/Icon/icons/MoreVerticalIcon.js +36 -0
  32. package/dist/components/atoms/Icon/icons/NightIcon.d.ts +12 -0
  33. package/dist/components/atoms/Icon/icons/NightIcon.js +36 -0
  34. package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.d.ts +8 -0
  35. package/dist/components/atoms/Icon/icons/PlaneLandingOutlineIcon.js +36 -0
  36. package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.d.ts +8 -0
  37. package/dist/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.js +36 -0
  38. package/dist/components/atoms/Icon/icons/RowExcursion.d.ts +16 -0
  39. package/dist/components/atoms/Icon/icons/RowExcursion.js +28 -0
  40. package/dist/components/atoms/Icon/icons/StopWatchIcon.d.ts +12 -0
  41. package/dist/components/atoms/Icon/icons/StopWatchIcon.js +36 -0
  42. package/dist/components/atoms/Icon/icons/Utensils.d.ts +12 -0
  43. package/dist/components/atoms/Icon/icons/Utensils.js +36 -0
  44. package/dist/components/atoms/Icon/icons/WalletIcon.d.ts +12 -0
  45. package/dist/components/atoms/Icon/icons/WalletIcon.js +36 -0
  46. package/dist/components/atoms/Icon/icons/registry.d.ts +66 -0
  47. package/dist/components/atoms/Icon/icons/registry.js +121 -0
  48. package/dist/components/atoms/Typography/Typography.d.ts +3 -1
  49. package/dist/components/atoms/Typography/Typography.js +3 -15
  50. package/dist/components/molecules/ActionDropdown/ActionDropdown.css +2119 -0
  51. package/dist/components/molecules/ActionDropdown/ActionDropdown.d.ts +21 -0
  52. package/dist/components/molecules/ActionDropdown/ActionDropdown.js +34 -0
  53. package/dist/components/molecules/DateDisplay/DateDisplay.d.ts +14 -0
  54. package/dist/components/molecules/DateDisplay/DateDisplay.js +39 -0
  55. package/dist/components/molecules/FeatureRow/FeatureRow.css +2130 -0
  56. package/dist/components/molecules/FeatureRow/FeatureRow.d.ts +17 -0
  57. package/dist/components/molecules/FeatureRow/FeatureRow.js +22 -0
  58. package/dist/components/molecules/FromTo/FromTo.d.ts +8 -0
  59. package/dist/components/molecules/FromTo/FromTo.js +24 -0
  60. package/dist/components/molecules/LocationDropdown/LocationDropdown.d.ts +1 -0
  61. package/dist/components/molecules/LocationDropdown/LocationDropdown.js +17 -4
  62. package/dist/components/molecules/Pagination/Pagination.css +2168 -0
  63. package/dist/components/molecules/Pagination/Pagination.d.ts +16 -0
  64. package/dist/components/molecules/Pagination/Pagination.js +90 -0
  65. package/dist/components/molecules/SectionTitle/SectionTitle.css +2112 -0
  66. package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +16 -0
  67. package/dist/components/molecules/SectionTitle/SectionTitle.js +21 -0
  68. package/dist/components/molecules/Stepper/Stepper.css +2144 -0
  69. package/dist/components/molecules/Stepper/Stepper.d.ts +18 -0
  70. package/dist/components/molecules/Stepper/Stepper.js +33 -0
  71. package/dist/components/molecules/TableServiceItem/DetailsCol.d.ts +12 -0
  72. package/dist/components/molecules/TableServiceItem/DetailsCol.js +17 -0
  73. package/dist/components/molecules/TableServiceItem/ItemCol.d.ts +13 -0
  74. package/dist/components/molecules/TableServiceItem/ItemCol.js +24 -0
  75. package/dist/components/molecules/TableServiceItem/RowAccommodation.d.ts +16 -0
  76. package/dist/components/molecules/TableServiceItem/RowAccommodation.js +37 -0
  77. package/dist/components/molecules/TableServiceItem/RowExcursion.d.ts +16 -0
  78. package/dist/components/molecules/TableServiceItem/RowExcursion.js +22 -0
  79. package/dist/components/molecules/TableServiceItem/RowOtherServices.d.ts +9 -0
  80. package/dist/components/molecules/TableServiceItem/RowOtherServices.js +34 -0
  81. package/dist/components/molecules/TableServiceItem/RowTransfer.d.ts +15 -0
  82. package/dist/components/molecules/TableServiceItem/RowTransfer.js +37 -0
  83. package/dist/components/molecules/TableServiceItem/index.d.ts +17 -0
  84. package/dist/components/molecules/TableServiceItem/index.js +15 -0
  85. package/dist/components/molecules/TextWithIcon/TextWithIcon.d.ts +30 -0
  86. package/dist/components/molecules/TextWithIcon/TextWithIcon.js +31 -0
  87. package/dist/components/molecules/TooltipDisplay/TooltipDisplay.d.ts +13 -0
  88. package/dist/components/molecules/TooltipDisplay/TooltipDisplay.js +18 -0
  89. package/dist/components/organisms/CarBookingCard/CarBookingCard.css +2313 -0
  90. package/dist/components/organisms/CarBookingCard/CarBookingCard.d.ts +51 -0
  91. package/dist/components/organisms/CarBookingCard/CarBookingCard.js +39 -0
  92. package/dist/components/organisms/CarBookingCard/index.d.ts +2 -0
  93. package/dist/components/organisms/CarBookingCard/index.js +1 -0
  94. package/dist/components/organisms/Table/Table.css +2280 -0
  95. package/dist/components/organisms/Table/Table.d.ts +50 -0
  96. package/dist/components/organisms/Table/Table.js +95 -0
  97. package/dist/components/organisms/Table/TableCell.d.ts +15 -0
  98. package/dist/components/organisms/Table/TableCell.js +16 -0
  99. package/dist/components/organisms/Table/columns/booking-columns.d.ts +7 -0
  100. package/dist/components/organisms/Table/columns/booking-columns.js +83 -0
  101. package/dist/components/organisms/Table/columns/detail-resume-columns.d.ts +3 -0
  102. package/dist/components/organisms/Table/columns/detail-resume-columns.js +178 -0
  103. package/dist/components/organisms/Table/columns/index.d.ts +12 -0
  104. package/dist/components/organisms/Table/columns/index.js +9 -0
  105. package/dist/components/organisms/Table/columns/quotation-columns.d.ts +7 -0
  106. package/dist/components/organisms/Table/columns/quotation-columns.js +91 -0
  107. package/dist/components/organisms/Table/constant.d.ts +6 -0
  108. package/dist/components/organisms/Table/constant.js +24 -0
  109. package/dist/components/organisms/Table/index.d.ts +2 -0
  110. package/dist/components/organisms/Table/index.js +2 -0
  111. package/dist/components/ui/popover.d.ts +3 -3
  112. package/dist/components/ui/popover.js +5 -5
  113. package/dist/components/ui/tooltip.d.ts +7 -0
  114. package/dist/components/ui/tooltip.js +42 -0
  115. package/dist/index.d.ts +46 -26
  116. package/dist/index.js +29 -16
  117. package/dist/styles/components/molecule/location-dropdown.css +38 -0
  118. package/dist/styles/components/typography.css +1 -0
  119. package/dist/types/table/action-dropdown-type.types.d.ts +5 -0
  120. package/dist/types/table/action-dropdown-type.types.js +6 -0
  121. package/dist/types/table/booking.types.d.ts +16 -0
  122. package/dist/types/table/booking.types.js +1 -0
  123. package/dist/types/table/detail-resume.types.d.ts +155 -0
  124. package/dist/types/table/detail-resume.types.js +7 -0
  125. package/dist/types/table/index.d.ts +3 -0
  126. package/dist/types/table/index.js +3 -0
  127. package/dist/types/table/quotation.types.d.ts +23 -0
  128. package/dist/types/table/quotation.types.js +1 -0
  129. package/package.json +6 -1
  130. package/src/components/atoms/Button/Button.css +28 -0
  131. package/src/components/atoms/Button/Button.tsx +3 -2
  132. package/src/components/atoms/Chip/Chip.css +161 -0
  133. package/src/components/atoms/Chip/Chip.tsx +79 -0
  134. package/src/components/atoms/Divider/Divider.css +58 -0
  135. package/src/components/atoms/Divider/Divider.tsx +36 -0
  136. package/src/components/atoms/Icon/Icon.tsx +7 -153
  137. package/src/components/atoms/Icon/icons/AccomIcon.tsx +45 -0
  138. package/src/components/atoms/Icon/icons/ArrowDownOutlineIcon.tsx +41 -0
  139. package/src/components/atoms/Icon/icons/ArrowRightOutlineIcon.tsx +50 -0
  140. package/src/components/atoms/Icon/icons/Building2OutlineIcon.tsx +52 -0
  141. package/src/components/atoms/Icon/icons/BusIcon.tsx +52 -0
  142. package/src/components/atoms/Icon/icons/Calendar2Icon.tsx +54 -0
  143. package/src/components/atoms/Icon/icons/CalendarRangeOutlineIcon.tsx +55 -0
  144. package/src/components/atoms/Icon/icons/MapIcon.tsx +48 -0
  145. package/src/components/atoms/Icon/icons/MicroIcon.tsx +45 -0
  146. package/src/components/atoms/Icon/icons/MoreVerticalIcon.tsx +53 -0
  147. package/src/components/atoms/Icon/icons/NightIcon.tsx +45 -0
  148. package/src/components/atoms/Icon/icons/PlaneLandingOutlineIcon.tsx +56 -0
  149. package/src/components/atoms/Icon/icons/PlaneTakeoffOutlineIcon.tsx +52 -0
  150. package/src/components/atoms/Icon/icons/RowExcursion.tsx +54 -0
  151. package/src/components/atoms/Icon/icons/StopWatchIcon.tsx +45 -0
  152. package/src/components/atoms/Icon/icons/Utensils.tsx +45 -0
  153. package/src/components/atoms/Icon/icons/WalletIcon.tsx +45 -0
  154. package/src/components/atoms/Icon/icons/registry.tsx +127 -0
  155. package/src/components/atoms/Typography/Typography.tsx +22 -30
  156. package/src/components/molecules/ActionDropdown/ActionDropdown.css +23 -0
  157. package/src/components/molecules/ActionDropdown/ActionDropdown.tsx +53 -0
  158. package/src/components/molecules/DateDisplay/DateDisplay.tsx +47 -0
  159. package/src/components/molecules/FeatureRow/FeatureRow.css +53 -0
  160. package/src/components/molecules/FeatureRow/FeatureRow.tsx +46 -0
  161. package/src/components/molecules/FromTo/FromTo.tsx +31 -0
  162. package/src/components/molecules/LocationDropdown/LocationDropdown.tsx +67 -38
  163. package/src/components/molecules/Pagination/Pagination.css +90 -0
  164. package/src/components/molecules/Pagination/Pagination.tsx +149 -0
  165. package/src/components/molecules/SectionTitle/SectionTitle.css +35 -0
  166. package/src/components/molecules/SectionTitle/SectionTitle.tsx +43 -0
  167. package/src/components/molecules/Stepper/Stepper.css +67 -0
  168. package/src/components/molecules/Stepper/Stepper.tsx +74 -0
  169. package/src/components/molecules/TableServiceItem/DetailsCol.tsx +25 -0
  170. package/src/components/molecules/TableServiceItem/ItemCol.tsx +68 -0
  171. package/src/components/molecules/TableServiceItem/RowAccommodation.tsx +56 -0
  172. package/src/components/molecules/TableServiceItem/RowExcursion.tsx +40 -0
  173. package/src/components/molecules/TableServiceItem/RowOtherServices.tsx +50 -0
  174. package/src/components/molecules/TableServiceItem/RowTransfer.tsx +60 -0
  175. package/src/components/molecules/TableServiceItem/index.ts +24 -0
  176. package/src/components/molecules/TextWithIcon/TextWithIcon.tsx +62 -0
  177. package/src/components/molecules/TooltipDisplay/TooltipDisplay.tsx +32 -0
  178. package/src/components/organisms/CarBookingCard/CarBookingCard.css +236 -0
  179. package/src/components/organisms/CarBookingCard/CarBookingCard.tsx +238 -0
  180. package/src/components/organisms/CarBookingCard/index.ts +12 -0
  181. package/src/components/organisms/Table/Table.css +185 -0
  182. package/src/components/organisms/Table/Table.tsx +273 -0
  183. package/src/components/organisms/Table/TableCell.tsx +40 -0
  184. package/src/components/organisms/Table/columns/booking-columns.tsx +118 -0
  185. package/src/components/organisms/Table/columns/detail-resume-columns.tsx +226 -0
  186. package/src/components/organisms/Table/columns/index.ts +11 -0
  187. package/src/components/organisms/Table/columns/quotation-columns.tsx +150 -0
  188. package/src/components/organisms/Table/constant.ts +31 -0
  189. package/src/components/organisms/Table/index.ts +2 -0
  190. package/src/components/ui/popover.tsx +10 -10
  191. package/src/components/ui/tooltip.tsx +45 -0
  192. package/src/styles/components/molecule/location-dropdown.css +29 -0
  193. package/src/styles/components/typography.css +4 -0
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './Pagination.css';
3
+ export interface PaginationProps {
4
+ /** Current page (1-indexed) */
5
+ currentPage: number;
6
+ /** Total number of pages */
7
+ totalPages: number;
8
+ /** Handler called when page changes */
9
+ onPageChange: (page: number) => void;
10
+ /** Number of pages to display on each side of the current page */
11
+ siblingCount?: number;
12
+ /** Additional CSS classes */
13
+ className?: string;
14
+ }
15
+ declare const Pagination: React.FC<PaginationProps>;
16
+ export default Pagination;
@@ -0,0 +1,90 @@
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 Icon from '../../atoms/Icon/Icon';
14
+ import './Pagination.css';
15
+ var Pagination = function (_a) {
16
+ var currentPage = _a.currentPage, totalPages = _a.totalPages, onPageChange = _a.onPageChange, _b = _a.siblingCount, siblingCount = _b === void 0 ? 1 : _b, _c = _a.className, className = _c === void 0 ? '' : _c;
17
+ var handlePrevious = function () {
18
+ if (currentPage > 1) {
19
+ onPageChange(currentPage - 1);
20
+ }
21
+ };
22
+ var handleNext = function () {
23
+ if (currentPage < totalPages) {
24
+ onPageChange(currentPage + 1);
25
+ }
26
+ };
27
+ var handlePageClick = function (page) {
28
+ if (page >= 1 && page <= totalPages && page !== currentPage) {
29
+ onPageChange(page);
30
+ }
31
+ };
32
+ // Generate page numbers to display
33
+ var getPageNumbers = function () {
34
+ var pages = [];
35
+ var totalNumbers = siblingCount * 2 + 5;
36
+ var totalBlocks = totalNumbers + 2;
37
+ if (totalPages <= totalBlocks) {
38
+ // Display all pages if total is small
39
+ for (var i = 1; i <= totalPages; i++) {
40
+ pages.push(i);
41
+ }
42
+ }
43
+ else {
44
+ var leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
45
+ var rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages);
46
+ var shouldShowLeftEllipsis = leftSiblingIndex > 2;
47
+ var shouldShowRightEllipsis = rightSiblingIndex < totalPages - 1;
48
+ if (!shouldShowLeftEllipsis && shouldShowRightEllipsis) {
49
+ // Case: [1] [2] [3] [4] ... [10]
50
+ var leftItemCount = 3 + 2 * siblingCount;
51
+ for (var i = 1; i <= leftItemCount; i++) {
52
+ pages.push(i);
53
+ }
54
+ pages.push('ellipsis');
55
+ pages.push(totalPages);
56
+ }
57
+ else if (shouldShowLeftEllipsis && !shouldShowRightEllipsis) {
58
+ // Case: [1] ... [7] [8] [9] [10]
59
+ pages.push(1);
60
+ pages.push('ellipsis');
61
+ var rightItemCount = 3 + 2 * siblingCount;
62
+ for (var i = totalPages - rightItemCount + 1; i <= totalPages; i++) {
63
+ pages.push(i);
64
+ }
65
+ }
66
+ else {
67
+ // Case: [1] ... [4] [5] [6] ... [10]
68
+ pages.push(1);
69
+ pages.push('ellipsis');
70
+ for (var i = leftSiblingIndex; i <= rightSiblingIndex; i++) {
71
+ pages.push(i);
72
+ }
73
+ pages.push('ellipsis');
74
+ pages.push(totalPages);
75
+ }
76
+ }
77
+ return pages;
78
+ };
79
+ var pageNumbers = getPageNumbers();
80
+ var isPreviousDisabled = currentPage <= 1;
81
+ var isNextDisabled = currentPage >= totalPages;
82
+ return (_jsxs("div", __assign({ className: "pagination ".concat(className) }, { children: [_jsx("button", __assign({ type: "button", className: "pagination__button pagination__button--prev", onClick: handlePrevious, disabled: isPreviousDisabled, "aria-label": "Previous page" }, { children: _jsx(Icon, { name: "chevron-left", size: "sm" }) })), _jsx("div", __assign({ className: "pagination__numbers" }, { children: pageNumbers.map(function (page, index) {
83
+ if (page === 'ellipsis') {
84
+ return (_jsx("span", __assign({ className: "pagination__ellipsis" }, { children: "..." }), "ellipsis-".concat(index)));
85
+ }
86
+ var isSelected = page === currentPage;
87
+ return (_jsx("button", __assign({ type: "button", className: "pagination__number ".concat(isSelected ? 'pagination__number--selected' : ''), onClick: function () { return handlePageClick(page); }, "aria-label": "Page ".concat(page), "aria-current": isSelected ? 'page' : undefined }, { children: page }), page));
88
+ }) })), _jsx("button", __assign({ type: "button", className: "pagination__button pagination__button--next", onClick: handleNext, disabled: isNextDisabled, "aria-label": "Next page" }, { children: _jsx(Icon, { name: "chevron-right", size: "sm" }) }))] })));
89
+ };
90
+ export default Pagination;