@hoddy-ui/next 2.0.60 → 2.0.63
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.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +35 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -272,6 +272,7 @@ interface OTPInputProps {
|
|
|
272
272
|
interface RatingStarsProps {
|
|
273
273
|
rating: number;
|
|
274
274
|
size: number;
|
|
275
|
+
color?: colorTypes | (string & {});
|
|
275
276
|
}
|
|
276
277
|
interface RatingInputProps {
|
|
277
278
|
rating?: number;
|
|
@@ -281,6 +282,7 @@ interface RatingInputProps {
|
|
|
281
282
|
rating: number;
|
|
282
283
|
review: string;
|
|
283
284
|
}) => Promise<void>;
|
|
285
|
+
color?: colorTypes | (string & {});
|
|
284
286
|
}
|
|
285
287
|
interface DividerProps {
|
|
286
288
|
color?: colorTypes;
|
|
@@ -393,6 +395,7 @@ declare const Grid: React.FC<GridProps>;
|
|
|
393
395
|
type predictionType = {
|
|
394
396
|
id: string;
|
|
395
397
|
description: string;
|
|
398
|
+
types: string[];
|
|
396
399
|
};
|
|
397
400
|
declare const getPredictionsFromCoords: (coords: {
|
|
398
401
|
latitude: number;
|
|
@@ -400,6 +403,7 @@ declare const getPredictionsFromCoords: (coords: {
|
|
|
400
403
|
}) => Promise<{
|
|
401
404
|
description: any;
|
|
402
405
|
id: any;
|
|
406
|
+
types: any;
|
|
403
407
|
latLng: {
|
|
404
408
|
lst: number;
|
|
405
409
|
lng: number;
|
|
@@ -408,6 +412,7 @@ declare const getPredictionsFromCoords: (coords: {
|
|
|
408
412
|
declare const getPredictionsFromQuery: (query: string, country: string) => Promise<{
|
|
409
413
|
description: any;
|
|
410
414
|
id: any;
|
|
415
|
+
types: any;
|
|
411
416
|
}[]>;
|
|
412
417
|
declare const getLocationFromPlaceId: (place_id: string) => Promise<{
|
|
413
418
|
formatted_address: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -272,6 +272,7 @@ interface OTPInputProps {
|
|
|
272
272
|
interface RatingStarsProps {
|
|
273
273
|
rating: number;
|
|
274
274
|
size: number;
|
|
275
|
+
color?: colorTypes | (string & {});
|
|
275
276
|
}
|
|
276
277
|
interface RatingInputProps {
|
|
277
278
|
rating?: number;
|
|
@@ -281,6 +282,7 @@ interface RatingInputProps {
|
|
|
281
282
|
rating: number;
|
|
282
283
|
review: string;
|
|
283
284
|
}) => Promise<void>;
|
|
285
|
+
color?: colorTypes | (string & {});
|
|
284
286
|
}
|
|
285
287
|
interface DividerProps {
|
|
286
288
|
color?: colorTypes;
|
|
@@ -393,6 +395,7 @@ declare const Grid: React.FC<GridProps>;
|
|
|
393
395
|
type predictionType = {
|
|
394
396
|
id: string;
|
|
395
397
|
description: string;
|
|
398
|
+
types: string[];
|
|
396
399
|
};
|
|
397
400
|
declare const getPredictionsFromCoords: (coords: {
|
|
398
401
|
latitude: number;
|
|
@@ -400,6 +403,7 @@ declare const getPredictionsFromCoords: (coords: {
|
|
|
400
403
|
}) => Promise<{
|
|
401
404
|
description: any;
|
|
402
405
|
id: any;
|
|
406
|
+
types: any;
|
|
403
407
|
latLng: {
|
|
404
408
|
lst: number;
|
|
405
409
|
lng: number;
|
|
@@ -408,6 +412,7 @@ declare const getPredictionsFromCoords: (coords: {
|
|
|
408
412
|
declare const getPredictionsFromQuery: (query: string, country: string) => Promise<{
|
|
409
413
|
description: any;
|
|
410
414
|
id: any;
|
|
415
|
+
types: any;
|
|
411
416
|
}[]>;
|
|
412
417
|
declare const getLocationFromPlaceId: (place_id: string) => Promise<{
|
|
413
418
|
formatted_address: string;
|
package/dist/index.js
CHANGED
|
@@ -688,6 +688,7 @@ var Avatar = ({
|
|
|
688
688
|
style = {}
|
|
689
689
|
}) => {
|
|
690
690
|
const colors2 = useColors();
|
|
691
|
+
const [imageError, setImageError] = (0, import_react7.useState)(false);
|
|
691
692
|
const styles = import_react_native_size_matters4.ScaledSheet.create({
|
|
692
693
|
root: {
|
|
693
694
|
borderRadius: 150,
|
|
@@ -706,7 +707,15 @@ var Avatar = ({
|
|
|
706
707
|
width: "110%"
|
|
707
708
|
}
|
|
708
709
|
});
|
|
709
|
-
return /* @__PURE__ */ import_react7.default.createElement(import_react_native7.View, { style: styles.root }, source
|
|
710
|
+
return /* @__PURE__ */ import_react7.default.createElement(import_react_native7.View, { style: styles.root }, source && !imageError ? /* @__PURE__ */ import_react7.default.createElement(
|
|
711
|
+
import_react_native7.Image,
|
|
712
|
+
{
|
|
713
|
+
resizeMode: "cover",
|
|
714
|
+
style: styles.image,
|
|
715
|
+
source,
|
|
716
|
+
onError: () => setImageError(true)
|
|
717
|
+
}
|
|
718
|
+
) : label ? /* @__PURE__ */ import_react7.default.createElement(Typography_default, { style: { color: colors2[color].text } }, label[0]) : /* @__PURE__ */ import_react7.default.createElement(import_vector_icons2.AntDesign, { name: "user", color: "#fff", size: Math.round(size / 1.5) }));
|
|
710
719
|
};
|
|
711
720
|
var Avatar_default = Avatar;
|
|
712
721
|
|
|
@@ -1139,7 +1148,8 @@ var Popup = ({
|
|
|
1139
1148
|
// ../src/Components/StarRating.tsx
|
|
1140
1149
|
var RatingStars = ({
|
|
1141
1150
|
rating = 0,
|
|
1142
|
-
size = 16
|
|
1151
|
+
size = 16,
|
|
1152
|
+
color = "#FFD700"
|
|
1143
1153
|
}) => {
|
|
1144
1154
|
const colors2 = useColors();
|
|
1145
1155
|
const styles = import_react_native_size_matters9.ScaledSheet.create({
|
|
@@ -1148,7 +1158,15 @@ var RatingStars = ({
|
|
|
1148
1158
|
alignItems: "center"
|
|
1149
1159
|
}
|
|
1150
1160
|
});
|
|
1151
|
-
return /* @__PURE__ */ React.createElement(import_react_native12.View, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1161
|
+
return /* @__PURE__ */ React.createElement(import_react_native12.View, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1162
|
+
import_vector_icons5.Ionicons,
|
|
1163
|
+
{
|
|
1164
|
+
key: index,
|
|
1165
|
+
name: "star",
|
|
1166
|
+
size,
|
|
1167
|
+
color: colors2[color]?.main || color
|
|
1168
|
+
}
|
|
1169
|
+
)), [...Array(5 - Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1152
1170
|
import_vector_icons5.Ionicons,
|
|
1153
1171
|
{
|
|
1154
1172
|
key: index,
|
|
@@ -1161,7 +1179,8 @@ var RatingStars = ({
|
|
|
1161
1179
|
var RatingInput = ({
|
|
1162
1180
|
onSubmit: _onSubmit,
|
|
1163
1181
|
rating = 0,
|
|
1164
|
-
size = 16
|
|
1182
|
+
size = 16,
|
|
1183
|
+
color = "primary"
|
|
1165
1184
|
}) => {
|
|
1166
1185
|
const [showReviewsModal, setShowReviewsModal] = (0, import_react12.useState)(false);
|
|
1167
1186
|
const [rate, setRate] = (0, import_react12.useState)(0);
|
|
@@ -1216,7 +1235,7 @@ var RatingInput = ({
|
|
|
1216
1235
|
style: { marginLeft: 10 },
|
|
1217
1236
|
name: index < rate ? "star" : "star-outline",
|
|
1218
1237
|
size,
|
|
1219
|
-
color: colors2
|
|
1238
|
+
color: colors2[color]?.main || color
|
|
1220
1239
|
}
|
|
1221
1240
|
)
|
|
1222
1241
|
))), /* @__PURE__ */ React.createElement(
|
|
@@ -1255,7 +1274,8 @@ var RatingInput = ({
|
|
|
1255
1274
|
multiline: true,
|
|
1256
1275
|
value: review,
|
|
1257
1276
|
onChangeText: (text) => setReview(text),
|
|
1258
|
-
placeholder: "Type review here.."
|
|
1277
|
+
placeholder: "Type review here..",
|
|
1278
|
+
verticalAlign: "top"
|
|
1259
1279
|
}
|
|
1260
1280
|
)),
|
|
1261
1281
|
/* @__PURE__ */ React.createElement(
|
|
@@ -1924,10 +1944,15 @@ var getPredictionsFromCoords = async (coords) => {
|
|
|
1924
1944
|
)).json();
|
|
1925
1945
|
const p = [];
|
|
1926
1946
|
for (let key in res.results) {
|
|
1927
|
-
const {
|
|
1947
|
+
const {
|
|
1948
|
+
formatted_address: description,
|
|
1949
|
+
place_id,
|
|
1950
|
+
types
|
|
1951
|
+
} = res.results[key];
|
|
1928
1952
|
p.push({
|
|
1929
1953
|
description,
|
|
1930
1954
|
id: place_id,
|
|
1955
|
+
types,
|
|
1931
1956
|
latLng: { lst: coords.latitude, lng: coords.longitude }
|
|
1932
1957
|
});
|
|
1933
1958
|
}
|
|
@@ -1939,10 +1964,11 @@ var getPredictionsFromQuery = async (query, country) => {
|
|
|
1939
1964
|
const res = await (await fetch(endpoint)).json();
|
|
1940
1965
|
const p = [];
|
|
1941
1966
|
for (let key in res.predictions) {
|
|
1942
|
-
const { description, place_id } = res.predictions[key];
|
|
1967
|
+
const { description, place_id, types } = res.predictions[key];
|
|
1943
1968
|
p.push({
|
|
1944
1969
|
description,
|
|
1945
|
-
id: place_id
|
|
1970
|
+
id: place_id,
|
|
1971
|
+
types
|
|
1946
1972
|
});
|
|
1947
1973
|
}
|
|
1948
1974
|
return p;
|