searchsmartly-ui 0.0.98 → 0.0.100

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.ts CHANGED
@@ -3,11 +3,11 @@ import * as _emotion_styled from '@emotion/styled';
3
3
  import * as _mui_system from '@mui/system';
4
4
  import { SxProps as SxProps$1 } from '@mui/system';
5
5
  import * as react from 'react';
6
- import react__default, { FC, PropsWithChildren, ReactElement, MouseEvent, ReactNode, ComponentType, Component, ErrorInfo, ChangeEvent } from 'react';
6
+ import react__default, { FC, ReactNode, PropsWithChildren, ReactElement, MouseEvent, ComponentType, Component, ErrorInfo, ChangeEvent, JSX as JSX$1 } from 'react';
7
7
  import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
8
8
  import { OverridableComponent } from '@mui/material/OverridableComponent';
9
9
  import * as _mui_material from '@mui/material';
10
- import { SxProps, Theme, BoxProps, StackProps, SvgIconProps, SvgIconTypeMap, ButtonProps, SnackbarProps } from '@mui/material';
10
+ import { ButtonProps, SxProps, Theme, BoxProps, StackProps, SvgIconProps, SvgIconTypeMap, SnackbarProps } from '@mui/material';
11
11
  import { LazyLoadImageProps } from 'react-lazy-load-image-component';
12
12
  import { LazyLoadTypes } from 'react-slick';
13
13
  import { ChipProps } from '@mui/material/Chip/Chip';
@@ -25,11 +25,35 @@ import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
25
25
  declare const Button: _emotion_styled.StyledComponent<_mui_material.ButtonOwnProps & Omit<_mui_material.ButtonBaseOwnProps, "classes"> & _mui_material_OverridableComponent.CommonProps & Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
26
26
  ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
27
27
  }, "className" | "style" | "classes" | "action" | "centerRipple" | "children" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "tabIndex" | "TouchRippleProps" | "touchRippleRef" | "color" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "href" | "size" | "startIcon" | "variant"> & _mui_system.MUIStyledCommonProps<_mui_material.Theme> & {
28
- component?: react.ElementType<any> | undefined;
28
+ component?: react.ElementType<any, keyof react.JSX.IntrinsicElements> | undefined;
29
29
  } & {
30
30
  shape?: "lrect" | "mrect" | "srect" | "square" | undefined;
31
31
  }, {}, {}>;
32
32
 
33
+ type CopyButton = {
34
+ onClick: (val: (text: string) => void) => void;
35
+ };
36
+ declare const CopyButton: FC<CopyButton>;
37
+
38
+ type FilterButtonProps = {
39
+ small?: boolean;
40
+ badgeContent?: ReactNode;
41
+ onClick?: () => void;
42
+ } & ButtonProps;
43
+ declare const FilterButton: FC<FilterButtonProps>;
44
+
45
+ type AmenityButtonProps = {
46
+ isActive?: boolean;
47
+ disabled?: boolean;
48
+ badgeInvisible?: boolean;
49
+ badgeContentFontSize?: number | string;
50
+ onClick: () => void;
51
+ children: ReactNode;
52
+ sx?: Record<string, unknown>;
53
+ badgeSX?: Record<string, unknown>;
54
+ };
55
+ declare const AmenityButton: FC<AmenityButtonProps>;
56
+
33
57
  type BaseLayoutProps = {
34
58
  hideHeader?: boolean;
35
59
  logoLinks: ReactElement[] | ReactElement;
@@ -334,13 +358,6 @@ declare const CommuteIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime
334
358
 
335
359
  declare const PinIcon: ({ sx, ...props }: SvgIconProps) => react_jsx_runtime.JSX.Element;
336
360
 
337
- type FilterButtonProps = {
338
- small?: boolean;
339
- badgeContent?: ReactNode;
340
- onClick?: () => void;
341
- } & ButtonProps;
342
- declare const FilterButton: FC<FilterButtonProps>;
343
-
344
361
  type ModalsProps = {
345
362
  payload?: Record<any, any> | undefined;
346
363
  DialogProps: {
@@ -565,7 +582,7 @@ type FieldProps = {
565
582
  InputProps?: InputProps;
566
583
  wrapperSx?: SxProps$1<Theme>;
567
584
  };
568
- declare const TextField: react.ForwardRefExoticComponent<(Omit<FieldProps & _mui_material.FilledTextFieldProps, "ref"> | Omit<FieldProps & _mui_material.OutlinedTextFieldProps, "ref"> | Omit<FieldProps & _mui_material.StandardTextFieldProps, "ref">) & react.RefAttributes<HTMLInputElement>>;
585
+ declare const TextField: react.ForwardRefExoticComponent<(Omit<FieldProps & _mui_material.OutlinedTextFieldProps, "ref"> | Omit<FieldProps & _mui_material.FilledTextFieldProps, "ref"> | Omit<FieldProps & _mui_material.StandardTextFieldProps, "ref">) & react.RefAttributes<HTMLInputElement>>;
569
586
 
570
587
  declare const HelperText: FC<{
571
588
  error: string | null;
@@ -595,10 +612,25 @@ type PopoverProps = {
595
612
  };
596
613
  declare const Popover: FC<PopoverProps>;
597
614
 
598
- type CopyButton = {
599
- onClick: (val: (text: string) => void) => void;
600
- };
601
- declare const CopyButton: FC<CopyButton>;
615
+ type SmartTableColumn<T> = {
616
+ name: string;
617
+ title?: string | ReactNode;
618
+ minWidth: number;
619
+ sizingSuffix?: string;
620
+ growCoefficient?: number;
621
+ getValue: (item: T, index?: number) => string | ReactNode;
622
+ sx?: SxProps;
623
+ };
624
+ type Align = 'left' | 'center' | 'right' | 'inherit' | 'justify' | undefined;
625
+ type TableProps<T> = {
626
+ rowHeight?: number;
627
+ getUniqueId?: (item: T, index?: number) => string | number;
628
+ align?: Align;
629
+ minWidth?: number;
630
+ columns: SmartTableColumn<T>[];
631
+ data: T[];
632
+ };
633
+ declare function Table<T>({ rowHeight, getUniqueId, align, minWidth, columns, data, }: TableProps<T>): JSX$1.Element;
602
634
 
603
635
  declare const useResponsive: () => {
604
636
  isMobile: boolean;
@@ -651,4 +683,4 @@ declare const getDestination: (state: Record<string, unknown>, key: string) => {
651
683
  [key: string]: string;
652
684
  };
653
685
 
654
- export { AmenityTags, AreasForm, BaseLayout, BeachesIcon, BedIcon, BedroomsForm, BikeIcon, type Block, BudgetForm, BusIcon, BusTagIcon, Button, COMMUTE_METHODS, CarIcon, CardImage, type Commute, CommuteForm, CommuteIcon, type CommuteLocation, CommuteMethod, type CommutePin, CopyButton, EmptyDefaultImage, ErrorBoundary, type FieldProps, FilterButton, FiltersIcon, FiltersModal, FooterButtons, GymIcon, HelperText, LazyLoadImage, LifestyleForm, type LifestyleFormProps, ListHeader, Loader, type MapProps, MapTags, MapWrapper, type MethodType, ModalBase, ModalContainer, type ModalContainerProps, ModalFooter, ModalHeader, ModalsContext, type ModalsProps, ModalsProvider, Onboarding, OnboardingStepLayout, ParksIcon, type PinFeature, PinIcon, Polygon, Popover, Powered, PropertiesList, PropertyCard, type PropertyCardType, PropertyTag, PropertyTypeForm, type PropertyTypeFormProps, RentBuyForm, type RentBuyFormProps, RestaurantsIcon, SchoolsIcon, SearchsmartlyLogo, ShopIcon, SlickCarousel, SliderChart, Snackbar, StarIcon, Tag, type TagProps, TextField, ThemeProvider, Tooltip, TooltipTitle, Transition, WalkIcon, amenityTagConfig, currencyFormatterProperty, formatPrice, getAmenityTags, getBedroomsText, getDestination, getFormattedTime, iconsMap, minuteFormatter, pluralize, renderPlural, scrollIntoView, thresholds, titleCase, useClipboardFallback, useModal, useModalProvider, usePrevious, useResponsive, useWindowSize };
686
+ export { type Align, AmenityButton, type AmenityButtonProps, AmenityTags, AreasForm, BaseLayout, BeachesIcon, BedIcon, BedroomsForm, BikeIcon, type Block, BudgetForm, BusIcon, BusTagIcon, Button, COMMUTE_METHODS, CarIcon, CardImage, type Commute, CommuteForm, CommuteIcon, type CommuteLocation, CommuteMethod, type CommutePin, CopyButton, EmptyDefaultImage, ErrorBoundary, type FieldProps, FilterButton, FiltersIcon, FiltersModal, FooterButtons, GymIcon, HelperText, LazyLoadImage, LifestyleForm, type LifestyleFormProps, ListHeader, Loader, type MapProps, MapTags, MapWrapper, type MethodType, ModalBase, ModalContainer, type ModalContainerProps, ModalFooter, ModalHeader, ModalsContext, type ModalsProps, ModalsProvider, Onboarding, OnboardingStepLayout, ParksIcon, type PinFeature, PinIcon, Polygon, Popover, Powered, PropertiesList, PropertyCard, type PropertyCardType, PropertyTag, PropertyTypeForm, type PropertyTypeFormProps, RentBuyForm, type RentBuyFormProps, RestaurantsIcon, SchoolsIcon, SearchsmartlyLogo, ShopIcon, SlickCarousel, SliderChart, type SmartTableColumn, Snackbar, StarIcon, Table, type TableProps, Tag, type TagProps, TextField, ThemeProvider, Tooltip, TooltipTitle, Transition, WalkIcon, amenityTagConfig, currencyFormatterProperty, formatPrice, getAmenityTags, getBedroomsText, getDestination, getFormattedTime, iconsMap, minuteFormatter, pluralize, renderPlural, scrollIntoView, thresholds, titleCase, useClipboardFallback, useModal, useModalProvider, usePrevious, useResponsive, useWindowSize };