@pienter/ui 0.11.0 → 0.13.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 +60 -0
- package/CONVENTIONS.md +10 -0
- package/components/form/block-editor/BlockEditor.vue +61 -44
- package/components/form/block-editor/block-editor.css +11 -0
- package/components/form/checkbox/Checkbox.vue +23 -7
- package/components/form/checkbox/checkbox.css +12 -0
- package/components/form/combobox/Combobox.vue +9 -2
- package/components/form/date-input/DateInput.vue +5 -0
- package/components/form/form/Form.vue +5 -2
- package/components/form/number-field/NumberField.vue +8 -3
- package/components/form/number-field/number-field.css +6 -0
- package/components/form/radio-group/RadioGroup.vue +23 -1
- package/components/form/radio-group/radio-group.css +9 -0
- package/components/form/record-form/RecordFields.vue +40 -2
- package/components/form/record-form/RecordForm.vue +7 -1
- package/components/form/record-form/record-form.css +14 -0
- package/components/form/record-form/types.ts +6 -0
- package/components/form/select/Select.vue +32 -6
- package/components/form/select/select.css +5 -0
- package/components/form/switch/Switch.vue +23 -7
- package/components/form/switch/switch.css +8 -0
- package/components/form/tags-input/TagsInput.vue +11 -5
- package/components/form/tags-input/tags-input.css +5 -0
- package/components/form/text-input/TextInput.vue +6 -1
- package/components/form/textarea/Textarea.vue +6 -1
- package/components/form/textarea/textarea.css +7 -0
- package/components/layout/record-layout/Panel.vue +44 -0
- package/components/layout/record-layout/RecordLayout.vue +35 -0
- package/components/layout/record-layout/record-layout.css +94 -0
- package/components/navigation/tabs/tabs.css +2 -0
- package/package.json +3 -1
- package/styles/4-components/form-field.css +7 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.pui-record-layout {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns:
|
|
5
|
+
minmax(0, var(--space-sidebar-width))
|
|
6
|
+
minmax(0, 1fr);
|
|
7
|
+
gap: var(--space-m);
|
|
8
|
+
align-items: start;
|
|
9
|
+
min-inline-size: 0;
|
|
10
|
+
|
|
11
|
+
@media (max-width: 56em) {
|
|
12
|
+
grid-template-columns: minmax(0, 1fr);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pui-record-layout__sidebar {
|
|
17
|
+
min-inline-size: 0;
|
|
18
|
+
|
|
19
|
+
& .pui-panel {
|
|
20
|
+
--pui-record-fields-columns: minmax(0, 1fr);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Same layer as record-details.css, so this has to outrank its field rule. */
|
|
24
|
+
& .pui-record-details .pui-record-details__field {
|
|
25
|
+
grid-template-columns: minmax(0, 1fr);
|
|
26
|
+
gap: var(--space-3xs);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (min-width: 24em) and (max-width: 56em) {
|
|
30
|
+
& .pui-panel {
|
|
31
|
+
--pui-record-fields-columns: repeat(2, minmax(0, 1fr));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.pui-record-layout__main {
|
|
37
|
+
display: grid;
|
|
38
|
+
gap: var(--space-s);
|
|
39
|
+
min-inline-size: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pui-panel {
|
|
43
|
+
--pui-record-fields-columns: minmax(0, 1fr);
|
|
44
|
+
|
|
45
|
+
display: grid;
|
|
46
|
+
gap: var(--space-s);
|
|
47
|
+
min-inline-size: 0;
|
|
48
|
+
padding: var(--space-m);
|
|
49
|
+
border: var(--stroke-sm) solid var(--border-clr-subtle);
|
|
50
|
+
border-radius: var(--radius-md);
|
|
51
|
+
background: var(--bg-clr-surface);
|
|
52
|
+
|
|
53
|
+
&[hidden] {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
& .pui-field:has(textarea) {
|
|
58
|
+
grid-column: 1 / -1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* An editable block list draws its own boxes and needs the width for
|
|
62
|
+
* its controls; a read-only one is content and keeps the panel. */
|
|
63
|
+
&:has(> .pui-block-editor:not([data-readonly='true'])) {
|
|
64
|
+
padding: var(--space-2xs) 0 0;
|
|
65
|
+
border: 0;
|
|
66
|
+
background: transparent;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (min-width: 48em) {
|
|
70
|
+
--pui-record-fields-columns: repeat(2, minmax(0, 1fr));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (max-width: 56em) {
|
|
74
|
+
padding: var(--space-s);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pui-panel__header {
|
|
79
|
+
display: grid;
|
|
80
|
+
gap: var(--space-3xs);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.pui-panel__title {
|
|
84
|
+
margin: 0;
|
|
85
|
+
font-size: var(--step-0);
|
|
86
|
+
font-weight: var(--fw-semibold);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.pui-panel__description {
|
|
90
|
+
margin: 0;
|
|
91
|
+
font-size: var(--step--1);
|
|
92
|
+
color: var(--text-clr-muted);
|
|
93
|
+
}
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pienter/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Shared Pienter UI components, styles, icons, and browser utilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"./components/Collapsible.vue": "./components/layout/collapsible/Collapsible.vue",
|
|
65
65
|
"./components/AppLayout.vue": "./components/layout/app-layout/AppLayout.vue",
|
|
66
66
|
"./components/PageHeader.vue": "./components/layout/page-header/PageHeader.vue",
|
|
67
|
+
"./components/Panel.vue": "./components/layout/record-layout/Panel.vue",
|
|
68
|
+
"./components/RecordLayout.vue": "./components/layout/record-layout/RecordLayout.vue",
|
|
67
69
|
"./components/Separator.vue": "./components/layout/separator/Separator.vue",
|
|
68
70
|
"./components/Table.vue": "./components/layout/table/Table.vue",
|
|
69
71
|
"./components/TableRow.vue": "./components/layout/table/TableRow.vue",
|
|
@@ -96,6 +96,13 @@
|
|
|
96
96
|
cursor: not-allowed;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
/* `data-readonly="true"`: same border, text and focus ring as the
|
|
100
|
+
* default state on a muted surface; the control stays in the tab order. */
|
|
101
|
+
.pui-field[data-readonly='true'] .pui-input,
|
|
102
|
+
.pui-field[data-readonly='true'] .pui-textarea {
|
|
103
|
+
background: var(--bg-clr-surface-2);
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
.pui-field[data-status='error'] .pui-input,
|
|
100
107
|
.pui-field[data-status='error'] .pui-textarea {
|
|
101
108
|
border-color: var(--border-clr-danger);
|