@duffel/components 3.3.1--canary.5 → 3.3.2

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.
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ import { Place } from "./lib/getPlacesFromMapboxClient";
3
+ export interface MapboxPlacesLookupProps {
4
+ mapboxPublicKey: string;
5
+ onPlaceSelected: (selection: Place) => void;
6
+ placeholder?: string;
7
+ inputClassName?: string;
8
+ }
9
+ export declare const MapboxPlacesLookup: React.FC<MapboxPlacesLookupProps>;
@@ -0,0 +1,13 @@
1
+ import { MapboxPlacesLookupProps } from "./MapboxPlacesLookup";
2
+ declare const CUSTOM_ELEMENT_TAG = "duffel-mapbox-places-lookup";
3
+ declare global {
4
+ namespace JSX {
5
+ interface IntrinsicElements {
6
+ [CUSTOM_ELEMENT_TAG]: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
7
+ }
8
+ }
9
+ }
10
+ type MapboxPlacesLookupCustomElementRenderArguments = Pick<MapboxPlacesLookupProps, "mapboxPublicKey" | "placeholder" | "inputClassName">;
11
+ export declare function renderMapboxPlacesLookupCustomElement(props: MapboxPlacesLookupCustomElementRenderArguments): void;
12
+ export declare function onMapboxPlacesLookupPlaceSelected(onPlaceSelected: MapboxPlacesLookupProps["onPlaceSelected"]): void;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface Place {
2
+ name: string;
3
+ longitude: string;
4
+ latitude: string;
5
+ shortName: string;
6
+ }
7
+ export declare function getPlacesFromMapboxClient(publicKey: string): (query: string) => Promise<Place[]>;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ export declare const hrefToComponentStyles: string;
2
3
  type WithComponentStylesProps = {
3
4
  children?: React.ReactNode;
4
5
  };
@@ -8,3 +8,4 @@ export { renderDuffelStaysRatingCustomElement } from "./components/Stays/StaysRa
8
8
  export { renderDuffelStaysAmenitiesCustomElement } from "./components/Stays/StaysAmenitiesCustomElement";
9
9
  export { renderDuffelStaysSummaryCustomElement } from "./components/Stays/StaysSummaryCustomElement";
10
10
  export { renderDuffelStaysRoomRateCardCustomElement } from "./components/Stays/StaysRoomRateCardCustomElement";
11
+ export { renderMapboxPlacesLookupCustomElement, onMapboxPlacesLookupPlaceSelected, } from "./components/MapboxPlacesLookup/MapboxPlacesLookupCustomElement";