design-system-silkhaus 2.3.0-beta.travel-list.35 → 2.3.0

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
@@ -1,5 +1,6 @@
1
1
  import { CalendarDayShape } from 'react-dates';
2
2
  import { ClassProp } from 'class-variance-authority/types';
3
+ import { ClassValue } from 'clsx';
3
4
  import { default as default_2 } from 'react';
4
5
  import { FC } from 'react';
5
6
  import { ForwardRefExoticComponent } from 'react';
@@ -11,8 +12,6 @@ import { PropsWithChildren } from 'react';
11
12
  import * as React_2 from 'react';
12
13
  import { ReactNode } from 'react';
13
14
  import { RefAttributes } from 'react';
14
- import { toast as toast_2 } from 'react-toastify';
15
- import { ToastContainerProps as ToastContainerProps_2 } from 'react-toastify';
16
15
  import { VariantProps } from 'class-variance-authority';
17
16
 
18
17
  export declare const Accordion: default_2.ForwardRefExoticComponent<AccordionProps & default_2.RefAttributes<HTMLDivElement>>;
@@ -36,10 +35,6 @@ export declare interface AccordionProps {
36
35
  isCollapseOnlyOnHeaderClick?: boolean;
37
36
  }
38
37
 
39
- declare type ActionButtonProps = {
40
- label: string;
41
- } & ButtonProps;
42
-
43
38
  export declare const ActionFooter: default_2.ForwardRefExoticComponent<ActionFooterProps & default_2.RefAttributes<HTMLDivElement>>;
44
39
 
45
40
  export declare interface ActionFooterProps {
@@ -58,8 +53,8 @@ export declare const AlertDialog: default_2.ForwardRefExoticComponent<AlertDialo
58
53
  export declare interface AlertDialogProps {
59
54
  outerDivClassName?: string;
60
55
  banner?: string;
61
- title: ReactNode;
62
- description?: ReactNode;
56
+ title: string;
57
+ description?: string;
63
58
  disablePrimaryBtn: boolean;
64
59
  showPrimaryBtn: boolean;
65
60
  disableSecondaryBtn: boolean;
@@ -73,7 +68,7 @@ export declare interface AlertDialogProps {
73
68
  export declare const AnimatedModal: ForwardRefExoticComponent<AnimatedModalProps & RefAttributes<HTMLDivElement>>;
74
69
 
75
70
  export declare interface AnimatedModalProps extends HTMLAttributes<HTMLDivElement> {
76
- show?: boolean;
71
+ show: boolean;
77
72
  handleClose?: () => void;
78
73
  animation?: 'slideUp' | 'slideDown' | 'fadeIn';
79
74
  /**
@@ -92,6 +87,14 @@ export declare interface AnimatedModalProps extends HTMLAttributes<HTMLDivElemen
92
87
  contentClassName?: string;
93
88
  }
94
89
 
90
+ export declare const ArrowRightIcon: FC<{
91
+ className?: string;
92
+ }>;
93
+
94
+ export declare const ArrowUndoIcon: FC<{
95
+ className?: string;
96
+ }>;
97
+
95
98
  export declare const Asterisk: default_2.ForwardRefExoticComponent<AsteriskProps & default_2.RefAttributes<HTMLSpanElement>>;
96
99
 
97
100
  declare interface AsteriskProps {
@@ -130,10 +133,6 @@ export declare interface BookingQuoteLineItemType {
130
133
  description?: string;
131
134
  }
132
135
 
133
- export declare const BuildingIcon: FC<{
134
- className?: string;
135
- }>;
136
-
137
136
  export declare const Button: default_2.ForwardRefExoticComponent<ButtonProps & default_2.RefAttributes<HTMLButtonElement>>;
138
137
 
139
138
  export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -144,20 +143,6 @@ export declare interface ButtonProps extends default_2.ButtonHTMLAttributes<HTML
144
143
  endIcon?: default_2.ReactNode;
145
144
  trackingId?: string;
146
145
  selected?: boolean;
147
- helperText?: string;
148
- /**
149
- * classes to apply on the outer most container which contains
150
- * the button and the helper text
151
- */
152
- className?: string;
153
- /**
154
- * classes to apply on button element
155
- */
156
- buttonClassName?: string;
157
- /**
158
- * classes to apply on the helper text
159
- */
160
- helpterTextClassName?: string;
161
146
  }
162
147
 
163
148
  export declare const ButtonsGroupSelector: default_2.ForwardRefExoticComponent<ButtonsGroupSelectorProps & default_2.RefAttributes<HTMLDivElement>>;
@@ -230,14 +215,6 @@ export declare interface CheckboxProps extends HTMLAttributes<HTMLDivElement> {
230
215
  disabled?: boolean;
231
216
  }
232
217
 
233
- export declare const CheckmarkCircleIcon: FC<{
234
- className?: string;
235
- }>;
236
-
237
- export declare const CheckmarkIcon: FC<{
238
- className?: string;
239
- }>;
240
-
241
218
  export declare const ChevronLeftRegularIcon: FC<{
242
219
  className?: string;
243
220
  }>;
@@ -246,18 +223,12 @@ export declare const ChevronRightRegularIcon: FC<{
246
223
  className?: string;
247
224
  }>;
248
225
 
249
- export declare const ClipboardIcon: FC<{
250
- className?: string;
251
- }>;
252
-
253
- export declare const ClipboardSolidIcon: FC<{
254
- className?: string;
255
- }>;
256
-
257
226
  export declare const CloseIcon: FC<{
258
227
  className?: string;
259
228
  }>;
260
229
 
230
+ export declare function cn(...inputs: ClassValue[]): string;
231
+
261
232
  export declare const DateRangePicker: default_2.ForwardRefExoticComponent<DateRangePickerProps & default_2.RefAttributes<HTMLDivElement>>;
262
233
 
263
234
  declare interface DateRangePickerProps {
@@ -294,12 +265,6 @@ declare interface DateRangePickerProps {
294
265
  isAdjustHeightForViewport?: boolean;
295
266
  }
296
267
 
297
- export declare const DeleteIcon: FC<{
298
- className?: string;
299
- }>;
300
-
301
- export declare const desktopMinWidth: number;
302
-
303
268
  export declare const DesktopTooltip: FC<PropsWithChildren<TooltipProps>>;
304
269
 
305
270
  export declare const Dialog: ForwardRefExoticComponent<DialogProps & RefAttributes<HTMLDivElement>>;
@@ -308,26 +273,14 @@ export declare interface DialogProps extends HTMLAttributes<HTMLDivElement> {
308
273
  open: boolean;
309
274
  }
310
275
 
311
- export declare const DialogV2: FC<DialogV2Props>;
312
-
313
- export declare type DialogV2Props = {
314
- className?: string;
315
- title: string;
316
- subTitle?: string;
317
- dialogContainerClassname?: string;
318
- dialogHeaderClassname?: string;
319
- dialogBodyClassname?: string;
320
- dialogFooterClassname?: string;
321
- dialogBody: ReactNode;
322
- show: boolean;
323
- onClose?: () => void;
324
- actionButtons?: ActionButtonProps[];
325
- };
276
+ export declare const DUE_TODAY = "due_today";
326
277
 
327
278
  export declare const FilterIcon: FC<{
328
279
  className?: string;
329
280
  }>;
330
281
 
282
+ export declare const formatCurrency: (val: number, currency?: string) => string;
283
+
331
284
  export declare const Grid: React_2.ForwardRefExoticComponent<GridProps & React_2.RefAttributes<HTMLDivElement>>;
332
285
 
333
286
  export declare interface GridProps extends React_2.HTMLAttributes<HTMLDivElement>, Omit<GridVariantProps, 'optional'> {
@@ -341,12 +294,12 @@ declare const gridVariants: (props?: ({
341
294
  gap?: "gap0" | "gap100" | "gap150" | "gap200" | "gap300" | "gap400" | "gap600" | "gap800" | "gap1000" | "gap1200" | "gap1600" | "gap2000" | null | undefined;
342
295
  gapX?: "gap0" | "gap100" | "gap150" | "gap200" | "gap300" | "gap400" | "gap600" | "gap800" | "gap1000" | "gap1200" | "gap1600" | "gap2000" | null | undefined;
343
296
  gapY?: "gap0" | "gap100" | "gap150" | "gap200" | "gap300" | "gap400" | "gap600" | "gap800" | "gap1000" | "gap1200" | "gap1600" | "gap2000" | null | undefined;
344
- justifyContent?: "end" | "start" | "normal" | "center" | "between" | "around" | "evenly" | "stretch" | null | undefined;
345
- justifyItems?: "end" | "start" | "center" | "stretch" | null | undefined;
346
- alignContent?: "end" | "start" | "normal" | "center" | "between" | "around" | "evenly" | "stretch" | "baseline" | null | undefined;
347
- alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
348
- placeContent?: "end" | "start" | "center" | "between" | "around" | "evenly" | "stretch" | "baseline" | null | undefined;
349
- placeItems?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
297
+ justifyContent?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch" | null | undefined;
298
+ justifyItems?: "start" | "end" | "center" | "stretch" | null | undefined;
299
+ alignContent?: "normal" | "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch" | "baseline" | null | undefined;
300
+ alignItems?: "start" | "end" | "center" | "stretch" | "baseline" | null | undefined;
301
+ placeContent?: "start" | "end" | "center" | "between" | "around" | "evenly" | "stretch" | "baseline" | null | undefined;
302
+ placeItems?: "start" | "end" | "center" | "stretch" | "baseline" | null | undefined;
350
303
  } & ClassProp) | undefined) => string;
351
304
 
352
305
  export declare const HandCursorTapIcon: FC<{
@@ -371,15 +324,11 @@ export declare interface ImageCarouselProps extends default_2.HTMLAttributes<HTM
371
324
  images: string[];
372
325
  }
373
326
 
374
- export declare const InfoIcon: FC<{
375
- className?: string;
376
- }>;
377
-
378
327
  export declare const Input: default_2.ForwardRefExoticComponent<InputProps & default_2.RefAttributes<HTMLInputElement>>;
379
328
 
380
329
  export declare interface InputProps extends default_2.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement> {
381
330
  textarea?: true | false | undefined;
382
- label?: default_2.ReactNode | undefined;
331
+ label?: string | undefined;
383
332
  caption?: string | undefined;
384
333
  color?: 'primary' | 'success' | 'error' | 'primaryRounded' | 'errorRounded' | 'disabled';
385
334
  required?: boolean;
@@ -403,6 +352,13 @@ export declare interface InputProps extends default_2.InputHTMLAttributes<HTMLIn
403
352
  onNumberUpdate?: (val: number | '') => void;
404
353
  }
405
354
 
355
+ export declare const INSTALLMENT = "installment";
356
+
357
+ declare interface KeyMapping<SourceKey extends keyof PaymentRadioInputProps, DestinationKey extends string> {
358
+ sourceKey: SourceKey;
359
+ destinationKey: DestinationKey;
360
+ }
361
+
406
362
  export declare const ListingCard: default_2.ForwardRefExoticComponent<ListingCardProps & default_2.RefAttributes<HTMLDivElement>>;
407
363
 
408
364
  export declare type ListingCardProps = {
@@ -420,15 +376,8 @@ export declare type ListingCardProps = {
420
376
  totalPrice: string;
421
377
  slashedTotalPrice?: string;
422
378
  onClick: () => void;
423
- selectable?: boolean;
424
- selectionState?: SelectionStateEnum;
425
- onViewListingClick?: () => void;
426
379
  };
427
380
 
428
- export declare const LocationIcon: FC<{
429
- className?: string;
430
- }>;
431
-
432
381
  export declare const LongTermBanner: default_2.ForwardRefExoticComponent<LongTermBannerProps & default_2.RefAttributes<HTMLDivElement>>;
433
382
 
434
383
  export declare interface LongTermBannerProps {
@@ -440,10 +389,6 @@ export declare interface LongTermBannerProps {
440
389
  className?: string;
441
390
  }
442
391
 
443
- export declare const MagnifyGlassIcon: FC<{
444
- className?: string;
445
- }>;
446
-
447
392
  export declare const MobileFilterMenu: ForwardRefExoticComponent<MobileFilterMenuProps & RefAttributes<HTMLDivElement>>;
448
393
 
449
394
  export declare interface MobileFilterMenuProps extends HTMLAttributes<HTMLDivElement> {
@@ -470,14 +415,9 @@ export declare interface MobileMultiSelectFilterDropDownProps extends HTMLAttrib
470
415
  placeholder?: string;
471
416
  selected?: boolean;
472
417
  setCheckBoxValue?: boolean;
473
- /**
474
- * @deprecated use `icon` instead to pass a react node
475
- */
476
418
  dropdownIcon?: string;
477
- icon?: React.ReactNode;
478
419
  error?: string;
479
420
  noDataError?: string;
480
- disabled?: boolean;
481
421
  }
482
422
 
483
423
  export declare const MobileSelectCardDropDown: ForwardRefExoticComponent<MobileSelectCardDropDownProps & RefAttributes<HTMLDivElement>>;
@@ -495,14 +435,9 @@ export declare interface MobileSelectCardDropDownProps extends HTMLAttributes<HT
495
435
  }) => void;
496
436
  placeholder?: string;
497
437
  selected?: boolean;
498
- /**
499
- * @deprecated use `icon` instead to pass a react node
500
- */
501
438
  dropdownIcon?: string;
502
- icon?: React.ReactNode;
503
439
  error?: string;
504
440
  noDataError?: string;
505
- disabled?: boolean;
506
441
  }
507
442
 
508
443
  export declare const MobileTootip: FC<PropsWithChildren<TooltipProps>>;
@@ -511,27 +446,105 @@ export declare const MoonIcon: FC<{
511
446
  className?: string;
512
447
  }>;
513
448
 
514
- export declare const OpenNewIcon: FC<{
515
- className?: string;
516
- }>;
517
-
518
449
  declare interface Option_2 {
519
450
  label: string;
520
451
  id?: number | 'All';
521
452
  }
522
453
  export { Option_2 as Option }
523
454
 
524
- export declare const PencilIcon: FC<{
455
+ declare const PaymentItem_2: default_2.FC<PaymentScheduleItemProps>;
456
+ export { PaymentItem_2 as PaymentItem }
457
+
458
+ export declare const PaymentRadioGroup: React.FC<PaymentRadioGroupProps>;
459
+
460
+ export declare interface PaymentRadioGroupInputProps {
461
+ id: string;
462
+ name: string;
463
+ label: string | React.ReactNode;
464
+ price: string | React.ReactNode;
465
+ description?: string | React.ReactNode;
466
+ selectionContent?: React.ReactNode;
525
467
  className?: string;
526
- }>;
468
+ }
527
469
 
528
- export declare const PlusCircleIcon: FC<{
470
+ export declare interface PaymentRadioGroupProps {
471
+ options: PaymentRadioGroupInputProps[];
529
472
  className?: string;
530
- }>;
473
+ defaultValue?: string;
474
+ keyMappings?: Array<KeyMapping<keyof PaymentRadioGroupInputProps, string>>;
475
+ onChange: (selectedOption: Record<string, string> | PaymentRadioGroupInputProps) => void;
476
+ }
477
+
478
+ export declare const PaymentRadioInput: default_2.FC<PaymentRadioInputProps>;
531
479
 
532
- export declare const PreviewIcon: FC<{
480
+ export declare interface PaymentRadioInputProps {
481
+ id: string;
482
+ name: string;
483
+ label: string | default_2.ReactNode;
484
+ price: string | default_2.ReactNode;
485
+ description?: string | default_2.ReactNode;
486
+ checked?: boolean;
487
+ selectionContent?: default_2.ReactNode;
533
488
  className?: string;
534
- }>;
489
+ onChange: (id: string) => void;
490
+ }
491
+
492
+ export declare const PaymentSchedule: default_2.FC<PaymentScheduleProps>;
493
+
494
+ export declare type PaymentScheduleItemProps = {
495
+ date: string;
496
+ title: string;
497
+ amount: string;
498
+ /**
499
+ * Define the status of the payment entry
500
+ * @default 'scheduled'
501
+ */
502
+ state?: 'completed' | 'next-due' | 'scheduled' | 'failed';
503
+ /**
504
+ * Define the position of the payment entry in the payment schedule
505
+ * @default 'in-between'
506
+ */
507
+ positionInSchedule?: 'first' | 'last' | 'in-between';
508
+ };
509
+
510
+ export declare const PaymentSchedulePreview: default_2.FC<PaymentSchedulePreviewProps>;
511
+
512
+ export declare const PaymentSchedulePreviewItem: default_2.FC<PaymentSchedulePreviewItemProps>;
513
+
514
+ export declare interface PaymentSchedulePreviewItemProps {
515
+ keyId: typeof DUE_TODAY | typeof SECURITY_DEPOSIT_REFUND | typeof INSTALLMENT;
516
+ displayName: string | default_2.ReactNode;
517
+ subText?: string | default_2.ReactNode;
518
+ amount: number;
519
+ className?: string;
520
+ currency: string;
521
+ }
522
+
523
+ export declare interface PaymentSchedulePreviewProps {
524
+ className?: string;
525
+ totalAmount: number;
526
+ currency: string;
527
+ dateFormat?: string;
528
+ popupDateFormat?: string;
529
+ items: {
530
+ keyId: typeof DUE_TODAY | typeof INSTALLMENT | typeof SECURITY_DEPOSIT_REFUND;
531
+ displayName?: string;
532
+ amount: number;
533
+ date: string;
534
+ className?: string;
535
+ subText?: string;
536
+ popupDate?: string;
537
+ popupTitle?: string;
538
+ }[];
539
+ noOfInstallmentsToShow?: number;
540
+ otherTotalCount?: number;
541
+ showDetailsModalTitle?: string;
542
+ }
543
+
544
+ export declare type PaymentScheduleProps = {
545
+ className?: string;
546
+ paymentItems: PaymentScheduleItemProps[];
547
+ };
535
548
 
536
549
  export declare const PriceRangeSlider: default_2.FC<PriceRangeSliderProps>;
537
550
 
@@ -552,7 +565,6 @@ export declare interface PriceRangeSliderProps {
552
565
  onPriceRangeChange?: (value: [number | '', number | '']) => void;
553
566
  currency?: string;
554
567
  value?: [number | '', number | ''];
555
- disabled?: boolean;
556
568
  }
557
569
 
558
570
  export declare const PromoDialog: default_2.ForwardRefExoticComponent<PromoDialogProps & default_2.RefAttributes<HTMLDivElement>>;
@@ -616,31 +628,7 @@ export declare const RulerRegularIcon: FC<{
616
628
 
617
629
  export declare type ScreenSize = 'mobile' | 'tablet' | 'desktop';
618
630
 
619
- export declare enum SelectionStateEnum {
620
- None = "none",
621
- Selected = "selected",
622
- Added = "added"
623
- }
624
-
625
- export declare const SelectPopover: ForwardRefExoticComponent<SelectPopoverProps & RefAttributes<HTMLDivElement>>;
626
-
627
- export declare interface SelectPopoverProps {
628
- showPopup?: boolean;
629
- mobileContainerClassname?: string;
630
- desktopContainerClassname?: string;
631
- maxWidth?: string;
632
- options?: Array<{
633
- label: string;
634
- icon: string | ReactNode;
635
- value: string;
636
- }>;
637
- onOptionSelected?: (value: string) => void;
638
- handleClose?: () => void;
639
- }
640
-
641
- export declare const ShareIcon: FC<{
642
- className?: string;
643
- }>;
631
+ export declare const SECURITY_DEPOSIT_REFUND = "security_deposit_refund";
644
632
 
645
633
  export declare const SlickImageCarousel: default_2.ForwardRefExoticComponent<SlickImageCarouselProps & default_2.RefAttributes<HTMLDivElement>>;
646
634
 
@@ -680,25 +668,6 @@ export declare interface StepperProps {
680
668
  outerMobileDivClass?: string;
681
669
  }
682
670
 
683
- export declare const StepsList: FC<StepsListProps>;
684
-
685
- export declare const StepsListItem: FC<StepsListItemProps>;
686
-
687
- export declare type StepsListItemProps = {
688
- title: string;
689
- description: string;
690
- IconComponent: FC<{
691
- className?: string;
692
- }>;
693
- iconClassName?: string;
694
- className?: string;
695
- };
696
-
697
- export declare type StepsListProps = {
698
- steps: StepsListItemProps[];
699
- className?: string;
700
- };
701
-
702
671
  export declare const Switch: default_2.ForwardRefExoticComponent<SwitchProps & default_2.RefAttributes<HTMLInputElement>>;
703
672
 
704
673
  export declare interface SwitchProps {
@@ -708,17 +677,11 @@ export declare interface SwitchProps {
708
677
  htmlId?: string;
709
678
  }
710
679
 
711
- export declare const tabletMinWidth: number;
712
-
713
680
  declare type TagProps = {
714
681
  icon: default_2.ReactNode;
715
682
  label: string;
716
683
  };
717
684
 
718
- export declare const ThreeDotsCircleIcon: FC<{
719
- className?: string;
720
- }>;
721
-
722
685
  export declare const Timer: default_2.ForwardRefExoticComponent<TimerProps & default_2.RefAttributes<HTMLDivElement>>;
723
686
 
724
687
  export declare interface TimerProps {
@@ -727,12 +690,6 @@ export declare interface TimerProps {
727
690
  outerDivClass?: string;
728
691
  }
729
692
 
730
- export declare const toast: typeof toast_2;
731
-
732
- export declare const ToastContainer: FC<ToastContainerProps>;
733
-
734
- export declare type ToastContainerProps = ToastContainerProps_2;
735
-
736
693
  export declare const ToggleCard: default_2.ForwardRefExoticComponent<ToggleCardProps & default_2.RefAttributes<HTMLDivElement>>;
737
694
 
738
695
  export declare interface ToggleCardProps extends HTMLAttributes<HTMLDivElement> {
@@ -811,50 +768,6 @@ export declare interface TopNavContainerMobileProps extends HTMLAttributes<HTMLD
811
768
  buttonText: string;
812
769
  }
813
770
 
814
- export declare const TrashIcon: FC<{
815
- className?: string;
816
- }>;
817
-
818
- export declare const TravelList: default_2.ForwardRefExoticComponent<TravelListProps & default_2.RefAttributes<HTMLDivElement>>;
819
-
820
- export declare const TravelListItem: default_2.ForwardRefExoticComponent<TravelListItemProps & default_2.RefAttributes<HTMLDivElement>>;
821
-
822
- export declare interface TravelListItemProps {
823
- title?: string;
824
- homeCount?: number;
825
- location?: string;
826
- dates?: string;
827
- budget?: string;
828
- shareLink?: string;
829
- onClickEditBtn?: () => void;
830
- onClickViewBtn?: () => void;
831
- onClickShareBtn?: () => void;
832
- hideEdit?: boolean;
833
- hideShare?: boolean;
834
- }
835
-
836
- export declare const TravelListPropertyItem: default_2.ForwardRefExoticComponent<TravelListPropertyItemProps & default_2.RefAttributes<HTMLDivElement>>;
837
-
838
- export declare interface TravelListPropertyItemProps {
839
- className?: string;
840
- title?: string;
841
- neighborhood?: string;
842
- bedroom?: string;
843
- area?: string;
844
- price?: string;
845
- guests?: string;
846
- imageUrl?: string;
847
- onOpenLinkClick?: () => void;
848
- onDeleteBtnClick?: () => void;
849
- isUnavailable?: boolean;
850
- }
851
-
852
- export declare interface TravelListProps extends default_2.PropsWithChildren {
853
- items?: TravelListItemProps[];
854
- hideShare?: boolean;
855
- hideEdit?: boolean;
856
- }
857
-
858
771
  export declare const TwoColumnDialog: ForwardRefExoticComponent<TwoColumnDialogProps & RefAttributes<HTMLDivElement>>;
859
772
 
860
773
  export declare interface TwoColumnDialogProps extends HTMLAttributes<HTMLDivElement> {