@ecohouse/ui 0.1.10 → 0.1.12

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.d.cts CHANGED
@@ -156,6 +156,11 @@ declare function LogOutIcon({ size, color, strokeWidth }: IconProps): react.JSX.
156
156
 
157
157
  declare function MailIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
158
158
 
159
+ interface MenuIconProps extends IconProps {
160
+ open?: boolean;
161
+ }
162
+ declare function MenuIcon({ size, color, strokeWidth, open, }: MenuIconProps): react.JSX.Element;
163
+
159
164
  declare function MinusIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
160
165
 
161
166
  declare function NavigateIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
@@ -236,6 +241,7 @@ declare const icons: {
236
241
  readonly linkedin: typeof LinkedInIcon;
237
242
  readonly logOut: typeof LogOutIcon;
238
243
  readonly mail: typeof MailIcon;
244
+ readonly menu: typeof MenuIcon;
239
245
  readonly minus: typeof MinusIcon;
240
246
  readonly navigate: typeof NavigateIcon;
241
247
  readonly phone: typeof PhoneIcon;
@@ -253,7 +259,7 @@ declare const icons: {
253
259
  type IconName = keyof typeof icons;
254
260
  declare const iconNames: IconName[];
255
261
  declare const iconGroups: {
256
- readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "navigate"];
262
+ readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "menu", "navigate"];
257
263
  readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "calendarOutline", "heart", "star", "starFilled", "minus", "plus"];
258
264
  readonly objects: readonly ["bag", "building", "clock", "user", "usersAlt", "video"];
259
265
  readonly communication: readonly ["mail", "phone"];
@@ -412,6 +418,8 @@ type DatePickerBaseProps = Omit<ViewProps, "style" | "children"> & {
412
418
  formatValue?: (date: Date) => string;
413
419
  /** First day of the week column (0 = Sunday, 1 = Monday). Defaults to Monday. */
414
420
  weekStartsOn?: 0 | 1;
421
+ /** Styles the calendar popup independently from the trigger width. */
422
+ calendarStyle?: StyleProp<ViewStyle>;
415
423
  style?: StyleProp<ViewStyle>;
416
424
  className?: string;
417
425
  };
@@ -863,4 +871,4 @@ declare const textareaTypography: {
863
871
  };
864
872
  };
865
873
 
866
- export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, type CommentCardProps, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, GlobeIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, type RatingInputProps, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, UsersAltIcon, VideoIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
874
+ export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, type CommentCardProps, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, GlobeIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, type RatingInputProps, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, UsersAltIcon, VideoIcon, 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
@@ -156,6 +156,11 @@ declare function LogOutIcon({ size, color, strokeWidth }: IconProps): react.JSX.
156
156
 
157
157
  declare function MailIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
158
158
 
159
+ interface MenuIconProps extends IconProps {
160
+ open?: boolean;
161
+ }
162
+ declare function MenuIcon({ size, color, strokeWidth, open, }: MenuIconProps): react.JSX.Element;
163
+
159
164
  declare function MinusIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
160
165
 
161
166
  declare function NavigateIcon({ size, color, strokeWidth }: IconProps): react.JSX.Element;
@@ -236,6 +241,7 @@ declare const icons: {
236
241
  readonly linkedin: typeof LinkedInIcon;
237
242
  readonly logOut: typeof LogOutIcon;
238
243
  readonly mail: typeof MailIcon;
244
+ readonly menu: typeof MenuIcon;
239
245
  readonly minus: typeof MinusIcon;
240
246
  readonly navigate: typeof NavigateIcon;
241
247
  readonly phone: typeof PhoneIcon;
@@ -253,7 +259,7 @@ declare const icons: {
253
259
  type IconName = keyof typeof icons;
254
260
  declare const iconNames: IconName[];
255
261
  declare const iconGroups: {
256
- readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "navigate"];
262
+ readonly navigation: readonly ["arrowRight", "chevronDown", "chevronLeft", "home", "menu", "navigate"];
257
263
  readonly actions: readonly ["show", "bell", "camera", "key", "check", "checkBadge", "search", "calendar", "calendarOutline", "heart", "star", "starFilled", "minus", "plus"];
258
264
  readonly objects: readonly ["bag", "building", "clock", "user", "usersAlt", "video"];
259
265
  readonly communication: readonly ["mail", "phone"];
@@ -412,6 +418,8 @@ type DatePickerBaseProps = Omit<ViewProps, "style" | "children"> & {
412
418
  formatValue?: (date: Date) => string;
413
419
  /** First day of the week column (0 = Sunday, 1 = Monday). Defaults to Monday. */
414
420
  weekStartsOn?: 0 | 1;
421
+ /** Styles the calendar popup independently from the trigger width. */
422
+ calendarStyle?: StyleProp<ViewStyle>;
415
423
  style?: StyleProp<ViewStyle>;
416
424
  className?: string;
417
425
  };
@@ -863,4 +871,4 @@ declare const textareaTypography: {
863
871
  };
864
872
  };
865
873
 
866
- export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, type CommentCardProps, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, GlobeIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, type RatingInputProps, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, UsersAltIcon, VideoIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
874
+ export { ArrowRightIcon, Avatar, type AvatarMenuItem, type AvatarProps, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, type BadgeProps, type BadgeVariant, BagIcon, BellIcon, BrandLogo, type BrandLogoProps, type BrandLogoVariant, BuildingIcon, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, type CheckboxProps, type CheckboxVariant, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, type CommentCardProps, Counter, type CounterProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DateRange, FacebookIcon, GlobeIcon, type GreyStep, HeartIcon, HelpCircleIcon, HomeIcon, Icon, type IconByNameProps, type IconComponent, type IconGroup, type IconName, type IconProps, Input, type InputProps, type InputSize, InstagramIcon, KeyIcon, type LanguageOption, LanguageSwitcher, type LanguageSwitcherProps, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuIcon, type MenuIconProps, MenuItem, type MenuItemProps, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, type RatingInputProps, SearchIcon, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectMultipleProps, type SelectOption, type SelectProps, type SelectSingleProps, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, type StarIconProps, StatCard, type StatCardProps, Textarea, type TextareaProps, Toggle, type ToggleProps, UserIcon, UsersAltIcon, VideoIcon, 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.js CHANGED
@@ -615,6 +615,28 @@ function MailIcon({ size = 20, color = colors.primary, strokeWidth = 2 }) {
615
615
  ) });
616
616
  }
617
617
 
618
+ // src/icons/Menu/menuPath.ts
619
+ var MENU_PATH = "M8 12.6667H17.3333M1 6.83332H17.3333M8 0.999985H17.3333";
620
+ var MENU_CLOSE_PATH = "M15 1L1 15M1 1L15 15";
621
+ function MenuIcon({
622
+ size = 19,
623
+ color = colors.white,
624
+ strokeWidth = 2,
625
+ open = false
626
+ }) {
627
+ return /* @__PURE__ */ jsx(Svg, { width: size, height: size, viewBox: "0 0 19 19", fill: "none", children: /* @__PURE__ */ jsx(
628
+ Path,
629
+ {
630
+ d: open ? MENU_CLOSE_PATH : MENU_PATH,
631
+ stroke: color,
632
+ strokeWidth,
633
+ strokeLinecap: "round",
634
+ strokeLinejoin: "round",
635
+ transform: open ? "translate(1.5 1.5)" : "translate(0 2.5)"
636
+ }
637
+ ) });
638
+ }
639
+
618
640
  // src/icons/Minus/minusPath.ts
619
641
  var MINUS_PATH = "M3.33337 8H12.6667";
620
642
  function MinusIcon({ size = 16, color = colors.white, strokeWidth = 2 }) {
@@ -871,6 +893,7 @@ var icons = {
871
893
  linkedin: LinkedInIcon,
872
894
  logOut: LogOutIcon,
873
895
  mail: MailIcon,
896
+ menu: MenuIcon,
874
897
  minus: MinusIcon,
875
898
  navigate: NavigateIcon,
876
899
  phone: PhoneIcon,
@@ -887,7 +910,7 @@ var icons = {
887
910
  };
888
911
  var iconNames = Object.keys(icons);
889
912
  var iconGroups = {
890
- navigation: ["arrowRight", "chevronDown", "chevronLeft", "home", "navigate"],
913
+ navigation: ["arrowRight", "chevronDown", "chevronLeft", "home", "menu", "navigate"],
891
914
  actions: [
892
915
  "show",
893
916
  "bell",
@@ -1893,10 +1916,7 @@ var styles6 = StyleSheet.create({
1893
1916
  gap: 8,
1894
1917
  borderRadius: 12,
1895
1918
  backgroundColor: colors.whiteAlpha6,
1896
- ...Platform.select({
1897
- web: { boxShadow: `0 8px 24px ${colors.black}73` },
1898
- default: { elevation: 8 }
1899
- })
1919
+ overflow: "hidden"
1900
1920
  },
1901
1921
  item: {
1902
1922
  height: CONTROL_HEIGHT,
@@ -2039,6 +2059,7 @@ var Button = forwardRef(
2039
2059
  paddingRight: hasIcon ? metrics.paddingRightWithIcon : metrics.paddingRight,
2040
2060
  gap: hasIcon ? metrics.gap : 0
2041
2061
  },
2062
+ hasIcon ? styles8.contentWithIcon : styles8.contentWithoutIcon,
2042
2063
  disabled && styles8.disabled,
2043
2064
  style
2044
2065
  ];
@@ -2094,6 +2115,12 @@ var styles8 = StyleSheet.create({
2094
2115
  disabled: {
2095
2116
  opacity: 0.6
2096
2117
  },
2118
+ contentWithIcon: {
2119
+ justifyContent: "space-between"
2120
+ },
2121
+ contentWithoutIcon: {
2122
+ justifyContent: "center"
2123
+ },
2097
2124
  label: {},
2098
2125
  labelAndroid: {
2099
2126
  includeFontPadding: false
@@ -2300,6 +2327,7 @@ var DatePicker = forwardRef(
2300
2327
  weekdayLabels = DEFAULT_WEEKDAY_LABELS,
2301
2328
  formatValue = formatDate,
2302
2329
  weekStartsOn = 1,
2330
+ calendarStyle,
2303
2331
  style,
2304
2332
  className,
2305
2333
  accessibilityLabel,
@@ -2454,7 +2482,7 @@ var DatePicker = forwardRef(
2454
2482
  ]
2455
2483
  }
2456
2484
  ),
2457
- isOpen ? /* @__PURE__ */ jsxs(View, { style: styles10.menu, children: [
2485
+ isOpen ? /* @__PURE__ */ jsxs(View, { style: [styles10.menu, calendarStyle], children: [
2458
2486
  /* @__PURE__ */ jsxs(View, { style: styles10.calendarHeader, children: [
2459
2487
  /* @__PURE__ */ jsx(
2460
2488
  Pressable,
@@ -2634,7 +2662,7 @@ var styles10 = StyleSheet.create({
2634
2662
  position: "absolute",
2635
2663
  top: "100%",
2636
2664
  left: 0,
2637
- right: 0,
2665
+ width: DEFAULT_WIDTH,
2638
2666
  marginTop: 8,
2639
2667
  zIndex: 10,
2640
2668
  borderRadius: MENU_RADIUS2,
@@ -4144,6 +4172,6 @@ var styles16 = StyleSheet.create({
4144
4172
  }
4145
4173
  });
4146
4174
 
4147
- export { ArrowRightIcon, Avatar, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, BagIcon, BellIcon, BrandLogo, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, Counter, DatePicker, FacebookIcon, GlobeIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LanguageSwitcher, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, StatCard, Textarea, Toggle, UserIcon, UsersAltIcon, VideoIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
4175
+ export { ArrowRightIcon, Avatar, BRAND_LOGO_COLORS, BRAND_LOGO_DEFAULT_HEIGHT, BRAND_LOGO_DEFAULT_WIDTH, Badge, BagIcon, BellIcon, BrandLogo, BuildingIcon, Button, CalendarIcon, CalendarOutlineIcon, CameraIcon, CheckBadgeIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronLeftIcon, ClockIcon, CommentCard, Counter, DatePicker, FacebookIcon, GlobeIcon, HeartIcon, HelpCircleIcon, HomeIcon, Icon, Input, InstagramIcon, KeyIcon, LanguageSwitcher, LayoutGridIcon, LinkedInIcon, LogOutIcon, MailIcon, MenuIcon, MenuItem, MinusIcon, NavigateIcon, PhoneIcon, PlusIcon, RatingInput, SearchIcon, SegmentedToggle, Select, SettingsIcon, ShowIcon, SidebarIcon, StarFilledIcon, StarIcon, StatCard, Textarea, Toggle, UserIcon, UsersAltIcon, VideoIcon, avatarTypography, badgeTypography, buttonTypography, colors, commentCardTypography, counterTypography, datePickerTypography, defaultLanguageOptions, fonts, getIconsByGroup, grey, iconGroupNames, iconGroups, iconNames, icons, inputTypography, languageSwitcherTypography, ratingTypography, segmentedToggleTypography, selectTypography, statCardTypography, textareaTypography };
4148
4176
  //# sourceMappingURL=index.js.map
4149
4177
  //# sourceMappingURL=index.js.map