sprintify-ui 0.0.164 → 0.0.165
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 +34 -1
- package/dist/sprintify-ui.es.js +2073 -2044
- package/dist/types/src/components/BaseAddressForm.vue.d.ts +45 -0
- package/dist/types/src/components/BaseAutocomplete.vue.d.ts +2 -2
- package/dist/types/src/components/BaseAutocompleteFetch.vue.d.ts +1 -1
- package/dist/types/src/components/BaseCharacterCounter.vue.d.ts +1 -1
- package/dist/types/src/components/BaseFieldI18n.vue.d.ts +1 -1
- package/dist/types/src/components/BaseInput.vue.d.ts +1 -1
- package/dist/types/src/components/BaseInputPercent.vue.d.ts +1 -1
- package/dist/types/src/components/BaseModalCenter.vue.d.ts +1 -1
- package/dist/types/src/components/BaseModalSide.vue.d.ts +1 -1
- package/dist/types/src/components/BaseNumber.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTagAutocomplete.vue.d.ts +2 -2
- package/dist/types/src/components/BaseTagAutocompleteFetch.vue.d.ts +1 -1
- package/dist/types/src/components/BaseTextareaAutoresize.vue.d.ts +1 -1
- package/dist/types/src/index.d.ts +34 -0
- package/dist/types/src/types/Country.d.ts +4 -0
- package/dist/types/src/types/Region.d.ts +5 -0
- package/package.json +2 -1
- package/src/components/BaseAddressForm.stories.js +63 -0
- package/src/components/BaseAddressForm.vue +303 -0
- package/src/components/BaseInput.vue +15 -1
- package/src/index.ts +14 -0
- package/src/lang/en.json +7 -0
- package/src/lang/fr.json +7 -0
- package/src/types/Country.ts +4 -0
- 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
|
-
```
|
|
247
|
+
```html
|
|
215
248
|
<template>
|
|
216
249
|
<BaseAlert title="Test" color="danger"></BaseAlert>
|
|
217
250
|
</template>
|