@navette-js/forms 0.0.0-stage → 1.0.0-beta.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/LICENSE +21 -0
- package/README.md +8 -2
- package/lib/builder.d.ts +128 -0
- package/lib/builder.js +309 -0
- package/lib/index.d.ts +871 -0
- package/lib/index.js +1957 -0
- package/package.json +62 -4
- package/views/asset.ejs +1 -0
- package/views/components/field-wrapper.ejs +39 -0
- package/views/components/rich-editor.ejs +472 -0
- package/views/components/text-input.ejs +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navette-js/forms",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-beta.1",
|
|
4
|
+
"description": "Form fields for Navette, the Node.js port of Filament.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./lib/index.d.ts",
|
|
10
|
+
"default": "./lib/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./builder": {
|
|
13
|
+
"types": "./lib/builder.d.ts",
|
|
14
|
+
"default": "./lib/builder.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"types": "./lib/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"lib",
|
|
20
|
+
"views",
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=24"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/NavetteJS/navette.git",
|
|
30
|
+
"directory": "packages/forms"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/NavetteJS/navette#readme",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/NavetteJS/navette/issues"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"navette",
|
|
38
|
+
"filament",
|
|
39
|
+
"admin",
|
|
40
|
+
"panel",
|
|
41
|
+
"livewire",
|
|
42
|
+
"express",
|
|
43
|
+
"node"
|
|
44
|
+
],
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@navette-js/actions": "1.0.0-beta.1",
|
|
47
|
+
"@navette-js/schemas": "1.0.0-beta.1",
|
|
48
|
+
"@navette-js/support": "1.0.0-beta.1",
|
|
49
|
+
"@tiptap/core": "^3.33.1",
|
|
50
|
+
"@tiptap/extension-highlight": "^3.33.1",
|
|
51
|
+
"@tiptap/extension-image": "^3.33.1",
|
|
52
|
+
"@tiptap/extension-subscript": "^3.33.1",
|
|
53
|
+
"@tiptap/extension-superscript": "^3.33.1",
|
|
54
|
+
"@tiptap/extension-table": "^3.33.1",
|
|
55
|
+
"@tiptap/extension-text-align": "^3.33.1",
|
|
56
|
+
"@tiptap/html": "^3.33.1",
|
|
57
|
+
"@tiptap/pm": "^3.33.1",
|
|
58
|
+
"@tiptap/starter-kit": "^3.33.1"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public",
|
|
62
|
+
"tag": "beta"
|
|
63
|
+
}
|
|
64
|
+
}
|
package/views/asset.ejs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%- assetUrl('js/filament/forms/components/' + path + '.js') %>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<%# Enveloppe de champ par défaut — port de Filament\Forms\Components\Field::wrapEmbeddedHtml() %>
|
|
2
|
+
<div data-field-wrapper class="<%- cls([locals.wrapperClass, 'fi-fo-field']) %>"<% if (locals.focusable) { %> tabindex="-1"<% } %>>
|
|
3
|
+
<% if (locals.hiddenLabel) { %>
|
|
4
|
+
<% if (locals.labelAsDiv) { %>
|
|
5
|
+
<div id="<%= id %>-label" class="fi-fo-field-label fi-sr-only">
|
|
6
|
+
<%= label %>
|
|
7
|
+
</div>
|
|
8
|
+
<% } else { %>
|
|
9
|
+
<label for="<%= id %>" class="fi-fo-field-label fi-sr-only">
|
|
10
|
+
<%= label %>
|
|
11
|
+
</label>
|
|
12
|
+
<% } %>
|
|
13
|
+
<% } else { %>
|
|
14
|
+
<div class="fi-fo-field-label-col">
|
|
15
|
+
<div class="fi-fo-field-label-ctn">
|
|
16
|
+
<%# Groupe de boutons : le libellé est un <div> référencé par aria-labelledby, pas un <label> %>
|
|
17
|
+
<<%- locals.labelAsDiv ? 'div id="' + id + '-label"' : 'label for="' + id + '"' %> class="fi-fo-field-label">
|
|
18
|
+
<%- labelPrefix %>
|
|
19
|
+
<span class="fi-fo-field-label-content">
|
|
20
|
+
<%= label %><% if (required) { %><sup class="fi-fo-field-label-required-mark">*</sup><% } %>
|
|
21
|
+
</span>
|
|
22
|
+
</<%- locals.labelAsDiv ? 'div' : 'label' %>>
|
|
23
|
+
<%# Après le libellé : indication (hint), icône et actions d'indication, en ligne et alignées à droite %>
|
|
24
|
+
<%- locals.afterLabel ?? '' %>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<% } %>
|
|
28
|
+
<% if (html !== '' || errorMessage !== null) { %>
|
|
29
|
+
<div class="fi-fo-field-content-col">
|
|
30
|
+
<%- html %>
|
|
31
|
+
<% if (errorMessage !== null) { %>
|
|
32
|
+
<p id="<%= id %>-error" data-validation-error class="fi-fo-field-wrp-error-message">
|
|
33
|
+
<%= errorMessage %>
|
|
34
|
+
</p>
|
|
35
|
+
<% } %>
|
|
36
|
+
</div>
|
|
37
|
+
<% } %>
|
|
38
|
+
<%- locals.after ?? '' %>
|
|
39
|
+
</div>
|