@ecohouse/ui 0.1.0 → 0.1.2

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 (99) hide show
  1. package/README.md +239 -36
  2. package/dist/index.cjs +649 -314
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +181 -258
  5. package/dist/index.d.ts +181 -258
  6. package/dist/index.js +626 -304
  7. package/dist/index.js.map +1 -1
  8. package/package.json +5 -7
  9. package/src/components/Button/Button.stories.tsx +98 -0
  10. package/src/components/{Button.tsx → Button/Button.tsx} +39 -71
  11. package/src/components/Button/index.ts +2 -0
  12. package/src/components/Input/Input.stories.tsx +118 -0
  13. package/src/components/Input/Input.tsx +327 -0
  14. package/src/components/Input/index.ts +2 -0
  15. package/src/components/index.ts +5 -0
  16. package/src/icons/{ArrowUpRightIcon.tsx → ArrowRight/ArrowRightIcon.tsx} +8 -7
  17. package/src/icons/{ArrowUpRightIcon.web.tsx → ArrowRight/ArrowRightIcon.web.tsx} +8 -7
  18. package/src/icons/ArrowRight/arrowRightPath.ts +2 -0
  19. package/src/icons/ArrowRight/index.ts +1 -0
  20. package/src/icons/Bag/BagIcon.tsx +20 -0
  21. package/src/icons/Bag/BagIcon.web.tsx +26 -0
  22. package/src/icons/Bag/bagPath.ts +2 -0
  23. package/src/icons/Bag/index.ts +1 -0
  24. package/src/icons/Bell/BellIcon.tsx +20 -0
  25. package/src/icons/Bell/BellIcon.web.tsx +26 -0
  26. package/src/icons/Bell/bellPath.ts +2 -0
  27. package/src/icons/Bell/index.ts +1 -0
  28. package/src/icons/Building/BuildingIcon.tsx +20 -0
  29. package/src/icons/Building/BuildingIcon.web.tsx +26 -0
  30. package/src/icons/Building/buildingPath.ts +2 -0
  31. package/src/icons/Building/index.ts +1 -0
  32. package/src/icons/Camera/CameraIcon.tsx +20 -0
  33. package/src/icons/Camera/CameraIcon.web.tsx +26 -0
  34. package/src/icons/Camera/cameraPath.ts +2 -0
  35. package/src/icons/Camera/index.ts +1 -0
  36. package/src/icons/CheckBadge/CheckBadgeIcon.tsx +20 -0
  37. package/src/icons/CheckBadge/CheckBadgeIcon.web.tsx +26 -0
  38. package/src/icons/CheckBadge/checkBadgePath.ts +2 -0
  39. package/src/icons/CheckBadge/index.ts +1 -0
  40. package/src/icons/Clock/ClockIcon.tsx +20 -0
  41. package/src/icons/Clock/ClockIcon.web.tsx +26 -0
  42. package/src/icons/Clock/clockPath.ts +2 -0
  43. package/src/icons/Clock/index.ts +1 -0
  44. package/src/icons/Facebook/FacebookIcon.tsx +14 -0
  45. package/src/icons/Facebook/FacebookIcon.web.tsx +20 -0
  46. package/src/icons/Facebook/facebookPath.ts +2 -0
  47. package/src/icons/Facebook/index.ts +1 -0
  48. package/src/icons/Home/HomeIcon.tsx +20 -0
  49. package/src/icons/Home/HomeIcon.web.tsx +26 -0
  50. package/src/icons/Home/homePath.ts +2 -0
  51. package/src/icons/Home/index.ts +1 -0
  52. package/src/icons/Icon.tsx +11 -0
  53. package/src/icons/Icons.stories.tsx +174 -0
  54. package/src/icons/Instagram/InstagramIcon.tsx +14 -0
  55. package/src/icons/Instagram/InstagramIcon.web.tsx +20 -0
  56. package/src/icons/Instagram/index.ts +1 -0
  57. package/src/icons/Instagram/instagramPath.ts +2 -0
  58. package/src/icons/Key/KeyIcon.tsx +20 -0
  59. package/src/icons/Key/KeyIcon.web.tsx +26 -0
  60. package/src/icons/Key/index.ts +1 -0
  61. package/src/icons/Key/keyPath.ts +2 -0
  62. package/src/icons/LinkedIn/LinkedInIcon.tsx +14 -0
  63. package/src/icons/LinkedIn/LinkedInIcon.web.tsx +20 -0
  64. package/src/icons/LinkedIn/index.ts +1 -0
  65. package/src/icons/LinkedIn/linkedinPath.ts +2 -0
  66. package/src/icons/Mail/MailIcon.tsx +20 -0
  67. package/src/icons/Mail/MailIcon.web.tsx +26 -0
  68. package/src/icons/Mail/index.ts +1 -0
  69. package/src/icons/Mail/mailPath.ts +2 -0
  70. package/src/icons/Navigate/NavigateIcon.tsx +20 -0
  71. package/src/icons/Navigate/NavigateIcon.web.tsx +26 -0
  72. package/src/icons/Navigate/index.ts +1 -0
  73. package/src/icons/Navigate/navigatePath.ts +2 -0
  74. package/src/icons/Phone/PhoneIcon.tsx +20 -0
  75. package/src/icons/Phone/PhoneIcon.web.tsx +26 -0
  76. package/src/icons/Phone/index.ts +1 -0
  77. package/src/icons/Phone/phonePath.ts +2 -0
  78. package/src/icons/Show/ShowIcon.tsx +33 -0
  79. package/src/icons/Show/ShowIcon.web.tsx +39 -0
  80. package/src/icons/Show/index.ts +1 -0
  81. package/src/icons/Show/showPath.ts +6 -0
  82. package/src/icons/User/UserIcon.tsx +26 -0
  83. package/src/icons/User/UserIcon.web.tsx +32 -0
  84. package/src/icons/User/index.ts +1 -0
  85. package/src/icons/User/userPath.ts +3 -0
  86. package/src/icons/index.ts +24 -0
  87. package/src/icons/registry.ts +58 -0
  88. package/src/icons/types.ts +9 -0
  89. package/src/index.ts +37 -21
  90. package/src/theme/colors.test.ts +12 -0
  91. package/src/theme/colors.ts +46 -0
  92. package/src/theme/index.ts +4 -0
  93. package/src/theme/typography.ts +46 -0
  94. package/src/web/styles/fonts.css +1 -0
  95. package/src/web/styles/typography.css +14 -92
  96. package/src/components/Button.stories.tsx +0 -135
  97. package/src/icons/arrowUpRightPath.ts +0 -1
  98. package/src/theme/tokens.test.ts +0 -10
  99. package/src/theme/tokens.ts +0 -286
@@ -0,0 +1,2 @@
1
+ export const BUILDING_PATH =
2
+ "M7.5 9.16659V16.6666M7.5 9.16659H3.83301C3.3663 9.16659 3.13318 9.16659 2.95492 9.25741C2.79811 9.33731 2.67072 9.4647 2.59083 9.6215C2.5 9.79976 2.5 10.0333 2.5 10.5V16.6666H7.5M7.5 9.16659V4.66667C7.5 4.19996 7.5 3.96643 7.59083 3.78817C7.67072 3.63137 7.79811 3.50397 7.95492 3.42408C8.13317 3.33325 8.3663 3.33325 8.83301 3.33325H11.1663C11.6331 3.33325 11.8669 3.33325 12.0452 3.42408C12.202 3.50397 12.329 3.63137 12.4089 3.78817C12.4997 3.96643 12.5 4.19996 12.5 4.66667V6.66659M7.5 16.6666H12.5M12.5 16.6666L17.5 16.6667V8C17.5 7.53329 17.4997 7.29976 17.4089 7.1215C17.329 6.9647 17.2024 6.83731 17.0456 6.75741C16.8674 6.66659 16.6334 6.66659 16.1667 6.66659H12.5M12.5 16.6666V6.66659";
@@ -0,0 +1 @@
1
+ export { BuildingIcon, BUILDING_PATH } from "./BuildingIcon";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { CAMERA_PATH } from "./cameraPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { CAMERA_PATH } from "./cameraPath";
7
+
8
+ export function CameraIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
11
+ <Path
12
+ d={CAMERA_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { CAMERA_PATH } from "./cameraPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function CameraIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path
16
+ d={CAMERA_PATH}
17
+ stroke={color}
18
+ strokeWidth={strokeWidth}
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </svg>
23
+ );
24
+ }
25
+
26
+ export { CAMERA_PATH } from "./cameraPath";
@@ -0,0 +1,2 @@
1
+ export const CAMERA_PATH =
2
+ "M9.48898 7H6.2002C5.08009 7 4.51962 7 4.0918 7.21799C3.71547 7.40973 3.40973 7.71547 3.21799 8.0918C3 8.51962 3 9.08009 3 10.2002V15.8002C3 16.9203 3 17.4796 3.21799 17.9074C3.40973 18.2837 3.71547 18.5905 4.0918 18.7822C4.5192 19 5.07899 19 6.19691 19H17.8031C18.921 19 19.48 19 19.9074 18.7822C20.2837 18.5905 20.5905 18.2837 20.7822 17.9074C21 17.48 21 16.921 21 15.8031V10.1969C21 9.07899 21 8.5192 20.7822 8.0918C20.5905 7.71547 20.2837 7.40973 19.9074 7.21799C19.4796 7 18.9203 7 17.8002 7H14.5108M9.48898 7H9.55078M9.48898 7C9.50151 7.00001 9.51468 7 9.52857 7L9.55078 7M9.48898 7C9.38286 6.99995 9.32339 6.99941 9.27637 6.99414C8.68878 6.92835 8.28578 6.36908 8.40918 5.79084C8.42066 5.73703 8.44336 5.66894 8.4883 5.53412L8.49023 5.52841C8.54156 5.37443 8.56723 5.29743 8.59558 5.22949C8.88586 4.53389 9.54322 4.06083 10.2949 4.00541C10.3683 4 10.449 4 10.6113 4H13.3886C13.5509 4 13.6322 4 13.7057 4.00541C14.4574 4.06083 15.114 4.53389 15.4043 5.22949C15.4326 5.29743 15.4584 5.37434 15.5098 5.52832C15.556 5.66699 15.5791 5.73636 15.5908 5.79093C15.7142 6.36917 15.3118 6.92835 14.7242 6.99414C14.6772 6.99941 14.6171 6.99995 14.5108 7M9.55078 7H14.449M14.449 7H14.5108M14.449 7L14.4712 7C14.4851 7 14.4983 7.00001 14.5108 7M12 16C10.3431 16 9 14.6569 9 13C9 11.3431 10.3431 10 12 10C13.6569 10 15 11.3431 15 13C15 14.6569 13.6569 16 12 16Z";
@@ -0,0 +1 @@
1
+ export { CameraIcon, CAMERA_PATH } from "./CameraIcon";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { CHECK_BADGE_PATH } from "./checkBadgePath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { CHECK_BADGE_PATH } from "./checkBadgePath";
7
+
8
+ export function CheckBadgeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path
12
+ d={CHECK_BADGE_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { CHECK_BADGE_PATH } from "./checkBadgePath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function CheckBadgeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path
16
+ d={CHECK_BADGE_PATH}
17
+ stroke={color}
18
+ strokeWidth={strokeWidth}
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </svg>
23
+ );
24
+ }
25
+
26
+ export { CHECK_BADGE_PATH } from "./checkBadgePath";
@@ -0,0 +1,2 @@
1
+ export const CHECK_BADGE_PATH =
2
+ "M12.5 8.33317L9.16663 11.6665L7.49996 9.99984M11.0384 2.88233L12.0558 3.74941C12.3122 3.96786 12.6305 4.09992 12.9662 4.12671L14.2987 4.23291C15.0822 4.29543 15.7045 4.91733 15.767 5.70077L15.8729 7.03353C15.8997 7.36925 16.0322 7.68799 16.2507 7.94433L17.1174 8.96152C17.6272 9.5597 17.6272 10.4396 17.1175 11.0378L16.2508 12.0551C16.0323 12.3115 15.9 12.6303 15.8732 12.9661L15.7666 14.2986C15.704 15.082 15.0827 15.7043 14.2993 15.7668L12.9663 15.8732C12.6305 15.9 12.312 16.0317 12.0556 16.2502L11.0384 17.1173C10.4402 17.627 9.55973 17.6271 8.96155 17.1174L7.9443 16.2502C7.68796 16.0318 7.36938 15.8998 7.03365 15.8731L5.70064 15.7668C4.9172 15.7043 4.29588 15.0822 4.23336 14.2987L4.12675 12.9661C4.09996 12.6304 3.96759 12.3118 3.74915 12.0555L2.88245 11.0378C2.37268 10.4397 2.37244 9.56002 2.88221 8.96184L3.74969 7.94418C3.96814 7.68784 4.09923 7.36926 4.12602 7.03353L4.23263 5.70093C4.29515 4.91749 4.91826 4.29535 5.70171 4.23283L7.03324 4.12663C7.36897 4.09984 7.68771 3.96788 7.94404 3.74943L8.96164 2.88233C9.55982 2.37256 10.4402 2.37256 11.0384 2.88233Z";
@@ -0,0 +1 @@
1
+ export { CheckBadgeIcon, CHECK_BADGE_PATH } from "./CheckBadgeIcon";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { CLOCK_PATH } from "./clockPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { CLOCK_PATH } from "./clockPath";
7
+
8
+ export function ClockIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
11
+ <Path
12
+ d={CLOCK_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { CLOCK_PATH } from "./clockPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function ClockIcon({ size = 24, color = colors.primary, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 24 24"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path
16
+ d={CLOCK_PATH}
17
+ stroke={color}
18
+ strokeWidth={strokeWidth}
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </svg>
23
+ );
24
+ }
25
+
26
+ export { CLOCK_PATH } from "./clockPath";
@@ -0,0 +1,2 @@
1
+ export const CLOCK_PATH =
2
+ "M12 7V12H17M12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21Z";
@@ -0,0 +1 @@
1
+ export { ClockIcon, CLOCK_PATH } from "./ClockIcon";
@@ -0,0 +1,14 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { FACEBOOK_PATH } from "./facebookPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { FACEBOOK_PATH } from "./facebookPath";
7
+
8
+ export function FacebookIcon({ size = 20, color = colors.white }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path d={FACEBOOK_PATH} fill={color} />
12
+ </Svg>
13
+ );
14
+ }
@@ -0,0 +1,20 @@
1
+ import { FACEBOOK_PATH } from "./facebookPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function FacebookIcon({ size = 20, color = colors.white }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path d={FACEBOOK_PATH} fill={color} />
16
+ </svg>
17
+ );
18
+ }
19
+
20
+ export { FACEBOOK_PATH } from "./facebookPath";
@@ -0,0 +1,2 @@
1
+ export const FACEBOOK_PATH =
2
+ "M10.0003 1.69922C5.41699 1.69922 1.66699 5.44089 1.66699 10.0492C1.66699 14.2159 4.71699 17.6742 8.70033 18.2992V12.4659H6.58366V10.0492H8.70033V8.20755C8.70033 6.11589 9.94199 4.96589 11.8503 4.96589C12.7587 4.96589 13.7087 5.12422 13.7087 5.12422V7.18255H12.6587C11.6253 7.18255 11.3003 7.82422 11.3003 8.48255V10.0492H13.617L13.242 12.4659H11.3003V18.2992C13.264 17.9891 15.0522 16.9871 16.3419 15.4743C17.6317 13.9614 18.3381 12.0373 18.3337 10.0492C18.3337 5.44089 14.5837 1.69922 10.0003 1.69922Z";
@@ -0,0 +1 @@
1
+ export { FacebookIcon, FACEBOOK_PATH } from "./FacebookIcon";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { HOME_PATH } from "./homePath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { HOME_PATH } from "./homePath";
7
+
8
+ export function HomeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path
12
+ d={HOME_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { HOME_PATH } from "./homePath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function HomeIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path
16
+ d={HOME_PATH}
17
+ stroke={color}
18
+ strokeWidth={strokeWidth}
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </svg>
23
+ );
24
+ }
25
+
26
+ export { HOME_PATH } from "./homePath";
@@ -0,0 +1,2 @@
1
+ export const HOME_PATH =
2
+ "M1.66675 16.6667H3.33341M3.33341 16.6667H8.33341M3.33341 16.6667V9.54352C3.33341 9.09823 3.33341 8.87548 3.38756 8.66828C3.43554 8.48466 3.51491 8.31089 3.6215 8.15387C3.74178 7.97668 3.90895 7.82974 4.24406 7.53652L8.24538 4.03537C8.86662 3.49178 9.17726 3.21997 9.5271 3.11652C9.83559 3.02529 10.1644 3.02529 10.4729 3.11652C10.823 3.22005 11.1341 3.49212 11.7563 4.03652L15.7563 7.53652C16.0914 7.82974 16.2586 7.97668 16.3789 8.15387C16.4855 8.31089 16.5642 8.48466 16.6122 8.66828C16.6664 8.87548 16.6667 9.09824 16.6667 9.54352V16.6667M8.33341 16.6667H11.6667M8.33341 16.6667V13.3334C8.33341 12.4129 9.07961 11.6667 10.0001 11.6667C10.9206 11.6667 11.6667 12.4129 11.6667 13.3334V16.6667M11.6667 16.6667H16.6667M16.6667 16.6667H18.3334";
@@ -0,0 +1 @@
1
+ export { HomeIcon, HOME_PATH } from "./HomeIcon";
@@ -0,0 +1,11 @@
1
+ import { icons, type IconName } from "./registry";
2
+ import type { IconProps } from "./types";
3
+
4
+ export interface IconByNameProps extends IconProps {
5
+ name: IconName;
6
+ }
7
+
8
+ export function Icon({ name, ...props }: IconByNameProps) {
9
+ const Component = icons[name];
10
+ return <Component {...props} />;
11
+ }
@@ -0,0 +1,174 @@
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
+ import { View, Text, StyleSheet } from "react-native";
3
+ import { colors } from "../theme";
4
+ import { Icon } from "./Icon";
5
+ import {
6
+ getIconsByGroup,
7
+ iconGroupNames,
8
+ iconGroups,
9
+ iconNames,
10
+ icons,
11
+ type IconName,
12
+ } from "./registry";
13
+
14
+ const meta = {
15
+ title: "Icons",
16
+ component: Icon,
17
+ args: {
18
+ name: "user",
19
+ size: 24,
20
+ color: colors.white,
21
+ strokeWidth: 2,
22
+ },
23
+ argTypes: {
24
+ name: {
25
+ control: "select",
26
+ options: iconNames,
27
+ },
28
+ size: { control: { type: "number", min: 12, max: 48, step: 2 } },
29
+ color: { control: "color" },
30
+ strokeWidth: { control: { type: "number", min: 1, max: 3, step: 0.5 } },
31
+ },
32
+ } satisfies Meta<typeof Icon>;
33
+
34
+ export default meta;
35
+ type Story = StoryObj<typeof meta>;
36
+
37
+ function IconGrid({
38
+ names,
39
+ size,
40
+ color,
41
+ strokeWidth,
42
+ }: {
43
+ names: readonly IconName[];
44
+ size?: number;
45
+ color?: string;
46
+ strokeWidth?: number;
47
+ }) {
48
+ return (
49
+ <View style={styles.grid}>
50
+ {names.map((name) => {
51
+ const Cmp = icons[name];
52
+ return (
53
+ <View key={name} style={styles.cell}>
54
+ <Cmp size={size} color={color} strokeWidth={strokeWidth} />
55
+ <Text style={styles.label}>{name}</Text>
56
+ </View>
57
+ );
58
+ })}
59
+ </View>
60
+ );
61
+ }
62
+
63
+ export const Playground: Story = {};
64
+
65
+ export const All: Story = {
66
+ render: (args) => (
67
+ <View style={styles.sections}>
68
+ {iconGroupNames.map((group) => (
69
+ <View key={group} style={styles.section}>
70
+ <Text style={styles.heading}>{group}</Text>
71
+ <IconGrid
72
+ names={iconGroups[group]}
73
+ size={args.size}
74
+ color={args.color}
75
+ strokeWidth={args.strokeWidth}
76
+ />
77
+ </View>
78
+ ))}
79
+ </View>
80
+ ),
81
+ };
82
+
83
+ export const Navigation: Story = {
84
+ name: "Group / Navigation",
85
+ render: (args) => (
86
+ <IconGrid
87
+ names={getIconsByGroup("navigation")}
88
+ size={args.size}
89
+ color={args.color}
90
+ strokeWidth={args.strokeWidth}
91
+ />
92
+ ),
93
+ };
94
+
95
+ export const Actions: Story = {
96
+ name: "Group / Actions",
97
+ render: (args) => (
98
+ <IconGrid
99
+ names={getIconsByGroup("actions")}
100
+ size={args.size}
101
+ color={args.color}
102
+ strokeWidth={args.strokeWidth}
103
+ />
104
+ ),
105
+ };
106
+
107
+ export const Objects: Story = {
108
+ name: "Group / Objects",
109
+ render: (args) => (
110
+ <IconGrid
111
+ names={getIconsByGroup("objects")}
112
+ size={args.size}
113
+ color={args.color}
114
+ strokeWidth={args.strokeWidth}
115
+ />
116
+ ),
117
+ };
118
+
119
+ export const Communication: Story = {
120
+ name: "Group / Communication",
121
+ render: (args) => (
122
+ <IconGrid
123
+ names={getIconsByGroup("communication")}
124
+ size={args.size}
125
+ color={args.color}
126
+ strokeWidth={args.strokeWidth}
127
+ />
128
+ ),
129
+ };
130
+
131
+ export const Social: Story = {
132
+ name: "Group / Social",
133
+ render: (args) => (
134
+ <IconGrid
135
+ names={getIconsByGroup("social")}
136
+ size={args.size}
137
+ color={args.color}
138
+ strokeWidth={args.strokeWidth}
139
+ />
140
+ ),
141
+ };
142
+
143
+ const styles = StyleSheet.create({
144
+ sections: {
145
+ gap: 32,
146
+ maxWidth: 520,
147
+ },
148
+ section: {
149
+ gap: 16,
150
+ },
151
+ heading: {
152
+ color: colors.white,
153
+ fontSize: 14,
154
+ fontWeight: "600",
155
+ fontFamily: "Noto Sans Armenian",
156
+ textTransform: "capitalize",
157
+ },
158
+ grid: {
159
+ flexDirection: "row",
160
+ flexWrap: "wrap",
161
+ gap: 24,
162
+ maxWidth: 520,
163
+ },
164
+ cell: {
165
+ width: 88,
166
+ alignItems: "center",
167
+ gap: 8,
168
+ },
169
+ label: {
170
+ color: colors.white,
171
+ fontSize: 12,
172
+ fontFamily: "Noto Sans Armenian",
173
+ },
174
+ });
@@ -0,0 +1,14 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { INSTAGRAM_PATH } from "./instagramPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { INSTAGRAM_PATH } from "./instagramPath";
7
+
8
+ export function InstagramIcon({ size = 20, color = colors.white }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path d={INSTAGRAM_PATH} fill={color} />
12
+ </Svg>
13
+ );
14
+ }
@@ -0,0 +1,20 @@
1
+ import { INSTAGRAM_PATH } from "./instagramPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function InstagramIcon({ size = 20, color = colors.white }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path d={INSTAGRAM_PATH} fill={color} />
16
+ </svg>
17
+ );
18
+ }
19
+
20
+ export { INSTAGRAM_PATH } from "./instagramPath";
@@ -0,0 +1 @@
1
+ export { InstagramIcon, INSTAGRAM_PATH } from "./InstagramIcon";
@@ -0,0 +1,2 @@
1
+ export const INSTAGRAM_PATH =
2
+ "M6.49984 1.66748H13.4998C16.1665 1.66748 18.3332 3.83415 18.3332 6.50081V13.5008C18.3332 14.7827 17.8239 16.0121 16.9175 16.9185C16.0111 17.8249 14.7817 18.3341 13.4998 18.3341H6.49984C3.83317 18.3341 1.6665 16.1675 1.6665 13.5008V6.50081C1.6665 5.21893 2.17573 3.98956 3.08215 3.08313C3.98858 2.17671 5.21796 1.66748 6.49984 1.66748ZM6.33317 3.33415C5.53752 3.33415 4.77446 3.65022 4.21185 4.21283C3.64924 4.77544 3.33317 5.5385 3.33317 6.33415V13.6675C3.33317 15.3258 4.67484 16.6675 6.33317 16.6675H13.6665C14.4622 16.6675 15.2252 16.3514 15.7878 15.7888C16.3504 15.2262 16.6665 14.4631 16.6665 13.6675V6.33415C16.6665 4.67581 15.3248 3.33415 13.6665 3.33415H6.33317ZM14.3748 4.58415C14.6511 4.58415 14.9161 4.69389 15.1114 4.88924C15.3068 5.08459 15.4165 5.34955 15.4165 5.62581C15.4165 5.90208 15.3068 6.16703 15.1114 6.36238C14.9161 6.55773 14.6511 6.66748 14.3748 6.66748C14.0986 6.66748 13.8336 6.55773 13.6383 6.36238C13.4429 6.16703 13.3332 5.90208 13.3332 5.62581C13.3332 5.34955 13.4429 5.08459 13.6383 4.88924C13.8336 4.69389 14.0986 4.58415 14.3748 4.58415ZM9.99984 5.83415C11.1049 5.83415 12.1647 6.27313 12.9461 7.05454C13.7275 7.83594 14.1665 8.89574 14.1665 10.0008C14.1665 11.1059 13.7275 12.1657 12.9461 12.9471C12.1647 13.7285 11.1049 14.1675 9.99984 14.1675C8.89477 14.1675 7.83496 13.7285 7.05356 12.9471C6.27216 12.1657 5.83317 11.1059 5.83317 10.0008C5.83317 8.89574 6.27216 7.83594 7.05356 7.05454C7.83496 6.27313 8.89477 5.83415 9.99984 5.83415ZM9.99984 7.50081C9.3368 7.50081 8.70091 7.76421 8.23207 8.23305C7.76323 8.70189 7.49984 9.33777 7.49984 10.0008C7.49984 10.6639 7.76323 11.2997 8.23207 11.7686C8.70091 12.2374 9.3368 12.5008 9.99984 12.5008C10.6629 12.5008 11.2988 12.2374 11.7676 11.7686C12.2364 11.2997 12.4998 10.6639 12.4998 10.0008C12.4998 9.33777 12.2364 8.70189 11.7676 8.23305C11.2988 7.76421 10.6629 7.50081 9.99984 7.50081Z";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { KEY_PATH } from "./keyPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { KEY_PATH } from "./keyPath";
7
+
8
+ export function KeyIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path
12
+ d={KEY_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }
@@ -0,0 +1,26 @@
1
+ import { KEY_PATH } from "./keyPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function KeyIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path
16
+ d={KEY_PATH}
17
+ stroke={color}
18
+ strokeWidth={strokeWidth}
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </svg>
23
+ );
24
+ }
25
+
26
+ export { KEY_PATH } from "./keyPath";
@@ -0,0 +1 @@
1
+ export { KeyIcon, KEY_PATH } from "./KeyIcon";
@@ -0,0 +1,2 @@
1
+ export const KEY_PATH =
2
+ "M5.28673 10.0002L7.0545 11.768M7.6435 7.64301L9.41127 9.41078M10.0003 5.28624L11.768 7.05401M4.22553 11.0604L11.0609 4.22505C11.7209 3.56502 12.0513 3.235 12.4318 3.11136C12.7666 3.00259 13.127 3.00259 13.4618 3.11136C13.8421 3.23494 14.1718 3.56464 14.8311 4.22393L15.775 5.16785C16.4351 5.82788 16.7654 6.15867 16.8891 6.53922C16.9979 6.87396 16.9976 7.23381 16.8889 7.56855C16.7652 7.9491 16.4353 8.27937 15.7753 8.9394L8.93989 15.7748C8.27986 16.4348 7.94959 16.7647 7.56904 16.8884C7.2343 16.9971 6.87445 16.9974 6.53971 16.8886C6.15916 16.765 5.82837 16.4346 5.16834 15.7745L4.22441 14.8306C3.56513 14.1713 3.23542 13.8416 3.11185 13.4613C3.00308 13.1266 3.00308 12.7661 3.11185 12.4313C3.23549 12.0508 3.56551 11.7204 4.22553 11.0604Z";
@@ -0,0 +1,14 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { LINKEDIN_PATH } from "./linkedinPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { LINKEDIN_PATH } from "./linkedinPath";
7
+
8
+ export function LinkedInIcon({ size = 20, color = colors.white }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path d={LINKEDIN_PATH} fill={color} />
12
+ </Svg>
13
+ );
14
+ }
@@ -0,0 +1,20 @@
1
+ import { LINKEDIN_PATH } from "./linkedinPath";
2
+ import { colors } from "../../theme";
3
+ import type { IconProps } from "../types";
4
+
5
+ export function LinkedInIcon({ size = 20, color = colors.white }: IconProps) {
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ aria-hidden
14
+ >
15
+ <path d={LINKEDIN_PATH} fill={color} />
16
+ </svg>
17
+ );
18
+ }
19
+
20
+ export { LINKEDIN_PATH } from "./linkedinPath";
@@ -0,0 +1 @@
1
+ export { LinkedInIcon, LINKEDIN_PATH } from "./LinkedInIcon";
@@ -0,0 +1,2 @@
1
+ export const LINKEDIN_PATH =
2
+ "M15.8333 2.50098C16.2754 2.50098 16.6993 2.67657 17.0118 2.98913C17.3244 3.30169 17.5 3.72562 17.5 4.16764V15.8343C17.5 16.2763 17.3244 16.7003 17.0118 17.0128C16.6993 17.3254 16.2754 17.501 15.8333 17.501H4.16667C3.72464 17.501 3.30072 17.3254 2.98816 17.0128C2.67559 16.7003 2.5 16.2763 2.5 15.8343V4.16764C2.5 3.72562 2.67559 3.30169 2.98816 2.98913C3.30072 2.67657 3.72464 2.50098 4.16667 2.50098H15.8333ZM15.4167 15.4176V11.001C15.4167 10.2805 15.1304 9.58948 14.621 9.08C14.1115 8.57053 13.4205 8.28431 12.7 8.28431C11.9917 8.28431 11.1667 8.71764 10.7667 9.36764V8.44264H8.44167V15.4176H10.7667V11.3093C10.7667 10.6676 11.2833 10.1426 11.925 10.1426C12.2344 10.1426 12.5312 10.2656 12.75 10.4844C12.9687 10.7031 13.0917 10.9999 13.0917 11.3093V15.4176H15.4167ZM5.73333 7.13431C6.10464 7.13431 6.46073 6.98681 6.72328 6.72426C6.98583 6.46171 7.13333 6.10561 7.13333 5.73431C7.13333 4.95931 6.50833 4.32598 5.73333 4.32598C5.35982 4.32598 5.0016 4.47435 4.73749 4.73847C4.47338 5.00258 4.325 5.3608 4.325 5.73431C4.325 6.50931 4.95833 7.13431 5.73333 7.13431ZM6.89167 15.4176V8.44264H4.58333V15.4176H6.89167Z";
@@ -0,0 +1,20 @@
1
+ import Svg, { Path } from "react-native-svg";
2
+ import { MAIL_PATH } from "./mailPath";
3
+ import { colors } from "../../theme";
4
+ import type { IconProps } from "../types";
5
+
6
+ export { MAIL_PATH } from "./mailPath";
7
+
8
+ export function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }: IconProps) {
9
+ return (
10
+ <Svg width={size} height={size} viewBox="0 0 20 20" fill="none">
11
+ <Path
12
+ d={MAIL_PATH}
13
+ stroke={color}
14
+ strokeWidth={strokeWidth}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ </Svg>
19
+ );
20
+ }