@ecohouse/ui 0.1.19 → 0.1.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecohouse/ui",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Cross-platform presentation-only UI components for EcoHouse (React Native + React Native Web)",
@@ -21,7 +21,8 @@ export interface StatCardProps extends Omit<ViewProps, "style" | "children"> {
21
21
  className?: string;
22
22
  }
23
23
 
24
- const ICON_SIZE = 28;
24
+ /** Default matches Figma users-alt vector width (W 25.63181). */
25
+ const ICON_SIZE = 25.63181;
25
26
 
26
27
  export const StatCard = forwardRef<ComponentRef<typeof View>, StatCardProps>(function StatCard(
27
28
  {
@@ -0,0 +1,18 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+ import { CLOSE_PATH } from "./closePath";
5
+
6
+ export function CloseIcon({ size = 20, color = colors.white, strokeWidth = 2 }: IconProps) {
7
+ return (
8
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
9
+ <Path
10
+ d={CLOSE_PATH}
11
+ stroke={color}
12
+ strokeWidth={strokeWidth}
13
+ strokeLinecap="round"
14
+ strokeLinejoin="round"
15
+ />
16
+ </Svg>
17
+ );
18
+ }
@@ -0,0 +1,17 @@
1
+ import { colors } from "../../theme";
2
+ import type { IconProps } from "../types";
3
+ import { CLOSE_PATH } from "./closePath";
4
+
5
+ export function CloseIcon({ size = 20, color = colors.white, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg width={size} height={size} viewBox="0 0 20 20" fill="none" aria-hidden>
8
+ <path
9
+ d={CLOSE_PATH}
10
+ stroke={color}
11
+ strokeWidth={strokeWidth}
12
+ strokeLinecap="round"
13
+ strokeLinejoin="round"
14
+ />
15
+ </svg>
16
+ );
17
+ }
@@ -0,0 +1,2 @@
1
+ /** Close (x) path — 20×20 viewBox. */
2
+ export const CLOSE_PATH = "M15 5L5 15M5 5L15 15";
@@ -0,0 +1,2 @@
1
+ export { CloseIcon } from "./CloseIcon";
2
+ export { CLOSE_PATH } from "./closePath";
@@ -0,0 +1,31 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+ import { MAP_COLLAPSE_PATH, MAP_EXPAND_PATH } from "./mapControlPaths";
5
+
6
+ function MapControlIcon({
7
+ path,
8
+ size = 20,
9
+ color = colors.white,
10
+ strokeWidth = 2,
11
+ }: IconProps & { path: string }) {
12
+ return (
13
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
14
+ <Path
15
+ d={path}
16
+ stroke={color}
17
+ strokeWidth={strokeWidth}
18
+ strokeLinecap="round"
19
+ strokeLinejoin="round"
20
+ />
21
+ </Svg>
22
+ );
23
+ }
24
+
25
+ export function MapExpandIcon(props: IconProps) {
26
+ return <MapControlIcon {...props} path={MAP_EXPAND_PATH} />;
27
+ }
28
+
29
+ export function MapCollapseIcon(props: IconProps) {
30
+ return <MapControlIcon {...props} path={MAP_COLLAPSE_PATH} />;
31
+ }
@@ -0,0 +1,30 @@
1
+ import { colors } from "../../theme";
2
+ import type { IconProps } from "../types";
3
+ import { MAP_COLLAPSE_PATH, MAP_EXPAND_PATH } from "./mapControlPaths";
4
+
5
+ function MapControlIcon({
6
+ path,
7
+ size = 20,
8
+ color = colors.white,
9
+ strokeWidth = 2,
10
+ }: IconProps & { path: string }) {
11
+ return (
12
+ <svg width={size} height={size} viewBox="0 0 20 20" fill="none" aria-hidden>
13
+ <path
14
+ d={path}
15
+ stroke={color}
16
+ strokeWidth={strokeWidth}
17
+ strokeLinecap="round"
18
+ strokeLinejoin="round"
19
+ />
20
+ </svg>
21
+ );
22
+ }
23
+
24
+ export function MapExpandIcon(props: IconProps) {
25
+ return <MapControlIcon {...props} path={MAP_EXPAND_PATH} />;
26
+ }
27
+
28
+ export function MapCollapseIcon(props: IconProps) {
29
+ return <MapControlIcon {...props} path={MAP_COLLAPSE_PATH} />;
30
+ }
@@ -0,0 +1,2 @@
1
+ export { MapCollapseIcon, MapExpandIcon } from "./MapControlIcons";
2
+ export { MAP_COLLAPSE_PATH, MAP_EXPAND_PATH } from "./mapControlPaths";
@@ -0,0 +1,4 @@
1
+ /** Map control paths — 20×20 viewBox. */
2
+ export const MAP_EXPAND_PATH = "M8.33366 15.8332H4.16699V11.6665M11.667 4.1665H15.8337V8.33317";
3
+
4
+ export const MAP_COLLAPSE_PATH = "M4.16699 11.6665H8.33366V15.8332M15.8337 8.33317H11.667V4.1665";
@@ -17,6 +17,7 @@ export { CheckBadgeIcon } from "./CheckBadge";
17
17
  export { ChevronDownIcon } from "./ChevronDown";
18
18
  export { ChevronLeftIcon } from "./ChevronLeft";
19
19
  export { ClockIcon } from "./Clock";
20
+ export { CloseIcon } from "./Close";
20
21
  export {
21
22
  BathroomsIcon,
22
23
  BedroomsIcon,
@@ -50,6 +51,7 @@ export { LocationPinIcon } from "./LocationPin";
50
51
  export { LogOutIcon } from "./LogOut";
51
52
  export { MailIcon } from "./Mail";
52
53
  export { MapViewIcon } from "./MapView";
54
+ export { MapCollapseIcon, MapExpandIcon } from "./MapControls";
53
55
  export { MenuIcon } from "./Menu";
54
56
  export type { MenuIconProps } from "./Menu";
55
57
  export { NavigateIcon } from "./Navigate";
@@ -10,6 +10,7 @@ import { CheckBadgeIcon } from "./CheckBadge";
10
10
  import { ChevronDownIcon } from "./ChevronDown";
11
11
  import { ChevronLeftIcon } from "./ChevronLeft";
12
12
  import { ClockIcon } from "./Clock";
13
+ import { CloseIcon } from "./Close";
13
14
  import {
14
15
  BathroomsIcon,
15
16
  BedroomsIcon,
@@ -43,6 +44,7 @@ import { LocationPinIcon } from "./LocationPin";
43
44
  import { LogOutIcon } from "./LogOut";
44
45
  import { MailIcon } from "./Mail";
45
46
  import { MapViewIcon } from "./MapView";
47
+ import { MapCollapseIcon, MapExpandIcon } from "./MapControls";
46
48
  import { MenuIcon } from "./Menu";
47
49
  import { MinusIcon } from "./Minus";
48
50
  import { NavigateIcon } from "./Navigate";
@@ -75,6 +77,7 @@ export const icons = {
75
77
  chevronDown: ChevronDownIcon,
76
78
  chevronLeft: ChevronLeftIcon,
77
79
  clock: ClockIcon,
80
+ close: CloseIcon,
78
81
  clockFilled: ClockFilledIcon,
79
82
  copy: CopyIcon,
80
83
  bathrooms: BathroomsIcon,
@@ -96,6 +99,8 @@ export const icons = {
96
99
  logOut: LogOutIcon,
97
100
  mail: MailIcon,
98
101
  mapView: MapViewIcon,
102
+ mapCollapse: MapCollapseIcon,
103
+ mapExpand: MapExpandIcon,
99
104
  menu: MenuIcon,
100
105
  minus: MinusIcon,
101
106
  navigate: NavigateIcon,
@@ -131,6 +136,8 @@ export const iconGroups = {
131
136
  "home",
132
137
  "listView",
133
138
  "locationPin",
139
+ "mapCollapse",
140
+ "mapExpand",
134
141
  "mapView",
135
142
  "menu",
136
143
  "navigate",
@@ -147,6 +154,7 @@ export const iconGroups = {
147
154
  "search",
148
155
  "calendar",
149
156
  "calendarOutline",
157
+ "close",
150
158
  "ratingStar",
151
159
  "saveHeart",
152
160
  "share",
package/src/index.ts CHANGED
@@ -87,6 +87,7 @@ export {
87
87
  ChevronDownIcon,
88
88
  ChevronLeftIcon,
89
89
  ClockIcon,
90
+ CloseIcon,
90
91
  BathroomsIcon,
91
92
  BedroomsIcon,
92
93
  CardLocationIcon,
@@ -116,6 +117,8 @@ export {
116
117
  LogOutIcon,
117
118
  MailIcon,
118
119
  MapViewIcon,
120
+ MapCollapseIcon,
121
+ MapExpandIcon,
119
122
  MenuIcon,
120
123
  MinusIcon,
121
124
  NavigateIcon,