@undefine-ui/design-system 3.6.1 → 3.6.2

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.js CHANGED
@@ -10558,7 +10558,27 @@ var RHFGooglePlacesAutocomplete = ({
10558
10558
  }
10559
10559
  };
10560
10560
  }
10561
- return field.value;
10561
+ if (field.value.address || field.value.city || field.value.country) {
10562
+ const addressParts = [
10563
+ field.value.address,
10564
+ field.value.city,
10565
+ field.value.state,
10566
+ field.value.country
10567
+ ].filter(Boolean);
10568
+ const displayText = addressParts.join(", ");
10569
+ return {
10570
+ description: displayText,
10571
+ structured_formatting: {
10572
+ main_text: field.value.address || field.value.city || displayText,
10573
+ main_text_matched_substrings: [],
10574
+ secondary_text: addressParts.slice(1).join(", ")
10575
+ }
10576
+ };
10577
+ }
10578
+ if (field.value.description) {
10579
+ return field.value;
10580
+ }
10581
+ return null;
10562
10582
  };
10563
10583
  const handleChange = (newValue) => {
10564
10584
  onValueChange?.(newValue);