@promodev/form-builder-vue3 0.0.0-stage → 0.1.1
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 +65 -2
- package/dist/form-builder-vue3.js +16691 -0
- package/dist/form-builder-vue3.umd.cjs +534 -0
- package/dist/index-DRqJOqUR.js +3484 -0
- package/dist/index-DiIAwrIy.js +21839 -0
- package/dist/style.css +862 -0
- package/dist/widget/form-builder-vue3.css +1 -0
- package/dist/widget/form-builder-vue3.iife.js +534 -0
- package/package.json +42 -4
package/README.md
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @promodev/form-builder-vue3
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Portage **Vue 3 / TypeScript** fidèle de `lucien-form-builder` : moteur de rendu des
|
|
4
|
+
formulaires de participation Houston Promo, avec validation (vee-validate 4),
|
|
5
|
+
internationalisation (vue-i18n, 17 locales) et 28 types de champs.
|
|
6
|
+
|
|
7
|
+
Deux façons de l'intégrer : **module** (bundler) ou **CDN** (widget autonome).
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Module (bundler / npm)
|
|
12
|
+
|
|
13
|
+
> Paquet **privé** publié sur **GitHub Packages**. Les consommateurs doivent ajouter à
|
|
14
|
+
> leur `.npmrc` : `@promogit:registry=https://npm.pkg.github.com` + un token GitHub.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @promodev/form-builder-vue3
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { createApp } from "vue";
|
|
22
|
+
import { HoustonForm } from "@promodev/form-builder-vue3";
|
|
23
|
+
import "@promodev/form-builder-vue3/style.css"; // opt-in — retirez pour styler vous-même
|
|
24
|
+
|
|
25
|
+
createApp({
|
|
26
|
+
components: { HoustonForm },
|
|
27
|
+
template: `<HoustonForm :form-id="'69ca3bd62f951904a0f8f085'" server="https://…" />`,
|
|
28
|
+
}).mount("#app");
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
> Le CSS est **optionnel** : ne l'importez pas si vous fournissez votre propre thème.
|
|
32
|
+
|
|
33
|
+
## CDN (widget autonome)
|
|
34
|
+
|
|
35
|
+
Le widget IIFE (`dist/widget/form-builder-vue3.iife.js`) embarque Vue et s'auto-monte.
|
|
36
|
+
|
|
37
|
+
> **Paquet privé** → unpkg / jsdelivr **ne peuvent pas** le servir (ils ne diffusent que
|
|
38
|
+
> le npm public). Auto-hébergez `dist/widget/form-builder-vue3.iife.js` et son `.css`
|
|
39
|
+
> (votre CDN/static, ou un asset de release GitHub), puis :
|
|
40
|
+
|
|
41
|
+
```html
|
|
42
|
+
<link rel="stylesheet" href="https://VOTRE-CDN/form-builder-vue3.css" />
|
|
43
|
+
<div id="houston-form" data-form-id="69ca3bd62f951904a0f8f085" data-server="https://…"></div>
|
|
44
|
+
<script src="https://VOTRE-CDN/form-builder-vue3.iife.js"></script>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Thème (CSS désactivable)
|
|
48
|
+
|
|
49
|
+
Toute l'apparence passe par des variables `--fb-*`. Surchargez-les sans toucher au CSS
|
|
50
|
+
de base :
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
:root {
|
|
54
|
+
--fb-color-primary: #0055ff;
|
|
55
|
+
--fb-radius: 6px;
|
|
56
|
+
--fb-field-gap: 15px;
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Build
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pnpm install
|
|
64
|
+
pnpm run build # module + widget + copie du CSS opt-in
|
|
65
|
+
pnpm test # tests unitaires (vitest)
|
|
66
|
+
```
|