@ecohouse/ui 0.1.30 → 0.1.32

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 (72) hide show
  1. package/README.md +5 -0
  2. package/dist/index.cjs +1131 -339
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +147 -5
  5. package/dist/index.d.ts +147 -5
  6. package/dist/index.js +1058 -286
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/AccountHeader/AccountHeader.stories.tsx +70 -0
  10. package/src/components/AccountHeader/AccountHeader.tsx +224 -0
  11. package/src/components/AccountHeader/index.ts +2 -0
  12. package/src/components/AvatarSimple/AvatarSimple.tsx +2 -2
  13. package/src/components/Button/Button.tsx +4 -1
  14. package/src/components/DatePicker/DatePicker.tsx +14 -9
  15. package/src/components/FloatingActionButton/FloatingActionButton.stories.tsx +42 -0
  16. package/src/components/FloatingActionButton/FloatingActionButton.tsx +77 -0
  17. package/src/components/FloatingActionButton/index.ts +2 -0
  18. package/src/components/InfoTile/InfoTile.stories.tsx +80 -0
  19. package/src/components/InfoTile/InfoTile.tsx +118 -0
  20. package/src/components/InfoTile/index.ts +2 -0
  21. package/src/components/PaginationDots/PaginationDots.stories.tsx +48 -0
  22. package/src/components/PaginationDots/PaginationDots.tsx +111 -0
  23. package/src/components/PaginationDots/index.ts +2 -0
  24. package/src/components/Sidebar/Sidebar.tsx +9 -1
  25. package/src/components/StatusBadge/StatusBadge.stories.tsx +54 -0
  26. package/src/components/StatusBadge/StatusBadge.tsx +108 -0
  27. package/src/components/StatusBadge/index.ts +2 -0
  28. package/src/components/StepList/StepList.stories.tsx +37 -0
  29. package/src/components/StepList/StepList.tsx +152 -0
  30. package/src/components/StepList/index.ts +2 -0
  31. package/src/components/index.ts +18 -0
  32. package/src/icons/AlertTriangle/AlertTriangleIcon.tsx +19 -0
  33. package/src/icons/AlertTriangle/AlertTriangleIcon.web.tsx +18 -0
  34. package/src/icons/AlertTriangle/alertTrianglePath.ts +3 -0
  35. package/src/icons/AlertTriangle/index.ts +1 -0
  36. package/src/icons/Bell/BellIcon.tsx +2 -2
  37. package/src/icons/Bell/BellIcon.web.tsx +2 -2
  38. package/src/icons/Bell/bellPath.ts +1 -1
  39. package/src/icons/CottageDetail/CottageDetailIcons.tsx +15 -0
  40. package/src/icons/CottageDetail/CottageDetailIcons.web.tsx +15 -0
  41. package/src/icons/CottageDetail/cottageDetailPaths.ts +3 -0
  42. package/src/icons/CottageDetail/index.ts +1 -0
  43. package/src/icons/Edit/EditIcon.tsx +20 -0
  44. package/src/icons/Edit/EditIcon.web.tsx +19 -0
  45. package/src/icons/Edit/editPath.ts +3 -0
  46. package/src/icons/Edit/index.ts +1 -0
  47. package/src/icons/HouseRules/HouseRulesIcons.tsx +62 -0
  48. package/src/icons/HouseRules/HouseRulesIcons.web.tsx +61 -0
  49. package/src/icons/HouseRules/houseRulesPaths.ts +24 -0
  50. package/src/icons/HouseRules/index.ts +2 -0
  51. package/src/icons/LocationUser/LocationUserIcon.tsx +15 -0
  52. package/src/icons/LocationUser/LocationUserIcon.web.tsx +14 -0
  53. package/src/icons/LocationUser/index.ts +1 -0
  54. package/src/icons/LocationUser/locationUserPath.ts +2 -0
  55. package/src/icons/Lock/LockIcon.tsx +21 -0
  56. package/src/icons/Lock/LockIcon.web.tsx +26 -0
  57. package/src/icons/Lock/index.ts +1 -0
  58. package/src/icons/Lock/lockPath.ts +3 -0
  59. package/src/icons/Refresh/RefreshIcon.tsx +20 -0
  60. package/src/icons/Refresh/RefreshIcon.web.tsx +19 -0
  61. package/src/icons/Refresh/index.ts +1 -0
  62. package/src/icons/Refresh/refreshPath.ts +3 -0
  63. package/src/icons/RefundStatus/RefundStatusIcon.tsx +24 -0
  64. package/src/icons/RefundStatus/RefundStatusIcon.web.tsx +23 -0
  65. package/src/icons/RefundStatus/index.ts +1 -0
  66. package/src/icons/RefundStatus/refundStatusPath.ts +3 -0
  67. package/src/icons/index.ts +8 -0
  68. package/src/icons/registry.ts +30 -0
  69. package/src/index.ts +26 -0
  70. package/src/theme/colors.ts +4 -0
  71. package/src/theme/typography.ts +1 -1
  72. package/src/utils/dateUtils.ts +25 -0
@@ -7,6 +7,7 @@ export { Icon } from "./Icon";
7
7
 
8
8
  export { AmenityIcon } from "./Amenity";
9
9
  export type { AmenityIconProps, AmenityName } from "./Amenity";
10
+ export { AlertTriangleIcon } from "./AlertTriangle";
10
11
  export { AppleIcon } from "./Store";
11
12
  export { ArrowRightIcon } from "./ArrowRight";
12
13
  export { BagIcon } from "./Bag";
@@ -21,6 +22,7 @@ export { ChevronDownIcon } from "./ChevronDown";
21
22
  export { ChevronLeftIcon } from "./ChevronLeft";
22
23
  export { ClockIcon } from "./Clock";
23
24
  export { CloseIcon } from "./Close";
25
+ export { EditIcon } from "./Edit";
24
26
  export {
25
27
  BathroomsIcon,
26
28
  BedroomsIcon,
@@ -34,11 +36,13 @@ export {
34
36
  CheckSuccessIcon,
35
37
  ClockFilledIcon,
36
38
  CopyIcon,
39
+ DownloadIcon,
37
40
  QrCodeIcon,
38
41
  ShareIcon,
39
42
  TooltipArrowIcon,
40
43
  WhatsAppIcon,
41
44
  } from "./CottageDetail";
45
+ export { QuietHoursIcon, NoSmokingIcon, PawIcon, TrashIcon } from "./HouseRules";
42
46
  export { FacebookIcon } from "./Facebook";
43
47
  export { FiltersIcon } from "./Filters";
44
48
  export { HeartIcon } from "./Heart";
@@ -52,6 +56,8 @@ export { LayoutGridIcon } from "./LayoutGrid";
52
56
  export { LinkedInIcon } from "./LinkedIn";
53
57
  export { ListViewIcon } from "./ListView";
54
58
  export { LocationPinIcon } from "./LocationPin";
59
+ export { LocationUserIcon } from "./LocationUser";
60
+ export { LockIcon } from "./Lock";
55
61
  export { LogOutIcon } from "./LogOut";
56
62
  export { MailIcon } from "./Mail";
57
63
  export { MapViewIcon } from "./MapView";
@@ -62,6 +68,8 @@ export { NavigateIcon } from "./Navigate";
62
68
  export { PhoneIcon } from "./Phone";
63
69
  export { PlusIcon } from "./Plus";
64
70
  export { MinusIcon } from "./Minus";
71
+ export { RefreshIcon } from "./Refresh";
72
+ export { RefundStatusIcon } from "./RefundStatus";
65
73
  export { SearchIcon } from "./Search";
66
74
  export { SettingsIcon } from "./Settings";
67
75
  export { ShowIcon } from "./Show";
@@ -1,4 +1,5 @@
1
1
  import { ArrowRightIcon } from "./ArrowRight";
2
+ import { AlertTriangleIcon } from "./AlertTriangle";
2
3
  import { AppleIcon, GooglePlayIcon } from "./Store";
3
4
  import { BagIcon } from "./Bag";
4
5
  import { BellIcon } from "./Bell";
@@ -12,6 +13,7 @@ import { ChevronDownIcon } from "./ChevronDown";
12
13
  import { ChevronLeftIcon } from "./ChevronLeft";
13
14
  import { ClockIcon } from "./Clock";
14
15
  import { CloseIcon } from "./Close";
16
+ import { EditIcon } from "./Edit";
15
17
  import {
16
18
  BathroomsIcon,
17
19
  BedroomsIcon,
@@ -25,11 +27,13 @@ import {
25
27
  CheckSuccessIcon,
26
28
  ClockFilledIcon,
27
29
  CopyIcon,
30
+ DownloadIcon,
28
31
  QrCodeIcon,
29
32
  ShareIcon,
30
33
  TooltipArrowIcon,
31
34
  WhatsAppIcon,
32
35
  } from "./CottageDetail";
36
+ import { NoSmokingIcon, PawIcon, QuietHoursIcon, TrashIcon } from "./HouseRules";
33
37
  import { FacebookIcon } from "./Facebook";
34
38
  import { FiltersIcon } from "./Filters";
35
39
  import { HeartIcon } from "./Heart";
@@ -42,6 +46,8 @@ import { LayoutGridIcon } from "./LayoutGrid";
42
46
  import { LinkedInIcon } from "./LinkedIn";
43
47
  import { ListViewIcon } from "./ListView";
44
48
  import { LocationPinIcon } from "./LocationPin";
49
+ import { LocationUserIcon } from "./LocationUser";
50
+ import { LockIcon } from "./Lock";
45
51
  import { LogOutIcon } from "./LogOut";
46
52
  import { MailIcon } from "./Mail";
47
53
  import { MapViewIcon } from "./MapView";
@@ -51,6 +57,8 @@ import { MinusIcon } from "./Minus";
51
57
  import { NavigateIcon } from "./Navigate";
52
58
  import { PhoneIcon } from "./Phone";
53
59
  import { PlusIcon } from "./Plus";
60
+ import { RefreshIcon } from "./Refresh";
61
+ import { RefundStatusIcon } from "./RefundStatus";
54
62
  import { SearchIcon } from "./Search";
55
63
  import { SettingsIcon } from "./Settings";
56
64
  import { ShowIcon } from "./Show";
@@ -64,6 +72,7 @@ import { VideoIcon } from "./Video";
64
72
  import type { IconComponent } from "./types";
65
73
 
66
74
  export const icons = {
75
+ alertTriangle: AlertTriangleIcon,
67
76
  areaExpand: AreaExpandIcon,
68
77
  apple: AppleIcon,
69
78
  arrowRight: ArrowRightIcon,
@@ -80,8 +89,10 @@ export const icons = {
80
89
  chevronLeft: ChevronLeftIcon,
81
90
  clock: ClockIcon,
82
91
  close: CloseIcon,
92
+ edit: EditIcon,
83
93
  clockFilled: ClockFilledIcon,
84
94
  copy: CopyIcon,
95
+ download: DownloadIcon,
85
96
  bathrooms: BathroomsIcon,
86
97
  bedrooms: BedroomsIcon,
87
98
  cardLocation: CardLocationIcon,
@@ -99,6 +110,8 @@ export const icons = {
99
110
  linkedin: LinkedInIcon,
100
111
  listView: ListViewIcon,
101
112
  locationPin: LocationPinIcon,
113
+ locationUser: LocationUserIcon,
114
+ lock: LockIcon,
102
115
  logOut: LogOutIcon,
103
116
  mail: MailIcon,
104
117
  mapView: MapViewIcon,
@@ -107,10 +120,15 @@ export const icons = {
107
120
  menu: MenuIcon,
108
121
  minus: MinusIcon,
109
122
  navigate: NavigateIcon,
123
+ noSmoking: NoSmokingIcon,
124
+ paw: PawIcon,
110
125
  phone: PhoneIcon,
111
126
  qrCode: QrCodeIcon,
127
+ quietHours: QuietHoursIcon,
112
128
  ratingStar: RatingStarIcon,
113
129
  plus: PlusIcon,
130
+ refresh: RefreshIcon,
131
+ refundStatus: RefundStatusIcon,
114
132
  search: SearchIcon,
115
133
  saveHeart: SaveHeartIcon,
116
134
  share: ShareIcon,
@@ -121,6 +139,7 @@ export const icons = {
121
139
  star: StarIcon,
122
140
  starFilled: StarFilledIcon,
123
141
  tooltipArrow: TooltipArrowIcon,
142
+ trash: TrashIcon,
124
143
  user: UserIcon,
125
144
  usersAlt: UsersAltIcon,
126
145
  video: VideoIcon,
@@ -139,6 +158,7 @@ export const iconGroups = {
139
158
  "home",
140
159
  "listView",
141
160
  "locationPin",
161
+ "locationUser",
142
162
  "mapCollapse",
143
163
  "mapExpand",
144
164
  "mapView",
@@ -147,6 +167,7 @@ export const iconGroups = {
147
167
  ],
148
168
  actions: [
149
169
  "show",
170
+ "alertTriangle",
150
171
  "bell",
151
172
  "camera",
152
173
  "key",
@@ -154,10 +175,12 @@ export const iconGroups = {
154
175
  "checkBadge",
155
176
  "checkSuccess",
156
177
  "copy",
178
+ "download",
157
179
  "search",
158
180
  "calendar",
159
181
  "calendarOutline",
160
182
  "close",
183
+ "edit",
161
184
  "ratingStar",
162
185
  "saveHeart",
163
186
  "share",
@@ -167,6 +190,8 @@ export const iconGroups = {
167
190
  "starFilled",
168
191
  "minus",
169
192
  "plus",
193
+ "refresh",
194
+ "refundStatus",
170
195
  "sort",
171
196
  ],
172
197
  objects: [
@@ -178,7 +203,12 @@ export const iconGroups = {
178
203
  "clock",
179
204
  "clockFilled",
180
205
  "guests",
206
+ "lock",
207
+ "noSmoking",
208
+ "paw",
181
209
  "qrCode",
210
+ "quietHours",
211
+ "trash",
182
212
  "user",
183
213
  "usersAlt",
184
214
  "video",
package/src/index.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  export {
2
2
  Avatar,
3
3
  AvatarSimple,
4
+ AccountHeader,
4
5
  Badge,
6
+ StatusBadge,
7
+ PaginationDots,
8
+ InfoTile,
9
+ StepList,
5
10
  Counter,
6
11
  SegmentedToggle,
7
12
  Sidebar,
@@ -11,6 +16,7 @@ export {
11
16
  Button,
12
17
  Checkbox,
13
18
  DatePicker,
19
+ FloatingActionButton,
14
20
  Input,
15
21
  VerificationCodeInput,
16
22
  Select,
@@ -24,8 +30,14 @@ export type {
24
30
  AvatarProps,
25
31
  AvatarMenuItem,
26
32
  AvatarSimpleProps,
33
+ AccountHeaderProps,
27
34
  BadgeProps,
28
35
  BadgeVariant,
36
+ StatusBadgeProps,
37
+ StatusBadgeTone,
38
+ PaginationDotsProps,
39
+ InfoTileProps,
40
+ StepListProps,
29
41
  CounterProps,
30
42
  SegmentedToggleOption,
31
43
  SegmentedToggleProps,
@@ -45,6 +57,7 @@ export type {
45
57
  DatePickerRangeProps,
46
58
  DatePickerVariant,
47
59
  DateRange,
60
+ FloatingActionButtonProps,
48
61
  InputIcon,
49
62
  InputProps,
50
63
  InputSize,
@@ -84,6 +97,7 @@ export type {
84
97
  export {
85
98
  Icon,
86
99
  AmenityIcon,
100
+ AlertTriangleIcon,
87
101
  AppleIcon,
88
102
  icons,
89
103
  iconNames,
@@ -103,6 +117,7 @@ export {
103
117
  ChevronLeftIcon,
104
118
  ClockIcon,
105
119
  CloseIcon,
120
+ EditIcon,
106
121
  BathroomsIcon,
107
122
  BedroomsIcon,
108
123
  CardLocationIcon,
@@ -113,10 +128,15 @@ export {
113
128
  CheckSuccessIcon,
114
129
  ClockFilledIcon,
115
130
  CopyIcon,
131
+ DownloadIcon,
116
132
  QrCodeIcon,
117
133
  ShareIcon,
118
134
  TooltipArrowIcon,
119
135
  WhatsAppIcon,
136
+ QuietHoursIcon,
137
+ NoSmokingIcon,
138
+ PawIcon,
139
+ TrashIcon,
120
140
  FacebookIcon,
121
141
  FiltersIcon,
122
142
  HeartIcon,
@@ -130,6 +150,8 @@ export {
130
150
  LinkedInIcon,
131
151
  ListViewIcon,
132
152
  LocationPinIcon,
153
+ LocationUserIcon,
154
+ LockIcon,
133
155
  LogOutIcon,
134
156
  MailIcon,
135
157
  MapViewIcon,
@@ -140,6 +162,8 @@ export {
140
162
  NavigateIcon,
141
163
  PhoneIcon,
142
164
  PlusIcon,
165
+ RefreshIcon,
166
+ RefundStatusIcon,
143
167
  SearchIcon,
144
168
  SettingsIcon,
145
169
  ShowIcon,
@@ -182,3 +206,5 @@ export {
182
206
  fonts,
183
207
  } from "./theme";
184
208
  export type { GreyStep } from "./theme";
209
+
210
+ export { abbreviateMonthName, formatDate, formatDateDayShortMonth } from "./utils/dateUtils";
@@ -33,10 +33,13 @@ export const colors = {
33
33
  red: "#A63E3E",
34
34
  lightGrey: "#B7B7B7",
35
35
  green: "#34A853",
36
+ greenMuted: "#34A85329",
36
37
  primaryMuted: "#B464360F",
37
38
  primaryHover: "#B4643633",
38
39
  redMuted: "#A63E3E0F",
39
40
  redHover: "#A63E3E33",
41
+ greyMuted: "#76767629",
42
+ cancelledMuted: "#A63E3E29",
40
43
 
41
44
  grey0: grey["0"],
42
45
  grey50: grey["0.5"],
@@ -47,6 +50,7 @@ export const colors = {
47
50
  grey400: grey["4"],
48
51
  grey500: grey["5"],
49
52
  grey600: grey["6"],
53
+ grey650: "#1B1B1B",
50
54
  grey700: grey["7"],
51
55
  grey750: grey["7.5"],
52
56
  grey800: grey["8"],
@@ -193,7 +193,7 @@ export const datePickerTypography = {
193
193
  fontFamily: fonts.sans,
194
194
  fontSize: 12,
195
195
  fontWeight: "400" as const,
196
- lineHeight: 12,
196
+ lineHeight: 14,
197
197
  letterSpacing: 0.36,
198
198
  },
199
199
  rangeLabel: {
@@ -57,6 +57,31 @@ export function formatDate(date: Date): string {
57
57
  return `${day}.${month}.${date.getFullYear()}`;
58
58
  }
59
59
 
60
+ /**
61
+ * Shortens a month name to `letterCount` letters.
62
+ * Armenian digraph «ու» counts as one letter so «Հուլիս» → «Հուլ», not «Հու».
63
+ */
64
+ export function abbreviateMonthName(monthName: string, letterCount = 3): string {
65
+ const chars = Array.from(monthName);
66
+ let visual = 0;
67
+ let end = 0;
68
+ while (end < chars.length && visual < letterCount) {
69
+ if (chars[end] === "ո" && chars[end + 1] === "ւ") {
70
+ end += 2;
71
+ } else {
72
+ end += 1;
73
+ }
74
+ visual += 1;
75
+ }
76
+ return chars.slice(0, end).join("");
77
+ }
78
+
79
+ /** "15 Հուլ 2026" — day + abbreviated month + year for range triggers. */
80
+ export function formatDateDayShortMonth(date: Date, monthNames: string[], letterCount = 3): string {
81
+ const month = abbreviateMonthName(monthNames[date.getMonth()] ?? "", letterCount);
82
+ return `${date.getDate()} ${month} ${date.getFullYear()}`;
83
+ }
84
+
60
85
  /**
61
86
  * Builds a 6×7 grid of calendar days for the month containing `monthDate`,
62
87
  * including the leading/trailing days from adjacent months needed to fill