@pure-ds/core 0.4.18 → 0.4.19
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/CSS-INTELLISENSE-QUICK-REF.md +2 -2
- package/custom-elements.json +174 -170
- package/dist/types/pds.d.ts +2 -2
- package/dist/types/public/assets/js/pds.d.ts +3 -3
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/{pds-jsonform.d.ts → pds-form.d.ts} +10 -9
- package/dist/types/public/assets/pds/components/pds-form.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/node-api/pds-api.d.ts +31 -0
- package/dist/types/src/node-api/pds-api.d.ts.map +1 -0
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds.js +1 -1
- package/public/assets/js/app.js +6 -11
- package/public/assets/js/pds.js +3 -8
- package/public/assets/pds/components/{pds-jsonform.js → pds-form.js} +536 -45
- package/public/assets/pds/custom-elements.json +8 -8
- package/public/assets/pds/vscode-custom-data.json +63 -63
- package/readme.md +4 -4
- package/src/js/pds-core/pds-generator.js +3 -8
- package/src/js/pds-core/pds-ontology.js +5 -5
- package/src/js/pds.d.ts +2 -2
- package/dist/types/public/assets/pds/components/pds-jsonform.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"readme": "",
|
|
4
4
|
"modules": [
|
|
@@ -671,11 +671,11 @@
|
|
|
671
671
|
},
|
|
672
672
|
{
|
|
673
673
|
"kind": "javascript-module",
|
|
674
|
-
"path": "public/assets/pds/components/pds-
|
|
674
|
+
"path": "public/assets/pds/components/pds-form.js",
|
|
675
675
|
"declarations": [
|
|
676
676
|
{
|
|
677
677
|
"kind": "class",
|
|
678
|
-
"description": "<pds-
|
|
678
|
+
"description": "<pds-form>\n\nForm Actions:\nBy default, the form includes Submit and Reset buttons inside the <form> element.\n\nUsage options:\n1. Default buttons:\n <pds-form .jsonSchema=${schema}></pds-form>\n\n2. Customize labels:\n <pds-form .jsonSchema=${schema} submit-label=\"Save\" reset-label=\"Clear\"></pds-form>\n\n3. Hide reset button:\n <pds-form .jsonSchema=${schema} hide-reset></pds-form>\n\n4. Add extra buttons (slot):\n <pds-form .jsonSchema=${schema}>\n <button type=\"button\" slot=\"actions\"",
|
|
679
679
|
"name": "SchemaForm",
|
|
680
680
|
"members": [
|
|
681
681
|
{
|
|
@@ -953,9 +953,9 @@
|
|
|
953
953
|
],
|
|
954
954
|
"superclass": {
|
|
955
955
|
"name": "LitElement",
|
|
956
|
-
"module": "/public/assets/pds/components/pds-
|
|
956
|
+
"module": "/public/assets/pds/components/pds-form.js"
|
|
957
957
|
},
|
|
958
|
-
"tagName": "pds-
|
|
958
|
+
"tagName": "pds-form",
|
|
959
959
|
"customElement": true
|
|
960
960
|
}
|
|
961
961
|
],
|
|
@@ -965,15 +965,15 @@
|
|
|
965
965
|
"name": "SchemaForm",
|
|
966
966
|
"declaration": {
|
|
967
967
|
"name": "SchemaForm",
|
|
968
|
-
"module": "public/assets/pds/components/pds-
|
|
968
|
+
"module": "public/assets/pds/components/pds-form.js"
|
|
969
969
|
}
|
|
970
970
|
},
|
|
971
971
|
{
|
|
972
972
|
"kind": "custom-element-definition",
|
|
973
|
-
"name": "pds-
|
|
973
|
+
"name": "pds-form",
|
|
974
974
|
"declaration": {
|
|
975
975
|
"name": "SchemaForm",
|
|
976
|
-
"module": "public/assets/pds/components/pds-
|
|
976
|
+
"module": "public/assets/pds/components/pds-form.js"
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
]
|
|
@@ -65,6 +65,69 @@
|
|
|
65
65
|
}
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
|
+
{
|
|
69
|
+
"name": "pds-form",
|
|
70
|
+
"description": "<pds-form>\n\nForm Actions:\nBy default, the form includes Submit and Reset buttons inside the <form> element.\n\nUsage options:\n1. Default buttons:\n <pds-form .jsonSchema=${schema}></pds-form>\n\n2. Customize labels:\n <pds-form .jsonSchema=${schema} submit-label=\"Save\" reset-label=\"Clear\"></pds-form>\n\n3. Hide reset button:\n <pds-form .jsonSchema=${schema} hide-reset></pds-form>\n\n4. Add extra buttons (slot):\n <pds-form .jsonSchema=${schema}>\n <button type=\"button\" slot=\"actions\"",
|
|
71
|
+
"attributes": [
|
|
72
|
+
{
|
|
73
|
+
"name": "json-schema",
|
|
74
|
+
"description": ""
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "ui-schema",
|
|
78
|
+
"description": ""
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "options",
|
|
82
|
+
"description": ""
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "values",
|
|
86
|
+
"description": ""
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "action",
|
|
90
|
+
"description": ""
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "method",
|
|
94
|
+
"description": ""
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "disabled",
|
|
98
|
+
"description": "",
|
|
99
|
+
"valueSet": "v"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "hide-actions",
|
|
103
|
+
"description": "",
|
|
104
|
+
"valueSet": "v"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "submit-label",
|
|
108
|
+
"description": ""
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "reset-label",
|
|
112
|
+
"description": ""
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "hide-reset",
|
|
116
|
+
"description": "",
|
|
117
|
+
"valueSet": "v"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "hide-submit",
|
|
121
|
+
"description": "",
|
|
122
|
+
"valueSet": "v"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "hide-legend",
|
|
126
|
+
"description": "",
|
|
127
|
+
"valueSet": "v"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
68
131
|
{
|
|
69
132
|
"name": "pds-icon",
|
|
70
133
|
"description": "SVG Icon Web Component",
|
|
@@ -598,69 +661,6 @@
|
|
|
598
661
|
}
|
|
599
662
|
]
|
|
600
663
|
},
|
|
601
|
-
{
|
|
602
|
-
"name": "pds-jsonform",
|
|
603
|
-
"description": "<pds-jsonform>\n\nForm Actions:\nBy default, the form includes Submit and Reset buttons inside the <form> element.\n\nUsage options:\n1. Default buttons:\n <pds-jsonform .jsonSchema=${schema}></pds-jsonform>\n\n2. Customize labels:\n <pds-jsonform .jsonSchema=${schema} submit-label=\"Save\" reset-label=\"Clear\"></pds-jsonform>\n\n3. Hide reset button:\n <pds-jsonform .jsonSchema=${schema} hide-reset></pds-jsonform>\n\n4. Add extra buttons (slot):\n <pds-jsonform .jsonSchema=${schema}>\n <button type=\"button\" slot=\"actions\"",
|
|
604
|
-
"attributes": [
|
|
605
|
-
{
|
|
606
|
-
"name": "json-schema",
|
|
607
|
-
"description": ""
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
"name": "ui-schema",
|
|
611
|
-
"description": ""
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
"name": "options",
|
|
615
|
-
"description": ""
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"name": "values",
|
|
619
|
-
"description": ""
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"name": "action",
|
|
623
|
-
"description": ""
|
|
624
|
-
},
|
|
625
|
-
{
|
|
626
|
-
"name": "method",
|
|
627
|
-
"description": ""
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
"name": "disabled",
|
|
631
|
-
"description": "",
|
|
632
|
-
"valueSet": "v"
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
"name": "hide-actions",
|
|
636
|
-
"description": "",
|
|
637
|
-
"valueSet": "v"
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
"name": "submit-label",
|
|
641
|
-
"description": ""
|
|
642
|
-
},
|
|
643
|
-
{
|
|
644
|
-
"name": "reset-label",
|
|
645
|
-
"description": ""
|
|
646
|
-
},
|
|
647
|
-
{
|
|
648
|
-
"name": "hide-reset",
|
|
649
|
-
"description": "",
|
|
650
|
-
"valueSet": "v"
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"name": "hide-submit",
|
|
654
|
-
"description": "",
|
|
655
|
-
"valueSet": "v"
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
"name": "hide-legend",
|
|
659
|
-
"description": "",
|
|
660
|
-
"valueSet": "v"
|
|
661
|
-
}
|
|
662
|
-
]
|
|
663
|
-
},
|
|
664
664
|
{
|
|
665
665
|
"name": "pds-richtext",
|
|
666
666
|
"description": "RichText component",
|
package/readme.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Pure Design System (PDS)
|
|
1
|
+
# Pure Design System (PDS)
|
|
2
2
|
|
|
3
3
|
> ⚠️ **Beta Software** - APIs are stabilizing but may still change. Pin versions in production: `"@pure-ds/core": "~0.3.0"`
|
|
4
4
|
|
|
@@ -166,7 +166,7 @@ A growing set of PDS components:
|
|
|
166
166
|
- `<pds-icon>` — SVG sprite icons
|
|
167
167
|
- `<pds-drawer>` — Slide-out panels
|
|
168
168
|
- `<pds-tabstrip>` — Accessible tabs
|
|
169
|
-
- `<pds-
|
|
169
|
+
- `<pds-form>` — Forms from JSON Schema
|
|
170
170
|
- `<pds-upload>` — Drag & drop file upload
|
|
171
171
|
- `<pds-richtext>` — Rich text / Markdown editor
|
|
172
172
|
- `<pds-splitpanel>` — Resizable panes
|
|
@@ -707,9 +707,9 @@ Features:
|
|
|
707
707
|
- Undo/redo
|
|
708
708
|
- Markdown shortcuts
|
|
709
709
|
|
|
710
|
-
**`<pds-
|
|
710
|
+
**`<pds-form>`** - Dynamic forms from JSON Schema
|
|
711
711
|
```html
|
|
712
|
-
<pds-
|
|
712
|
+
<pds-form schema='{"type":"object","properties":{...}}'></pds-form>
|
|
713
713
|
```
|
|
714
714
|
|
|
715
715
|
Generates complete forms with validation from JSON Schema.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registry as pdsRegistry } from "./pds-registry.js";
|
|
1
|
+
import { registry as pdsRegistry } from "./pds-registry.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generator - A JS-config-first design system
|
|
@@ -1810,10 +1810,8 @@ form {
|
|
|
1810
1810
|
}
|
|
1811
1811
|
|
|
1812
1812
|
fieldset {
|
|
1813
|
-
margin: 0;
|
|
1814
|
-
padding: var(--spacing-5);
|
|
1813
|
+
margin: 0;
|
|
1815
1814
|
width: 100%;
|
|
1816
|
-
background-color: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
1817
1815
|
|
|
1818
1816
|
/* Unified styling for radio groups and checkbox groups */
|
|
1819
1817
|
&[role="radiogroup"],
|
|
@@ -3061,7 +3059,7 @@ dialog form {
|
|
|
3061
3059
|
margin: 0;
|
|
3062
3060
|
}
|
|
3063
3061
|
|
|
3064
|
-
/* Dialog fields - to open pds-
|
|
3062
|
+
/* Dialog fields - to open pds-form subforms */
|
|
3065
3063
|
.dialog-field {
|
|
3066
3064
|
margin-top: var(--spacing-3);
|
|
3067
3065
|
}
|
|
@@ -4231,9 +4229,6 @@ nav[data-dropdown] {
|
|
|
4231
4229
|
|
|
4232
4230
|
:where(fieldset) {
|
|
4233
4231
|
border: none;
|
|
4234
|
-
padding: var(--spacing-4);
|
|
4235
|
-
margin: 0 0 var(--spacing-4) 0;
|
|
4236
|
-
background-color: var(--color-surface-subtle);
|
|
4237
4232
|
}
|
|
4238
4233
|
|
|
4239
4234
|
:where(legend) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Pure Design System Ontology (PDS)
|
|
1
|
+
// Pure Design System Ontology (PDS)
|
|
2
2
|
// This file is the single source-of-truth metadata for primitives, components, tokens, themes and enhancements.
|
|
3
3
|
// Used by PDS.query() for searching and correlating concepts.
|
|
4
4
|
|
|
@@ -223,10 +223,10 @@ export const ontology = {
|
|
|
223
223
|
category: "feedback"
|
|
224
224
|
},
|
|
225
225
|
{
|
|
226
|
-
id: "pds-
|
|
226
|
+
id: "pds-form",
|
|
227
227
|
name: "JSON Form",
|
|
228
228
|
description: "Auto-generated form from JSON Schema",
|
|
229
|
-
selectors: ["pds-
|
|
229
|
+
selectors: ["pds-form"],
|
|
230
230
|
tags: ["form", "schema", "auto-generate"],
|
|
231
231
|
category: "form"
|
|
232
232
|
},
|
|
@@ -481,7 +481,7 @@ export const ontology = {
|
|
|
481
481
|
form: {
|
|
482
482
|
description: "Form inputs and controls",
|
|
483
483
|
primitives: ["button", "fieldset", "label-field", "form"],
|
|
484
|
-
components: ["pds-upload", "pds-
|
|
484
|
+
components: ["pds-upload", "pds-form", "pds-richtext", "pds-calendar"]
|
|
485
485
|
},
|
|
486
486
|
layout: {
|
|
487
487
|
description: "Page structure and content arrangement",
|
|
@@ -541,7 +541,7 @@ export const ontology = {
|
|
|
541
541
|
content: ["text", "typography", "body", "article"],
|
|
542
542
|
|
|
543
543
|
// Forms & Inputs
|
|
544
|
-
form: ["input", "field", "label", "button", "fieldset", "pds-
|
|
544
|
+
form: ["input", "field", "label", "button", "fieldset", "pds-form", "pds-upload", "pds-richtext", "pds-calendar", "required", "validation", "submit"],
|
|
545
545
|
input: ["form", "field", "text", "label", "required", "validation"],
|
|
546
546
|
field: ["form", "input", "label", "required"],
|
|
547
547
|
button: ["btn", "interactive", "action", "submit", "form", "btn-primary", "btn-secondary", "btn-working"],
|
package/src/js/pds.d.ts
CHANGED
|
@@ -217,7 +217,7 @@ export class PDS extends EventTarget {
|
|
|
217
217
|
|
|
218
218
|
export { PDS as default };
|
|
219
219
|
|
|
220
|
-
// ===== pds-
|
|
220
|
+
// ===== pds-form Types =====
|
|
221
221
|
|
|
222
222
|
export interface JsonFormOptions {
|
|
223
223
|
widgets?: {
|
|
@@ -358,7 +358,7 @@ export interface JsonFormEventMap {
|
|
|
358
358
|
|
|
359
359
|
declare global {
|
|
360
360
|
interface HTMLElementTagNameMap {
|
|
361
|
-
'pds-
|
|
361
|
+
'pds-form': SchemaForm;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pds-jsonform.d.ts","sourceRoot":"","sources":["../../../../../../public/assets/pds/components/pds-jsonform.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAcE;IAGF,yBAEC;IAaC,gBAA2B;IAC3B,cAAyB;IACzB,aAAwB;IACxB,YAAuB;IACvB,eAAoB;IACpB,qBAAwB;IACxB,oBAA2B;IAC3B,mBAAyB;IACzB,mBAAsB;IACtB,oBAAuB;IAiBzB,8CAEC;IACD,4BAEC;IAGD,oBAEC;IAkBD;;;MAIC;IAED,uBAEC;IAED,0BAMC;IAGD,+BAyBC;IA+ND,cAyCC;;CAu4CF"}
|