@ecohouse/ui 0.1.5 → 0.1.7

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 (57) hide show
  1. package/README.md +34 -3
  2. package/dist/index.cjs +946 -102
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +349 -157
  5. package/dist/index.d.ts +349 -157
  6. package/dist/index.js +930 -104
  7. package/dist/index.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/Badge/Badge.stories.tsx +52 -0
  10. package/src/components/Badge/Badge.tsx +131 -0
  11. package/src/components/Badge/index.ts +2 -0
  12. package/src/components/CommentCard/CommentCard.stories.tsx +31 -0
  13. package/src/components/CommentCard/CommentCard.tsx +209 -0
  14. package/src/components/CommentCard/index.ts +2 -0
  15. package/src/components/Counter/Counter.stories.tsx +46 -0
  16. package/src/components/Counter/Counter.tsx +135 -0
  17. package/src/components/Counter/index.ts +2 -0
  18. package/src/components/RatingInput/RatingInput.stories.tsx +41 -0
  19. package/src/components/RatingInput/RatingInput.tsx +168 -0
  20. package/src/components/RatingInput/index.ts +2 -0
  21. package/src/components/SegmentedToggle/SegmentedToggle.stories.tsx +63 -0
  22. package/src/components/SegmentedToggle/SegmentedToggle.tsx +221 -0
  23. package/src/components/SegmentedToggle/index.ts +2 -0
  24. package/src/components/StatCard/StatCard.stories.tsx +20 -0
  25. package/src/components/StatCard/StatCard.tsx +61 -0
  26. package/src/components/StatCard/index.ts +2 -0
  27. package/src/components/index.ts +18 -0
  28. package/src/icons/Minus/MinusIcon.tsx +20 -0
  29. package/src/icons/Minus/MinusIcon.web.tsx +19 -0
  30. package/src/icons/Minus/index.ts +1 -0
  31. package/src/icons/Minus/minusPath.ts +1 -0
  32. package/src/icons/Plus/PlusIcon.tsx +20 -0
  33. package/src/icons/Plus/PlusIcon.web.tsx +19 -0
  34. package/src/icons/Plus/index.ts +1 -0
  35. package/src/icons/Plus/plusPath.ts +1 -0
  36. package/src/icons/Sidebar/SidebarIcon.tsx +21 -0
  37. package/src/icons/Sidebar/SidebarIcon.web.tsx +27 -0
  38. package/src/icons/Sidebar/index.ts +1 -0
  39. package/src/icons/Sidebar/sidebarPath.ts +3 -0
  40. package/src/icons/Star/StarIcon.tsx +35 -0
  41. package/src/icons/Star/StarIcon.web.tsx +41 -0
  42. package/src/icons/Star/index.ts +2 -0
  43. package/src/icons/Star/starPath.ts +3 -0
  44. package/src/icons/StarFilled/StarFilledIcon.tsx +28 -0
  45. package/src/icons/StarFilled/StarFilledIcon.web.tsx +34 -0
  46. package/src/icons/StarFilled/index.ts +1 -0
  47. package/src/icons/UsersAlt/UsersAltIcon.tsx +14 -0
  48. package/src/icons/UsersAlt/UsersAltIcon.web.tsx +13 -0
  49. package/src/icons/UsersAlt/index.ts +1 -0
  50. package/src/icons/UsersAlt/usersAltPath.ts +2 -0
  51. package/src/icons/index.ts +7 -0
  52. package/src/icons/registry.ts +18 -2
  53. package/src/index.ts +34 -1
  54. package/src/theme/colors.test.ts +6 -0
  55. package/src/theme/colors.ts +6 -0
  56. package/src/theme/index.ts +6 -0
  57. package/src/theme/typography.ts +77 -0
@@ -0,0 +1,27 @@
1
+ import { SIDEBAR_PATH } from "./sidebarPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ /** Web / Storybook — plain SVG (no react-native-svg). */
6
+ export function SidebarIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
7
+ return (
8
+ <svg
9
+ width={size}
10
+ height={size}
11
+ viewBox="0 0 20 20"
12
+ fill="none"
13
+ xmlns="http://www.w3.org/2000/svg"
14
+ aria-hidden
15
+ >
16
+ <path
17
+ d={SIDEBAR_PATH}
18
+ stroke={color}
19
+ strokeWidth={strokeWidth}
20
+ strokeLinecap="round"
21
+ strokeLinejoin="round"
22
+ />
23
+ </svg>
24
+ );
25
+ }
26
+
27
+ export { SIDEBAR_PATH } from "./sidebarPath";
@@ -0,0 +1 @@
1
+ export { SidebarIcon, SIDEBAR_PATH } from "./SidebarIcon";
@@ -0,0 +1,3 @@
1
+ /** Sidebar icon path — 20×20 viewBox. */
2
+ export const SIDEBAR_PATH =
3
+ "M12.5 2.5V17.5M6.5 2.5H13.5C14.9001 2.5 15.6002 2.5 16.135 2.77248C16.6054 3.01217 16.9878 3.39462 17.2275 3.86502C17.5 4.3998 17.5 5.09987 17.5 6.5V13.5C17.5 14.9001 17.5 15.6002 17.2275 16.135C16.9878 16.6054 16.6054 16.9878 16.135 17.2275C15.6002 17.5 14.9001 17.5 13.5 17.5H6.5C5.09987 17.5 4.3998 17.5 3.86502 17.2275C3.39462 16.9878 3.01217 16.6054 2.77248 16.135C2.5 15.6002 2.5 14.9001 2.5 13.5V6.5C2.5 5.09987 2.5 4.3998 2.77248 3.86502C3.01217 3.39462 3.39462 3.01217 3.86502 2.77248C4.3998 2.5 5.09987 2.5 6.5 2.5Z";
@@ -0,0 +1,35 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { colors } from "../../theme";
3
+ import { STAR_PATH } from "./starPath";
4
+ import type { IconProps } from "../types";
5
+
6
+ export interface StarIconProps extends IconProps {
7
+ active?: boolean;
8
+ height?: number;
9
+ }
10
+
11
+ /** Native — active is solid orange; inactive is a grey outline. */
12
+ export function StarIcon({
13
+ active = false,
14
+ size = 28,
15
+ height,
16
+ color,
17
+ strokeWidth = 2,
18
+ }: StarIconProps) {
19
+ const resolvedColor = color ?? (active ? "#E38E5E" : colors.grey150);
20
+
21
+ return (
22
+ <Svg width={size} height={height ?? (size * 26) / 28} viewBox="0 0 28 26" fill="none">
23
+ <Path
24
+ d={STAR_PATH}
25
+ fill={active ? resolvedColor : "none"}
26
+ stroke={resolvedColor}
27
+ strokeWidth={strokeWidth}
28
+ strokeLinecap="round"
29
+ strokeLinejoin="round"
30
+ />
31
+ </Svg>
32
+ );
33
+ }
34
+
35
+ export { STAR_PATH } from "./starPath";
@@ -0,0 +1,41 @@
1
+ import { colors } from "../../theme";
2
+ import { STAR_PATH } from "./starPath";
3
+ import type { IconProps } from "../types";
4
+
5
+ export interface StarIconProps extends IconProps {
6
+ active?: boolean;
7
+ height?: number;
8
+ }
9
+
10
+ /** Web / Storybook — active is solid orange; inactive is a grey outline. */
11
+ export function StarIcon({
12
+ active = false,
13
+ size = 28,
14
+ height,
15
+ color,
16
+ strokeWidth = 2,
17
+ }: StarIconProps) {
18
+ const resolvedColor = color ?? (active ? "#E38E5E" : colors.grey150);
19
+
20
+ return (
21
+ <svg
22
+ width={size}
23
+ height={height ?? (size * 26) / 28}
24
+ viewBox="0 0 28 26"
25
+ fill="none"
26
+ xmlns="http://www.w3.org/2000/svg"
27
+ aria-hidden
28
+ >
29
+ <path
30
+ d={STAR_PATH}
31
+ fill={active ? resolvedColor : "none"}
32
+ stroke={resolvedColor}
33
+ strokeWidth={strokeWidth}
34
+ strokeLinecap="round"
35
+ strokeLinejoin="round"
36
+ />
37
+ </svg>
38
+ );
39
+ }
40
+
41
+ export { STAR_PATH } from "./starPath";
@@ -0,0 +1,2 @@
1
+ export { StarIcon, STAR_PATH } from "./StarIcon";
2
+ export type { StarIconProps } from "./StarIcon";
@@ -0,0 +1,3 @@
1
+ /** Star icon path — 28×26 viewBox. */
2
+ export const STAR_PATH =
3
+ "M12.6112 2.09824C12.9186 1.47565 13.0722 1.16436 13.2808 1.0649C13.4623 0.978367 13.6732 0.978367 13.8546 1.0649C14.0632 1.16436 14.2169 1.47565 14.5242 2.09824L17.4398 8.00486C17.5305 8.18866 17.5759 8.28056 17.6422 8.35192C17.7009 8.41509 17.7713 8.46628 17.8495 8.50264C17.9378 8.54371 18.0392 8.55854 18.242 8.58818L24.7637 9.54142C25.4505 9.6418 25.7938 9.69199 25.9528 9.85973C26.091 10.0057 26.156 10.2062 26.1297 10.4055C26.0995 10.6346 25.8509 10.8767 25.3537 11.361L20.6363 15.9557C20.4893 16.0989 20.4157 16.1706 20.3683 16.2558C20.3263 16.3312 20.2993 16.4141 20.2889 16.4998C20.2772 16.5966 20.2945 16.6978 20.3292 16.9001L21.4423 23.39C21.5597 24.0745 21.6184 24.4167 21.5081 24.6198C21.4121 24.7965 21.2415 24.9205 21.0438 24.9571C20.8165 24.9992 20.5092 24.8376 19.8945 24.5144L14.0642 21.4483C13.8826 21.3527 13.7917 21.305 13.696 21.2862C13.6113 21.2696 13.5242 21.2696 13.4394 21.2862C13.3437 21.305 13.2529 21.3527 13.0713 21.4483L7.24094 24.5144C6.62626 24.8376 6.31892 24.9992 6.09167 24.9571C5.89395 24.9205 5.72334 24.7965 5.62736 24.6198C5.51704 24.4167 5.57574 24.0745 5.69314 23.39L6.80622 16.9001C6.84092 16.6978 6.85828 16.5966 6.84653 16.4998C6.83614 16.4141 6.80919 16.3312 6.76718 16.2558C6.71974 16.1706 6.64621 16.0989 6.49916 15.9557L1.78179 11.361C1.28459 10.8767 1.03599 10.6346 1.00574 10.4055C0.979423 10.2062 1.04445 10.0057 1.18271 9.85973C1.34162 9.69199 1.685 9.6418 2.37177 9.54142L8.89346 8.58818C9.09627 8.55854 9.19768 8.54371 9.286 8.50264C9.36419 8.46628 9.43459 8.41509 9.49329 8.35192C9.55958 8.28056 9.60495 8.18866 9.69567 8.00486L12.6112 2.09824Z";
@@ -0,0 +1,28 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { STAR_PATH } from "../Star/starPath";
3
+ import type { IconProps } from "../types";
4
+
5
+ interface StarFilledIconProps extends IconProps {
6
+ height?: number;
7
+ }
8
+
9
+ /** Native — supplied solid orange 28×26 star icon. */
10
+ export function StarFilledIcon({
11
+ size = 28,
12
+ height,
13
+ color = "#E38E5E",
14
+ strokeWidth = 2,
15
+ }: StarFilledIconProps) {
16
+ return (
17
+ <Svg width={size} height={height ?? (size * 26) / 28} viewBox="0 0 28 26" fill={color}>
18
+ <Path
19
+ d={STAR_PATH}
20
+ fill={color}
21
+ stroke={color}
22
+ strokeWidth={strokeWidth}
23
+ strokeLinecap="round"
24
+ strokeLinejoin="round"
25
+ />
26
+ </Svg>
27
+ );
28
+ }
@@ -0,0 +1,34 @@
1
+ import { STAR_PATH } from "../Star/starPath";
2
+ import type { IconProps } from "../types";
3
+
4
+ interface StarFilledIconProps extends IconProps {
5
+ height?: number;
6
+ }
7
+
8
+ /** Web / Storybook — supplied solid orange 28×26 star icon. */
9
+ export function StarFilledIcon({
10
+ size = 28,
11
+ height,
12
+ color = "#E38E5E",
13
+ strokeWidth = 2,
14
+ }: StarFilledIconProps) {
15
+ return (
16
+ <svg
17
+ width={size}
18
+ height={height ?? (size * 26) / 28}
19
+ viewBox="0 0 28 26"
20
+ fill={color}
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ aria-hidden
23
+ >
24
+ <path
25
+ d={STAR_PATH}
26
+ fill={color}
27
+ stroke={color}
28
+ strokeWidth={strokeWidth}
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
+ />
32
+ </svg>
33
+ );
34
+ }
@@ -0,0 +1 @@
1
+ export { StarFilledIcon } from "./StarFilledIcon";
@@ -0,0 +1,14 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+ import { USERS_ALT_PATH } from "./usersAltPath";
5
+
6
+ export { USERS_ALT_PATH } from "./usersAltPath";
7
+
8
+ export function UsersAltIcon({ size = 28, color = colors.white }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 28 28" fill="none">
11
+ <Path d={USERS_ALT_PATH} fill={color} />
12
+ </Svg>
13
+ );
14
+ }
@@ -0,0 +1,13 @@
1
+ import { colors } from "../../theme";
2
+ import type { IconProps } from "../types";
3
+ import { USERS_ALT_PATH } from "./usersAltPath";
4
+
5
+ export { USERS_ALT_PATH } from "./usersAltPath";
6
+
7
+ export function UsersAltIcon({ size = 28, color = colors.white }: IconProps) {
8
+ return (
9
+ <svg width={size} height={size} viewBox="0 0 28 28" fill="none" aria-hidden>
10
+ <path d={USERS_ALT_PATH} fill={color} />
11
+ </svg>
12
+ );
13
+ }
@@ -0,0 +1 @@
1
+ export { UsersAltIcon, USERS_ALT_PATH } from "./UsersAltIcon";
@@ -0,0 +1,2 @@
1
+ export const USERS_ALT_PATH =
2
+ "M14.35 14.2566C14.9725 13.7177 15.4718 13.0513 15.814 12.3024C16.1562 11.5536 16.3333 10.7399 16.3333 9.91659C16.3333 8.36949 15.7187 6.88576 14.6248 5.7918C13.5308 4.69783 12.0471 4.08325 10.5 4.08325C8.95289 4.08325 7.46916 4.69783 6.3752 5.7918C5.28124 6.88576 4.66666 8.36949 4.66666 9.91659C4.66665 10.7399 4.84376 11.5536 5.18597 12.3024C5.52818 13.0513 6.02748 13.7177 6.64999 14.2566C5.01682 14.9961 3.6312 16.1904 2.6588 17.6966C1.6864 19.2027 1.16837 20.9571 1.16666 22.7499C1.16666 23.0593 1.28957 23.3561 1.50837 23.5749C1.72716 23.7937 2.0239 23.9166 2.33332 23.9166C2.64274 23.9166 2.93949 23.7937 3.15828 23.5749C3.37707 23.3561 3.49999 23.0593 3.49999 22.7499C3.49999 20.8934 4.23749 19.1129 5.55024 17.8002C6.863 16.4874 8.64347 15.7499 10.5 15.7499C12.3565 15.7499 14.137 16.4874 15.4497 17.8002C16.7625 19.1129 17.5 20.8934 17.5 22.7499C17.5 23.0593 17.6229 23.3561 17.8417 23.5749C18.0605 23.7937 18.3572 23.9166 18.6667 23.9166C18.9761 23.9166 19.2728 23.7937 19.4916 23.5749C19.7104 23.3561 19.8333 23.0593 19.8333 22.7499C19.8316 20.9571 19.3136 19.2027 18.3412 17.6966C17.3688 16.1904 15.9832 14.9961 14.35 14.2566ZM10.5 13.4166C9.80775 13.4166 9.13107 13.2113 8.55549 12.8267C7.97992 12.4421 7.53132 11.8955 7.26641 11.256C7.0015 10.6164 6.93219 9.9127 7.06724 9.23377C7.20229 8.55484 7.53563 7.9312 8.02512 7.44171C8.5146 6.95223 9.13824 6.61889 9.81717 6.48384C10.4961 6.34879 11.1998 6.4181 11.8394 6.68301C12.4789 6.94791 13.0255 7.39652 13.4101 7.97209C13.7947 8.54766 14 9.22435 14 9.91659C14 10.8448 13.6312 11.7351 12.9749 12.3915C12.3185 13.0478 11.4282 13.4166 10.5 13.4166ZM21.8633 13.7899C22.61 12.9491 23.0977 11.9105 23.2678 10.799C23.4378 9.68748 23.2831 8.55051 22.822 7.52492C22.361 6.49933 21.6134 5.62885 20.6692 5.01825C19.725 4.40764 18.6244 4.08295 17.5 4.08325C17.1906 4.08325 16.8938 4.20617 16.675 4.42496C16.4562 4.64375 16.3333 4.9405 16.3333 5.24992C16.3333 5.55934 16.4562 5.85608 16.675 6.07488C16.8938 6.29367 17.1906 6.41659 17.5 6.41659C18.4282 6.41659 19.3185 6.78533 19.9749 7.44171C20.6312 8.09809 21 8.98833 21 9.91659C20.9983 10.5294 20.8358 11.131 20.5287 11.6612C20.2216 12.1915 19.7807 12.6319 19.25 12.9383C19.077 13.038 18.9325 13.1805 18.8304 13.3521C18.7283 13.5237 18.6719 13.7186 18.6667 13.9183C18.6618 14.1163 18.7074 14.3123 18.7993 14.4879C18.8911 14.6634 19.0262 14.8127 19.1917 14.9216L19.6467 15.2249L19.7983 15.3066C21.2046 15.9736 22.391 17.0286 23.2178 18.3473C24.0446 19.666 24.4773 21.1935 24.465 22.7499C24.465 23.0593 24.5879 23.3561 24.8067 23.5749C25.0255 23.7937 25.3222 23.9166 25.6317 23.9166C25.9411 23.9166 26.2378 23.7937 26.4566 23.5749C26.6754 23.3561 26.7983 23.0593 26.7983 22.7499C26.8079 20.9596 26.3594 19.1965 25.4957 17.6283C24.632 16.0601 23.3816 14.7388 21.8633 13.7899Z";
@@ -29,8 +29,15 @@ export { LogOutIcon } from "./LogOut";
29
29
  export { MailIcon } from "./Mail";
30
30
  export { NavigateIcon } from "./Navigate";
31
31
  export { PhoneIcon } from "./Phone";
32
+ export { PlusIcon } from "./Plus";
33
+ export { MinusIcon } from "./Minus";
32
34
  export { SearchIcon } from "./Search";
33
35
  export { SettingsIcon } from "./Settings";
34
36
  export { ShowIcon } from "./Show";
37
+ export { SidebarIcon } from "./Sidebar";
38
+ export { StarIcon } from "./Star";
39
+ export { StarFilledIcon } from "./StarFilled";
35
40
  export { UserIcon } from "./User";
41
+ export { UsersAltIcon } from "./UsersAlt";
36
42
  export { VideoIcon } from "./Video";
43
+ export type { StarIconProps } from "./Star";
@@ -20,12 +20,18 @@ import { LayoutGridIcon } from "./LayoutGrid";
20
20
  import { LinkedInIcon } from "./LinkedIn";
21
21
  import { LogOutIcon } from "./LogOut";
22
22
  import { MailIcon } from "./Mail";
23
+ import { MinusIcon } from "./Minus";
23
24
  import { NavigateIcon } from "./Navigate";
24
25
  import { PhoneIcon } from "./Phone";
26
+ import { PlusIcon } from "./Plus";
25
27
  import { SearchIcon } from "./Search";
26
28
  import { SettingsIcon } from "./Settings";
27
29
  import { ShowIcon } from "./Show";
30
+ import { SidebarIcon } from "./Sidebar";
31
+ import { StarIcon } from "./Star";
32
+ import { StarFilledIcon } from "./StarFilled";
28
33
  import { UserIcon } from "./User";
34
+ import { UsersAltIcon } from "./UsersAlt";
29
35
  import { VideoIcon } from "./Video";
30
36
  import type { IconComponent } from "./types";
31
37
 
@@ -52,12 +58,18 @@ export const icons = {
52
58
  linkedin: LinkedInIcon,
53
59
  logOut: LogOutIcon,
54
60
  mail: MailIcon,
61
+ minus: MinusIcon,
55
62
  navigate: NavigateIcon,
56
63
  phone: PhoneIcon,
64
+ plus: PlusIcon,
57
65
  search: SearchIcon,
58
66
  settings: SettingsIcon,
59
67
  show: ShowIcon,
68
+ sidebar: SidebarIcon,
69
+ star: StarIcon,
70
+ starFilled: StarFilledIcon,
60
71
  user: UserIcon,
72
+ usersAlt: UsersAltIcon,
61
73
  video: VideoIcon,
62
74
  } as const satisfies Record<string, IconComponent>;
63
75
 
@@ -78,11 +90,15 @@ export const iconGroups = {
78
90
  "calendar",
79
91
  "calendarOutline",
80
92
  "heart",
93
+ "star",
94
+ "starFilled",
95
+ "minus",
96
+ "plus",
81
97
  ],
82
- objects: ["bag", "building", "clock", "user", "video"],
98
+ objects: ["bag", "building", "clock", "user", "usersAlt", "video"],
83
99
  communication: ["mail", "phone"],
84
100
  social: ["facebook", "instagram", "linkedin"],
85
- interface: ["layoutGrid", "settings", "helpCircle", "logOut"],
101
+ interface: ["layoutGrid", "sidebar", "settings", "helpCircle", "logOut"],
86
102
  } as const satisfies Record<string, readonly IconName[]>;
87
103
 
88
104
  export type IconGroup = keyof typeof iconGroups;
package/src/index.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  export {
2
2
  Avatar,
3
+ Badge,
4
+ Counter,
5
+ SegmentedToggle,
6
+ StatCard,
3
7
  Button,
4
8
  Checkbox,
5
9
  DatePicker,
@@ -7,10 +11,18 @@ export {
7
11
  Select,
8
12
  Textarea,
9
13
  Toggle,
14
+ RatingInput,
15
+ CommentCard,
10
16
  } from "./components";
11
17
  export type {
12
18
  AvatarProps,
13
19
  AvatarMenuItem,
20
+ BadgeProps,
21
+ BadgeVariant,
22
+ CounterProps,
23
+ SegmentedToggleOption,
24
+ SegmentedToggleProps,
25
+ StatCardProps,
14
26
  ButtonProps,
15
27
  ButtonSize,
16
28
  ButtonVariant,
@@ -28,6 +40,8 @@ export type {
28
40
  SelectMultipleProps,
29
41
  TextareaProps,
30
42
  ToggleProps,
43
+ RatingInputProps,
44
+ CommentCardProps,
31
45
  } from "./components";
32
46
 
33
47
  export { MenuItem } from "./primitives";
@@ -62,20 +76,39 @@ export {
62
76
  LinkedInIcon,
63
77
  LogOutIcon,
64
78
  MailIcon,
79
+ MinusIcon,
65
80
  NavigateIcon,
66
81
  PhoneIcon,
82
+ PlusIcon,
67
83
  SearchIcon,
68
84
  SettingsIcon,
69
85
  ShowIcon,
86
+ SidebarIcon,
87
+ StarIcon,
88
+ StarFilledIcon,
70
89
  UserIcon,
90
+ UsersAltIcon,
71
91
  VideoIcon,
72
92
  } from "./icons";
73
- export type { IconProps, IconName, IconGroup, IconComponent, IconByNameProps } from "./icons";
93
+ export type {
94
+ IconProps,
95
+ IconName,
96
+ IconGroup,
97
+ IconComponent,
98
+ IconByNameProps,
99
+ StarIconProps,
100
+ } from "./icons";
74
101
 
75
102
  export {
76
103
  colors,
77
104
  grey,
78
105
  avatarTypography,
106
+ badgeTypography,
107
+ statCardTypography,
108
+ segmentedToggleTypography,
109
+ counterTypography,
110
+ ratingTypography,
111
+ commentCardTypography,
79
112
  buttonTypography,
80
113
  datePickerTypography,
81
114
  inputTypography,
@@ -6,6 +6,12 @@ describe("design tokens", () => {
6
6
  it("exposes primary and button typography used by Button", () => {
7
7
  expect(colors.primary).toBe("#B46436");
8
8
  expect(colors.dark).toBe("#090909");
9
+ expect(colors.green).toBe("#34A853");
10
+ expect(colors.whiteAlpha86).toBe("#FFFFFFDB");
11
+ expect(colors.whiteAlpha40).toBe("#FFFFFF66");
12
+ expect(colors.whiteAlpha20).toBe("#FFFFFF33");
13
+ expect(colors.whiteAlpha10).toBe("#FFFFFF1A");
14
+ expect(colors.whiteAlpha5).toBe("#FFFFFF0D");
9
15
  expect(buttonTypography.lg.fontSize).toBe(14);
10
16
  expect(buttonTypography.lg.fontWeight).toBe("600");
11
17
  });
@@ -22,9 +22,15 @@ export const colors = {
22
22
  primary: "#B46436",
23
23
  black: "#000000",
24
24
  white: "#ffffff",
25
+ whiteAlpha86: "#FFFFFFDB",
26
+ whiteAlpha40: "#FFFFFF66",
27
+ whiteAlpha20: "#FFFFFF33",
28
+ whiteAlpha10: "#FFFFFF1A",
29
+ whiteAlpha5: "#FFFFFF0D",
25
30
  dark: "#090909",
26
31
  red: "#A63E3E",
27
32
  lightGrey: "#B7B7B7",
33
+ green: "#34A853",
28
34
  primaryMuted: "#B464360F",
29
35
  primaryHover: "#B4643633",
30
36
  redMuted: "#A63E3E0F",
@@ -4,6 +4,12 @@ export type { GreyStep } from "./colors";
4
4
  export {
5
5
  fonts,
6
6
  avatarTypography,
7
+ badgeTypography,
8
+ statCardTypography,
9
+ segmentedToggleTypography,
10
+ counterTypography,
11
+ ratingTypography,
12
+ commentCardTypography,
7
13
  buttonTypography,
8
14
  datePickerTypography,
9
15
  inputTypography,
@@ -20,6 +20,83 @@ export const buttonTypography = {
20
20
  },
21
21
  } as const;
22
22
 
23
+ /** Badge label — Regular 14, line-height 112%, letter-spacing 0. */
24
+ export const badgeTypography = {
25
+ fontFamily: fonts.sans,
26
+ fontSize: 14,
27
+ fontWeight: "400" as const,
28
+ lineHeight: 16,
29
+ letterSpacing: 0,
30
+ } as const;
31
+
32
+ /** Stat card label — Medium 16, line-height 100%, letter-spacing 0. */
33
+ export const statCardTypography = {
34
+ fontFamily: fonts.sans,
35
+ fontSize: 16,
36
+ fontWeight: "500" as const,
37
+ lineHeight: 16,
38
+ letterSpacing: 0,
39
+ } as const;
40
+
41
+ /** Segmented toggle label — Medium 14, line-height 100%, letter-spacing 0. */
42
+ export const segmentedToggleTypography = {
43
+ fontFamily: fonts.sans,
44
+ fontSize: 14,
45
+ fontWeight: "500" as const,
46
+ lineHeight: 14,
47
+ letterSpacing: 0,
48
+ } as const;
49
+
50
+ /** Counter value — Bold 14, line-height 100%, letter-spacing 0. */
51
+ export const counterTypography = {
52
+ fontFamily: fonts.sans,
53
+ fontSize: 14,
54
+ fontWeight: "700" as const,
55
+ lineHeight: 14,
56
+ letterSpacing: 0,
57
+ } as const;
58
+
59
+ /** Rating score — Bold 32, line-height 112%, letter-spacing 0. */
60
+ export const ratingTypography = {
61
+ fontFamily: fonts.sans,
62
+ fontSize: 32,
63
+ fontWeight: "700" as const,
64
+ lineHeight: 35.84,
65
+ letterSpacing: 0,
66
+ } as const;
67
+
68
+ /** Comment card identity, body, and action typography. */
69
+ export const commentCardTypography = {
70
+ name: {
71
+ fontFamily: fonts.sans,
72
+ fontSize: 16,
73
+ fontWeight: "600" as const,
74
+ lineHeight: 18,
75
+ letterSpacing: 0,
76
+ },
77
+ date: {
78
+ fontFamily: fonts.sans,
79
+ fontSize: 14,
80
+ fontWeight: "400" as const,
81
+ lineHeight: 16,
82
+ letterSpacing: 0,
83
+ },
84
+ comment: {
85
+ fontFamily: fonts.sans,
86
+ fontSize: 14,
87
+ fontWeight: "400" as const,
88
+ lineHeight: 19,
89
+ letterSpacing: 0,
90
+ },
91
+ action: {
92
+ fontFamily: fonts.sans,
93
+ fontSize: 12,
94
+ fontWeight: "700" as const,
95
+ lineHeight: 12,
96
+ letterSpacing: 0,
97
+ },
98
+ } as const;
99
+
23
100
  /** Input label / field / hint typography. */
24
101
  export const inputTypography = {
25
102
  label: {