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