sprintify-ui 0.0.164 → 0.0.166

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.
Files changed (30) hide show
  1. package/README.md +34 -1
  2. package/dist/sprintify-ui.es.js +16799 -16560
  3. package/dist/style.css +1 -1
  4. package/dist/types/src/components/BaseAddressForm.vue.d.ts +45 -0
  5. package/dist/types/src/components/BaseAutocomplete.vue.d.ts +2 -2
  6. package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +1 -1
  7. package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +1 -1
  8. package/dist/types/src/components/BaseFieldI18n.vue.d.ts +1 -1
  9. package/dist/types/src/components/BaseInput.vue.d.ts +1 -1
  10. package/dist/types/src/components/BaseInputPercent.vue.d.ts +1 -1
  11. package/dist/types/src/components/BaseModalCenter.vue.d.ts +1 -1
  12. package/dist/types/src/components/BaseModalSide.vue.d.ts +1 -1
  13. package/dist/types/src/components/BaseNumber.vue.d.ts +1 -1
  14. package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +2 -2
  15. package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +1 -1
  16. package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +1 -1
  17. package/dist/types/src/components/index.d.ts +2 -1
  18. package/dist/types/src/index.d.ts +34 -0
  19. package/dist/types/src/types/Country.d.ts +4 -0
  20. package/dist/types/src/types/Region.d.ts +5 -0
  21. package/package.json +2 -1
  22. package/src/components/BaseAddressForm.stories.js +63 -0
  23. package/src/components/BaseAddressForm.vue +303 -0
  24. package/src/components/BaseInput.vue +15 -1
  25. package/src/components/index.ts +2 -0
  26. package/src/index.ts +14 -0
  27. package/src/lang/en.json +7 -0
  28. package/src/lang/fr.json +7 -0
  29. package/src/types/Country.ts +4 -0
  30. package/src/types/Region.ts +5 -0
package/README.md CHANGED
@@ -207,11 +207,44 @@ const notifications = computed(() => {
207
207
  </script>
208
208
  ```
209
209
 
210
+ ### Configure countries and regions globally
211
+
212
+ In order to make BaseAddressForm work correctly, you must import countries and regions to Sprintify UI.
213
+
214
+ Each country must adhere to the following interface:
215
+ - code: string
216
+ - name: string
217
+
218
+ Each region must adhere to the following interface:
219
+ - code: string
220
+ - name: string
221
+ - country_id: string
222
+
223
+ ```js
224
+ app.use(SprintifyUI, {
225
+ i18n,
226
+ http,
227
+
228
+ // Import while initializing Sprintify UI
229
+ countries: window.yourCountryList,
230
+ regions: window.yourRegionList,
231
+ });
232
+ ```
233
+
234
+ ### Using BaseAddressForm with Google Maps Autocomplete
235
+
236
+ Add this snipped to your HTML `<head>`. Replace `YOUR_API_KEY` with you API key.
237
+
238
+ ```html
239
+ <script defer async src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"
240
+ ></script>
241
+ ```
242
+
210
243
  ## Using components
211
244
 
212
245
  All components are globally available, you can use them without importation:
213
246
 
214
- ```vue
247
+ ```html
215
248
  <template>
216
249
  <BaseAlert title="Test" color="danger"></BaseAlert>
217
250
  </template>