@ecohouse/ui 0.1.58 → 0.1.60
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/index.cjs +649 -468
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -10
- package/dist/index.d.ts +25 -10
- package/dist/index.js +544 -366
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.tsx +6 -2
- package/src/components/CommentCard/CommentCard.tsx +3 -0
- package/src/components/Counter/Counter.tsx +5 -3
- package/src/components/DatePicker/DatePicker.tsx +98 -40
- package/src/components/NotificationStatus/NotificationStatus.tsx +1 -1
- package/src/components/Range/Range.tsx +1 -1
- package/src/components/VerificationCodeInput/VerificationCodeInput.tsx +28 -4
- package/src/icons/Backspace/BackspaceIcon.test.ts +9 -0
- package/src/icons/Backspace/BackspaceIcon.tsx +20 -0
- package/src/icons/Backspace/BackspaceIcon.web.tsx +26 -0
- package/src/icons/Backspace/backspacePath.ts +3 -0
- package/src/icons/Backspace/index.ts +1 -0
- package/src/icons/Fingerprint/FingerprintIcon.test.ts +9 -0
- package/src/icons/Fingerprint/FingerprintIcon.tsx +23 -0
- package/src/icons/Fingerprint/FingerprintIcon.web.tsx +29 -0
- package/src/icons/Fingerprint/fingerprintPaths.ts +6 -0
- package/src/icons/Fingerprint/index.ts +1 -0
- package/src/icons/GoogleBrand/GoogleBrandIcon.test.ts +14 -0
- package/src/icons/GoogleBrand/GoogleBrandIcon.tsx +15 -0
- package/src/icons/GoogleBrand/GoogleBrandIcon.web.tsx +21 -0
- package/src/icons/GoogleBrand/googleBrandPaths.ts +18 -0
- package/src/icons/GoogleBrand/index.ts +1 -0
- package/src/icons/index.ts +3 -0
- package/src/icons/registry.ts +9 -1
- package/src/index.ts +3 -0
- package/src/theme/typography.ts +6 -6
- package/src/utils/dateUtils.ts +7 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { GOOGLE_BRAND_PATHS } from "./googleBrandPaths";
|
|
3
|
+
|
|
4
|
+
describe("GoogleBrandIcon", () => {
|
|
5
|
+
it("uses the approved brand-colored paths", () => {
|
|
6
|
+
expect(GOOGLE_BRAND_PATHS).toHaveLength(4);
|
|
7
|
+
expect(GOOGLE_BRAND_PATHS.map((path) => path.fill)).toEqual([
|
|
8
|
+
"#4285F4",
|
|
9
|
+
"#34A853",
|
|
10
|
+
"#FBBC05",
|
|
11
|
+
"#A63E3E",
|
|
12
|
+
]);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Svg, { Path } from "react-native-svg";
|
|
2
|
+
import type { IconProps } from "../types";
|
|
3
|
+
import { GOOGLE_BRAND_PATHS } from "./googleBrandPaths";
|
|
4
|
+
|
|
5
|
+
export { GOOGLE_BRAND_PATHS } from "./googleBrandPaths";
|
|
6
|
+
|
|
7
|
+
export function GoogleBrandIcon({ size = 18 }: IconProps) {
|
|
8
|
+
return (
|
|
9
|
+
<Svg width={size} height={size} viewBox="0 0 18 18" fill="none">
|
|
10
|
+
{GOOGLE_BRAND_PATHS.map((path) => (
|
|
11
|
+
<Path key={path.fill} clipRule="evenodd" d={path.d} fill={path.fill} fillRule="evenodd" />
|
|
12
|
+
))}
|
|
13
|
+
</Svg>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { IconProps } from "../types";
|
|
2
|
+
import { GOOGLE_BRAND_PATHS } from "./googleBrandPaths";
|
|
3
|
+
|
|
4
|
+
export function GoogleBrandIcon({ size = 18 }: IconProps) {
|
|
5
|
+
return (
|
|
6
|
+
<svg
|
|
7
|
+
width={size}
|
|
8
|
+
height={size}
|
|
9
|
+
viewBox="0 0 18 18"
|
|
10
|
+
fill="none"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
aria-hidden
|
|
13
|
+
>
|
|
14
|
+
{GOOGLE_BRAND_PATHS.map((path) => (
|
|
15
|
+
<path key={path.fill} clipRule="evenodd" d={path.d} fill={path.fill} fillRule="evenodd" />
|
|
16
|
+
))}
|
|
17
|
+
</svg>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { GOOGLE_BRAND_PATHS } from "./googleBrandPaths";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const GOOGLE_BRAND_PATHS = [
|
|
2
|
+
{
|
|
3
|
+
d: "M17.64 9.20456C17.64 8.56637 17.5827 7.95274 17.4764 7.36365H9V10.845H13.8436C13.635 11.97 13.0009 12.9232 12.0477 13.5614V15.8196H14.9564C16.6582 14.2527 17.64 11.9455 17.64 9.20456Z",
|
|
4
|
+
fill: "#4285F4",
|
|
5
|
+
},
|
|
6
|
+
{
|
|
7
|
+
d: "M9.00366 18C11.4337 18 13.4709 17.1941 14.96 15.8195L12.0514 13.5613C11.2455 14.1013 10.2146 14.4204 9.00366 14.4204C6.65957 14.4204 4.67548 12.8372 3.96776 10.71H0.960938V13.0418C2.44185 15.9831 5.48548 18 9.00366 18Z",
|
|
8
|
+
fill: "#34A853",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
d: "M3.96409 10.7099C3.78409 10.1699 3.68182 9.59313 3.68182 8.99995C3.68182 8.40677 3.78409 7.82995 3.96409 7.28995V4.95813H0.957273C0.347727 6.17313 0 7.54768 0 8.99995C0 10.4522 0.347727 11.8268 0.957273 13.0418L3.96409 10.7099Z",
|
|
12
|
+
fill: "#FBBC05",
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
d: "M9.00366 3.57955C10.325 3.57955 11.5114 4.03364 12.4441 4.92545L15.0255 2.34409C13.4668 0.891818 11.4296 0 9.00366 0C5.48548 0 2.44185 2.01682 0.960938 4.95818L3.96776 7.29C4.67548 5.16273 6.65957 3.57955 9.00366 3.57955Z",
|
|
16
|
+
fill: "#A63E3E",
|
|
17
|
+
},
|
|
18
|
+
] as const;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GoogleBrandIcon, GOOGLE_BRAND_PATHS } from "./GoogleBrandIcon";
|
package/src/icons/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { AlertTriangleIcon } from "./AlertTriangle";
|
|
|
12
12
|
export { AppleIcon } from "./Store";
|
|
13
13
|
export { ArrowLeftIcon } from "./ArrowLeft";
|
|
14
14
|
export { ArrowRightIcon } from "./ArrowRight";
|
|
15
|
+
export { BackspaceIcon } from "./Backspace";
|
|
15
16
|
export { BagIcon } from "./Bag";
|
|
16
17
|
export { BanIcon } from "./Ban";
|
|
17
18
|
export { BlockedGuestsIcon } from "./BlockedGuests";
|
|
@@ -59,6 +60,7 @@ export {
|
|
|
59
60
|
export { QuietHoursIcon, NoSmokingIcon, PawIcon, TrashIcon } from "./HouseRules";
|
|
60
61
|
export { FacebookIcon } from "./Facebook";
|
|
61
62
|
export { FiltersIcon } from "./Filters";
|
|
63
|
+
export { FingerprintIcon } from "./Fingerprint";
|
|
62
64
|
export { FullscreenIcon } from "./Fullscreen";
|
|
63
65
|
export { CutleryIcon } from "./Cutlery";
|
|
64
66
|
export { DollarIcon } from "./Dollar";
|
|
@@ -68,6 +70,7 @@ export { DoubleCheckIcon } from "./DoubleCheck";
|
|
|
68
70
|
export { HeartIcon } from "./Heart";
|
|
69
71
|
export { HeadsetIcon } from "./Headset";
|
|
70
72
|
export { GlobeIcon } from "./Globe";
|
|
73
|
+
export { GoogleBrandIcon } from "./GoogleBrand";
|
|
71
74
|
export { GooglePlayIcon } from "./Store";
|
|
72
75
|
export { HelpCircleIcon } from "./HelpCircle";
|
|
73
76
|
export { HideIcon } from "./Hide";
|
package/src/icons/registry.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ActiveGuestsIcon } from "./ActiveGuests";
|
|
|
2
2
|
import { ArrowRightIcon } from "./ArrowRight";
|
|
3
3
|
import { AlertTriangleIcon } from "./AlertTriangle";
|
|
4
4
|
import { AppleIcon, GooglePlayIcon } from "./Store";
|
|
5
|
+
import { BackspaceIcon } from "./Backspace";
|
|
5
6
|
import { BagIcon } from "./Bag";
|
|
6
7
|
import { BanIcon } from "./Ban";
|
|
7
8
|
import { BlockedGuestsIcon } from "./BlockedGuests";
|
|
@@ -47,6 +48,8 @@ import {
|
|
|
47
48
|
} from "./CottageDetail";
|
|
48
49
|
import { NoSmokingIcon, PawIcon, QuietHoursIcon, TrashIcon } from "./HouseRules";
|
|
49
50
|
import { FacebookIcon } from "./Facebook";
|
|
51
|
+
import { FingerprintIcon } from "./Fingerprint";
|
|
52
|
+
import { GoogleBrandIcon } from "./GoogleBrand";
|
|
50
53
|
import { FiltersIcon } from "./Filters";
|
|
51
54
|
import { FullscreenIcon } from "./Fullscreen";
|
|
52
55
|
import { CutleryIcon } from "./Cutlery";
|
|
@@ -118,6 +121,7 @@ export const icons = {
|
|
|
118
121
|
areaExpand: AreaExpandIcon,
|
|
119
122
|
apple: AppleIcon,
|
|
120
123
|
arrowRight: ArrowRightIcon,
|
|
124
|
+
backspace: BackspaceIcon,
|
|
121
125
|
bag: BagIcon,
|
|
122
126
|
ban: BanIcon,
|
|
123
127
|
blockedGuests: BlockedGuestsIcon,
|
|
@@ -148,6 +152,8 @@ export const icons = {
|
|
|
148
152
|
bedrooms: BedroomsIcon,
|
|
149
153
|
cardLocation: CardLocationIcon,
|
|
150
154
|
facebook: FacebookIcon,
|
|
155
|
+
fingerprint: FingerprintIcon,
|
|
156
|
+
googleBrand: GoogleBrandIcon,
|
|
151
157
|
filters: FiltersIcon,
|
|
152
158
|
fullscreen: FullscreenIcon,
|
|
153
159
|
guests: GuestsIcon,
|
|
@@ -282,6 +288,8 @@ export const iconGroups = {
|
|
|
282
288
|
"smartKey",
|
|
283
289
|
"stayHome",
|
|
284
290
|
"filters",
|
|
291
|
+
"backspace",
|
|
292
|
+
"fingerprint",
|
|
285
293
|
"fullscreen",
|
|
286
294
|
"heart",
|
|
287
295
|
"headset",
|
|
@@ -333,7 +341,7 @@ export const iconGroups = {
|
|
|
333
341
|
"notificationQrCode",
|
|
334
342
|
"notificationWarning",
|
|
335
343
|
],
|
|
336
|
-
social: ["apple", "facebook", "googlePlay", "instagram", "linkedin"],
|
|
344
|
+
social: ["apple", "facebook", "googleBrand", "googlePlay", "instagram", "linkedin"],
|
|
337
345
|
interface: [
|
|
338
346
|
"areaExpand",
|
|
339
347
|
"cutlery",
|
package/src/index.ts
CHANGED
|
@@ -144,6 +144,7 @@ export {
|
|
|
144
144
|
getIconsByGroup,
|
|
145
145
|
ArrowLeftIcon,
|
|
146
146
|
ArrowRightIcon,
|
|
147
|
+
BackspaceIcon,
|
|
147
148
|
BagIcon,
|
|
148
149
|
BanIcon,
|
|
149
150
|
BellIcon,
|
|
@@ -188,6 +189,8 @@ export {
|
|
|
188
189
|
PawIcon,
|
|
189
190
|
TrashIcon,
|
|
190
191
|
FacebookIcon,
|
|
192
|
+
FingerprintIcon,
|
|
193
|
+
GoogleBrandIcon,
|
|
191
194
|
FiltersIcon,
|
|
192
195
|
FullscreenIcon,
|
|
193
196
|
HeartIcon,
|
package/src/theme/typography.ts
CHANGED
|
@@ -2,20 +2,20 @@ export const fonts = {
|
|
|
2
2
|
sans: "Noto Sans Armenian",
|
|
3
3
|
} as const;
|
|
4
4
|
|
|
5
|
-
/** Button label — SemiBold, line-height
|
|
5
|
+
/** Button label — SemiBold, 125%+ line-height so Noto Sans Armenian is not clipped. */
|
|
6
6
|
export const buttonTypography = {
|
|
7
7
|
lg: {
|
|
8
8
|
fontFamily: fonts.sans,
|
|
9
9
|
fontSize: 14,
|
|
10
10
|
fontWeight: "600" as const,
|
|
11
|
-
lineHeight:
|
|
11
|
+
lineHeight: 20,
|
|
12
12
|
letterSpacing: 0.42,
|
|
13
13
|
},
|
|
14
14
|
sm: {
|
|
15
15
|
fontFamily: fonts.sans,
|
|
16
16
|
fontSize: 12,
|
|
17
17
|
fontWeight: "600" as const,
|
|
18
|
-
lineHeight:
|
|
18
|
+
lineHeight: 16,
|
|
19
19
|
letterSpacing: 0.36,
|
|
20
20
|
},
|
|
21
21
|
} as const;
|
|
@@ -222,7 +222,7 @@ export const datePickerTypography = {
|
|
|
222
222
|
fontFamily: fonts.sans,
|
|
223
223
|
fontSize: 14,
|
|
224
224
|
fontWeight: "700" as const,
|
|
225
|
-
lineHeight:
|
|
225
|
+
lineHeight: 18,
|
|
226
226
|
letterSpacing: 0,
|
|
227
227
|
},
|
|
228
228
|
/** Weekday header (ԵՐ, ԵՔ, ...) — Regular, uppercase, centered, Grey/300. */
|
|
@@ -230,14 +230,14 @@ export const datePickerTypography = {
|
|
|
230
230
|
fontFamily: fonts.sans,
|
|
231
231
|
fontSize: 12,
|
|
232
232
|
fontWeight: "400" as const,
|
|
233
|
-
lineHeight:
|
|
233
|
+
lineHeight: 16,
|
|
234
234
|
letterSpacing: 0,
|
|
235
235
|
},
|
|
236
236
|
day: {
|
|
237
237
|
fontFamily: fonts.sans,
|
|
238
238
|
fontSize: 14,
|
|
239
239
|
fontWeight: "400" as const,
|
|
240
|
-
lineHeight:
|
|
240
|
+
lineHeight: 18,
|
|
241
241
|
letterSpacing: 0,
|
|
242
242
|
},
|
|
243
243
|
} as const;
|
package/src/utils/dateUtils.ts
CHANGED
|
@@ -83,9 +83,10 @@ export function formatDateDayShortMonth(date: Date, monthNames: string[], letter
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Builds a 6×7 grid of calendar days for the month containing `monthDate`,
|
|
87
|
-
* including
|
|
88
|
-
*
|
|
86
|
+
* Builds a 4–6 × 7 grid of calendar days for the month containing `monthDate`,
|
|
87
|
+
* including adjacent-month days only when they share a week with this month.
|
|
88
|
+
* Trailing weeks that are entirely the next month are omitted.
|
|
89
|
+
* `weekStartsOn` follows the JS `Date#getDay()` convention
|
|
89
90
|
* (0 = Sunday, 1 = Monday, ...).
|
|
90
91
|
*/
|
|
91
92
|
export function getMonthMatrix(monthDate: Date, weekStartsOn: 0 | 1 = 1): Date[][] {
|
|
@@ -105,7 +106,9 @@ export function getMonthMatrix(monthDate: Date, weekStartsOn: 0 | 1 = 1): Date[]
|
|
|
105
106
|
days.push(cursor);
|
|
106
107
|
cursor = new Date(cursor.getFullYear(), cursor.getMonth(), cursor.getDate() + 1);
|
|
107
108
|
}
|
|
108
|
-
|
|
109
|
+
if (days.some((day) => day.getMonth() === month)) {
|
|
110
|
+
weeks.push(days);
|
|
111
|
+
}
|
|
109
112
|
}
|
|
110
113
|
return weeks;
|
|
111
114
|
}
|