sprintify-ui 0.12.26 → 0.12.28
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/README.md +13 -0
- package/dist/sprintify-ui.es.js +10175 -9935
- package/dist/tailwindcss/table.js +27 -0
- package/dist/types/components/BaseAutocompleteDrawer.vue.d.ts +1 -1
- package/dist/types/components/BaseBelongsTo.vue.d.ts +1 -1
- package/dist/types/components/BaseBelongsToFetch.vue.d.ts +1 -1
- package/dist/types/components/BaseHasMany.vue.d.ts +1 -1
- package/dist/types/composables/placesAutocomplete.d.ts +31 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/svg/BaseGoogleMapsLogo.vue.d.ts +2 -0
- package/package.json +2 -2
- package/src/components/BaseAddressForm.stories.js +25 -0
- package/src/components/BaseAddressForm.vue +244 -51
- package/src/components/BaseCard.stories.js +57 -0
- package/src/composables/placesAutocomplete.ts +194 -0
- package/src/index.ts +8 -1
- package/src/svg/BaseGoogleMapsLogo.vue +63 -0
package/README.md
CHANGED
|
@@ -214,6 +214,19 @@ Add this snippet to your HTML `<head>`. Replace `YOUR_API_KEY` with you API key.
|
|
|
214
214
|
<script defer async src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"></script>
|
|
215
215
|
```
|
|
216
216
|
|
|
217
|
+
Both Google Places APIs are supported, so existing keys keep working without changes:
|
|
218
|
+
|
|
219
|
+
- **Places API (New)** is used when enabled on the key's Google Cloud project. Suggestions are shown in a Sprintify dropdown with the required Google Maps attribution.
|
|
220
|
+
- **Places API (Legacy)** is used automatically when the key is not allowed to use the new API (Google's own autocomplete widget).
|
|
221
|
+
|
|
222
|
+
The API is detected on the first search and remembered for the page. To skip detection, set it explicitly:
|
|
223
|
+
|
|
224
|
+
```js
|
|
225
|
+
app.use(SprintifyUI, {
|
|
226
|
+
googlePlacesApi: 'auto', // 'auto' (default) | 'new' | 'legacy'
|
|
227
|
+
});
|
|
228
|
+
```
|
|
229
|
+
|
|
217
230
|
## Using components
|
|
218
231
|
|
|
219
232
|
All components are globally available, you can use them without importation:
|