@navette-js/forms 0.0.0-stage → 1.0.0-beta.2
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 +306 -0
- package/lib/index.d.ts +866 -0
- package/lib/index.js +1947 -0
- package/package.json +61 -4
- package/views/asset.ejs +1 -0
- package/views/components/field-wrapper.ejs +39 -0
- package/views/components/rich-editor.ejs +471 -0
- package/views/components/text-input.ejs +32 -0
package/package.json
CHANGED
|
@@ -1,6 +1,63 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navette-js/forms",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
|
+
"description": "Form fields and validation for Navette admin panels.",
|
|
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
|
+
"admin",
|
|
39
|
+
"panel",
|
|
40
|
+
"livewire",
|
|
41
|
+
"express",
|
|
42
|
+
"node"
|
|
43
|
+
],
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@navette-js/actions": "1.0.0-beta.2",
|
|
46
|
+
"@navette-js/schemas": "1.0.0-beta.2",
|
|
47
|
+
"@navette-js/support": "1.0.0-beta.2",
|
|
48
|
+
"@tiptap/core": "^3.33.1",
|
|
49
|
+
"@tiptap/extension-highlight": "^3.33.1",
|
|
50
|
+
"@tiptap/extension-image": "^3.33.1",
|
|
51
|
+
"@tiptap/extension-subscript": "^3.33.1",
|
|
52
|
+
"@tiptap/extension-superscript": "^3.33.1",
|
|
53
|
+
"@tiptap/extension-table": "^3.33.1",
|
|
54
|
+
"@tiptap/extension-text-align": "^3.33.1",
|
|
55
|
+
"@tiptap/html": "^3.33.1",
|
|
56
|
+
"@tiptap/pm": "^3.33.1",
|
|
57
|
+
"@tiptap/starter-kit": "^3.33.1"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public",
|
|
61
|
+
"tag": "beta"
|
|
62
|
+
}
|
|
63
|
+
}
|
package/views/asset.ejs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%- assetUrl('js/filament/forms/components/' + path + '.js') %>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<%# Default field wrapper. %>
|
|
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
|
+
<%# Button groups: the label is a <div> referenced by aria-labelledby, not a <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
|
+
<%# After the label: hint, hint icon and hint actions, inline and right-aligned %>
|
|
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>
|