@hoddy-ui/next 2.0.61 → 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 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
@@ -1148,7 +1148,8 @@ var Popup = ({
1148
1148
  // ../src/Components/StarRating.tsx
1149
1149
  var RatingStars = ({
1150
1150
  rating = 0,
1151
- size = 16
1151
+ size = 16,
1152
+ color = "#FFD700"
1152
1153
  }) => {
1153
1154
  const colors2 = useColors();
1154
1155
  const styles = import_react_native_size_matters9.ScaledSheet.create({
@@ -1157,7 +1158,15 @@ var RatingStars = ({
1157
1158
  alignItems: "center"
1158
1159
  }
1159
1160
  });
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
+ 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(
1161
1170
  import_vector_icons5.Ionicons,
1162
1171
  {
1163
1172
  key: index,
@@ -1170,7 +1179,8 @@ var RatingStars = ({
1170
1179
  var RatingInput = ({
1171
1180
  onSubmit: _onSubmit,
1172
1181
  rating = 0,
1173
- size = 16
1182
+ size = 16,
1183
+ color = "primary"
1174
1184
  }) => {
1175
1185
  const [showReviewsModal, setShowReviewsModal] = (0, import_react12.useState)(false);
1176
1186
  const [rate, setRate] = (0, import_react12.useState)(0);
@@ -1225,7 +1235,7 @@ var RatingInput = ({
1225
1235
  style: { marginLeft: 10 },
1226
1236
  name: index < rate ? "star" : "star-outline",
1227
1237
  size,
1228
- color: colors2.primary.light
1238
+ color: colors2[color]?.main || color
1229
1239
  }
1230
1240
  )
1231
1241
  ))), /* @__PURE__ */ React.createElement(
@@ -1264,7 +1274,8 @@ var RatingInput = ({
1264
1274
  multiline: true,
1265
1275
  value: review,
1266
1276
  onChangeText: (text) => setReview(text),
1267
- placeholder: "Type review here.."
1277
+ placeholder: "Type review here..",
1278
+ verticalAlign: "top"
1268
1279
  }
1269
1280
  )),
1270
1281
  /* @__PURE__ */ React.createElement(
@@ -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 { formatted_address: description, place_id } = res.results[key];
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;