searchsmartly-ui 0.0.16 → 0.0.21

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 (31) hide show
  1. package/README.md +11 -2
  2. package/dist/index.d.ts +67 -6
  3. package/dist/index.esm.js +4 -4
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +4 -4
  6. package/dist/index.js.map +1 -1
  7. package/dist/src/components/Tag/AmenityTags/AmenityTags.d.ts +23 -0
  8. package/dist/src/components/Tag/AmenityTags/index.d.ts +1 -0
  9. package/dist/src/components/Tag/PropertyTag/PropertyTag.d.ts +3 -0
  10. package/dist/src/components/Tag/PropertyTag/index.d.ts +1 -0
  11. package/dist/src/components/Tag/index.d.ts +2 -0
  12. package/dist/src/components/forms/BedroomsForm/BedroomsForm.d.ts +7 -0
  13. package/dist/src/components/forms/BedroomsForm/index.d.ts +1 -0
  14. package/dist/src/components/forms/BudgetForm/BudgetForm.d.ts +8 -0
  15. package/dist/src/components/forms/BudgetForm/index.d.ts +1 -0
  16. package/dist/src/components/forms/index.d.ts +2 -0
  17. package/dist/src/components/icons/PropertyIcons/BeachesIcon.d.ts +2 -0
  18. package/dist/src/components/icons/PropertyIcons/BusIcon.d.ts +2 -0
  19. package/dist/src/components/icons/PropertyIcons/GymIcon.d.ts +2 -0
  20. package/dist/src/components/icons/PropertyIcons/ParksIcon.d.ts +2 -0
  21. package/dist/src/components/icons/PropertyIcons/RestaurantsIcon.d.ts +2 -0
  22. package/dist/src/components/icons/PropertyIcons/SchoolsIcon.d.ts +2 -0
  23. package/dist/src/components/icons/PropertyIcons/ShopIcon.d.ts +2 -0
  24. package/dist/src/components/icons/PropertyIcons/StarIcon.d.ts +2 -0
  25. package/dist/src/components/icons/PropertyIcons/index.d.ts +8 -0
  26. package/dist/src/components/icons/index.d.ts +3 -0
  27. package/dist/src/components/index.d.ts +2 -0
  28. package/dist/src/components/list/PropertiesList/PropertiesList.d.ts +8 -2
  29. package/dist/src/components/list/PropertyCard.d.ts +2 -2
  30. package/package.json +1 -1
  31. package/dist/src/components/layouts/Onboarding/StepLayout.d.ts +0 -9
package/README.md CHANGED
@@ -8,12 +8,12 @@ npm dev
8
8
 
9
9
  Usage
10
10
 
11
- `"@searchsmartly/ui":<tag number>`
11
+ `"searchsmartly-ui":<tag number>`
12
12
 
13
13
  Installation
14
14
 
15
15
  ```bash
16
- npm install @searchsmartly/ui@<tag number> --registry=https://npm.pkg.github.com --legacy-peer-deps
16
+ npm install searchsmartly-ui@latest
17
17
  ```
18
18
 
19
19
  before merge (better remove dist folder and build it from scratch to avoid cache)
@@ -22,9 +22,18 @@ before merge (better remove dist folder and build it from scratch to avoid cache
22
22
  npm build
23
23
  ```
24
24
 
25
+ Publish
26
+
27
+ ```bash
28
+ npm build
29
+ npm version patch
30
+ npm publish
31
+ ```
32
+
25
33
  After build for now we need manually fix export types, now build export them in wrong way, i will find solution later
26
34
 
27
35
  example (we need like this in main index.d.ts):
36
+
28
37
  `export type ButtonProps = ButtonProps$1 & {
29
38
  shape?: 'lrect' | 'mrect' | 'srect' | 'square';
30
39
  };`
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import * as react from 'react';
6
6
  import { FC, PropsWithChildren, ReactElement } from 'react';
7
7
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
8
8
  import * as _mui_material from '@mui/material';
9
- import { SxProps, Theme, BoxProps, StackProps } from '@mui/material';
9
+ import { SxProps, Theme, BoxProps, StackProps, SvgIconProps } from '@mui/material';
10
10
  import { LazyLoadImageProps } from 'react-lazy-load-image-component';
11
11
  import { LazyLoadTypes } from 'react-slick';
12
12
  import { ChipProps } from '@mui/material/Chip/Chip';
@@ -76,12 +76,35 @@ interface CarouselInterface {
76
76
  }
77
77
  declare const SlickCarousel: FC<CarouselInterface>;
78
78
 
79
- interface TagProps extends ChipProps {
79
+ export interface TagProps extends ChipProps {
80
80
  fontSize?: number;
81
81
  tooltip?: string;
82
82
  }
83
83
  declare const Tag: FC<TagProps>;
84
84
 
85
+ declare const PropertyTag: FC<TagProps>;
86
+
87
+ type Amenity = {
88
+ icon: ChipProps['icon'];
89
+ name: string;
90
+ };
91
+ declare const amenityTagConfig: Record<string, Amenity>;
92
+ type Threshold = {
93
+ threshold: number;
94
+ getCopy: (amenity: string) => string;
95
+ };
96
+ type ThresholdsConfig = Record<string, Threshold>;
97
+ declare const thresholds: ThresholdsConfig;
98
+ type AmenityTag = {
99
+ id: string;
100
+ icon: ChipProps['icon'];
101
+ label: ChipProps['label'];
102
+ };
103
+ declare const getAmenityTags: (scores: Record<string, number>) => AmenityTag[];
104
+ declare const AmenityTags: FC<{
105
+ scores: Record<string, number>;
106
+ }>;
107
+
85
108
  type PropertyItemType = {
86
109
  displayable_address: string;
87
110
  price: number;
@@ -95,15 +118,20 @@ type PropertyItemType = {
95
118
  type ListProps<T extends PropertyItemType> = {
96
119
  title: string;
97
120
  currency?: string;
121
+ defaultPropertyCard?: boolean;
98
122
  properties: T[];
123
+ children?: ({ property }: {
124
+ property: T;
125
+ }) => ReactElement;
126
+ cardHeader?: (val: T) => void;
99
127
  disableCarousel?: boolean;
100
128
  loadMoreLoading?: boolean;
101
129
  onLoadMore?: () => void;
102
130
  onClickMapButton?: () => void;
103
131
  };
104
- declare const PropertiesList: <T extends PropertyItemType>({ currency, title, properties, disableCarousel, loadMoreLoading, onLoadMore, onClickMapButton, }: ListProps<T>) => react_jsx_runtime.JSX.Element;
132
+ declare const PropertiesList: <T extends PropertyItemType>({ currency, title, properties, defaultPropertyCard, disableCarousel, cardHeader, loadMoreLoading, onLoadMore, onClickMapButton, children, }: ListProps<T>) => react_jsx_runtime.JSX.Element;
105
133
 
106
- type PropertyCardType<T extends PropertyItemType> = Omit<BoxProps, 'property'> & {
134
+ export type PropertyCardType<T extends PropertyItemType> = Omit<BoxProps, 'property'> & {
107
135
  id?: string;
108
136
  currency?: string;
109
137
  isPopover?: boolean;
@@ -111,7 +139,7 @@ type PropertyCardType<T extends PropertyItemType> = Omit<BoxProps, 'property'> &
111
139
  tagColor?: ChipProps['color'];
112
140
  property: T;
113
141
  children?: ReactElement | ReactElement[];
114
- header?: ReactElement | ReactElement[];
142
+ header?: (val: T) => void;
115
143
  };
116
144
  declare const PropertyCard: <T extends PropertyItemType>({ property, currency, id, disableCarousel, isPopover, children, header, tagColor, sx, }: PropertyCardType<T>) => react_jsx_runtime.JSX.Element;
117
145
 
@@ -125,6 +153,39 @@ declare const EmptyDefaultImage: FC<{
125
153
  sx?: SxProps$1<Theme$1>;
126
154
  }>;
127
155
 
156
+ type BedroomsFormProps = {
157
+ selected?: number;
158
+ onClick: (value?: number) => void;
159
+ };
160
+ declare const BedroomsForm: FC<BedroomsFormProps>;
161
+
162
+ type BudgetFormProps = {
163
+ minPrice?: number;
164
+ maxPrice?: number;
165
+ onSubmit: (minPrice?: number, maxPrice?: number) => void;
166
+ };
167
+ declare const BudgetForm: FC<BudgetFormProps>;
168
+
169
+ declare const StarIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
170
+
171
+ declare const ParksIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
172
+
173
+ declare const RestaurantsIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
174
+
175
+ declare const SchoolsIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
176
+
177
+ declare const BeachesIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
178
+
179
+ declare const BusIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
180
+
181
+ declare const ShopIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
182
+
183
+ declare const GymIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
184
+
185
+ declare const BedIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
186
+
187
+ declare const SearchsmartlyLogo: () => react_jsx_runtime.JSX.Element;
188
+
128
189
  declare const useResponsive: () => {
129
190
  isMobile: boolean;
130
191
  isTablet: boolean;
@@ -133,4 +194,4 @@ declare const useResponsive: () => {
133
194
 
134
195
  declare const ThemeProvider: FC<ThemeProviderProps>;
135
196
 
136
- export { BaseLayout, Button, CardImage, EmptyDefaultImage, LazyLoadImage, ListHeader, Onboarding, OnboardingStepLayout, Powered, PropertiesList, PropertyCard, type PropertyCardType, SlickCarousel, Tag, type TagProps, ThemeProvider, useResponsive };
197
+ export { AmenityTags, BaseLayout, BeachesIcon, BedIcon, BedroomsForm, BudgetForm, BusIcon, Button, CardImage, EmptyDefaultImage, GymIcon, LazyLoadImage, ListHeader, Onboarding, OnboardingStepLayout, ParksIcon, Powered, PropertiesList, PropertyCard, PropertyTag, RestaurantsIcon, SchoolsIcon, SearchsmartlyLogo, ShopIcon, SlickCarousel, StarIcon, Tag, ThemeProvider, amenityTagConfig, getAmenityTags, thresholds, useResponsive };