@pretable/ui 0.0.3 → 0.0.8
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/dist/grid.css +72 -0
- package/dist/themes/excel.css +3 -0
- package/dist/themes/material.css +3 -0
- package/package.json +1 -1
package/dist/grid.css
CHANGED
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
font-size: var(--pretable-font-size-header);
|
|
52
52
|
font-weight: 500;
|
|
53
53
|
color: var(--pretable-text-header);
|
|
54
|
+
border: 0;
|
|
54
55
|
border-right: 1px solid var(--pretable-rule);
|
|
55
56
|
box-sizing: border-box;
|
|
56
57
|
}
|
|
@@ -110,6 +111,77 @@
|
|
|
110
111
|
background: var(--pretable-bg-grid-alt);
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
/* ---- Row grouping ---------------------------------------------------- */
|
|
115
|
+
|
|
116
|
+
/* Group headers borrow the header fill so the eye reads them as structure
|
|
117
|
+
rather than as another record. */
|
|
118
|
+
:where([data-pretable-group-row] [data-pretable-cell]) {
|
|
119
|
+
background: var(--pretable-bg-header);
|
|
120
|
+
color: var(--pretable-text-header);
|
|
121
|
+
font-weight: 600;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Depth indent is padding INSIDE the cell box. Indenting the row instead
|
|
125
|
+
would scroll the indent away from a pinned group column, compute ellipsis
|
|
126
|
+
truncation against the wrong width, and misplace the focus outline.
|
|
127
|
+
The literal fallback matters: a third-party theme that predates
|
|
128
|
+
--pretable-group-indent degrades to a visible indent, not a flat list. */
|
|
129
|
+
:where([data-pretable-group-cell]) {
|
|
130
|
+
gap: var(--pretable-cell-padding-x);
|
|
131
|
+
padding-left: calc(
|
|
132
|
+
var(--pretable-cell-padding-x) + var(--pretable-group-depth, 0) *
|
|
133
|
+
var(--pretable-group-indent, 16px)
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
:where([data-pretable-group-twisty]) {
|
|
138
|
+
flex: none;
|
|
139
|
+
width: 1em;
|
|
140
|
+
height: 1em;
|
|
141
|
+
padding: 0;
|
|
142
|
+
border: 0;
|
|
143
|
+
background: none;
|
|
144
|
+
color: inherit;
|
|
145
|
+
font: inherit;
|
|
146
|
+
line-height: 1;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
transition: rotate 120ms ease;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* The glyph points down when open; rotate it closed. */
|
|
152
|
+
:where([data-pretable-group-twisty][aria-expanded="false"]) {
|
|
153
|
+
rotate: -90deg;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:where([data-pretable-group-twisty]:focus-visible) {
|
|
157
|
+
outline: 2px solid var(--pretable-focus-ring);
|
|
158
|
+
outline-offset: 1px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:where([data-pretable-group-label]) {
|
|
162
|
+
min-width: 0;
|
|
163
|
+
overflow: hidden;
|
|
164
|
+
text-overflow: ellipsis;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
:where([data-pretable-group-count]) {
|
|
169
|
+
flex: none;
|
|
170
|
+
color: var(--pretable-text-dim);
|
|
171
|
+
font-weight: 400;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Data rows sit one twisty-width in, so their content lines up with sibling
|
|
175
|
+
group labels instead of hanging a chevron to the left. Only visible once
|
|
176
|
+
leaf and group rows share a depth — invisible in a screenshot, ragged in
|
|
177
|
+
every real grid. */
|
|
178
|
+
:where([data-pretable-group-leaf]) {
|
|
179
|
+
padding-left: calc(
|
|
180
|
+
var(--pretable-cell-padding-x) * 2 + 1em +
|
|
181
|
+
var(--pretable-group-depth, 0) * var(--pretable-group-indent, 16px)
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
113
185
|
/* Hover */
|
|
114
186
|
:where([data-pretable-row]:hover [data-pretable-cell]) {
|
|
115
187
|
background: var(--pretable-bg-hover);
|
package/dist/themes/excel.css
CHANGED
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
--pretable-row-height: 20px; /* 15pt at 96 DPI */
|
|
57
57
|
--pretable-header-height: 24px;
|
|
58
58
|
--pretable-cell-padding-x: 6px;
|
|
59
|
+
--pretable-group-indent: 12px;
|
|
59
60
|
--pretable-cell-padding-y: 2px;
|
|
60
61
|
--pretable-font-size-cell: 15px; /* Aptos Narrow 11pt */
|
|
61
62
|
--pretable-font-size-header: 13px;
|
|
@@ -74,6 +75,7 @@
|
|
|
74
75
|
--pretable-row-height: 24px;
|
|
75
76
|
--pretable-header-height: 32px;
|
|
76
77
|
--pretable-cell-padding-x: 8px;
|
|
78
|
+
--pretable-group-indent: 16px;
|
|
77
79
|
--pretable-cell-padding-y: 4px;
|
|
78
80
|
--pretable-font-size-cell: 15px;
|
|
79
81
|
--pretable-font-size-header: 14px;
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
--pretable-row-height: 32px;
|
|
84
86
|
--pretable-header-height: 40px;
|
|
85
87
|
--pretable-cell-padding-x: 12px;
|
|
88
|
+
--pretable-group-indent: 20px;
|
|
86
89
|
--pretable-cell-padding-y: 8px;
|
|
87
90
|
--pretable-font-size-cell: 15px;
|
|
88
91
|
--pretable-font-size-header: 14px;
|
package/dist/themes/material.css
CHANGED
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
--pretable-row-height: 48px;
|
|
60
60
|
--pretable-header-height: 52px;
|
|
61
61
|
--pretable-cell-padding-x: 16px;
|
|
62
|
+
--pretable-group-indent: 24px;
|
|
62
63
|
--pretable-cell-padding-y: 12px;
|
|
63
64
|
--pretable-font-size-cell: 14px; /* body-medium */
|
|
64
65
|
--pretable-font-size-header: 14px; /* label-large (px equal; weight differs in grid.css) */
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
--pretable-row-height: 40px;
|
|
77
78
|
--pretable-header-height: 44px;
|
|
78
79
|
--pretable-cell-padding-x: 12px;
|
|
80
|
+
--pretable-group-indent: 20px;
|
|
79
81
|
--pretable-cell-padding-y: 6px;
|
|
80
82
|
--pretable-font-size-cell: 12px; /* body-small */
|
|
81
83
|
--pretable-font-size-header: 12px;
|
|
@@ -85,6 +87,7 @@
|
|
|
85
87
|
--pretable-row-height: 56px;
|
|
86
88
|
--pretable-header-height: 64px;
|
|
87
89
|
--pretable-cell-padding-x: 24px;
|
|
90
|
+
--pretable-group-indent: 32px;
|
|
88
91
|
--pretable-cell-padding-y: 16px;
|
|
89
92
|
--pretable-font-size-cell: 14px;
|
|
90
93
|
--pretable-font-size-header: 14px;
|