@sellout/ui 0.0.398 → 0.0.400
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/build/Colors.d.ts +37 -37
- package/build/Colors.js +38 -38
- package/build/Colors.js.map +1 -1
- package/build/components/AddressSearchDropdown.d.ts +31 -31
- package/build/components/AddressSearchDropdown.js +101 -101
- package/build/components/AddressSearchDropdown.js.map +1 -1
- package/build/components/Button.d.ts +51 -51
- package/build/components/Button.js +252 -267
- package/build/components/Button.js.map +1 -1
- package/build/components/CodeInput.d.ts +22 -22
- package/build/components/CodeInput.js +90 -91
- package/build/components/CodeInput.js.map +1 -1
- package/build/components/Counter.d.ts +9 -9
- package/build/components/Counter.js +17 -18
- package/build/components/Counter.js.map +1 -1
- package/build/components/Dropdown.d.ts +40 -40
- package/build/components/Dropdown.js +41 -44
- package/build/components/Dropdown.js.map +1 -1
- package/build/components/Flex.d.ts +14 -14
- package/build/components/Flex.js +6 -6
- package/build/components/Flex.js.map +1 -1
- package/build/components/FormattedInput.d.ts +34 -34
- package/build/components/FormattedInput.js +66 -70
- package/build/components/FormattedInput.js.map +1 -1
- package/build/components/FormattedfullInput.d.ts +32 -32
- package/build/components/FormattedfullInput.js +66 -70
- package/build/components/FormattedfullInput.js.map +1 -1
- package/build/components/Icon.d.ts +219 -219
- package/build/components/Icon.js +28 -29
- package/build/components/Icon.js.map +1 -1
- package/build/components/Icons.d.ts +190 -190
- package/build/components/Icons.js +189 -189
- package/build/components/Icons.js.map +1 -1
- package/build/components/Input.d.ts +77 -77
- package/build/components/Input.js +165 -176
- package/build/components/Input.js.map +1 -1
- package/build/components/InputOld.d.ts +23 -23
- package/build/components/Label.d.ts +16 -16
- package/build/components/Label.js +14 -14
- package/build/components/Label.js.map +1 -1
- package/build/components/Loader.d.ts +14 -14
- package/build/components/Loader.js +29 -29
- package/build/components/Loader.js.map +1 -1
- package/build/components/MaxLength.d.ts +8 -8
- package/build/components/MaxLength.js +12 -12
- package/build/components/MaxLength.js.map +1 -1
- package/build/components/Motion.d.ts +30 -30
- package/build/components/Motion.js +33 -33
- package/build/components/Motion.js.map +1 -1
- package/build/components/PhoneNumberInput.d.ts +36 -36
- package/build/components/PhoneNumberInput.js +37 -40
- package/build/components/PhoneNumberInput.js.map +1 -1
- package/build/components/Product.d.ts +35 -35
- package/build/components/Product.js +111 -110
- package/build/components/Product.js.map +1 -1
- package/build/components/SearchDropdown.d.ts +41 -41
- package/build/components/SearchDropdown.js +60 -59
- package/build/components/SearchDropdown.js.map +1 -1
- package/build/components/SvgIcons.d.ts +15 -15
- package/build/components/SvgIcons.js +35 -35
- package/build/components/SvgIcons.js.map +1 -1
- package/build/components/SvgRendrer.d.ts +5 -5
- package/build/components/SvgRendrer.js +14 -14
- package/build/components/SvgRendrer.js.map +1 -1
- package/build/components/TextButton.d.ts +21 -21
- package/build/components/TextButton.js +39 -40
- package/build/components/TextButton.js.map +1 -1
- package/build/components/Tip.d.ts +7 -7
- package/build/components/Tip.js +10 -10
- package/build/components/Tip.js.map +1 -1
- package/build/components/UserImage.d.ts +13 -13
- package/build/components/UserImage.js +28 -29
- package/build/components/UserImage.js.map +1 -1
- package/build/components/UserInfo.d.ts +24 -24
- package/build/components/UserInfo.js +31 -31
- package/build/components/UserInfo.js.map +1 -1
- package/build/components/ValidationError.d.ts +7 -7
- package/build/components/ValidationError.js +17 -17
- package/build/components/ValidationError.js.map +1 -1
- package/build/index.d.ts +29 -29
- package/build/node_modules/tslib/tslib.es6.js +97 -0
- package/build/node_modules/tslib/tslib.es6.js.map +1 -0
- package/build/utils/ErrorUtil.d.ts +1 -1
- package/build/utils/ErrorUtil.js +15 -15
- package/build/utils/ErrorUtil.js.map +1 -1
- package/build/utils/MediaQuery.d.ts +18 -18
- package/build/utils/MediaQuery.js +59 -59
- package/build/utils/MediaQuery.js.map +1 -1
- package/build/utils/Validation.d.ts +6 -6
- package/build/utils/Validation.js +44 -44
- package/build/utils/Validation.js.map +1 -1
- package/build/utils/makeEventHandler.d.ts +1 -1
- package/build/utils/makeEventHandler.js +8 -8
- package/build/utils/makeEventHandler.js.map +1 -1
- package/package.json +6 -6
- package/build/_virtual/_tslib.js.map +0 -1
package/build/Colors.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
export declare enum Colors {
|
|
2
|
-
White = "#FFFFFF",
|
|
3
|
-
Black = "#000000",
|
|
4
|
-
Black2 = "#141414",
|
|
5
|
-
Yellow = "#FFBA49",
|
|
6
|
-
Green = "#42BB83",
|
|
7
|
-
OffWhite = "#FCFCFC",
|
|
8
|
-
LightBlue = "#39159C",
|
|
9
|
-
Secondary = "#1E1E1E",
|
|
10
|
-
Blue = "#2D0E84",
|
|
11
|
-
DarkBlue = "#1D0858",
|
|
12
|
-
Red = "#E63946",
|
|
13
|
-
Orange = "#FF700F",
|
|
14
|
-
FadedOrange = "#FFF1E7",
|
|
15
|
-
LightOrange = "#FFBE93",
|
|
16
|
-
DarkOrange = "#D65600",
|
|
17
|
-
Grey1 = "#333333",
|
|
18
|
-
Grey2 = "#4F4F4F",
|
|
19
|
-
Grey3 = "#828282",
|
|
20
|
-
Grey4 = "#BDBDBD",
|
|
21
|
-
Grey5 = "#E0E0E0",
|
|
22
|
-
Grey6 = "#F2F2F2",
|
|
23
|
-
Grey7 = "#F8F8F8",
|
|
24
|
-
Grey8 = "#424242",
|
|
25
|
-
Purple = "#040436",
|
|
26
|
-
SecondarySurface = "#1E1E1E",
|
|
27
|
-
SecondaryStroke = "#424242",
|
|
28
|
-
SurfaceTertiary = "#141414",
|
|
29
|
-
HeadingSecondary = "#FCFCFC",
|
|
30
|
-
SupportTertiary = "#A3A3A3",
|
|
31
|
-
HeadingPrimary = "#EF602E",
|
|
32
|
-
InteractiveBGSecondary = "#292929",
|
|
33
|
-
InteractiveBGPrimary = "#EA4513",
|
|
34
|
-
TagBGTertiary = "#0C0C0C",
|
|
35
|
-
TextSupportSecondary = "#D6D6D6",
|
|
36
|
-
ErrorRed = "#F31B43"
|
|
37
|
-
}
|
|
1
|
+
export declare enum Colors {
|
|
2
|
+
White = "#FFFFFF",
|
|
3
|
+
Black = "#000000",
|
|
4
|
+
Black2 = "#141414",
|
|
5
|
+
Yellow = "#FFBA49",
|
|
6
|
+
Green = "#42BB83",
|
|
7
|
+
OffWhite = "#FCFCFC",
|
|
8
|
+
LightBlue = "#39159C",
|
|
9
|
+
Secondary = "#1E1E1E",
|
|
10
|
+
Blue = "#2D0E84",
|
|
11
|
+
DarkBlue = "#1D0858",
|
|
12
|
+
Red = "#E63946",
|
|
13
|
+
Orange = "#FF700F",
|
|
14
|
+
FadedOrange = "#FFF1E7",
|
|
15
|
+
LightOrange = "#FFBE93",
|
|
16
|
+
DarkOrange = "#D65600",
|
|
17
|
+
Grey1 = "#333333",
|
|
18
|
+
Grey2 = "#4F4F4F",
|
|
19
|
+
Grey3 = "#828282",
|
|
20
|
+
Grey4 = "#BDBDBD",
|
|
21
|
+
Grey5 = "#E0E0E0",
|
|
22
|
+
Grey6 = "#F2F2F2",
|
|
23
|
+
Grey7 = "#F8F8F8",
|
|
24
|
+
Grey8 = "#424242",
|
|
25
|
+
Purple = "#040436",
|
|
26
|
+
SecondarySurface = "#1E1E1E",
|
|
27
|
+
SecondaryStroke = "#424242",
|
|
28
|
+
SurfaceTertiary = "#141414",
|
|
29
|
+
HeadingSecondary = "#FCFCFC",
|
|
30
|
+
SupportTertiary = "#A3A3A3",
|
|
31
|
+
HeadingPrimary = "#EF602E",
|
|
32
|
+
InteractiveBGSecondary = "#292929",
|
|
33
|
+
InteractiveBGPrimary = "#EA4513",
|
|
34
|
+
TagBGTertiary = "#0C0C0C",
|
|
35
|
+
TextSupportSecondary = "#D6D6D6",
|
|
36
|
+
ErrorRed = "#F31B43"
|
|
37
|
+
}
|
package/build/Colors.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
var Colors;
|
|
2
|
-
(function (Colors) {
|
|
3
|
-
Colors["White"] = "#FFFFFF";
|
|
4
|
-
Colors["Black"] = "#000000";
|
|
5
|
-
Colors["Black2"] = "#141414";
|
|
6
|
-
Colors["Yellow"] = "#FFBA49";
|
|
7
|
-
// Green = "#419D78",
|
|
8
|
-
Colors["Green"] = "#42BB83";
|
|
9
|
-
Colors["OffWhite"] = "#FCFCFC";
|
|
10
|
-
Colors["LightBlue"] = "#39159C";
|
|
11
|
-
Colors["Secondary"] = "#1E1E1E";
|
|
12
|
-
Colors["Blue"] = "#2D0E84";
|
|
13
|
-
Colors["DarkBlue"] = "#1D0858";
|
|
14
|
-
Colors["Red"] = "#E63946";
|
|
15
|
-
Colors["Orange"] = "#FF700F";
|
|
16
|
-
Colors["FadedOrange"] = "#FFF1E7";
|
|
17
|
-
Colors["LightOrange"] = "#FFBE93";
|
|
18
|
-
Colors["DarkOrange"] = "#D65600";
|
|
19
|
-
Colors["Grey1"] = "#333333";
|
|
20
|
-
Colors["Grey2"] = "#4F4F4F";
|
|
21
|
-
Colors["Grey3"] = "#828282";
|
|
22
|
-
Colors["Grey4"] = "#BDBDBD";
|
|
23
|
-
Colors["Grey5"] = "#E0E0E0";
|
|
24
|
-
Colors["Grey6"] = "#F2F2F2";
|
|
25
|
-
Colors["Grey7"] = "#F8F8F8";
|
|
26
|
-
Colors["Grey8"] = "#424242";
|
|
27
|
-
Colors["Purple"] = "#040436";
|
|
28
|
-
Colors["SecondarySurface"] = "#1E1E1E";
|
|
29
|
-
Colors["SecondaryStroke"] = "#424242";
|
|
30
|
-
Colors["SurfaceTertiary"] = "#141414";
|
|
31
|
-
Colors["HeadingSecondary"] = "#FCFCFC";
|
|
32
|
-
Colors["SupportTertiary"] = "#A3A3A3";
|
|
33
|
-
Colors["HeadingPrimary"] = "#EF602E";
|
|
34
|
-
Colors["InteractiveBGSecondary"] = "#292929";
|
|
35
|
-
Colors["InteractiveBGPrimary"] = "#EA4513";
|
|
36
|
-
Colors["TagBGTertiary"] = "#0C0C0C";
|
|
37
|
-
Colors["TextSupportSecondary"] = "#D6D6D6";
|
|
38
|
-
Colors["ErrorRed"] = "#F31B43";
|
|
1
|
+
var Colors;
|
|
2
|
+
(function (Colors) {
|
|
3
|
+
Colors["White"] = "#FFFFFF";
|
|
4
|
+
Colors["Black"] = "#000000";
|
|
5
|
+
Colors["Black2"] = "#141414";
|
|
6
|
+
Colors["Yellow"] = "#FFBA49";
|
|
7
|
+
// Green = "#419D78",
|
|
8
|
+
Colors["Green"] = "#42BB83";
|
|
9
|
+
Colors["OffWhite"] = "#FCFCFC";
|
|
10
|
+
Colors["LightBlue"] = "#39159C";
|
|
11
|
+
Colors["Secondary"] = "#1E1E1E";
|
|
12
|
+
Colors["Blue"] = "#2D0E84";
|
|
13
|
+
Colors["DarkBlue"] = "#1D0858";
|
|
14
|
+
Colors["Red"] = "#E63946";
|
|
15
|
+
Colors["Orange"] = "#FF700F";
|
|
16
|
+
Colors["FadedOrange"] = "#FFF1E7";
|
|
17
|
+
Colors["LightOrange"] = "#FFBE93";
|
|
18
|
+
Colors["DarkOrange"] = "#D65600";
|
|
19
|
+
Colors["Grey1"] = "#333333";
|
|
20
|
+
Colors["Grey2"] = "#4F4F4F";
|
|
21
|
+
Colors["Grey3"] = "#828282";
|
|
22
|
+
Colors["Grey4"] = "#BDBDBD";
|
|
23
|
+
Colors["Grey5"] = "#E0E0E0";
|
|
24
|
+
Colors["Grey6"] = "#F2F2F2";
|
|
25
|
+
Colors["Grey7"] = "#F8F8F8";
|
|
26
|
+
Colors["Grey8"] = "#424242";
|
|
27
|
+
Colors["Purple"] = "#040436";
|
|
28
|
+
Colors["SecondarySurface"] = "#1E1E1E";
|
|
29
|
+
Colors["SecondaryStroke"] = "#424242";
|
|
30
|
+
Colors["SurfaceTertiary"] = "#141414";
|
|
31
|
+
Colors["HeadingSecondary"] = "#FCFCFC";
|
|
32
|
+
Colors["SupportTertiary"] = "#A3A3A3";
|
|
33
|
+
Colors["HeadingPrimary"] = "#EF602E";
|
|
34
|
+
Colors["InteractiveBGSecondary"] = "#292929";
|
|
35
|
+
Colors["InteractiveBGPrimary"] = "#EA4513";
|
|
36
|
+
Colors["TagBGTertiary"] = "#0C0C0C";
|
|
37
|
+
Colors["TextSupportSecondary"] = "#D6D6D6";
|
|
38
|
+
Colors["ErrorRed"] = "#F31B43";
|
|
39
39
|
})(Colors || (Colors = {}));
|
|
40
40
|
|
|
41
41
|
export { Colors };
|
package/build/Colors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Colors.js","sources":["../src/Colors.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"Colors.js","sources":["../src/Colors.ts"],"sourcesContent":[null],"names":[],"mappings":"IAAY,OAsCX;AAtCD,CAAA,UAAY,MAAM,EAAA;AAChB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAkB,CAAA;;AAElB,IAAA,MAAA,CAAA,OAAA,CAAA,GAAA,SAAiB,CAAA;AACjB,IAAA,MAAA,CAAA,UAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,WAAA,CAAA,GAAA,SAAqB,CAAA;AACrB,IAAA,MAAA,CAAA,WAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,MAAA,CAAA,GAAA,SAAgB,CAAA;AAChB,IAAA,MAAA,CAAA,UAAA,CAAA,GAAA,SAAoB,CAAA;AACpB,IAAA,MAAA,CAAA,KAAA,CAAA,GAAA,SAAe,CAAA;AACf,IAAA,MAAA,CAAA,QAAA,CAAA,GAAA,SAAkB,CAAA;AAClB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,SAAuB,CAAA;AACvB,IAAA,MAAA,CAAA,aAAA,CAAA,GAAA,SAAuB,CAAA;AACvB,I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CAAA;;;;"}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface IAddress {
|
|
3
|
-
address1?: string;
|
|
4
|
-
address2?: string;
|
|
5
|
-
city?: string;
|
|
6
|
-
state?: string;
|
|
7
|
-
zip?: string;
|
|
8
|
-
country?: string;
|
|
9
|
-
phone?: string;
|
|
10
|
-
lat?: number | null;
|
|
11
|
-
lng?: number | null;
|
|
12
|
-
placeId?: string;
|
|
13
|
-
placeName?: string;
|
|
14
|
-
timezone?: string;
|
|
15
|
-
}
|
|
16
|
-
export
|
|
17
|
-
value: IAddress;
|
|
18
|
-
onChange: (address: IAddress) => void;
|
|
19
|
-
width?: string;
|
|
20
|
-
label?: any;
|
|
21
|
-
tip?: string;
|
|
22
|
-
fontSize?: string;
|
|
23
|
-
fontWeight?: string;
|
|
24
|
-
fontFamily?: string;
|
|
25
|
-
darkThemeProps?: string;
|
|
26
|
-
labelColor?: string;
|
|
27
|
-
borderColor?: string;
|
|
28
|
-
height?: string;
|
|
29
|
-
};
|
|
30
|
-
export default function AddressSearchDropdown({ value, onChange, width, label, tip, fontSize, fontWeight, fontFamily, darkThemeProps, labelColor, borderColor, height }: AddressSearchDropdownProps): React.JSX.Element;
|
|
31
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface IAddress {
|
|
3
|
+
address1?: string;
|
|
4
|
+
address2?: string;
|
|
5
|
+
city?: string;
|
|
6
|
+
state?: string;
|
|
7
|
+
zip?: string;
|
|
8
|
+
country?: string;
|
|
9
|
+
phone?: string;
|
|
10
|
+
lat?: number | null;
|
|
11
|
+
lng?: number | null;
|
|
12
|
+
placeId?: string;
|
|
13
|
+
placeName?: string;
|
|
14
|
+
timezone?: string;
|
|
15
|
+
}
|
|
16
|
+
export type AddressSearchDropdownProps = {
|
|
17
|
+
value: IAddress;
|
|
18
|
+
onChange: (address: IAddress) => void;
|
|
19
|
+
width?: string;
|
|
20
|
+
label?: any;
|
|
21
|
+
tip?: string;
|
|
22
|
+
fontSize?: string;
|
|
23
|
+
fontWeight?: string;
|
|
24
|
+
fontFamily?: string;
|
|
25
|
+
darkThemeProps?: string;
|
|
26
|
+
labelColor?: string;
|
|
27
|
+
borderColor?: string;
|
|
28
|
+
height?: string;
|
|
29
|
+
};
|
|
30
|
+
export default function AddressSearchDropdown({ value, onChange, width, label, tip, fontSize, fontWeight, fontFamily, darkThemeProps, labelColor, borderColor, height }: AddressSearchDropdownProps): React.JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { __makeTemplateObject, __awaiter, __generator } from '../
|
|
1
|
+
import { __makeTemplateObject, __awaiter, __generator } from '../node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import usePlacesAutocomplete, { getGeocode } from 'use-places-autocomplete';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import SearchDropdown, { SearchDropdownTypes } from './SearchDropdown.js';
|
|
6
6
|
import { IconEnum } from './Icons.js';
|
|
7
7
|
|
|
8
|
-
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n z-index: 100000;\n"], ["\n width: 100%;\n z-index: 100000;\n"])));
|
|
9
|
-
function AddressSearchDropdown(_a) {
|
|
10
|
-
var _this = this;
|
|
11
|
-
var value = _a.value, onChange = _a.onChange, width = _a.width, label = _a.label, tip = _a.tip, fontSize = _a.fontSize, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, darkThemeProps = _a.darkThemeProps, labelColor = _a.labelColor, borderColor = _a.borderColor, height = _a.height;
|
|
12
|
-
/* Hooks */
|
|
13
|
-
var _b = usePlacesAutocomplete({
|
|
14
|
-
requestOptions: {
|
|
15
|
-
componentRestrictions: { country: "us" },
|
|
16
|
-
},
|
|
17
|
-
debounce: 300,
|
|
18
|
-
}), innerValue = _b.value, data = _b.suggestions.data, setValue = _b.setValue;
|
|
19
|
-
React.useEffect(function () {
|
|
20
|
-
var placeName = (value === null || value === void 0 ? void 0 : value.placeName) ? value === null || value === void 0 ? void 0 : value.placeName : "";
|
|
21
|
-
setValue(placeName);
|
|
22
|
-
innerValue = placeName;
|
|
23
|
-
}, []);
|
|
24
|
-
var selectAddress = React.useCallback(function (address) {
|
|
25
|
-
setValue(address);
|
|
26
|
-
var doEffect = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
27
|
-
var results, result, location_1, addressObject_1, e_1;
|
|
28
|
-
return __generator(this, function (_a) {
|
|
29
|
-
switch (_a.label) {
|
|
30
|
-
case 0:
|
|
31
|
-
_a.trys.push([0, 2, , 3]);
|
|
32
|
-
return [4 /*yield*/, getGeocode({ address: address })];
|
|
33
|
-
case 1:
|
|
34
|
-
results = _a.sent();
|
|
35
|
-
result = results.find(function (r) {
|
|
36
|
-
return r.address_components.length > 2 &&
|
|
37
|
-
r.types.includes('street_address');
|
|
38
|
-
}) || results[0];
|
|
39
|
-
location_1 = result.geometry.location;
|
|
40
|
-
addressObject_1 = {
|
|
41
|
-
address1: "",
|
|
42
|
-
address2: "",
|
|
43
|
-
city: "",
|
|
44
|
-
state: "",
|
|
45
|
-
zip: "",
|
|
46
|
-
country: "",
|
|
47
|
-
lat: location_1.lat(),
|
|
48
|
-
lng: location_1.lng(),
|
|
49
|
-
placeId: result.place_id,
|
|
50
|
-
placeName: address,
|
|
51
|
-
};
|
|
52
|
-
result.address_components.forEach(function (ac) {
|
|
53
|
-
if (ac.types.includes("street_number")) {
|
|
54
|
-
addressObject_1.address1 = ac.short_name;
|
|
55
|
-
}
|
|
56
|
-
if (ac.types.includes("route")) {
|
|
57
|
-
addressObject_1.address1 = addressObject_1.address1
|
|
58
|
-
? (addressObject_1.address1
|
|
59
|
-
: ac.short_name;
|
|
60
|
-
}
|
|
61
|
-
if (ac.types.includes("subpremise")) {
|
|
62
|
-
addressObject_1.address2 = ac.short_name;
|
|
63
|
-
}
|
|
64
|
-
if (ac.types.includes("locality") &&
|
|
65
|
-
ac.types.includes("political")) {
|
|
66
|
-
addressObject_1.city = ac.short_name;
|
|
67
|
-
}
|
|
68
|
-
if (ac.types.includes("administrative_area_level_1") &&
|
|
69
|
-
ac.types.includes("political")) {
|
|
70
|
-
addressObject_1.state = ac.short_name;
|
|
71
|
-
}
|
|
72
|
-
if (ac.types.includes("country") &&
|
|
73
|
-
ac.types.includes("political")) {
|
|
74
|
-
addressObject_1.country = ac.short_name;
|
|
75
|
-
}
|
|
76
|
-
if (ac.types.includes("postal_code")) {
|
|
77
|
-
addressObject_1.zip = ac.short_name;
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
onChange(addressObject_1);
|
|
81
|
-
return [3 /*break*/, 3];
|
|
82
|
-
case 2:
|
|
83
|
-
e_1 = _a.sent();
|
|
84
|
-
console.error(e_1);
|
|
85
|
-
return [3 /*break*/, 3];
|
|
86
|
-
case 3: return [2 /*return*/];
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
}); };
|
|
90
|
-
doEffect();
|
|
91
|
-
}, [onChange, setValue]);
|
|
92
|
-
React.useEffect(function () {
|
|
93
|
-
var intialAddress = {};
|
|
94
|
-
if (!innerValue)
|
|
95
|
-
onChange(intialAddress);
|
|
96
|
-
}, [innerValue]);
|
|
97
|
-
/* Render */
|
|
98
|
-
var items = [];
|
|
99
|
-
if (data.length) {
|
|
100
|
-
items = data.map(function (suggestion) { return ({
|
|
101
|
-
text: suggestion.description,
|
|
102
|
-
value: suggestion.description,
|
|
103
|
-
}); });
|
|
104
|
-
}
|
|
105
|
-
return (React.createElement(Container, null,
|
|
106
|
-
React.createElement(SearchDropdown, { type: SearchDropdownTypes.SingleSelect, icon: IconEnum.MapPinLight, onChange: selectAddress, value: innerValue, searchQuery: innerValue, setSearchQuery: setValue, placeholder: "Search for an address", items: items, width: width, label: label, tip: tip, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, darkThemeProps: darkThemeProps, labelColor: labelColor, borderColor: borderColor, height: height })));
|
|
107
|
-
}
|
|
8
|
+
var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n z-index: 100000;\n"], ["\n width: 100%;\n z-index: 100000;\n"])));
|
|
9
|
+
function AddressSearchDropdown(_a) {
|
|
10
|
+
var _this = this;
|
|
11
|
+
var value = _a.value, onChange = _a.onChange, width = _a.width, label = _a.label, tip = _a.tip, fontSize = _a.fontSize, fontWeight = _a.fontWeight, fontFamily = _a.fontFamily, darkThemeProps = _a.darkThemeProps, labelColor = _a.labelColor, borderColor = _a.borderColor, height = _a.height;
|
|
12
|
+
/* Hooks */
|
|
13
|
+
var _b = usePlacesAutocomplete({
|
|
14
|
+
requestOptions: {
|
|
15
|
+
componentRestrictions: { country: "us" },
|
|
16
|
+
},
|
|
17
|
+
debounce: 300,
|
|
18
|
+
}), innerValue = _b.value, data = _b.suggestions.data, setValue = _b.setValue;
|
|
19
|
+
React.useEffect(function () {
|
|
20
|
+
var placeName = (value === null || value === void 0 ? void 0 : value.placeName) ? value === null || value === void 0 ? void 0 : value.placeName : "";
|
|
21
|
+
setValue(placeName);
|
|
22
|
+
innerValue = placeName;
|
|
23
|
+
}, []);
|
|
24
|
+
var selectAddress = React.useCallback(function (address) {
|
|
25
|
+
setValue(address);
|
|
26
|
+
var doEffect = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
27
|
+
var results, result, location_1, addressObject_1, e_1;
|
|
28
|
+
return __generator(this, function (_a) {
|
|
29
|
+
switch (_a.label) {
|
|
30
|
+
case 0:
|
|
31
|
+
_a.trys.push([0, 2, , 3]);
|
|
32
|
+
return [4 /*yield*/, getGeocode({ address: address })];
|
|
33
|
+
case 1:
|
|
34
|
+
results = _a.sent();
|
|
35
|
+
result = results.find(function (r) {
|
|
36
|
+
return r.address_components.length > 2 &&
|
|
37
|
+
r.types.includes('street_address');
|
|
38
|
+
}) || results[0];
|
|
39
|
+
location_1 = result.geometry.location;
|
|
40
|
+
addressObject_1 = {
|
|
41
|
+
address1: "",
|
|
42
|
+
address2: "",
|
|
43
|
+
city: "",
|
|
44
|
+
state: "",
|
|
45
|
+
zip: "",
|
|
46
|
+
country: "",
|
|
47
|
+
lat: location_1.lat(),
|
|
48
|
+
lng: location_1.lng(),
|
|
49
|
+
placeId: result.place_id,
|
|
50
|
+
placeName: address,
|
|
51
|
+
};
|
|
52
|
+
result.address_components.forEach(function (ac) {
|
|
53
|
+
if (ac.types.includes("street_number")) {
|
|
54
|
+
addressObject_1.address1 = ac.short_name;
|
|
55
|
+
}
|
|
56
|
+
if (ac.types.includes("route")) {
|
|
57
|
+
addressObject_1.address1 = addressObject_1.address1
|
|
58
|
+
? "".concat(addressObject_1.address1, " ").concat(ac.short_name).trim()
|
|
59
|
+
: ac.short_name;
|
|
60
|
+
}
|
|
61
|
+
if (ac.types.includes("subpremise")) {
|
|
62
|
+
addressObject_1.address2 = ac.short_name;
|
|
63
|
+
}
|
|
64
|
+
if (ac.types.includes("locality") &&
|
|
65
|
+
ac.types.includes("political")) {
|
|
66
|
+
addressObject_1.city = ac.short_name;
|
|
67
|
+
}
|
|
68
|
+
if (ac.types.includes("administrative_area_level_1") &&
|
|
69
|
+
ac.types.includes("political")) {
|
|
70
|
+
addressObject_1.state = ac.short_name;
|
|
71
|
+
}
|
|
72
|
+
if (ac.types.includes("country") &&
|
|
73
|
+
ac.types.includes("political")) {
|
|
74
|
+
addressObject_1.country = ac.short_name;
|
|
75
|
+
}
|
|
76
|
+
if (ac.types.includes("postal_code")) {
|
|
77
|
+
addressObject_1.zip = ac.short_name;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
onChange(addressObject_1);
|
|
81
|
+
return [3 /*break*/, 3];
|
|
82
|
+
case 2:
|
|
83
|
+
e_1 = _a.sent();
|
|
84
|
+
console.error(e_1);
|
|
85
|
+
return [3 /*break*/, 3];
|
|
86
|
+
case 3: return [2 /*return*/];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); };
|
|
90
|
+
doEffect();
|
|
91
|
+
}, [onChange, setValue]);
|
|
92
|
+
React.useEffect(function () {
|
|
93
|
+
var intialAddress = {};
|
|
94
|
+
if (!innerValue)
|
|
95
|
+
onChange(intialAddress);
|
|
96
|
+
}, [innerValue]);
|
|
97
|
+
/* Render */
|
|
98
|
+
var items = [];
|
|
99
|
+
if (data.length) {
|
|
100
|
+
items = data.map(function (suggestion) { return ({
|
|
101
|
+
text: suggestion.description,
|
|
102
|
+
value: suggestion.description,
|
|
103
|
+
}); });
|
|
104
|
+
}
|
|
105
|
+
return (React.createElement(Container, null,
|
|
106
|
+
React.createElement(SearchDropdown, { type: SearchDropdownTypes.SingleSelect, icon: IconEnum.MapPinLight, onChange: selectAddress, value: innerValue, searchQuery: innerValue, setSearchQuery: setValue, placeholder: "Search for an address", items: items, width: width, label: label, tip: tip, fontSize: fontSize, fontWeight: fontWeight, fontFamily: fontFamily, darkThemeProps: darkThemeProps, labelColor: labelColor, borderColor: borderColor, height: height })));
|
|
107
|
+
}
|
|
108
108
|
var templateObject_1;
|
|
109
109
|
|
|
110
110
|
export { AddressSearchDropdown as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressSearchDropdown.js","sources":["../../src/components/AddressSearchDropdown.tsx"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"AddressSearchDropdown.js","sources":["../../src/components/AddressSearchDropdown.tsx"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;AA0BA,IAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA,gBAAA,KAAA,gBAAA,GAAA,oBAAA,CAAA,CAAA,wCAAA,CAAA,EAAA,CAAA,wCAG3B,IAAA,CAAC;AAiBsB,SAAA,qBAAqB,CAAC,EAajB,EAAA;IAb7B,IAkJC,KAAA,GAAA,IAAA,CAAA;AAjJC,IAAA,IAAA,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,KAAK,GAAA,EAAA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F,KAAK,CAAC,SAAS,CAAC,YAAA;QACd,IAAI,aAAa,GAAa,EAAE,CAAC;AACjC,QAAA,IAAI,CAAC,UAAU;YAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC3C,KAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;;IAGjB,IAAI,KAAK,GAA0B,EAAE,CAAC;IAEtC,IAAI,IAAI,CAAC,MAAM,EAAE;QACf,KAAK,GAAG,IAAI,CAAC,GAAG,CACd,UAAC,UAAU,EAA0B,EAAA,QAAC;YACpC,IAAI,EAAE,UAAU,CAAC,WAAW;YAC5B,KAAK,EAAE,UAAU,CAAC,WAAW;SAC9B,EAAC,EAAA,CACH,CAAC;AACH,KAAA;IAED,QACE,oBAAC,SAAS,EAAA,IAAA;AACR,QAAA,KAAA,CAAA,aAAA,CAAC,cAAc,EACb,EAAA,IAAI,EAAE,mBAAmB,CAAC,YAAY,EACtC,IAAI,EAAE,QAAQ,CAAC,WAAW,EAC1B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,UAAU,EACjB,WAAW,EAAE,UAAU,EACvB,cAAc,EAAE,QAAQ,EACxB,WAAW,EAAC,uBAAuB,EACnC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,CAAA,CACQ,EACZ;AACJ,CAAC;;;;;"}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Colors } from "../Colors";
|
|
3
|
-
export declare enum ButtonTypes {
|
|
4
|
-
Next = "Next",
|
|
5
|
-
Regular = "Regular",
|
|
6
|
-
Thin = "Thin",
|
|
7
|
-
Normal = "Normal",
|
|
8
|
-
CustomInputHeight = "CustomInputHeight"
|
|
9
|
-
}
|
|
10
|
-
export declare enum ButtonStates {
|
|
11
|
-
Active = "Active",
|
|
12
|
-
Warning = "Warning",
|
|
13
|
-
Disabled = "Disabled"
|
|
14
|
-
}
|
|
15
|
-
export declare enum ButtonIconPosition {
|
|
16
|
-
Left = "Left",
|
|
17
|
-
Right = "Right"
|
|
18
|
-
}
|
|
19
|
-
export
|
|
20
|
-
type?: ButtonTypes;
|
|
21
|
-
state?: ButtonStates;
|
|
22
|
-
bgColor?: Colors;
|
|
23
|
-
textColor?: Colors;
|
|
24
|
-
text?: string;
|
|
25
|
-
onClick?: any;
|
|
26
|
-
icon?: any;
|
|
27
|
-
iconPosition?: ButtonIconPosition;
|
|
28
|
-
iconSize?: number;
|
|
29
|
-
margin?: string;
|
|
30
|
-
loading?: boolean;
|
|
31
|
-
label?: string;
|
|
32
|
-
tip?: string;
|
|
33
|
-
subLabel?: string;
|
|
34
|
-
marginBottam?: string;
|
|
35
|
-
paddingAround?: string;
|
|
36
|
-
contentAlign?: string;
|
|
37
|
-
textTransform?: string;
|
|
38
|
-
fontSize?: string;
|
|
39
|
-
fontWeight?: string;
|
|
40
|
-
fontFamily?: string;
|
|
41
|
-
letterSpacing?: string;
|
|
42
|
-
disabledbuttonTheme?: boolean;
|
|
43
|
-
CustomInputHeight?: string;
|
|
44
|
-
lineHeight?: string;
|
|
45
|
-
svgIconName?: string;
|
|
46
|
-
svgWidth?: string;
|
|
47
|
-
svgHeight?: string;
|
|
48
|
-
marginOnButtonText?: boolean;
|
|
49
|
-
innerTextWhiteSpace?: string;
|
|
50
|
-
};
|
|
51
|
-
export default function Button({ type, state, bgColor, textColor, text, onClick, icon, iconPosition, iconSize, margin, marginBottam, loading, paddingAround, contentAlign, textTransform, fontSize, fontWeight, fontFamily, letterSpacing, disabledbuttonTheme, CustomInputHeight, lineHeight, svgIconName, svgHeight, svgWidth, marginOnButtonText, innerTextWhiteSpace }: ButtonProps): React.JSX.Element;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Colors } from "../Colors";
|
|
3
|
+
export declare enum ButtonTypes {
|
|
4
|
+
Next = "Next",
|
|
5
|
+
Regular = "Regular",
|
|
6
|
+
Thin = "Thin",
|
|
7
|
+
Normal = "Normal",
|
|
8
|
+
CustomInputHeight = "CustomInputHeight"
|
|
9
|
+
}
|
|
10
|
+
export declare enum ButtonStates {
|
|
11
|
+
Active = "Active",
|
|
12
|
+
Warning = "Warning",
|
|
13
|
+
Disabled = "Disabled"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ButtonIconPosition {
|
|
16
|
+
Left = "Left",
|
|
17
|
+
Right = "Right"
|
|
18
|
+
}
|
|
19
|
+
export type ButtonProps = {
|
|
20
|
+
type?: ButtonTypes;
|
|
21
|
+
state?: ButtonStates;
|
|
22
|
+
bgColor?: Colors;
|
|
23
|
+
textColor?: Colors;
|
|
24
|
+
text?: string;
|
|
25
|
+
onClick?: any;
|
|
26
|
+
icon?: any;
|
|
27
|
+
iconPosition?: ButtonIconPosition;
|
|
28
|
+
iconSize?: number;
|
|
29
|
+
margin?: string;
|
|
30
|
+
loading?: boolean;
|
|
31
|
+
label?: string;
|
|
32
|
+
tip?: string;
|
|
33
|
+
subLabel?: string;
|
|
34
|
+
marginBottam?: string;
|
|
35
|
+
paddingAround?: string;
|
|
36
|
+
contentAlign?: string;
|
|
37
|
+
textTransform?: string;
|
|
38
|
+
fontSize?: string;
|
|
39
|
+
fontWeight?: string;
|
|
40
|
+
fontFamily?: string;
|
|
41
|
+
letterSpacing?: string;
|
|
42
|
+
disabledbuttonTheme?: boolean;
|
|
43
|
+
CustomInputHeight?: string;
|
|
44
|
+
lineHeight?: string;
|
|
45
|
+
svgIconName?: string;
|
|
46
|
+
svgWidth?: string;
|
|
47
|
+
svgHeight?: string;
|
|
48
|
+
marginOnButtonText?: boolean;
|
|
49
|
+
innerTextWhiteSpace?: string;
|
|
50
|
+
};
|
|
51
|
+
export default function Button({ type, state, bgColor, textColor, text, onClick, icon, iconPosition, iconSize, margin, marginBottam, loading, paddingAround, contentAlign, textTransform, fontSize, fontWeight, fontFamily, letterSpacing, disabledbuttonTheme, CustomInputHeight, lineHeight, svgIconName, svgHeight, svgWidth, marginOnButtonText, innerTextWhiteSpace }: ButtonProps): React.JSX.Element;
|