searchsmartly-ui 0.0.13

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 (41) hide show
  1. package/README.md +36 -0
  2. package/dist/index.d.ts +117 -0
  3. package/dist/index.esm.js +24 -0
  4. package/dist/index.esm.js.map +1 -0
  5. package/dist/index.js +24 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/src/components/Button/Button.d.ts +8 -0
  8. package/dist/src/components/Button/index.d.ts +1 -0
  9. package/dist/src/components/CardImage/CardImage.d.ts +10 -0
  10. package/dist/src/components/CardImage/index.d.ts +1 -0
  11. package/dist/src/components/EmptyDefaultImage/EmptyDefaultImage.d.ts +6 -0
  12. package/dist/src/components/EmptyDefaultImage/index.d.ts +1 -0
  13. package/dist/src/components/LazyLoadImage/LazyLoadImage.d.ts +15 -0
  14. package/dist/src/components/LazyLoadImage/index.d.ts +1 -0
  15. package/dist/src/components/SlickCarousel/ControlButton.d.ts +8 -0
  16. package/dist/src/components/SlickCarousel/SlickCarousel.d.ts +17 -0
  17. package/dist/src/components/SlickCarousel/index.d.ts +1 -0
  18. package/dist/src/components/SlickCarousel/styles.d.ts +5 -0
  19. package/dist/src/components/Tag/Tag.d.ts +7 -0
  20. package/dist/src/components/Tag/index.d.ts +1 -0
  21. package/dist/src/components/helpers/currencyFormatter.d.ts +1 -0
  22. package/dist/src/components/helpers/getBedroomsText.d.ts +7 -0
  23. package/dist/src/components/icons/BedIcon.d.ts +2 -0
  24. package/dist/src/components/index.d.ts +8 -0
  25. package/dist/src/components/layouts/BaseLayout/BaseLayout.d.ts +8 -0
  26. package/dist/src/components/layouts/BaseLayout/index.d.ts +1 -0
  27. package/dist/src/components/layouts/index.d.ts +1 -0
  28. package/dist/src/components/list/ListHeader.d.ts +4 -0
  29. package/dist/src/components/list/PropertiesList/PropertiesList.d.ts +12 -0
  30. package/dist/src/components/list/PropertiesList/index.d.ts +1 -0
  31. package/dist/src/components/list/PropertyCard.d.ts +15 -0
  32. package/dist/src/components/list/index.d.ts +3 -0
  33. package/dist/src/components/list/types.d.ts +9 -0
  34. package/dist/src/helpers/currencyFormatter.d.ts +1 -0
  35. package/dist/src/helpers/getBedroomsText.d.ts +7 -0
  36. package/dist/src/hooks/index.d.ts +1 -0
  37. package/dist/src/hooks/useResponsive.d.ts +5 -0
  38. package/dist/src/index.d.ts +3 -0
  39. package/dist/src/theme/ThemeProvider.d.ts +3 -0
  40. package/dist/src/theme/index.d.ts +1 -0
  41. package/package.json +99 -0
@@ -0,0 +1,8 @@
1
+ import type { FC, ReactNode } from 'react';
2
+ type ControlButtonInterface = {
3
+ children: ReactNode;
4
+ isNext?: boolean;
5
+ onClick?: () => void;
6
+ };
7
+ export declare const ControlButton: FC<ControlButtonInterface>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { LazyLoadTypes } from 'react-slick';
3
+ import { Theme } from '@mui/material';
4
+ import { SxProps } from '@mui/system';
5
+ import 'slick-carousel/slick/slick.css';
6
+ import 'slick-carousel/slick/slick-theme.css';
7
+ interface CarouselInterface {
8
+ images: string[];
9
+ disableLazyLoader?: boolean;
10
+ lazyLoad?: LazyLoadTypes;
11
+ fullSizeImages?: string[];
12
+ id?: string;
13
+ sx?: SxProps<Theme>;
14
+ imageSX?: SxProps<Theme>;
15
+ }
16
+ export declare const SlickCarousel: FC<CarouselInterface>;
17
+ export {};
@@ -0,0 +1 @@
1
+ export * from './SlickCarousel';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import Slider from 'react-slick';
3
+ export declare const StyledCarousel: import("@emotion/styled").StyledComponent<import("react-slick").Settings & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {
4
+ ref?: import("react").Ref<Slider> | undefined;
5
+ }>;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { ChipProps } from '@mui/material/Chip/Chip';
3
+ export interface TagProps extends ChipProps {
4
+ fontSize?: number;
5
+ tooltip?: string;
6
+ }
7
+ export declare const Tag: FC<TagProps>;
@@ -0,0 +1 @@
1
+ export * from './Tag';
@@ -0,0 +1 @@
1
+ export declare const currencyFormatterProperty: (price: number, currency?: string) => string;
@@ -0,0 +1,7 @@
1
+ export declare const renderPlural: (word: string, number: number) => string;
2
+ export declare const getBedroomsText: ({ bedrooms, isShared, disablePlural, isShort }: {
3
+ bedrooms?: number | undefined;
4
+ isShared?: boolean | undefined;
5
+ disablePlural?: boolean | undefined;
6
+ isShort?: boolean | undefined;
7
+ }) => string;
@@ -0,0 +1,2 @@
1
+ import { SvgIconProps } from '@mui/material';
2
+ export declare const BedIcon: ({ sx, ...props }: SvgIconProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export * from './Button';
2
+ export * from './layouts';
3
+ export * from './CardImage';
4
+ export * from './LazyLoadImage';
5
+ export * from './SlickCarousel';
6
+ export * from './Tag';
7
+ export * from './list';
8
+ export * from './EmptyDefaultImage';
@@ -0,0 +1,8 @@
1
+ import type { FC, PropsWithChildren, ReactElement } from 'react';
2
+ type BaseLayoutProps = {
3
+ hideHeader?: boolean;
4
+ logoLinks: ReactElement[] | ReactElement;
5
+ menu: ReactElement[] | ReactElement;
6
+ };
7
+ export declare const BaseLayout: FC<PropsWithChildren<BaseLayoutProps>>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './BaseLayout';
@@ -0,0 +1 @@
1
+ export * from './BaseLayout';
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ export declare const ListHeader: FC<{
3
+ title: string;
4
+ }>;
@@ -0,0 +1,12 @@
1
+ import { type PropertyItemType } from '../types';
2
+ type ListProps<T extends PropertyItemType> = {
3
+ title: string;
4
+ currency?: string;
5
+ properties: T[];
6
+ disableCarousel?: boolean;
7
+ loadMoreLoading?: boolean;
8
+ onLoadMore?: () => void;
9
+ onClickMapButton?: () => void;
10
+ };
11
+ export declare const PropertiesList: <T extends PropertyItemType>({ currency, title, properties, disableCarousel, loadMoreLoading, onLoadMore, onClickMapButton, }: ListProps<T>) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from './PropertiesList';
@@ -0,0 +1,15 @@
1
+ import { type ReactElement } from 'react';
2
+ import { ChipProps } from '@mui/material/Chip/Chip';
3
+ import type { BoxProps } from '@mui/material';
4
+ import type { PropertyItemType } from './types';
5
+ export type PropertyCardType<T extends PropertyItemType> = Omit<BoxProps, 'property'> & {
6
+ id?: string;
7
+ currency?: string;
8
+ isPopover?: boolean;
9
+ disableCarousel?: boolean;
10
+ tagColor?: ChipProps['color'];
11
+ property: T;
12
+ children?: ReactElement | ReactElement[];
13
+ header?: ReactElement | ReactElement[];
14
+ };
15
+ export declare const PropertyCard: <T extends PropertyItemType>({ property, currency, id, disableCarousel, isPopover, children, header, tagColor, sx, }: PropertyCardType<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './PropertiesList';
2
+ export * from './PropertyCard';
3
+ export * from './ListHeader';
@@ -0,0 +1,9 @@
1
+ export type PropertyItemType = {
2
+ displayable_address: string;
3
+ price: number;
4
+ listing_status: string;
5
+ id: string;
6
+ images: string[];
7
+ num_bedrooms?: number;
8
+ is_shared?: boolean;
9
+ };
@@ -0,0 +1 @@
1
+ export declare const currencyFormatterProperty: (price: number, currency?: string) => string;
@@ -0,0 +1,7 @@
1
+ export declare const renderPlural: (word: string, number: number) => string;
2
+ export declare const getBedroomsText: ({ bedrooms, isShared, disablePlural, isShort }: {
3
+ bedrooms?: number | undefined;
4
+ isShared?: boolean | undefined;
5
+ disablePlural?: boolean | undefined;
6
+ isShort?: boolean | undefined;
7
+ }) => string;
@@ -0,0 +1 @@
1
+ export * from './useResponsive';
@@ -0,0 +1,5 @@
1
+ export declare const useResponsive: () => {
2
+ isMobile: boolean;
3
+ isTablet: boolean;
4
+ isDesktop: boolean;
5
+ };
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ export * from './hooks';
3
+ export * from './theme';
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
3
+ export declare const ThemeProvider: FC<ThemeProviderProps>;
@@ -0,0 +1 @@
1
+ export * from './ThemeProvider';
package/package.json ADDED
@@ -0,0 +1,99 @@
1
+ {
2
+ "name": "searchsmartly-ui",
3
+ "version": "0.0.13",
4
+ "description": "SearchSmartly UI Library",
5
+ "keywords": [
6
+ "react",
7
+ "typescript"
8
+ ],
9
+ "repository": "git@github.com:SearchSmartly/searchsmartly-ui.git",
10
+ "license": "ISC",
11
+ "author": "",
12
+ "main": "dist/index.js",
13
+ "module": "dist/index.esm.js",
14
+ "types": "dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "NODE_ENV=development rollup -c --bundleConfigAsCjs",
20
+ "dev": "rollup -c -w --bundleConfigAsCjs",
21
+ "lint": "eslint ./src --max-warnings=0",
22
+ "lint-fix": "eslint ./src --fix --max-warnings=0",
23
+ "pre-commit": "lint-staged",
24
+ "prepare": "husky install",
25
+ "prettier": "prettier '**/*' --check --ignore-unknown",
26
+ "prettier:write": "prettier '**/*' --write --ignore-unknown",
27
+ "type-check": "tsc --noEmit"
28
+ },
29
+ "husky": {
30
+ "hooks": {
31
+ "pre-commit": "lint-staged"
32
+ }
33
+ },
34
+ "lint-staged": {
35
+ "*": "prettier --write --ignore-unknown",
36
+ "*.{ts,tsx} !(*.d.ts)": [
37
+ "eslint --fix --max-warnings=0",
38
+ "bash -c 'npm run type-check'"
39
+ ]
40
+ },
41
+ "dependencies": {
42
+ "photoswipe": "^5.4.3",
43
+ "react-lazy-load-image-component": "^1.6.0",
44
+ "react-photoswipe-gallery": "^3.0.0-alpha.0",
45
+ "react-slick": "^0.29.0",
46
+ "slick-carousel": "^1.8.1"
47
+ },
48
+ "devDependencies": {
49
+ "@babel/core": "^7.23.3",
50
+ "@babel/plugin-transform-runtime": "^7.23.4",
51
+ "@babel/preset-env": "^7.23.3",
52
+ "@babel/preset-react": "^7.23.3",
53
+ "@babel/preset-typescript": "^7.23.3",
54
+ "@rollup/plugin-babel": "^6.0.4",
55
+ "@rollup/plugin-commonjs": "^25.0.7",
56
+ "@rollup/plugin-eslint": "^9.0.5",
57
+ "@rollup/plugin-image": "^3.0.3",
58
+ "@rollup/plugin-json": "^6.0.1",
59
+ "@rollup/plugin-multi-entry": "^6.0.1",
60
+ "@rollup/plugin-node-resolve": "^15.2.3",
61
+ "@rollup/plugin-replace": "^5.0.5",
62
+ "@rollup/plugin-terser": "^0.4.4",
63
+ "@rollup/plugin-typescript": "^11.1.5",
64
+ "@svgr/rollup": "^8.1.0",
65
+ "@types/react": "^18.2.42",
66
+ "@types/react-dom": "^18.2.17",
67
+ "@types/react-lazy-load-image-component": "^1.6.3",
68
+ "@types/react-slick": "^0.23.12",
69
+ "@typescript-eslint/eslint-plugin": "^6.13.1",
70
+ "@typescript-eslint/parser": "^6.13.1",
71
+ "babel-loader": "^9.1.3",
72
+ "eslint": "^8.54.0",
73
+ "eslint-config-prettier": "^9.0.0",
74
+ "eslint-plugin-prettier": "^5.0.1",
75
+ "eslint-plugin-react": "^7.33.2",
76
+ "eslint-plugin-react-hooks": "^4.6.0",
77
+ "husky": "^8.0.3",
78
+ "lint-staged": "^15.1.0",
79
+ "node-sass": "^9.0.0",
80
+ "prettier": "^3.1.0",
81
+ "rollup": "^4.6.0",
82
+ "rollup-plugin-delete": "^2.0.0",
83
+ "rollup-plugin-dts": "^6.1.0",
84
+ "rollup-plugin-local-resolve": "^1.0.7",
85
+ "rollup-plugin-peer-deps-external": "^2.2.4",
86
+ "rollup-plugin-postcss": "^4.0.2",
87
+ "rollup-plugin-visualizer": "^5.10.0",
88
+ "sass-loader": "^13.3.2",
89
+ "typescript": "^5.3.2"
90
+ },
91
+ "peerDependencies": {
92
+ "@emotion/react": "^11.11.1",
93
+ "@emotion/styled": "^11.11.0",
94
+ "@mui/icons-material": "^5.14.18",
95
+ "@mui/material": "^5.14.18",
96
+ "react": "^18.2.0",
97
+ "react-dom": "18.2.0"
98
+ }
99
+ }