@pienter/ui 0.5.0 → 0.8.0
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/CHANGELOG.md +149 -0
- package/CONVENTIONS.md +91 -28
- package/README.md +66 -0
- package/components/display/record-details/RecordDetails.vue +61 -0
- package/components/display/record-details/record-details.css +37 -0
- package/components/display/record-details/types.ts +8 -0
- package/components/feedback/toast/Toast.vue +3 -4
- package/components/feedback/toast/ToastHost.vue +165 -0
- package/components/feedback/toast/toast.ts +116 -0
- package/components/feedback/toast/types.ts +48 -0
- package/components/form/block-editor/BlockEditor.vue +455 -0
- package/components/form/block-editor/block-editor.css +149 -0
- package/components/form/block-editor/types.ts +15 -0
- package/components/form/checkbox/Checkbox.vue +10 -2
- package/components/form/combobox/Combobox.vue +32 -39
- package/components/form/combobox/combobox.css +1 -1
- package/components/form/date-input/DateInput.vue +10 -2
- package/components/form/date-input/date-input.css +2 -17
- package/components/form/form/Form.vue +10 -9
- package/components/form/form/form.css +2 -22
- package/components/form/input-otp/InputOTP.vue +1 -1
- package/components/form/input-otp/input-otp.css +1 -1
- package/components/form/label/label.css +2 -11
- package/components/form/number-field/NumberField.vue +10 -3
- package/components/form/number-field/number-field.css +3 -3
- package/components/form/radio-group/RadioGroup.vue +1 -1
- package/components/form/record-form/RecordFields.vue +128 -0
- package/components/form/record-form/RecordForm.vue +116 -0
- package/components/form/record-form/fields.ts +20 -0
- package/components/form/record-form/record-form.css +15 -0
- package/components/form/record-form/types.ts +28 -0
- package/components/form/select/Select.vue +13 -4
- package/components/form/select/select.css +6 -9
- package/components/form/slider/Slider.vue +1 -1
- package/components/form/switch/Switch.vue +1 -1
- package/components/form/tags-input/TagsInput.vue +17 -2
- package/components/form/tags-input/tags-input.css +16 -12
- package/components/form/text-input/TextInput.vue +10 -2
- package/components/form/text-input/text-input.css +10 -129
- package/components/form/textarea/Textarea.vue +10 -2
- package/components/form/textarea/textarea.css +3 -19
- package/components/layout/app-layout/AppLayout.vue +116 -0
- package/components/layout/app-layout/app-layout.css +115 -0
- package/components/layout/index/Index.vue +373 -0
- package/components/layout/index/index.css +157 -0
- package/components/layout/index/useIndex.ts +407 -0
- package/components/layout/table/DataTable.vue +14 -1
- package/components/layout/table/Table.vue +12 -0
- package/components/layout/table/table.css +2 -1
- package/components/navigation/breadcrumb/Breadcrumb.vue +24 -5
- package/components/navigation/breadcrumb/breadcrumb.css +20 -0
- package/components/navigation/sidebar/Sidebar.vue +11 -8
- package/components/navigation/sidebar/sidebar.css +23 -16
- package/components/navigation/tabs/Tabs.vue +6 -0
- package/components/navigation/tabs/tabs.css +7 -7
- package/composables/useMenu.ts +20 -27
- package/package.json +17 -2
- package/styles/0-settings/colors.css +10 -0
- package/styles/4-components/form-field.css +112 -0
- package/styles/4-components/index.css +1 -0
- package/styles/main.css +1 -0
- package/utils/a11y/focus.ts +9 -3
- package/utils/a11y/index.ts +5 -1
- package/utils/a11y/live-region.ts +2 -1
- package/utils/cms/index.ts +283 -0
- package/utils/cms/schema.json +126 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:pienter:cms:backend:v1",
|
|
4
|
+
"title": "Pienter CMS backend contract v1",
|
|
5
|
+
"description": "Common response envelopes and normalized list query. Validate domain records and endpoint-specific sort/filter rules separately.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{ "$ref": "#/$defs/ListResponse" },
|
|
8
|
+
{ "$ref": "#/$defs/ItemResponse" },
|
|
9
|
+
{ "$ref": "#/$defs/ErrorResponse" },
|
|
10
|
+
{ "$ref": "#/$defs/ListQuery" }
|
|
11
|
+
],
|
|
12
|
+
"$defs": {
|
|
13
|
+
"Record": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "A domain record whose properties are defined by the endpoint.",
|
|
16
|
+
"additionalProperties": true
|
|
17
|
+
},
|
|
18
|
+
"ListResponse": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["data", "meta"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"data": { "type": "array", "items": { "$ref": "#/$defs/Record" } },
|
|
24
|
+
"meta": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["page", "page_size", "total"],
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"properties": {
|
|
29
|
+
"page": { "$ref": "#/$defs/Page" },
|
|
30
|
+
"page_size": { "$ref": "#/$defs/PageSize" },
|
|
31
|
+
"total": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"minimum": 0,
|
|
34
|
+
"maximum": 9007199254740991
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"ItemResponse": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"required": ["data"],
|
|
43
|
+
"additionalProperties": false,
|
|
44
|
+
"properties": { "data": { "$ref": "#/$defs/Record" } }
|
|
45
|
+
},
|
|
46
|
+
"ErrorResponse": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["error"],
|
|
49
|
+
"additionalProperties": false,
|
|
50
|
+
"properties": {
|
|
51
|
+
"error": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["code", "message"],
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"properties": {
|
|
56
|
+
"code": { "type": "string", "minLength": 1 },
|
|
57
|
+
"message": { "type": "string", "minLength": 1 },
|
|
58
|
+
"issues": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "$ref": "#/$defs/ValidationIssue" }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"ValidationIssue": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"required": ["path", "messages"],
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"properties": {
|
|
71
|
+
"path": {
|
|
72
|
+
"type": "array",
|
|
73
|
+
"description": "Object keys and zero-based array positions in the submitted value; an empty array addresses the whole value.",
|
|
74
|
+
"items": {
|
|
75
|
+
"oneOf": [
|
|
76
|
+
{ "type": "string", "minLength": 1 },
|
|
77
|
+
{ "type": "integer", "minimum": 0, "maximum": 9007199254740991 }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"messages": {
|
|
82
|
+
"type": "array",
|
|
83
|
+
"minItems": 1,
|
|
84
|
+
"items": { "type": "string", "minLength": 1 }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"ListQuery": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"description": "Normalized output from decoding URL query parameters, after defaults are applied. This is not a JSON request body.",
|
|
91
|
+
"required": ["page", "page_size", "search", "sort", "filters"],
|
|
92
|
+
"additionalProperties": false,
|
|
93
|
+
"properties": {
|
|
94
|
+
"page": { "$ref": "#/$defs/Page", "default": 1 },
|
|
95
|
+
"page_size": { "$ref": "#/$defs/PageSize", "default": 20 },
|
|
96
|
+
"search": { "type": "string", "default": "" },
|
|
97
|
+
"sort": {
|
|
98
|
+
"default": null,
|
|
99
|
+
"oneOf": [
|
|
100
|
+
{ "type": "null" },
|
|
101
|
+
{
|
|
102
|
+
"type": "object",
|
|
103
|
+
"required": ["key", "direction"],
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"properties": {
|
|
106
|
+
"key": { "type": "string", "minLength": 1 },
|
|
107
|
+
"direction": { "enum": ["asc", "desc"] }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"filters": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"default": {},
|
|
115
|
+
"propertyNames": {
|
|
116
|
+
"pattern": "^[a-zA-Z0-9_]+$",
|
|
117
|
+
"not": { "enum": ["__proto__", "prototype", "constructor"] }
|
|
118
|
+
},
|
|
119
|
+
"additionalProperties": { "type": "string" }
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"Page": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
|
|
124
|
+
"PageSize": { "type": "integer", "minimum": 1, "maximum": 100 }
|
|
125
|
+
}
|
|
126
|
+
}
|