@ecohouse/ui 0.1.21 → 0.1.23
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 +314 -198
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -14
- package/dist/index.d.ts +29 -14
- package/dist/index.js +316 -201
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SegmentedToggle/SegmentedToggle.tsx +7 -19
- package/src/index.ts +3 -0
- package/src/primitives/Amenity/Amenity.stories.tsx +64 -0
- package/src/primitives/Amenity/Amenity.tsx +178 -0
- package/src/primitives/Amenity/index.ts +2 -0
- package/src/primitives/index.ts +3 -0
- package/src/theme/colors.test.ts +1 -1
- package/src/theme/typography.ts +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
|
-
import { PressableProps,
|
|
4
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle, View, GestureResponderEvent, ViewProps, TouchableOpacityProps, TextInputProps, TextInput } from 'react-native';
|
|
5
|
+
|
|
6
|
+
declare const amenityNames: readonly ["kitchen", "wifi", "tv", "washer", "ac", "bbq", "forestView", "pets"];
|
|
7
|
+
type AmenityName = (typeof amenityNames)[number];
|
|
8
|
+
|
|
9
|
+
interface AmenityIconProps {
|
|
10
|
+
name: AmenityName;
|
|
11
|
+
size?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function AmenityIcon({ name, size, color }: AmenityIconProps): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
type AmenityVariant = "display" | "selectable";
|
|
17
|
+
interface AmenityProps extends Omit<PressableProps, "children" | "disabled" | "onPress" | "style"> {
|
|
18
|
+
icon: AmenityName;
|
|
19
|
+
label: string;
|
|
20
|
+
variant?: AmenityVariant;
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
defaultSelected?: boolean;
|
|
23
|
+
onSelectedChange?: (selected: boolean) => void;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const Amenity: react.ForwardRefExoticComponent<AmenityProps & react.RefAttributes<View>>;
|
|
5
30
|
|
|
6
31
|
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
7
32
|
/** Leading icon, e.g. `<CalendarIcon size={16} />` — pass it pre-colored. */
|
|
@@ -354,16 +379,6 @@ interface IconByNameProps extends IconProps {
|
|
|
354
379
|
}
|
|
355
380
|
declare function Icon({ name, ...props }: IconByNameProps): react.JSX.Element;
|
|
356
381
|
|
|
357
|
-
declare const amenityNames: readonly ["kitchen", "wifi", "tv", "washer", "ac", "bbq", "forestView", "pets"];
|
|
358
|
-
type AmenityName = (typeof amenityNames)[number];
|
|
359
|
-
|
|
360
|
-
interface AmenityIconProps {
|
|
361
|
-
name: AmenityName;
|
|
362
|
-
size?: number;
|
|
363
|
-
color?: string;
|
|
364
|
-
}
|
|
365
|
-
declare function AmenityIcon({ name, size, color }: AmenityIconProps): react.JSX.Element;
|
|
366
|
-
|
|
367
382
|
type BadgeVariant = "default" | "transparent";
|
|
368
383
|
interface BadgeProps extends Omit<ViewProps, "style" | "children"> {
|
|
369
384
|
label: string;
|
|
@@ -802,12 +817,12 @@ declare const statCardTypography: {
|
|
|
802
817
|
readonly lineHeight: 16;
|
|
803
818
|
readonly letterSpacing: 0;
|
|
804
819
|
};
|
|
805
|
-
/** Segmented toggle label — Medium 12, line-height
|
|
820
|
+
/** Segmented toggle label — Medium 12, 14px line-height, letter-spacing 0. */
|
|
806
821
|
declare const segmentedToggleTypography: {
|
|
807
822
|
readonly fontFamily: "Noto Sans Armenian";
|
|
808
823
|
readonly fontSize: 12;
|
|
809
824
|
readonly fontWeight: "500";
|
|
810
|
-
readonly lineHeight:
|
|
825
|
+
readonly lineHeight: 14;
|
|
811
826
|
readonly letterSpacing: 0;
|
|
812
827
|
};
|
|
813
828
|
/** Language switcher trigger and option labels — SemiBold 14. */
|
|
@@ -1001,4 +1016,4 @@ declare const textareaTypography: {
|
|
|
1001
1016
|
};
|
|
1002
1017
|
};
|
|
1003
1018
|
|
|
1004
|
-
export { AmenityIcon, type AmenityIconProps, type AmenityName, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, type CommentCardProps, CopyIcon, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, FavoritesButton, type FavoritesButtonProps, FiltersIcon, GlobeIcon, GooglePlayIcon, type GreyStep, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputIcon, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, type RangeProps, type RangeValue, RatingInput, type RatingInputProps, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectIcon, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|
|
1019
|
+
export { Amenity, AmenityIcon, type AmenityIconProps, type AmenityName, type AmenityProps, type AmenityVariant, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, type CommentCardProps, CopyIcon, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, FavoritesButton, type FavoritesButtonProps, FiltersIcon, GlobeIcon, GooglePlayIcon, type GreyStep, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputIcon, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, type RangeProps, type RangeValue, RatingInput, type RatingInputProps, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectIcon, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, ComponentType } from 'react';
|
|
3
3
|
import * as react_native from 'react-native';
|
|
4
|
-
import { PressableProps,
|
|
4
|
+
import { PressableProps, StyleProp, ViewStyle, TextStyle, View, GestureResponderEvent, ViewProps, TouchableOpacityProps, TextInputProps, TextInput } from 'react-native';
|
|
5
|
+
|
|
6
|
+
declare const amenityNames: readonly ["kitchen", "wifi", "tv", "washer", "ac", "bbq", "forestView", "pets"];
|
|
7
|
+
type AmenityName = (typeof amenityNames)[number];
|
|
8
|
+
|
|
9
|
+
interface AmenityIconProps {
|
|
10
|
+
name: AmenityName;
|
|
11
|
+
size?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
}
|
|
14
|
+
declare function AmenityIcon({ name, size, color }: AmenityIconProps): react.JSX.Element;
|
|
15
|
+
|
|
16
|
+
type AmenityVariant = "display" | "selectable";
|
|
17
|
+
interface AmenityProps extends Omit<PressableProps, "children" | "disabled" | "onPress" | "style"> {
|
|
18
|
+
icon: AmenityName;
|
|
19
|
+
label: string;
|
|
20
|
+
variant?: AmenityVariant;
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
defaultSelected?: boolean;
|
|
23
|
+
onSelectedChange?: (selected: boolean) => void;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
26
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const Amenity: react.ForwardRefExoticComponent<AmenityProps & react.RefAttributes<View>>;
|
|
5
30
|
|
|
6
31
|
interface MenuItemProps extends Omit<PressableProps, "onPress" | "disabled" | "style" | "children" | "hitSlop"> {
|
|
7
32
|
/** Leading icon, e.g. `<CalendarIcon size={16} />` — pass it pre-colored. */
|
|
@@ -354,16 +379,6 @@ interface IconByNameProps extends IconProps {
|
|
|
354
379
|
}
|
|
355
380
|
declare function Icon({ name, ...props }: IconByNameProps): react.JSX.Element;
|
|
356
381
|
|
|
357
|
-
declare const amenityNames: readonly ["kitchen", "wifi", "tv", "washer", "ac", "bbq", "forestView", "pets"];
|
|
358
|
-
type AmenityName = (typeof amenityNames)[number];
|
|
359
|
-
|
|
360
|
-
interface AmenityIconProps {
|
|
361
|
-
name: AmenityName;
|
|
362
|
-
size?: number;
|
|
363
|
-
color?: string;
|
|
364
|
-
}
|
|
365
|
-
declare function AmenityIcon({ name, size, color }: AmenityIconProps): react.JSX.Element;
|
|
366
|
-
|
|
367
382
|
type BadgeVariant = "default" | "transparent";
|
|
368
383
|
interface BadgeProps extends Omit<ViewProps, "style" | "children"> {
|
|
369
384
|
label: string;
|
|
@@ -802,12 +817,12 @@ declare const statCardTypography: {
|
|
|
802
817
|
readonly lineHeight: 16;
|
|
803
818
|
readonly letterSpacing: 0;
|
|
804
819
|
};
|
|
805
|
-
/** Segmented toggle label — Medium 12, line-height
|
|
820
|
+
/** Segmented toggle label — Medium 12, 14px line-height, letter-spacing 0. */
|
|
806
821
|
declare const segmentedToggleTypography: {
|
|
807
822
|
readonly fontFamily: "Noto Sans Armenian";
|
|
808
823
|
readonly fontSize: 12;
|
|
809
824
|
readonly fontWeight: "500";
|
|
810
|
-
readonly lineHeight:
|
|
825
|
+
readonly lineHeight: 14;
|
|
811
826
|
readonly letterSpacing: 0;
|
|
812
827
|
};
|
|
813
828
|
/** Language switcher trigger and option labels — SemiBold 14. */
|
|
@@ -1001,4 +1016,4 @@ declare const textareaTypography: {
|
|
|
1001
1016
|
};
|
|
1002
1017
|
};
|
|
1003
1018
|
|
|
1004
|
-
export { AmenityIcon, type AmenityIconProps, type AmenityName, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, type CommentCardProps, CopyIcon, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, FavoritesButton, type FavoritesButtonProps, FiltersIcon, GlobeIcon, GooglePlayIcon, type GreyStep, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputIcon, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, type RangeProps, type RangeValue, RatingInput, type RatingInputProps, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectIcon, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|
|
1019
|
+
export { Amenity, AmenityIcon, type AmenityIconProps, type AmenityName, type AmenityProps, type AmenityVariant, AppleIcon, AreaExpandIcon, ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BathroomsIcon, BedroomsIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CardLocationIcon, CheckBadgeIcon, CheckIcon, CheckSuccessIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockFilledIcon, ClockIcon, CloseIcon, CommentCard, type CommentCardProps, CopyIcon, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, FavoritesButton, type FavoritesButtonProps, FiltersIcon, GlobeIcon, GooglePlayIcon, type GreyStep, GuestsIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputIcon, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, ListViewIcon, LocationPinIcon, LogOutIcon, MailIcon, MapCollapseIcon, MapExpandIcon, MapViewIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, QrCodeIcon, Range, type RangeProps, type RangeValue, RatingInput, type RatingInputProps, RatingStarIcon, SaveHeartIcon, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectIcon, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShareIcon, ShowIcon, SidebarIcon, SortIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, TooltipArrowIcon, UserIcon, UsersAltIcon, VideoIcon, WhatsAppIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
|