@hoddy-ui/next 2.0.61 → 2.0.65
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 +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +61 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +102 -84
- 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;
|
|
@@ -384,8 +386,8 @@ declare const showFlashMessage: (msg: FlashMessageProps) => void;
|
|
|
384
386
|
|
|
385
387
|
declare const FormWrapper: React.FC<FormWrapperProps>;
|
|
386
388
|
|
|
387
|
-
declare const RatingStars: FC<RatingStarsProps>;
|
|
388
389
|
declare const RatingInput: FC<RatingInputProps>;
|
|
390
|
+
declare const RatingStars: FC<RatingStarsProps>;
|
|
389
391
|
|
|
390
392
|
declare const GridItem: React.FC<GridItemProps>;
|
|
391
393
|
declare const Grid: React.FC<GridProps>;
|
|
@@ -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;
|
|
@@ -384,8 +386,8 @@ declare const showFlashMessage: (msg: FlashMessageProps) => void;
|
|
|
384
386
|
|
|
385
387
|
declare const FormWrapper: React.FC<FormWrapperProps>;
|
|
386
388
|
|
|
387
|
-
declare const RatingStars: FC<RatingStarsProps>;
|
|
388
389
|
declare const RatingInput: FC<RatingInputProps>;
|
|
390
|
+
declare const RatingStars: FC<RatingStarsProps>;
|
|
389
391
|
|
|
390
392
|
declare const GridItem: React.FC<GridItemProps>;
|
|
391
393
|
declare const Grid: React.FC<GridProps>;
|
|
@@ -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
|
@@ -963,7 +963,7 @@ var FormWrapper = ({
|
|
|
963
963
|
// ../src/Components/StarRating.tsx
|
|
964
964
|
var import_vector_icons5 = require("@expo/vector-icons");
|
|
965
965
|
var Haptics = __toESM(require("expo-haptics"));
|
|
966
|
-
var import_react12 = require("react");
|
|
966
|
+
var import_react12 = __toESM(require("react"));
|
|
967
967
|
var import_react_native12 = require("react-native");
|
|
968
968
|
var import_react_native_size_matters9 = require("react-native-size-matters");
|
|
969
969
|
|
|
@@ -1146,31 +1146,11 @@ var Popup = ({
|
|
|
1146
1146
|
};
|
|
1147
1147
|
|
|
1148
1148
|
// ../src/Components/StarRating.tsx
|
|
1149
|
-
var RatingStars = ({
|
|
1150
|
-
rating = 0,
|
|
1151
|
-
size = 16
|
|
1152
|
-
}) => {
|
|
1153
|
-
const colors2 = useColors();
|
|
1154
|
-
const styles = import_react_native_size_matters9.ScaledSheet.create({
|
|
1155
|
-
root: {
|
|
1156
|
-
flexDirection: "row",
|
|
1157
|
-
alignItems: "center"
|
|
1158
|
-
}
|
|
1159
|
-
});
|
|
1160
|
-
return /* @__PURE__ */ React.createElement(import_react_native12.View, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(import_vector_icons5.Ionicons, { key: index, name: "star", size, color: "#FFD700" })), [...Array(5 - Math.floor(rating))].map((_, index) => /* @__PURE__ */ React.createElement(
|
|
1161
|
-
import_vector_icons5.Ionicons,
|
|
1162
|
-
{
|
|
1163
|
-
key: index,
|
|
1164
|
-
name: "star",
|
|
1165
|
-
size,
|
|
1166
|
-
color: colors2.textSecondary.light
|
|
1167
|
-
}
|
|
1168
|
-
)));
|
|
1169
|
-
};
|
|
1170
1149
|
var RatingInput = ({
|
|
1171
1150
|
onSubmit: _onSubmit,
|
|
1172
1151
|
rating = 0,
|
|
1173
|
-
size = 16
|
|
1152
|
+
size = 16,
|
|
1153
|
+
color = "primary"
|
|
1174
1154
|
}) => {
|
|
1175
1155
|
const [showReviewsModal, setShowReviewsModal] = (0, import_react12.useState)(false);
|
|
1176
1156
|
const [rate, setRate] = (0, import_react12.useState)(0);
|
|
@@ -1210,7 +1190,7 @@ var RatingInput = ({
|
|
|
1210
1190
|
_onSubmit && await _onSubmit({ rating: rate, review });
|
|
1211
1191
|
setLoading(false);
|
|
1212
1192
|
};
|
|
1213
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement(import_react_native12.View, { style: styles.root }, loading ? /* @__PURE__ */ import_react12.default.createElement(import_react_native12.ActivityIndicator, null) : [...Array(5)].map((_, index) => /* @__PURE__ */ import_react12.default.createElement(
|
|
1214
1194
|
import_react_native12.TouchableOpacity,
|
|
1215
1195
|
{
|
|
1216
1196
|
key: index,
|
|
@@ -1219,16 +1199,16 @@ var RatingInput = ({
|
|
|
1219
1199
|
onRate(index);
|
|
1220
1200
|
}
|
|
1221
1201
|
},
|
|
1222
|
-
/* @__PURE__ */
|
|
1202
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
1223
1203
|
import_vector_icons5.Ionicons,
|
|
1224
1204
|
{
|
|
1225
1205
|
style: { marginLeft: 10 },
|
|
1226
1206
|
name: index < rate ? "star" : "star-outline",
|
|
1227
1207
|
size,
|
|
1228
|
-
color: colors2
|
|
1208
|
+
color: colors2[color]?.main || color
|
|
1229
1209
|
}
|
|
1230
1210
|
)
|
|
1231
|
-
))), /* @__PURE__ */
|
|
1211
|
+
))), /* @__PURE__ */ import_react12.default.createElement(
|
|
1232
1212
|
Popup,
|
|
1233
1213
|
{
|
|
1234
1214
|
sheet: true,
|
|
@@ -1237,7 +1217,7 @@ var RatingInput = ({
|
|
|
1237
1217
|
setShowReviewsModal(false);
|
|
1238
1218
|
}
|
|
1239
1219
|
},
|
|
1240
|
-
/* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
1241
1221
|
import_react_native12.View,
|
|
1242
1222
|
{
|
|
1243
1223
|
style: {
|
|
@@ -1245,9 +1225,9 @@ var RatingInput = ({
|
|
|
1245
1225
|
marginBottom: 5
|
|
1246
1226
|
}
|
|
1247
1227
|
},
|
|
1248
|
-
/* @__PURE__ */
|
|
1228
|
+
/* @__PURE__ */ import_react12.default.createElement(RatingStars, { rating: rate, size: 24 })
|
|
1249
1229
|
),
|
|
1250
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
1251
1231
|
Typography_default,
|
|
1252
1232
|
{
|
|
1253
1233
|
align: "center",
|
|
@@ -1257,17 +1237,18 @@ var RatingInput = ({
|
|
|
1257
1237
|
},
|
|
1258
1238
|
"Add to your review"
|
|
1259
1239
|
),
|
|
1260
|
-
/* @__PURE__ */
|
|
1240
|
+
/* @__PURE__ */ import_react12.default.createElement(import_react_native12.View, { style: styles.inputCon }, /* @__PURE__ */ import_react12.default.createElement(
|
|
1261
1241
|
import_react_native12.TextInput,
|
|
1262
1242
|
{
|
|
1263
1243
|
style: styles.input,
|
|
1264
1244
|
multiline: true,
|
|
1265
1245
|
value: review,
|
|
1266
1246
|
onChangeText: (text) => setReview(text),
|
|
1267
|
-
placeholder: "Type review here.."
|
|
1247
|
+
placeholder: "Type review here..",
|
|
1248
|
+
verticalAlign: "top"
|
|
1268
1249
|
}
|
|
1269
1250
|
)),
|
|
1270
|
-
/* @__PURE__ */
|
|
1251
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
1271
1252
|
Button_default,
|
|
1272
1253
|
{
|
|
1273
1254
|
gutterBottom: 40,
|
|
@@ -1281,6 +1262,36 @@ var RatingInput = ({
|
|
|
1281
1262
|
)
|
|
1282
1263
|
));
|
|
1283
1264
|
};
|
|
1265
|
+
var RatingStars = ({
|
|
1266
|
+
rating = 0,
|
|
1267
|
+
size = 16,
|
|
1268
|
+
color = "#FFD700"
|
|
1269
|
+
}) => {
|
|
1270
|
+
const colors2 = useColors();
|
|
1271
|
+
const styles = import_react_native_size_matters9.ScaledSheet.create({
|
|
1272
|
+
root: {
|
|
1273
|
+
flexDirection: "row",
|
|
1274
|
+
alignItems: "center"
|
|
1275
|
+
}
|
|
1276
|
+
});
|
|
1277
|
+
return /* @__PURE__ */ import_react12.default.createElement(import_react_native12.View, { style: styles.root }, [...Array(Math.floor(rating))].map((_, index) => /* @__PURE__ */ import_react12.default.createElement(
|
|
1278
|
+
import_vector_icons5.Ionicons,
|
|
1279
|
+
{
|
|
1280
|
+
key: index,
|
|
1281
|
+
name: "star",
|
|
1282
|
+
size,
|
|
1283
|
+
color: colors2[color]?.main || color
|
|
1284
|
+
}
|
|
1285
|
+
)), [...Array(5 - Math.floor(rating))].map((_, index) => /* @__PURE__ */ import_react12.default.createElement(
|
|
1286
|
+
import_vector_icons5.Ionicons,
|
|
1287
|
+
{
|
|
1288
|
+
key: index,
|
|
1289
|
+
name: "star",
|
|
1290
|
+
size,
|
|
1291
|
+
color: colors2.textSecondary.light
|
|
1292
|
+
}
|
|
1293
|
+
)));
|
|
1294
|
+
};
|
|
1284
1295
|
|
|
1285
1296
|
// ../src/Components/Grid.tsx
|
|
1286
1297
|
var import_react13 = __toESM(require("react"));
|
|
@@ -1933,10 +1944,15 @@ var getPredictionsFromCoords = async (coords) => {
|
|
|
1933
1944
|
)).json();
|
|
1934
1945
|
const p = [];
|
|
1935
1946
|
for (let key in res.results) {
|
|
1936
|
-
const {
|
|
1947
|
+
const {
|
|
1948
|
+
formatted_address: description,
|
|
1949
|
+
place_id,
|
|
1950
|
+
types
|
|
1951
|
+
} = res.results[key];
|
|
1937
1952
|
p.push({
|
|
1938
1953
|
description,
|
|
1939
1954
|
id: place_id,
|
|
1955
|
+
types,
|
|
1940
1956
|
latLng: { lst: coords.latitude, lng: coords.longitude }
|
|
1941
1957
|
});
|
|
1942
1958
|
}
|
|
@@ -1948,10 +1964,11 @@ var getPredictionsFromQuery = async (query, country) => {
|
|
|
1948
1964
|
const res = await (await fetch(endpoint)).json();
|
|
1949
1965
|
const p = [];
|
|
1950
1966
|
for (let key in res.predictions) {
|
|
1951
|
-
const { description, place_id } = res.predictions[key];
|
|
1967
|
+
const { description, place_id, types } = res.predictions[key];
|
|
1952
1968
|
p.push({
|
|
1953
1969
|
description,
|
|
1954
|
-
id: place_id
|
|
1970
|
+
id: place_id,
|
|
1971
|
+
types
|
|
1955
1972
|
});
|
|
1956
1973
|
}
|
|
1957
1974
|
return p;
|
|
@@ -2139,6 +2156,7 @@ var SafeAreaView = ({
|
|
|
2139
2156
|
};
|
|
2140
2157
|
|
|
2141
2158
|
// ../src/Components/Divider.tsx
|
|
2159
|
+
var import_react19 = __toESM(require("react"));
|
|
2142
2160
|
var import_react_native19 = require("react-native");
|
|
2143
2161
|
var import_react_native_size_matters15 = require("react-native-size-matters");
|
|
2144
2162
|
var Divider = ({
|
|
@@ -2156,11 +2174,11 @@ var Divider = ({
|
|
|
2156
2174
|
...style
|
|
2157
2175
|
}
|
|
2158
2176
|
});
|
|
2159
|
-
return /* @__PURE__ */
|
|
2177
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react_native19.View, { style: styles.root });
|
|
2160
2178
|
};
|
|
2161
2179
|
|
|
2162
2180
|
// ../src/Components/Spinner.tsx
|
|
2163
|
-
var
|
|
2181
|
+
var import_react20 = __toESM(require("react"));
|
|
2164
2182
|
var import_react_native20 = require("react-native");
|
|
2165
2183
|
var import_react_native_size_matters16 = require("react-native-size-matters");
|
|
2166
2184
|
var Spinner = ({
|
|
@@ -2197,12 +2215,12 @@ var Spinner = ({
|
|
|
2197
2215
|
color: color === "light" ? colors2.white[2] : colors2.black[4]
|
|
2198
2216
|
}
|
|
2199
2217
|
});
|
|
2200
|
-
return /* @__PURE__ */
|
|
2218
|
+
return /* @__PURE__ */ import_react20.default.createElement(import_react_native20.View, { style: styles.root }, /* @__PURE__ */ import_react20.default.createElement(import_react_native20.View, { style: styles.content }, /* @__PURE__ */ import_react20.default.createElement(import_react_native20.ActivityIndicator, { color: colors2[color].dark, size }), label && /* @__PURE__ */ import_react20.default.createElement(Typography_default, { style: styles.label }, label)));
|
|
2201
2219
|
};
|
|
2202
2220
|
var Spinner_default = Spinner;
|
|
2203
2221
|
|
|
2204
2222
|
// ../src/Components/OTPInput.tsx
|
|
2205
|
-
var
|
|
2223
|
+
var import_react21 = __toESM(require("react"));
|
|
2206
2224
|
var import_react_native21 = require("react-native");
|
|
2207
2225
|
var import_react_native_size_matters17 = require("react-native-size-matters");
|
|
2208
2226
|
var OTPInput = ({
|
|
@@ -2214,8 +2232,8 @@ var OTPInput = ({
|
|
|
2214
2232
|
spacing = 1,
|
|
2215
2233
|
size = 45
|
|
2216
2234
|
}) => {
|
|
2217
|
-
const inputRefs = (0,
|
|
2218
|
-
() => Array(length).fill(0).map((_) =>
|
|
2235
|
+
const inputRefs = (0, import_react21.useMemo)(
|
|
2236
|
+
() => Array(length).fill(0).map((_) => import_react21.default.createRef()),
|
|
2219
2237
|
[length]
|
|
2220
2238
|
);
|
|
2221
2239
|
const onChangeHandler = (val, index) => {
|
|
@@ -2264,7 +2282,7 @@ var OTPInput = ({
|
|
|
2264
2282
|
fontSize: (0, import_react_native_size_matters17.ms)(size * 0.5)
|
|
2265
2283
|
}
|
|
2266
2284
|
});
|
|
2267
|
-
return /* @__PURE__ */
|
|
2285
|
+
return /* @__PURE__ */ import_react21.default.createElement(import_react_native21.View, { style: styles.root }, /* @__PURE__ */ import_react21.default.createElement(import_react_native21.View, { style: styles.container }, [...Array(length)].map((_, index) => /* @__PURE__ */ import_react21.default.createElement(
|
|
2268
2286
|
import_react_native21.TextInput,
|
|
2269
2287
|
{
|
|
2270
2288
|
ref: inputRefs[index],
|